:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #172f30;
  background: #f3f6f3;
  --ink: #172f30;
  --muted: #546965;
  --line: #dbe5df;
  --green: #17604f;
  --teal: #122a2d;
  --paper: #fff;
  --red: #94392f;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
a { color: var(--green); }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid #c67622; outline-offset: 3px; }
.top { color: #ebf7ed; background: var(--teal); }
.bar {
  max-width: 1300px; margin: auto; padding: 0 32px; min-height: 76px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 11px; line-height: 1.15; white-space: nowrap; }
.brand strong { font-size: 1.13rem; }
.brand small { color: #adccc2; margin-top: 4px; }
.brand-mark {
  width: 38px; height: 38px; color: #d9f497; background: #264449; border-radius: 10px;
  display: inline-grid; place-items: center; flex: 0 0 auto;
}
.brand-mark svg { width: 23px; height: 23px; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav button, .logout { border: 0; background: transparent; color: #d4e8df; font-size: .88rem; }
.nav button { min-height: 42px; padding: 9px 13px; border-radius: 7px; }
.nav button:hover, .nav button[aria-current] { background: #2a4a49; color: #fff; }
.logout { min-height: 42px; padding: 6px 2px; }
.logout:hover { text-decoration: underline; }
.badge {
  display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 14px; background: #d9f497;
  color: #213623; font-size: .72rem; font-weight: 700;
}
main { max-width: 1300px; padding: 32px; margin: auto; }
.heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 15px; margin: 0 0 24px; }
h1 { font-size: clamp(2rem,4vw,2.65rem); letter-spacing: -.045em; line-height: 1.08; margin: 0; }
h2 { margin: 0; font-size: 1.2rem; letter-spacing: -.015em; }
p { margin: 0; color: var(--muted); line-height: 1.5; }
.heading p, .section-head p { margin-top: 6px; }
small { display: block; font-size: .79rem; color: var(--muted); line-height: 1.4; }
strong { font-weight: 680; }
.demo {
  background: #fff4db; color: #654a1f; padding: 11px 14px; border: 1px solid #ebd7ad;
  border-radius: 8px; margin-bottom: 22px; font-size: .88rem;
}
.summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.metric {
  border: 1px solid var(--line); border-radius: 12px; padding: 17px 18px; min-height: 119px; background: var(--paper);
}
.metric.emphasis { background: #e4efe5; border-color: #d2e3d5; }
.metric > span { font-size: .84rem; font-weight: 640; color: #405b55; display: block; }
.metric > strong { display: block; font-size: clamp(1.35rem,2.7vw,2.1rem); margin: 5px 0 1px; letter-spacing: -.055em; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 13px; }
main > .panel + .panel { margin-top: 20px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; }
.section-head p { font-size: .87rem; }
.primary,.secondary,.quiet,.portal,.file {
  min-height: 40px; padding: 8px 12px; border-radius: 7px; border: 1px solid transparent;
  font-weight: 660; font-size: .83rem; line-height: 1.3; display: inline-flex; align-items: center; justify-content: center;
}
.primary { color: white; background: var(--green); }
.primary:hover { background: #0e4a3d; }
.secondary { background: #fff; color: var(--green); border-color: #bfd2c7; }
.secondary:hover,.quiet:hover,.portal:hover,.file:hover { background: #edf5ef; }
.quiet,.portal,.file { color: var(--green); text-decoration: none; background: transparent; }
.actions { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.connections { border-top: 1px solid var(--line); padding: 0 22px; }
.connection {
  display: grid; grid-template-columns: minmax(160px,1fr) minmax(230px,1.6fr) auto;
  align-items: center; padding: 11px 0; gap: 12px;
}
.connection + .connection { border-top: 1px solid var(--line); }
.connection strong { font-size: .89rem; }
.connection small { margin-top: 3px; }
.connection-status { overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: .86rem; }
th { color: #48615a; background: #f2f6f2; font-size: .76rem; font-weight: 700; }
td, th { padding: 11px 10px; border-top: 1px solid var(--line); }
td:first-child, th:first-child { padding-left: 22px; }
td:last-child, th:last-child { padding-right: 22px; }
td small { margin-top: 4px; overflow-wrap: anywhere; }
td.amount { font-weight: 690; white-space: nowrap; }
.pill { display: inline-block; padding: 4px 8px; border-radius: 6px; font-weight: 680; font-size: .75rem; }
.unpaid { color: #8e3d29; background: #faeee7; }
.paid { color: #1e634a; background: #e7f3e9; }
.unknown { color: #675324; background: #fbf2dd; }
.past,.error { color: var(--red); }
.empty { border-top: 1px solid var(--line); padding: 24px 22px; color: var(--muted); font-size: .9rem; }
.supply-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: start; }
.supply > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; padding: 17px 18px; }
.supply h2 { margin: 6px 0 2px; }
.supply header p { overflow-wrap: anywhere; }
.energy,.period-status { font-size: .72rem; color: var(--green); font-weight: 700; }
.period-list { list-style: none; margin: 0; padding: 0; }
.period { border-top: 1px solid var(--line); padding: 13px 18px; }
.period-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.period-head small { margin-top: 5px; }
.period-status { display: inline-block; margin-left: 4px; }
.period p { margin: 7px 0 3px; font-size: .84rem; overflow-wrap: anywhere; }
.period-actions { margin-top: 9px; }
.supply footer { display: flex; flex-wrap: wrap; gap: 6px; padding: 13px 18px; border-top: 1px solid var(--line); }
.filters { display: flex; gap: 12px; padding: 15px 22px; flex-wrap: wrap; }
.alert-list,.payment-history { margin: 0; list-style: none; padding: 0; }
.alert-list li { border-top: 1px solid var(--line); padding: 14px 22px; }
.payment-history li { padding: 8px 0; }
dialog {
  color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 14px;
  width: min(500px,calc(100vw - 26px)); padding: 20px; max-height: calc(100dvh - 32px);
  box-shadow: 0 15px 75px #11262640;
}
dialog::backdrop { background: #112c35a0; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 13px; }
.icon { border: 0; border-radius: 7px; padding: 0 10px; height: 40px; background: #edf4ef; color: var(--ink); font-size: 1.45rem; }
form { display: grid; gap: 12px; }
label { display: grid; min-width: 0; gap: 4px; font-size: .84rem; font-weight: 670; }
input:not([type=checkbox]),select {
  color: var(--ink); border: 1px solid #bfcec6; border-radius: 7px; padding: 8px; min-height: 42px;
  width: 100%; background: #fff; font-size: 1rem;
}
input[readonly] { background: #edf2ef; }
label.check { display: flex; align-items: center; gap: 7px; min-height: 29px; }
label.check input { width: 17px; height: 17px; accent-color: var(--green); }
.pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.steps { color: var(--muted); margin: 0; padding-left: 20px; font-size: .84rem; line-height: 1.5; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; }
.error:empty { display: none; }
.login { display: grid; place-items: center; min-height: 100dvh; }
.login-card { width: min(100%,410px); padding: 26px; }
.login-card h1 { margin: 11px 0 6px; }
.login-card form { margin-top: 17px; }
.login-card .demo { margin: 0; }
.loading { padding: 30px; }
#toast {
  position: fixed; z-index: 2; left: 50%; bottom: 18px; transform: translateX(-50%); width: max-content;
  max-width: calc(100vw - 36px); padding: 11px 17px; border-radius: 9px; background: var(--teal); color: #fff;
  visibility: hidden; font-size: .87rem; box-shadow: 0 3px 20px #0002;
}
#toast.shown { visibility: visible; }
@media (max-width: 920px) {
  .bar,main { padding-left: 20px; padding-right: 20px; }
  .bar { gap: 15px; }
  .summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 670px) {
  .bar { min-height: 0; display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 11px 14px 7px; }
  .nav { order: 3; grid-column: 1 / -1; gap: 3px; flex-wrap: nowrap; overflow-x: auto; }
  .nav button { padding: 7px 8px; font-size: .77rem; white-space: nowrap; }
  main { padding: 20px 13px; }
  .heading { align-items: flex-start; flex-wrap: wrap; margin-bottom: 15px; }
  .summary { gap: 8px; margin-bottom: 14px; }
  .metric { padding: 11px; min-height: 92px; }
  .metric > span { font-size: .75rem; }
  .section-head { flex-wrap: wrap; padding: 14px; }
  .connection { grid-template-columns: 1fr auto; gap: 2px 5px; }
  .connection-status { grid-column: 1 / -1; grid-row: 2; }
  .connections { padding: 0 14px; }
  .supply-grid { grid-template-columns: 1fr; }
  .filters { padding: 13px; }
  table,tbody,tr,td { display: block; }
  thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  tr { display: grid; grid-template-columns: 1fr 1fr; padding: 9px 14px; border-top: 1px solid var(--line); }
  td, td:first-child, td:last-child { padding: 5px 6px 5px 0; border: 0; }
  td:first-child, td:last-child { grid-column: 1 / -1; }
  td:not(:first-child):not(:last-child)::before { display: block; content: attr(data-label); font-size: .71rem; color: var(--muted); }
}
.custom-provider:not([hidden]) { display: grid; gap: 12px; }
.pending-list { list-style: none; margin: 0; padding: 0; }
.pending-row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 5px 12px; padding: 10px 22px; border-top: 1px solid var(--line);
}
.pending-row strong { font-size: .89rem; }
.pending-row small { margin-top: 3px; }
.top { background: #14263b; }
.brand-mark { background: #243d59; color: #b9d7ff; }
.nav button:hover,.nav button[aria-current] { background: #2a4563; }
:root { background: #f3f6fa; --ink:#172940; --muted:#526076; --line:#dce4ee; --green:#214e83; --teal:#14263b; }
.heading { align-items:center; }
.group-head { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.group-head span { background:#e0e9f3; padding:2px 9px; border-radius:20px; font-size:.85rem; }
.group-head button { margin-left:auto; }
.supply-grid { grid-template-columns:repeat(3,minmax(0,1fr)); align-items:stretch; }
.supply { --accent:#21568c; --tint:#e8f2ff; display:flex; min-width:0; flex-direction:column; border-top:4px solid var(--accent); box-shadow:0 3px 11px #14263b0c; }
.supply-gas { --accent:#83540e; --tint:#fff2d9; }
.supply-unknown { --accent:#665282; --tint:#f2ebfa; }
.supply > header { gap:4px; padding:17px 18px 13px; }
.supply h2 { font-size:1.2rem; line-height:1.24; margin:9px 0 4px; }
.supply header p { font-size:.82rem; }
.supply-type { display:flex; gap:8px; align-items:center; color:var(--accent); font-size:.83rem; font-weight:700; }
.supply-symbol { display:grid; place-items:center; width:31px; height:31px; border-radius:8px; background:var(--tint); font-size:1.2rem; }
.supply-number,.supply-fact strong { font-variant-numeric:tabular-nums; }
.supply-body { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.25fr); margin:0 18px 12px; border-radius:9px; background:#f5f8fc; padding:11px 12px; gap:8px 10px; flex:1; }
.supply-fact strong { display:block; margin:3px 0; }
.supply-fact p { margin-top:4px; font-size:.86rem; }
.supply-fact .pill { margin-top:5px; }
.supply-note { color:#705322; margin:0 18px 12px; background:#fbf3e3; padding:6px 9px; border-radius:6px; font-size:.82rem; }
.supply footer { padding:9px 18px; }
.supply-periods { border-top:1px solid var(--line); }
.supply-periods summary,.archive summary { padding:12px 18px; cursor:pointer; color:var(--green); font-size:.9rem; font-weight:650; }
.archive { margin:16px 0; }
.archive summary { padding-left:0; }
.archive .supply-grid { margin-top:8px; }
.overview-heading { margin:26px 0 12px; }
.summary { grid-template-columns:repeat(3,minmax(0,1fr)); }
.alert-list li { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px 12px; }
@media (max-width: 1000px) { .supply-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 670px) {
  .pending-row { padding: 10px 14px; }
  .supply-grid { grid-template-columns:1fr; gap:12px; }
  .group-head button { padding-left:6px; padding-right:6px; }
  .summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
