:root{--bg:#fff;--card:#fff;--tx:#000;--mu:#333;--bd:#bbb;color-scheme:light;--ac:#e8730c;--ac2:#fff;--bad:#c0392b;
box-sizing:border-box;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
html{background:#fff;color-scheme:light only}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{min-height:100vh;margin:0;background:var(--bg);color:var(--tx);font:16px/1.4 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
a{color:var(--ac)}
.wrap{max-width:760px;margin:0 auto;padding:12px}
header{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;margin:8px 0 12px}
h1{font-size:1.4rem;margin:0 0 12px}
header h1{margin:0}
.nr{color:var(--mu);font-size:.9rem}
.card{background:var(--card);border:1px solid var(--bd);border-radius:12px;padding:14px;margin-bottom:12px}
h2{font-size:1rem;margin:0 0 10px;text-transform:uppercase;letter-spacing:.04em;color:var(--mu)}
label{display:block;font-size:.8rem;color:var(--mu);margin:8px 0 3px}
label.chk{display:flex;gap:8px;align-items:center;color:var(--tx);font-size:.95rem;margin-top:10px}
label.chk input{width:auto;min-height:0}
input,textarea,select{width:100%;font:inherit;color:var(--tx);background:var(--bg);border:1px solid var(--bd);border-radius:8px;padding:10px;min-height:44px}
textarea{min-height:70px;resize:vertical}
.g2{display:grid;grid-template-columns:1fr 1fr;gap:0 10px}
@media(max-width:520px){.g2{grid-template-columns:1fr}}
.sumrow{display:flex;justify-content:space-between;gap:8px;border-bottom:1px solid var(--bd);padding:4px 0;font-size:.9rem}
input[type=time],input[type=month]{color:#000;-webkit-text-fill-color:#000;opacity:1;background:#fff}
.row{display:grid;grid-template-columns:1.4fr 3fr 1fr 1fr 44px;gap:6px;margin-bottom:6px}
.row.h{font-size:.75rem;color:var(--mu);margin-bottom:2px}
@media(max-width:520px){.row{grid-template-columns:2fr 1fr 1fr 44px;margin-bottom:10px}.row [data-f=d]{grid-column:1/4;grid-row:1}.row .x{grid-column:4;grid-row:1}.row.h span:nth-child(1){display:none}.row.h{margin-bottom:2px}}
button{font:inherit;border-radius:8px;border:1px solid var(--bd);background:var(--card);color:var(--tx);padding:10px 14px;min-height:44px;cursor:pointer}
button.p{background:var(--ac);color:var(--ac2);border-color:var(--ac);font-weight:600}
button.x{color:var(--bad);padding:0}
button.danger{color:var(--bad)}
button.on{outline:2px solid var(--ac)}
.bar{display:flex;flex-wrap:wrap;gap:8px}
canvas{width:100%;height:170px;background:#fff;border:2px solid #d00000;border-radius:8px;touch-action:none;display:block}
.hint{font-size:.8rem;color:var(--mu);margin-top:4px}
.err{color:var(--bad);font-size:.9rem;margin-top:8px;min-height:1em}
.logo{position:absolute;cursor:grab;touch-action:none;user-select:none;-webkit-user-drag:none;height:auto}
.fh{display:none;position:relative;aspect-ratio:5/1;container-type:inline-size;margin:8px 0;border-bottom:2px solid var(--ac)}
.ft{position:absolute;cursor:grab;touch-action:none;user-select:none;line-height:1.417;white-space:nowrap}
.ft b{font-size:1.333em}
.lk .logo,.lk .ft{cursor:default;touch-action:auto}
.li{display:flex;gap:8px;align-items:center;justify-content:space-between;border-bottom:1px solid var(--bd);padding:4px 0;font-size:.9rem}
.li button{min-width:40px;min-height:36px;padding:0 10px}
.li .e{color:var(--tx)}
.li.doc{cursor:pointer;padding:8px 0;flex-wrap:wrap}
.li.doc>span:first-child{flex:1 1 240px;min-width:0}
.li.doc:hover{background:#fafafa}
.li small{color:var(--mu)}
.tag{font-size:.75rem;border:1px solid var(--bd);border-radius:6px;padding:1px 6px;white-space:nowrap;color:var(--mu)}
.tag.ok{border-color:#2e7d32;color:#2e7d32}
.seg{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:6px}
.seg button{font-size:1rem;min-width:0;padding:10px 6px;overflow:hidden;text-overflow:ellipsis}
.seg button.on{background:var(--ac);color:var(--ac2);border-color:var(--ac);font-weight:600;outline:none}
.tbar{position:sticky;top:0;z-index:5;display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;background:#fff3e6;border:2px solid var(--ac);border-radius:10px;padding:8px 10px;margin-bottom:10px;font-size:.9rem}
.tbar button{min-height:38px;padding:6px 12px;background:var(--ac);color:#fff;border-color:var(--ac);font-weight:600}
.lockbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;background:#eef6ee;border:2px solid #2e7d32;border-radius:10px;padding:8px 10px;margin-bottom:12px;font-size:.9rem}
.lockbar button{min-height:38px;padding:6px 12px}
#v-edit.locked input,#v-edit.locked textarea,#v-edit.locked select{background:#f6f6f6}
#v-edit.locked canvas{touch-action:auto;border-color:#999}
#v-edit.locked .row .x{visibility:hidden}
.fotos{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px}
.fotos:empty{display:none}
.foto{position:relative;aspect-ratio:1;border:1px solid var(--bd);border-radius:8px;overflow:hidden;background:#f2f2f2}
.foto img{width:100%;height:100%;object-fit:cover;display:block;cursor:zoom-in}
.foto button{position:absolute;top:4px;right:4px;min-height:32px;min-width:32px;padding:0 8px;background:rgba(255,255,255,.92);color:var(--bad);font-size:.85rem}
#v-edit.locked .foto button{display:none}
.fview{position:fixed;inset:0;z-index:20;background:rgba(0,0,0,.9);display:flex;align-items:center;justify-content:center}
.fview img{max-width:100%;max-height:100%;object-fit:contain}
.fview button{position:absolute;top:calc(10px + env(safe-area-inset-top,0px));right:10px;background:#fff;color:#000;font-size:1.1rem}
.ic{width:24px;height:24px;display:block;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.bnav,.sheet{display:none}
body.kachel nav.top{display:none}
body.kachel .wrap{padding-bottom:104px}
body.kachel .toast{bottom:96px}
body.kachel .bnav{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:8;background:#fff;border-top:1px solid var(--bd);padding:6px 6px calc(6px + env(safe-area-inset-bottom,0px));justify-content:space-around;align-items:flex-end}
.bnav button{border:0;background:none;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:.72rem;color:#555;min-width:60px;min-height:52px;padding:4px 2px;justify-content:flex-end}
.bnav button.on{color:var(--ac);outline:none;font-weight:600}
.bnav .ic{width:26px;height:26px}
.bnav button.neu{background:#FFC20E;color:#1a1a1a;border-radius:50%;width:62px;height:62px;min-width:62px;min-height:62px;justify-content:center;margin-top:-26px;box-shadow:0 4px 14px rgba(0,0,0,.22)}
.bnav button.neu .ic{width:30px;height:30px;stroke-width:2.6}
body.kachel .sheet:not([hidden]){display:flex;position:fixed;inset:0;z-index:15;background:rgba(0,0,0,.45);align-items:flex-end}
.sheet-in{background:#fff;width:100%;border-radius:22px 22px 0 0;padding:18px 16px calc(18px + env(safe-area-inset-bottom,0px))}
.gruss{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:6px 0 16px}
.gruss h1{margin:2px 0 0;font-size:1.6rem}
.avatar{width:48px;height:48px;min-height:48px;border-radius:50%;padding:0;background:#FFC20E;border-color:#FFC20E;color:#1a1a1a;font-weight:700;font-size:1rem}
.tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media(min-width:700px){.tiles{grid-template-columns:repeat(3,minmax(0,1fr))}}
.tile{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:4px;min-height:124px;padding:16px;border-radius:18px;border:1px solid #e3e3e0;background:#f6f6f3;text-align:left;font-size:1.08rem;font-weight:600;color:#1a1a1a}
.tile .ic{width:34px;height:34px;margin-bottom:8px}
.tile small{font-weight:400;color:#555;font-size:.82rem;line-height:1.3}
.tile.gelb{background:#FFC20E;border-color:#FFC20E}
.tile.gelb small{color:#3a3020}
.tile.dunkel{background:#232323;border-color:#232323;color:#fff}
.tile.dunkel small{color:#cfcfcf}
.tile.dunkel .ic{color:#FFC20E}
.tile:active{transform:scale(.98)}
.only-k{display:none}
body.kachel .only-k:not([hidden]){display:block}
body.kachel .only-pc{display:none!important}
.sheet-in.hoch{max-height:90vh;overflow:auto}
.sheet-kopf{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px}
.sheet-kopf h2{margin:0}
.sheet-kopf button{min-height:40px;padding:6px 14px}
.mchips{display:flex;gap:6px;overflow-x:auto;padding-bottom:2px}
.mchips.mitte{justify-content:center;flex-wrap:wrap;margin:8px 0}
.mchips button{min-height:38px;padding:6px 14px;border-radius:999px;white-space:nowrap;font-size:.9rem;background:#fff}
.mchips button.on{background:#FFC20E;border-color:#FFC20E;color:#1a1a1a;outline:none;font-weight:600}
.kwsel{display:flex;align-items:center;gap:12px;width:100%;text-align:left;padding:12px;border-radius:16px;border:2px solid #FFC20E;background:#fffaeb;min-height:72px;margin-bottom:6px}
.kwsel small{color:#555}
.kwsel .kw-ch{margin-left:auto;font-size:1.6rem;color:#999}
.kav{width:44px;height:44px;min-width:44px;border-radius:12px;background:#FFC20E;color:#1a1a1a;display:flex;align-items:center;justify-content:center;font-weight:700}
.kav.grau{background:#ecece8}
.kkarte{display:flex;align-items:center;gap:12px;width:100%;text-align:left;padding:10px 12px;border-radius:14px;border:1px solid var(--bd);background:#fff;min-height:64px;margin-bottom:8px}
.kkarte.sel{border:2px solid #FFC20E;background:#fffaeb}
.kkarte small{color:#555}
.kkarte .stern{margin-left:auto;border:0;background:none;font-size:1.4rem;min-width:44px;color:#bbb;padding:0}
.kkarte .stern.an{color:#e8a100}
.bkach{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.bkach .tile{min-height:96px;font-size:.98rem}
.mkach{margin-top:10px}
@media(min-width:700px){.bkach{grid-template-columns:repeat(3,minmax(0,1fr))}}
/* Material-Kacheln als Seiten zum Wischen (3×3, Tablet 4×3) */
.mseiten{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:auto;gap:0;scrollbar-width:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
.mseiten::-webkit-scrollbar{display:none}
.mseite{flex:0 0 100%;scroll-snap-align:start;scroll-snap-stop:always;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;align-content:start;padding:1px}
@media(min-width:700px){.mseite{grid-template-columns:repeat(4,minmax(0,1fr))}}
.mkach .tile{min-height:96px;font-size:.86rem;line-height:1.2;position:relative;padding:10px 8px;gap:2px}
.mkach .tile .ic{width:24px;height:24px;margin-bottom:4px}
.mkach .tile .tn{overflow-wrap:anywhere;hyphens:auto}
.mkach .tile small{font-size:.75rem}
.mkach .menge{top:8px;right:8px;font-size:.78rem}
/* Dokumentliste (Admin): Mitarbeiter-Auswahl und Namensschild */
.machips{flex-wrap:wrap;margin:2px 0 4px}
.ma{display:inline-flex;align-items:center;gap:6px;font-weight:700;font-size:.85rem;border-radius:999px;padding:2px 10px 2px 3px;margin-bottom:3px}
.ma i{font-style:normal;font-size:.7rem;width:20px;height:20px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center}
.farben{display:flex;flex-wrap:wrap;gap:8px}
.farben button{width:40px;height:40px;min-height:40px;padding:0;border-radius:50%;border:2px solid rgba(0,0,0,.15);font-weight:700;font-size:.8rem}
.farben button.on{outline:3px solid var(--tx);outline-offset:2px}
.farben button.auto{width:auto;border-radius:999px;padding:0 12px;background:var(--card);color:var(--tx)}
.msuche{margin-bottom:8px}
.msuche input{min-height:42px;border-radius:999px;padding:8px 16px;background:#f6f6f3}
html.dunkel .msuche input{background:#1a1a1a}
.mchips.aus button.on{background:#fff;border-color:var(--bd);color:var(--tx);font-weight:400}
html.dunkel .mchips.aus button.on{background:#1e1e1e}
.mleer{grid-column:1/-1;font-size:.85rem;color:var(--mu);padding:4px 2px}
.mpunkte{display:flex;justify-content:center;align-items:center;gap:8px;margin-top:10px;flex-wrap:wrap}
.mpunkte button{width:10px;height:10px;min-height:10px;min-width:10px;padding:0;border-radius:50%;border:0;background:#cfcfca}
.mpunkte button.on{background:#e8a100;width:22px;border-radius:5px}
.mpunkte span{font-size:.75rem;color:var(--mu);margin-left:4px}
html.dunkel .mpunkte button{background:#555}
html.dunkel .mpunkte button.on{background:#FFC20E}
.mkach .tile.gewaehlt{background:#fff3c4;border:2px solid #FFC20E}
.mkach .menge{position:absolute;top:10px;right:10px;font-weight:700;font-size:.9rem}
.mkach .tile.frei{background:#fff;border-style:dashed;color:#555}
.pad-anz{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:4px 0}
.pad-anz>span{font-size:2.6rem;font-weight:700;text-align:center;flex:1}
.pad-anz small{font-size:1.1rem;font-weight:400;color:#555}
.pad-pm{width:56px;height:56px;min-height:56px;border-radius:50%;font-size:1.6rem;padding:0}
.pad-eh{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0}
.pad-eh button{min-height:52px;font-size:1.25rem;font-weight:700;border-radius:14px;border:2px solid var(--bd);background:var(--card)}
.pad-eh button.on{background:#FFC20E;border-color:#FFC20E;color:#1a1a1a;outline:none}
.mchips.klein button{min-height:30px;padding:3px 10px;font-size:.78rem;opacity:.85}
.pad-keys{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.pad-keys button{min-height:58px;font-size:1.5rem;border-radius:14px;background:#f3f3f0;border-color:#e3e3e0}
body.kachel #pos input[data-f=m]{caret-color:transparent;cursor:pointer;background:#fffaeb;font-weight:600}
/* Hell/Dunkel-Knopf oben rechts und Offline-Hinweis */
.theme-btn{position:fixed;top:calc(8px + env(safe-area-inset-top,0px));right:8px;z-index:12;width:38px;height:38px;min-height:38px;padding:0;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--card);border:1px solid var(--bd);color:var(--tx);box-shadow:0 1px 4px rgba(0,0,0,.12)}
.theme-btn .ic{width:20px;height:20px}
nav.top,header,.gruss,.tbar,#v-login>h1,.view>h1:first-child{padding-right:46px}
.offbar{position:sticky;top:0;z-index:6;margin:0 auto;max-width:760px;background:#fff3c4;color:#3a3020;border-bottom:1px solid #e0c060;padding:6px 52px 6px 12px;font-size:.85rem}
.offbar.sync{background:#eef6ee;color:#1e4d20;border-color:#9cc59e}
/* Dunkles Design (umschaltbar, Standard hell) */
html.dunkel{color-scheme:dark;background:#141414}
html.dunkel body{--bg:#141414;--card:#1e1e1e;--tx:#f1f1f1;--mu:#b5b5b5;--bd:#3a3a3a;--ac2:#fff}
html.dunkel input,html.dunkel textarea,html.dunkel select{background:#1a1a1a;color:#f1f1f1;-webkit-text-fill-color:#f1f1f1}
html.dunkel input[type=date],html.dunkel input[type=time],html.dunkel input[type=month]{background:#1a1a1a;color:#f1f1f1;-webkit-text-fill-color:#f1f1f1;accent-color:#FFC20E}
html.dunkel input[type=date]::-webkit-datetime-edit,html.dunkel input[type=date]::-webkit-datetime-edit-fields-wrapper,html.dunkel input[type=date]::-webkit-datetime-edit-day-field,html.dunkel input[type=date]::-webkit-datetime-edit-month-field,html.dunkel input[type=date]::-webkit-datetime-edit-year-field,html.dunkel input[type=date]::-webkit-datetime-edit-text{color:#f1f1f1;-webkit-text-fill-color:#f1f1f1}
html.dunkel input[type=date]::-webkit-calendar-picker-indicator{filter:invert(1)}
html.dunkel .ro input,html.dunkel .ro textarea,html.dunkel .ro select,html.dunkel #v-edit.locked input,html.dunkel #v-edit.locked textarea,html.dunkel #v-edit.locked select{background:#242424}
html.dunkel .li.doc:hover{background:#262626}
html.dunkel .tile{background:#242424;border-color:#333;color:#f1f1f1}
html.dunkel .tile small{color:#bdbdbd}
html.dunkel .tile.gelb{background:#FFC20E;border-color:#FFC20E;color:#1a1a1a}
html.dunkel .tile.gelb small{color:#3a3020}
html.dunkel .tile.dunkel{background:#0c0c0c;border-color:#444}
html.dunkel .tile.frei,html.dunkel .mkach .tile.frei{background:transparent;color:#ccc}
html.dunkel .mkach .tile.gewaehlt{background:#3a3010;border-color:#FFC20E}
html.dunkel .bnav,html.dunkel .sheet-in,html.dunkel .kkarte,html.dunkel .mchips button{background:#1e1e1e;color:#f1f1f1}
html.dunkel .bnav button{color:#bbb}
html.dunkel .bnav button.on{color:#FFC20E}
html.dunkel .bnav button.neu{color:#1a1a1a}
html.dunkel .mchips button.on{background:#FFC20E;color:#1a1a1a}
html.dunkel .kwsel,html.dunkel .kkarte.sel{background:#2a2410;color:#f1f1f1}
html.dunkel .kwsel small,html.dunkel .kkarte small,html.dunkel .pad-anz small{color:#bdbdbd}
html.dunkel .kav.grau{background:#333;color:#f1f1f1}
html.dunkel .pad-keys button{background:#262626;border-color:#333;color:#f1f1f1}
html.dunkel .tbar{background:#3a2610;color:#f1f1f1}
html.dunkel .lockbar{background:#16301a;color:#e6f4e6}
html.dunkel .offbar{background:#3a3010;color:#fff3c4;border-color:#6b5a20}
html.dunkel .offbar.sync{background:#16301a;color:#e6f4e6;border-color:#2e5a32}
html.dunkel .foto{background:#262626}
html.dunkel .tag.ok{border-color:#66bb6a;color:#8fd694}
html.dunkel body.kachel #pos input[data-f=m]{background:#2a2410}
html.dunkel canvas{background:#fff}
.li.doc .stat{display:flex;gap:6px;align-items:center}
nav.top{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin-bottom:14px;padding-bottom:10px;border-bottom:1px solid var(--bd)}
.who{font-size:.85rem;color:var(--mu)}
.toast{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);background:#222;color:#fff;padding:10px 16px;border-radius:8px;font-size:.9rem;z-index:10;max-width:90vw}
.ro input,.ro textarea,.ro select{background:#f6f6f6}
input[type=date]{color:#000;-webkit-text-fill-color:#000;opacity:1;background:#fff;accent-color:#000}
input[type=date]::-webkit-datetime-edit,input[type=date]::-webkit-datetime-edit-fields-wrapper,input[type=date]::-webkit-datetime-edit-day-field,input[type=date]::-webkit-datetime-edit-month-field,input[type=date]::-webkit-datetime-edit-year-field,input[type=date]::-webkit-datetime-edit-text{color:#000;-webkit-text-fill-color:#000}
input[type=date]::-webkit-calendar-picker-indicator{filter:brightness(0);opacity:1}
@media print{
:root{--bg:#fff;--card:#fff;--tx:#000;--mu:#444;--bd:#999}
.wrap{padding:0}.card{border-radius:0;break-inside:avoid}
.np,button,.hint{display:none!important}
input,textarea{border:none;border-bottom:1px solid #999;border-radius:0;padding:4px 0;background:#fff;min-height:0}
.row{grid-template-columns:1.4fr 3fr 1fr 1fr}.row.h span:nth-child(5){display:none}
canvas{border:1px solid #999}}
