:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#19201c;background:#f3f4ef;--green:#c6ed72;--muted:#68736a}*{box-sizing:border-box}body{margin:0}main{max-width:940px;margin:auto;padding:28px 24px calc(24px + env(safe-area-inset-bottom))}header{display:flex;align-items:center;justify-content:space-between;gap:12px}.brand{font-size:23px;font-weight:950;letter-spacing:-1px}.brand span{display:block;font-size:9px;letter-spacing:2px;margin-top:4px}.pill{font-size:10px;border:1px solid #cdd2c6;border-radius:20px;padding:8px 10px;white-space:nowrap}.intro{margin:35px 0 26px}.eyebrow{font-size:10px;font-weight:750;letter-spacing:2px}.intro h1{font-size:clamp(44px,8vw,72px);letter-spacing:-3px;line-height:1.02;margin:12px 0 18px}.intro>p:last-child{color:var(--muted);font-size:14px}.stats{display:grid;grid-template-columns:repeat(3,1fr);background:#19211d;border-radius:18px;color:white;overflow:hidden}.stats>div,.stats>button{padding:22px 14px;background:none;color:inherit;border:0;text-align:left}.stats>button{color:var(--green);border-left:1px solid #3d463e}.stats b{font-size:30px;display:block;letter-spacing:-1px}.stats span{font-size:11px;display:block;margin-top:3px}button,input{font:inherit}button{cursor:pointer;border:0;border-radius:9px;min-height:44px;font-weight:650;font-size:13px}button:active{transform:scale(.98)}button:focus-visible,input:focus-visible{outline:3px solid #658d36;outline-offset:2px}nav{display:flex;gap:6px;border-bottom:1px solid #dce0d6;margin:26px 0 24px;padding-bottom:10px}nav button{flex:1;background:none;color:var(--muted)}nav .active{background:#e4e8dd;color:#19201c}.toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}h2{font-size:19px;letter-spacing:-.5px}h3{font-size:16px}.primary{background:var(--green);color:#18251a;padding:12px 17px}.secondary{background:#e9ece3;color:#263027;padding:12px}.danger{background:#fff0ec;color:#9f3226}.search{display:flex;align-items:center;background:white;border:1px solid #dce0d6;border-radius:12px;padding:0 14px;gap:10px}.search span{font-size:25px}.search input{border:0;background:none;width:100%;padding:15px 0;min-width:0;font-size:14px}.filters{display:flex;gap:8px;margin:12px 0 20px}.filters button{font-size:11px;min-height:34px;padding:7px 12px;background:none;color:var(--muted)}.filters .active{background:#19211d;color:white}.card{background:white;border:1px solid #e0e3da;border-radius:15px;padding:18px;margin:12px 0}.card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.card h3{margin:2px 0 5px}.meta{font-size:12px;color:var(--muted);margin:5px 0;overflow-wrap:anywhere}.stock{text-align:right;min-width:62px}.stock strong{font-size:30px;letter-spacing:-1px}.stock small{display:block;font-size:10px;color:var(--muted)}.tag{display:inline-block;background:#f1f3ed;border-radius:6px;padding:5px 8px;font-size:11px;margin:6px 4px 0 0}.warn{background:#fff0df;color:#944b12}.actions{display:flex;gap:8px;margin-top:16px}.actions button{flex:1;background:#eef1e8}.actions .plus{background:var(--green)}.actions .edit{flex:0 0 44px;background:white;border:1px solid #dce0d6}.empty{border:1px dashed #c7cec0;padding:30px 20px;text-align:center;border-radius:15px;margin-top:15px}.empty h3{margin:0 0 10px}.empty p,.muted{font-size:12px;color:var(--muted);line-height:1.6}section>p,.panel p{font-size:13px;line-height:1.7;color:#59645b}.panel{padding:20px;border:1px solid #dce0d6;border-radius:15px;background:white;margin:18px 0}.wide{width:100%;margin:8px 0}.movement{display:flex;gap:12px;padding:17px 0;border-bottom:1px solid #dce0d6}.movement>div{flex:1}.movement b{font-size:13px}.delta{font-size:20px!important;white-space:nowrap;color:#4d6c28}.negative{color:#a04b30}.movement p{margin:4px 0;font-size:11px;color:var(--muted)}footer{font-size:9px;letter-spacing:1.5px;color:#84907f;text-align:center;margin-top:40px}dialog{border:0;border-radius:20px;padding:23px;width:calc(100% - 28px);max-width:480px;max-height:90dvh;color:#19201c}dialog::backdrop{background:#111a16a6;backdrop-filter:blur(3px)}.dialog-head{display:flex;justify-content:space-between;align-items:center}.dialog-head h2{margin:4px 0 15px}.close{background:none;font-size:27px;min-width:44px}form label{display:block;font-size:12px;font-weight:650;margin:12px 0}form input{display:block;width:100%;border:1px solid #d0d7c8;border-radius:8px;padding:12px;margin-top:6px;background:#fafbf7;min-width:0;font-size:16px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}#toast{position:fixed;bottom:calc(22px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);background:#19211d;color:white;padding:14px 20px;border-radius:12px;width:max-content;max-width:90vw;font-size:13px;z-index:10}[hidden]{display:none!important}@media(min-width:700px){#items{display:grid;grid-template-columns:1fr 1fr;gap:15px}.card{margin:0}.intro h1 br{display:none}.stats b{font-size:40px}.stats>div,.stats>button{padding:25px}.empty{grid-column:1/-1}}@media(max-width:370px){main{padding:20px 15px}.brand{font-size:20px}.pill{font-size:9px}.stats>div,.stats>button{padding:18px 10px}}
.sync-panel{margin:20px 0;padding:16px}.sync-panel .toolbar{margin:0;gap:10px}.sync-panel h3{margin:0}.sync-panel p{margin:10px 0 0}.sync-panel #sync-conflict{border-top:1px solid #e2b8a6;margin-top:12px;color:#943e27}.sync-panel #sign-in{display:block;margin-top:12px;color:#416623}

