/* ALP monthly tariffs: the same navy, orange selection and compact white cards. */
.tariffs-mode #country{display:none}
.tariffs-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px;flex:none}
.tariff-month-navigation{display:flex;align-items:center;gap:8px;min-width:0}
.tariff-month-navigation>.icon-button{color:var(--muted);width:44px;height:44px;min-height:44px}
.tariff-month-navigation .fieldbox{width:230px;min-height:52px}
.tariff-current{font-size:.9rem;white-space:nowrap}
.tariffs-card{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;max-width:100%;padding:14px 14px 0;margin-bottom:0;overflow:hidden}
/* Months change with the existing controls; the table only scrolls vertically. */
.tariff-scroll{flex:1;width:100%;max-width:100%;min-width:0;overflow-x:hidden;overflow-y:auto;touch-action:pan-y pinch-zoom;overscroll-behavior:none;overflow-anchor:none;scrollbar-gutter:stable;isolation:isolate;scrollbar-width:thin;scrollbar-color:#a8bdd4 transparent}
.tariffs-table{--party-width:min(32%,280px);--resource-width:min(23%,168px);width:100%;min-width:0;max-width:100%;table-layout:fixed}
.tariff-party-col{width:var(--party-width)}
.tariff-resource-col{width:var(--resource-width)}
.tariff-month-col{width:auto}
.tariffs-table th,.tariffs-table td{padding:4px 12px;border-bottom:1px solid var(--line);height:48px}
.tariffs-table thead th{height:60px;z-index:3;white-space:normal;overflow-wrap:anywhere}
.tariffs-table :is(.tariff-party,.tariff-resource-head,.tariff-resource-cell){background:#fff;border-right:1px solid var(--line);text-align:left}
.tariffs-table thead :is(.tariff-party,.tariff-resource-head){background:#eff4fa}
.tariffs-table tbody th{position:static;color:inherit;font-size:inherit;font-weight:400;overflow-wrap:anywhere}
.tariffs-table tbody .tariff-party{font-size:1rem;line-height:1.45}
.tariffs-table tbody .tariff-resource-cell{background:#fff}
.tariffs-table .tariff-month-head{text-align:center}
.tariff-month-head small{display:block;margin-top:3px;font-size:.8rem;font-weight:400;opacity:.85}
.tariffs-table .tariff-month-head.is-current{color:#a84e00;background:#fff1e4;box-shadow:inset 0 3px var(--orange)}
.tariffs-table .tariff-pair.alternate :is(td,.tariff-party,.tariff-resource-cell){background:#f9fbfe}
.tariffs-table .tariff-price-cell.is-current{background:#fffaf5}
.tariffs-table .tariff-pair.alternate .tariff-price-cell.is-current{background:#fff7ee}
.tariffs-table .tariff-pair tr:first-child :is(td,.tariff-resource-cell){border-bottom:0}
.tariffs-table .tariff-pair:last-child :is(td,th){border-bottom:0}
.tariff-resource{display:flex;align-items:center;gap:8px;font-size:.875rem;line-height:1.3}
.tariff-resource>span{min-width:0;overflow-wrap:anywhere}
.tariff-resource .icon{width:22px;height:22px}
.tariff-resource.electricity>.icon{color:var(--orange)}
.tariff-resource.water>.icon{color:var(--blue)}
.tariff-resource small{display:block;font-size:.8125rem;color:var(--muted);margin-top:2px}
.tariff-price{display:flex;align-items:center;justify-content:center;gap:7px;min-width:0;min-height:44px;width:100%;padding:6px 4px;border:1px solid transparent;background:transparent;color:#285f91;font-weight:600;font-size:1rem;font-variant-numeric:tabular-nums;white-space:normal;overflow-wrap:anywhere}
.tariff-price:hover,.tariff-price:focus-visible{background:var(--choice-fill);border-color:var(--choice-outline)}
.tariff-price.is-unset{color:#8495ab;font-weight:400}
.tariff-add{color:#6483a7;font-size:1.1rem}
.tariffs-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 8px;color:var(--muted);font-size:.875rem;flex:none;border-top:1px solid var(--line)}
.tariff-editor-dialog{width:min(620px,calc(100vw - 32px))}
.tariff-editor-person{padding:6px 0 22px}
.tariff-editor-person h3{font-size:1.125rem;line-height:1.4;margin:0 0 10px}
.tariff-editor-person>span{display:flex;align-items:center;gap:8px;color:var(--muted)}
.tariff-editor-person .icon{width:20px;height:20px;color:var(--orange)}
.tariff-editor-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.tariff-editor-field{display:flex;flex-direction:column;gap:12px;min-width:0}
.tariff-editor-field .tariff-resource{font-size:1rem}
.tariff-input-wrap{display:flex;align-items:center;gap:8px;min-width:0}
.tariff-input-wrap input{width:100%;min-width:0;height:48px;font-size:18px;font-variant-numeric:tabular-nums}
.tariff-input-wrap>span{font-size:.875rem;color:var(--muted);white-space:nowrap}
.tariff-input-help{color:var(--muted);font-size:.875rem;line-height:1.5;margin:18px 0 0}
.tariff-error{color:#bf3535;font-size:.875rem;line-height:1.5;margin:12px 0 0}
@media(max-width:1050px){
 .tariffs-table th,.tariffs-table td{padding-left:8px;padding-right:8px}
}
@media(max-width:700px){
 .tariffs-toolbar{align-items:flex-start;flex-direction:column;gap:10px;margin-bottom:12px}
 .tariff-month-navigation{width:100%;flex-wrap:wrap}
 .tariff-current{order:2}
 .tariff-month-navigation .fieldbox{flex:1;width:auto;min-width:180px}
 .tariffs-card{padding:8px 8px 0}
 .tariffs-table tbody .tariff-party{font-size:.95rem}
 .tariff-editor-fields{grid-template-columns:1fr}
}
.tariffs-table[data-compact="true"]{--party-width:36%;--resource-width:29%}
.tariffs-table[data-compact="true"] .tariff-resource{flex-direction:column;align-items:flex-start;gap:4px}
