:root{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif;color:#15283b;background:#f5f8fa;font-synthesis:none}*{box-sizing:border-box}body{margin:0;padding-bottom:env(safe-area-inset-bottom)}header{height:76px;background:#10263e;color:#fff;display:flex;justify-content:space-between;align-items:center;padding:0 max(20px,calc((100vw - 800px)/2));box-shadow:0 2px 12px #172c4222}.brand{display:flex;gap:11px;align-items:center}.brand strong{font-size:18px}.brand small{display:block;font-size:11px;color:#c6dae7;letter-spacing:.06em;margin-top:3px}.logo{font-size:32px;border:1px solid #638094;border-radius:12px;width:42px;height:42px;display:grid;place-items:center}main{max-width:800px;margin:auto;padding:28px 18px 70px}h1{font-size:clamp(26px,6vw,36px);letter-spacing:-.04em;margin:4px 0 12px}h2{font-size:18px;margin:0 0 16px}p{color:#5c6c7e;line-height:1.55}label{display:block;font-weight:650;margin:14px 0 7px;font-size:14px}.eyebrow{font-size:11px;font-weight:800;letter-spacing:.18em;color:#07848b}.panel,.meter{background:white;border:1px solid #e1e9ef;border-radius:17px;padding:20px;box-shadow:0 8px 24px #182d4510}.panel{margin:18px 0}.narrow{max-width:430px;margin:55px auto}.tabs{display:flex;background:#e8eef2;padding:5px;border-radius:14px;margin-bottom:28px;gap:5px}.tabs button{flex:1;padding:12px;border:0;border-radius:10px;background:transparent;color:#65758a;font-weight:700;font-size:15px}.tabs button.active{background:white;color:#0f5664;box-shadow:0 2px 5px #19364b20}input,textarea{border:1px solid #cbd7e0;border-radius:11px;padding:12px 14px;width:100%;font:inherit;background:white;color:#10263e}input:focus,textarea:focus{outline:2px solid #0a8995;outline-offset:1px}.datewrap{max-width:300px;margin:20px 0}.cards{display:grid;gap:14px;margin:22px 0}.meter header{all:unset;display:flex;justify-content:space-between;align-items:center}.meter-title{font-size:19px;font-weight:750}.meter-icon{font-size:27px;margin-right:9px}.status{font-size:12px;border-radius:30px;padding:5px 9px;color:#566b7c;background:#edf2f5}.status.ok{background:#e0f7eb;color:#146344}.status.busy{background:#e9f5fb;color:#14597d}.meter .photo-row{display:flex;gap:12px;align-items:center;margin-top:15px}.photo-btn{padding:12px 15px;border-radius:12px;border:1px solid #b6d6d7;color:#086b73;background:#e8f7f7;font-weight:700;cursor:pointer;display:inline-block;margin:0;white-space:nowrap}.photo-preview{height:84px;width:84px;object-fit:cover;border-radius:11px;border:1px solid #d9e1e6}.meter .reading-line{display:grid;grid-template-columns:1fr auto;align-items:end;gap:12px}.unit{padding-bottom:12px;color:#697e8d;font-weight:700}.hint,.privacy{font-size:12px}.privacy{background:#e8f2f6;padding:12px;border-radius:10px}.primary{background:#0c7e86;color:#fff;border:0;border-radius:12px;padding:15px;font-size:15px;font-weight:750;width:100%;margin-top:18px;cursor:pointer}.primary:disabled{background:#aebfc6;cursor:not-allowed}.subtle{background:transparent;border:1px solid #648398;border-radius:9px;padding:8px;color:#fff}.error{color:#bf2735}.success{color:#186749}.hidden{display:none!important}.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.stat{background:white;padding:15px 10px;border:1px solid #e1e9ef;border-radius:13px}.stat small{display:block;color:#667b89;font-size:12px}.stat b{display:block;font-size:21px;margin-top:7px}.stat em{font-style:normal;color:#71818b;font-size:11px}.legend{display:flex;flex-wrap:wrap;gap:10px;font-size:11px;color:#62788a}.chart-row{display:flex;align-items:center;gap:12px;margin-top:17px}.chart-label{font-size:12px;width:80px;flex:none;color:#536d7a}.bars{flex:1;display:grid;gap:3px}.bar{height:8px;border-radius:5px;background:#087f8c;min-width:1px}.bar.gas{background:#de9341}.bar.wasser{background:#4d83d1}.history-row{border-top:1px solid #e4ebf0;padding:12px 0;font-size:13px}.history-row:first-child{border:0}.history-row strong{display:block;margin-bottom:4px}.history-row small{color:#64798b}footer{text-align:center;color:#8c9da9;font-size:11px;padding:20px}@media(max-width:430px){.meter{padding:15px}.photo-btn{font-size:13px;padding:11px}.stat b{font-size:17px}.chart-label{width:65px}}

.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.total-stat{grid-column:1/-1;background:#e8f7f7;border-color:#b9dcde}.bar.strom_eg{background:#0c7e86}.bar.strom_1og{background:#4171b7}.bar.strom_2og{background:#8668b9}.bar.strom_allgemein{background:#6f9e40}.chart-label{width:50px}

header { padding-top: env(safe-area-inset-top); height: calc(76px + env(safe-area-inset-top)); }
fieldset { border: 0; min-inline-size: 0; padding: 0; margin: 0; }
.meter header { height: auto; padding: 0; gap: 8px; }
.photo-row { position: relative; flex-wrap: wrap; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; padding: 0; }
.file-input:focus-visible + .photo-btn { outline: 2px solid #0a8995; outline-offset: 3px; }
.file-input:disabled + .photo-btn { opacity: .6; cursor: default; }
.reading-line > div { min-width: 0; }
.stat { overflow-wrap: anywhere; }
.stat em { display: block; margin-top: 4px; }
.status { text-align: center; }
.period-controls { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 190px),1fr)); gap: 8px 14px; }
select { width: 100%; padding: 12px 8px; font: inherit; color: #10263e; background: white; border: 1px solid #cbd7e0; border-radius: 11px; }
input[type="date"] { min-width: 0; min-height: 46px; }
.chart-row { display: grid; grid-template-columns: minmax(75px, 100px) minmax(0, 1fr); align-items: start; border-top: 1px solid #e4ebf0; padding-top: 12px; }
.chart-label { width: auto; font-weight: 700; }
.bar-label, .history-note { display: block; font-size: 12px; color: #536d7a; }
.bar { appearance: none; width: 100%; height: 10px; background: none !important; }
.bar::-webkit-meter-bar { background: #e8eef2; border: 0; border-radius: 5px; }
.bar::-webkit-meter-optimum-value { background: var(--bar-color, #0c7e86); border-radius: 5px; }
.bar::-moz-meter-bar { background: var(--bar-color, #0c7e86); border-radius: 5px; }
.bar.strom_1og { --bar-color: #4171b7; }
.bar.strom_2og { --bar-color: #8668b9; }
.bar.strom_allgemein { --bar-color: #6f9e40; }
.bar.gas { --bar-color: #a65d0e; }
.bar.wasser { --bar-color: #3b76c7; }
.history-note { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
button, input, select, textarea { font: inherit; }
button, .photo-btn { min-height: 44px; }
button:disabled { opacity: .65; cursor: default; }
button:focus-visible, select:focus-visible { outline: 3px solid #0a8995; outline-offset: 3px; }
input[aria-invalid="true"] { border: 2px solid #bf2735; }
.meter header { flex-wrap: wrap; }
.preview-button { padding: 0; border: 0; background: transparent; cursor: zoom-in; line-height: 0; border-radius: 11px; }
.photo-preview { display: block; }
.notice { padding: 12px 16px; border: 1px solid #dec47a; background: #fff8df; border-radius: 12px; color: #69531c; }
.previous-reading { border-top: 1px solid #e4ebf0; padding-top: 9px; }
#captureProgress { font-weight: 700; color: #086b73; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.actions > * { flex: 1 1 140px; white-space: normal; }
.actions .primary { margin-top: 0; }
.period-nav { margin-bottom: 16px; }
dialog { width: min(560px, calc(100% - 24px)); max-height: 90dvh; overflow: auto; border: 1px solid #cbd7e0; padding: 22px; border-radius: 18px; color: #15283b; }
dialog::backdrop { background: #10263e99; }
.review-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding-bottom: 10px; border-bottom: 1px solid #e4ebf0; }
.review-row strong { color: #15283b; }
.review-row small { grid-column: 1 / -1; }
#largePhoto { display: block; width: 100%; max-height: 72dvh; object-fit: contain; margin-top: 14px; }
#reviewNote { white-space: pre-wrap; }
.cost-heading { margin-top: 28px; }
#costStats b { font-size: 18px; }
#tariffList .history-row p { font-size: 14px; overflow-wrap: anywhere; }
.tabs button { min-width: 0; padding-inline: 8px; }
@media(prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
@media(max-width: 380px) {
  .panel { padding: 14px; }
  .chart-row { grid-template-columns: 1fr; gap: 5px; }
}