.choice-field{display:flex;gap:6px;align-items:stretch}.choice-field input{flex:1;min-width:0}.choice-picker{position:relative;flex:0 0 42px;margin-top:6px}.choice-picker select{appearance:none;-webkit-appearance:none;display:block;width:42px;height:100%;min-height:45px;border:1px solid #9bad81;border-radius:8px;background:#e7efdb;font:inherit;cursor:pointer;padding:0}.choice-picker::after{content:'▾';position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:23px;color:#304e19;pointer-events:none}.choice-picker select:focus-visible{outline:3px solid #658d36;outline-offset:2px}.choice-picker option{color:#19201c;background:#fff}

.stat-periods{flex-wrap:wrap}.stat-periods button{flex:1;min-height:40px}.stat-controls{display:flex;gap:8px;align-items:center}.stat-controls input{flex:1;min-width:0;padding:11px;border:1px solid #d2d9c8;border-radius:9px;background:white;color:#19201c;font:inherit}.stat-controls button{width:44px;flex:none}.stat-select-label{display:block;font-size:12px;font-weight:650;margin:16px 0}.stat-select-label select{display:block;width:100%;padding:12px;border:1px solid #d2d9c8;border-radius:9px;background:white;font:inherit;color:#19201c;margin-top:6px}.stat-counters{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.stat-counters>div{background:#e5ecda;border-radius:10px;padding:15px 12px}.stat-counters span{font-size:10px;display:block;color:#5f7151}.stat-counters b{font-size:26px;display:block;margin-top:6px;overflow-wrap:anywhere}#stats-chart svg{width:100%;height:auto;display:block}.stat-table-wrap{overflow-x:auto}.stat-details summary{padding:12px;cursor:pointer;background:#e9eee2;border-radius:9px;font-size:12px}.stat-details table{width:100%;border-collapse:collapse;font-size:12px;margin-top:10px}.stat-details th,.stat-details td{padding:10px 8px;border-bottom:1px solid #dce2d2;text-align:right;white-space:nowrap}.stat-details th:first-child,.stat-details td:first-child{text-align:left}nav button{font-size:12px;padding:8px 5px}@media(max-width:420px){.stat-counters>div{padding:12px 8px}.stat-counters b{font-size:23px}.stat-counters span{font-size:9px}nav button{font-size:11px}}

/* Zusatzfunktionen 1.3 – auf ursprünglicher Gestaltung aufbauend */
.advanced-filter{display:grid;grid-template-columns:repeat(3,minmax(120px,1fr)) auto;gap:9px;margin:12px 0 18px;align-items:end}.advanced-filter label{display:grid;gap:6px;font-size:12px;color:#536058}.advanced-filter select{min-width:0;padding:10px 8px;border:1px solid #d5ddcf;background:white;border-radius:9px;color:#182019}.quick-actions{display:flex;gap:7px;flex-wrap:wrap;margin:8px 0}.quick-actions button{font-weight:700}.inventory-check{display:inline-flex;align-items:center;gap:6px;margin-left:12px}.inventory-check input{width:18px;height:18px}.inventory-check[hidden]{display:none}#inventory-mode.active{background:#c6ef6c;color:#151917}#inventory-progress{align-self:center}@media(max-width:700px){.advanced-filter{grid-template-columns:1fr 1fr}}

.editor-feedback{background:#fff0df;color:#77380c;border:1px solid #d6974d;border-radius:9px;padding:11px 12px;font-size:13px;line-height:1.5;margin:10px 0;overflow-wrap:anywhere}

/* Darstellung: unabhängig von Lagerbestand und Sicherungen gespeichert. */
:root{color-scheme:light}.theme-toolbar{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:18px;font-size:12px;color:var(--muted)}.theme-toolbar select{font:inherit;padding:10px;border:1px solid #cdd2c6;border-radius:9px;background:white;color:#19201c}select:focus-visible{outline:3px solid #658d36;outline-offset:2px}
:root[data-theme="dark"]{color-scheme:dark;background:#151a17;color:#edf1ea;--muted:#acb8ad}
[data-theme="dark"] .pill,[data-theme="dark"] nav,[data-theme="dark"] .movement{border-color:#3e4a40}
[data-theme="dark"] .card,[data-theme="dark"] .panel,[data-theme="dark"] .search,[data-theme="dark"] dialog{background:#212923;color:#edf1ea;border-color:#435045}
[data-theme="dark"] input,[data-theme="dark"] select{background:#18201a;color:#edf1ea;border-color:#4b5b4c}
[data-theme="dark"] .search input{background:transparent}
[data-theme="dark"] input::placeholder{color:#a0ada1}
[data-theme="dark"] .secondary,[data-theme="dark"] .tag,[data-theme="dark"] .actions button,[data-theme="dark"] nav .active,[data-theme="dark"] .stat-details summary{background:#344035;color:#edf1ea}
[data-theme="dark"] .actions .plus,[data-theme="dark"] .primary{background:var(--green);color:#18251a}
[data-theme="dark"] .actions .edit{background:#212923;border-color:#526153;color:#edf1ea}
[data-theme="dark"] .filters .active{background:var(--green);color:#18251a}
[data-theme="dark"] .warn,[data-theme="dark"] .editor-feedback{background:#49331d;color:#ffcc91}
[data-theme="dark"] .danger{background:#492923;color:#ffb4a6}
[data-theme="dark"] .close{color:#edf1ea}
[data-theme="dark"] section>p,[data-theme="dark"] .panel p,[data-theme="dark"] .advanced-filter label{color:#acb8ad}
[data-theme="dark"] .stat-counters>div{background:#303d2c}
[data-theme="dark"] .stat-counters span{color:#c1cfb7}
[data-theme="dark"] .choice-picker::after{color:var(--green)}
[data-theme="dark"] .choice-picker option{background:#18201a;color:#edf1ea}
[data-theme="dark"] .delta{color:#c6ed72}[data-theme="dark"] .negative{color:#ffa58c}
[data-theme="dark"] .stat-details td,[data-theme="dark"] .stat-details th{border-color:#435045}
[data-theme="dark"] #stats-chart text{fill:#b5c2ad}[data-theme="dark"] #stats-chart line{stroke:#435045}[data-theme="dark"] #stats-chart polyline{stroke:#c6ed72}[data-theme="dark"] #stats-chart circle{fill:#c6ed72}
