:root {
  --bg: #f6f1ea; --card: #fffdf9; --ink: #2b211b; --muted: #7a6c61; --line: #e5dcd0;
  --accent: #2b211b; --accent-ink: #fff; --gold: #b8853f;
  --green: #2f7d4f; --green-bg: #e3f2e8; --orange: #b7650f; --orange-bg: #fbeedc; --red: #b3261e; --red-bg: #fbe4e2;
  --radius: 14px; --shadow: 0 1px 2px rgba(43,33,27,.06), 0 4px 14px rgba(43,33,27,.06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); min-height: 100vh; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1rem; }
a { color: inherit; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.center { display: grid; place-items: center; min-height: 60vh; text-align: center; padding: 16px; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 16px; }
.narrow { max-width: 460px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }

/* Formulare */
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: transparent; }
input[type=checkbox] { width: auto; }
.field { min-width: 0; }
button, .btn { font: inherit; border: 0; border-radius: 10px; padding: 10px 16px; cursor: pointer; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
button.ghost, .btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
label.btn { font-size: 1rem; margin: 0; }
button.green { background: var(--green); } button.orange { background: var(--orange); } button.red { background: var(--red); }
button:disabled { opacity: .5; cursor: default; }
button.big { width: 100%; padding: 22px; font-size: 1.25rem; border-radius: 16px; }
button.link { background: none; color: var(--muted); padding: 4px 8px; font-weight: 500; text-decoration: underline; }

/* Kopfzeile */
.topbar { background: var(--ink); color: #fff; padding: 12px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.topbar .title { font-weight: 700; flex: 1; min-width: 160px; }
.topbar button { background: rgba(255,255,255,.12); color: #fff; padding: 8px 12px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 8px 16px 0; background: var(--card); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs button { background: none; color: var(--muted); border-radius: 10px 10px 0 0; padding: 10px 14px; white-space: nowrap; border-bottom: 3px solid transparent; }
.tabs button.active { color: var(--ink); border-bottom-color: var(--gold); }
.badge { background: var(--red); color: #fff; border-radius: 99px; font-size: .75rem; padding: 1px 7px; margin-left: 4px; }

/* Status */
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .8rem; font-weight: 600; }
.pill.in { background: var(--green-bg); color: var(--green); }
.pill.break { background: var(--orange-bg); color: var(--orange); }
.pill.out { background: #eee7de; color: var(--muted); }
.pill.pending { background: var(--orange-bg); color: var(--orange); }
.pill.approved { background: var(--green-bg); color: var(--green); }
.pill.rejected { background: var(--red-bg); color: var(--red); }
.warn { background: var(--orange-bg); color: var(--orange); border-radius: 8px; padding: 4px 8px; font-size: .8rem; display: inline-block; margin-top: 4px; }

/* Avatare */
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #e9dfd2; display: inline-grid; place-items: center; font-weight: 700; color: var(--muted); flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.xl { width: 96px; height: 96px; font-size: 1.8rem; }

/* Tabellen */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.click { cursor: pointer; } tr.click:hover td { background: #faf5ee; }

/* Terminal */
.terminal { min-height: 100vh; display: flex; flex-direction: column; }
.terminal header { background: var(--ink); color: #fff; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.terminal .clock { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; padding: 16px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 8px; text-align: center; cursor: pointer; box-shadow: var(--shadow); position: relative; color: var(--ink); font-weight: 500; display: block; }
.tile .avatar { width: 76px; height: 76px; font-size: 1.5rem; margin: 0 auto 8px; display: grid; }
.tile .dot { position: absolute; top: 10px; right: 10px; width: 14px; height: 14px; border-radius: 50%; background: #d6ccbf; }
.tile .dot.in { background: var(--green); } .tile .dot.break { background: var(--orange); }
.search { margin: 16px 16px 0; }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.pinpad button { padding: 20px 0; font-size: 1.5rem; background: #efe7dc; color: var(--ink); border-radius: 14px; }
.pindots { display: flex; gap: 12px; justify-content: center; margin: 12px 0; min-height: 18px; }
.pindots span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); }
.pindots span.on { background: var(--ink); }

/* Modal & Toast */
.modal { position: fixed; inset: 0; background: rgba(30,22,17,.55); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal .box { background: var(--card); border-radius: 18px; padding: 20px; width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto; }
.modal .box.wide { max-width: 760px; }
.hidden { display: none !important; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 60; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.toast.err { background: var(--red); }

.bigstatus { text-align: center; padding: 8px 0; }
.bigstatus .time { font-size: 2.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.kpi .v { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: .8rem; color: var(--muted); }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }

@media (max-width: 600px) {
  .wrap { padding: 12px; }
  .hide-sm { display: none; }
  .terminal .clock { font-size: 1.5rem; }
}

/* Schalter aktiv/inaktiv */
.switch { position: relative; display: inline-block; width: 44px; height: 26px; margin: 0; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #d6ccbf; border-radius: 99px; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::before { transform: translateX(18px); }

.tiles .tgroup { grid-column: 1 / -1; margin: 8px 0 0; }

/* Kalender */
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head div { font-size: .75rem; color: var(--muted); text-align: center; font-weight: 600; padding-bottom: 4px; }
.cal-cell { min-height: 74px; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: #fff; overflow: hidden; }
.cal-cell.empty { background: transparent; border-color: transparent; }
.cal-cell.today { outline: 2px solid var(--gold); }
.cal-cell.hol { background: #fbf6ee; }
.cal-d { font-size: .8rem; font-weight: 700; }
.cal-tag { display: block; font-size: .68rem; border-radius: 5px; padding: 1px 4px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .cal-tag { display: inline-block; margin: 0 6px 0 0; }
.cal-tag.work { background: #efe7dc; color: var(--ink); }
.cal-tag.vac { background: var(--green-bg); color: var(--green); }
.cal-tag.sick { background: var(--red-bg); color: var(--red); }
.cal-tag.req { background: transparent; border: 1px dashed var(--orange); color: var(--orange); }
.cal-tag.hol { background: transparent; color: var(--gold); padding-left: 0; }
@media (max-width: 600px) { .cal-cell { min-height: 56px; padding: 2px; } .cal-tag { font-size: .6rem; padding: 0 2px; } }

/* Schichtplan */
table.plan { table-layout: fixed; min-width: 860px; }
table.plan th, table.plan td { border: 1px solid var(--line); padding: 6px; font-size: .85rem; }
table.plan thead th { text-align: center; background: #faf5ee; }
th.plan-slot { width: 170px; text-transform: none; letter-spacing: 0; color: var(--ink); font-weight: 400; font-size: .85rem; background: #fdfaf5; }
.plan-cell { cursor: pointer; height: 46px; text-align: center; }
.plan-cell:hover { background: #fbf3e6; }
.plan-cell.set { background: var(--green-bg); }
.plan-off { background: repeating-linear-gradient(45deg, #f1ebe2, #f1ebe2 6px, #f7f2ea 6px, #f7f2ea 12px); }
.plan-group { background: var(--ink); color: #fff; font-weight: 700; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
.plan-today { outline: 2px solid var(--gold); }
.pick-list { max-height: 50vh; overflow-y: auto; display: grid; gap: 6px; }
.pick { display: flex; gap: 10px; align-items: center; background: #fff; color: var(--ink); border: 1px solid var(--line); font-weight: 400; justify-content: flex-start; }
.pick.sel { border-color: var(--green); background: var(--green-bg); }
.pick .small { display: block; }
.cal-tag.plan { background: transparent; border: 1px solid var(--line); color: var(--muted); }
@media print { .topbar, .tabs, .section-title .row:last-child, .plan-card p, .toast { display: none !important; } .plan-cell.set { background: #fff; } }

.plan-cell.mine { background: var(--ink); color: #fff; font-weight: 700; }

/* Jetzt da */
.now-loc { margin-bottom: 14px; }
.now-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 12px; }
.now-card { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fff; border-left: 4px solid var(--green); }
.now-card.break { border-left-color: var(--orange); }
.avatar.lg { width: 56px; height: 56px; font-size: 1.1rem; }
.pos { display: inline-block; font-weight: 600; color: var(--gold); }

/* Unterlagen */
.doc-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; }
.doc-item.missing { border-left: 4px solid var(--red); } .doc-item.ok { border-left: 4px solid var(--green); }
.doc-file { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 6px; font-size: .9rem; }
.doc-ico { font-size: 1rem; }

.ai-line { font-size: .82rem; color: var(--muted); } .ai-line.ok { color: var(--green); } .ai-line.warn { color: var(--orange); }
.ai-sum { flex-basis: 100%; color: var(--muted); }

/* Reiter: am Computer Leiste, am Handy/Tablet farbige Kacheln (4 pro Reihe) */
.tabs button { display: inline-flex; align-items: center; gap: 6px; position: relative; }
.tabs .ti { font-size: 1rem; line-height: 1; }
@media (max-width: 820px) {
  .tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 10px 12px; overflow: visible; border-bottom: 1px solid var(--line); }
  .tabs button { flex-direction: column; justify-content: center; gap: 4px; min-height: 64px; padding: 8px 4px; border-radius: 14px;
    background: color-mix(in srgb, var(--tc) 13%, #fff); color: var(--ink); border: 2px solid transparent; border-bottom: 2px solid transparent; font-weight: 600; }
  .tabs button .ti { font-size: 1.45rem; }
  .tabs button .tl { font-size: .72rem; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
  .tabs button.active { background: var(--tc); color: #fff; border-color: var(--tc); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
  .tabs .badge { position: absolute; top: 4px; right: 4px; margin: 0; }
  .topbar { padding: 10px 12px; gap: 8px; }
  .topbar .title { min-width: 0; flex-basis: 100%; font-size: .95rem; }
  .topbar button { padding: 7px 10px; font-size: .85rem; }
}
@media (max-width: 360px) { .tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Foto-Auswahl */
.pick2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick2 .btn { cursor: pointer; text-align: center; padding: 18px 10px; font-size: 1.05rem; border-radius: 14px; }
.pick2 .pick-cam { background: var(--green); color: #fff; }
@media (max-width: 480px) { .pick2 { grid-template-columns: 1fr; } }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.thumb { position: relative; width: 74px; height: 74px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #f6f1ea; display: grid; place-items: center; font-size: .8rem; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 2px; right: 2px; padding: 0 6px; border-radius: 99px; background: rgba(0,0,0,.6); color: #fff; font-size: .75rem; }

/* dezente Auswahl (überschreibt oben) */
.pick2 .btn { padding: 12px 10px; font-size: 1rem; border-radius: 10px; background: transparent; color: var(--ink); border: 1px solid var(--line); }
@media (max-width: 480px) { .pick2 { grid-template-columns: 1fr 1fr; } }
.thumb-n { position: absolute; left: 4px; bottom: 3px; font-size: .7rem; background: rgba(0,0,0,.55); color: #fff; border-radius: 6px; padding: 0 5px; }
.thumb-add { cursor: pointer; border-style: dashed; color: var(--muted, #7a6c61); font-size: 1.4rem; line-height: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.thumb-add span { font-size: .7rem; }
.linklike { color: var(--gold, #b8853f); text-decoration: underline; cursor: pointer; }
.small-btn { padding: 6px 12px; font-size: .9rem; }
.av-edit { position: relative; cursor: pointer; display: inline-block; }
.av-edit .av-lbl { position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%); font-size: .65rem; background: rgba(0,0,0,.6); color: #fff; border-radius: 6px; padding: 0 5px; }
.linklike { display: inline; margin: 0; font-size: inherit; }
button.link.inl { padding: 0; display: inline; text-align: left; color: var(--gold); }
.kpi.acc { background: var(--bg); border-radius: 12px; padding: 10px; text-align: center; } .kpi.acc .v { font-size: 1.5rem; font-weight: 700; }

/* kompakte Listen (Meine Stunden) */
.tl { display: flex; flex-direction: column; margin-top: 8px; }
.tl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: .95rem; text-align: left; }
.tl-row:last-child { border-bottom: 0; }
.tl-btn { background: none; color: var(--ink); border-radius: 0; width: 100%; font-weight: 400; cursor: pointer; }
.tl-btn:hover, .tl-btn.sel { background: var(--bg); }
.tl-btn.sel { font-weight: 600; }
.tl-day { min-width: 78px; color: var(--muted); }
details > summary { cursor: pointer; }
.pick1 { display: block; text-align: center; padding: 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--ink); }
.pf-view h3 { font-size: .95rem; margin: 10px 0 4px !important; color: var(--muted); }
.pf-view .grid2 > div { padding: 2px 0; } .pf-view label { margin-bottom: 0; font-size: .75rem; }
.kpi-btn { text-align: left; color: var(--ink); font-weight: 400; cursor: pointer; } .kpi-btn.sel { outline: 2px solid var(--orange); } .kpi-btn:disabled { cursor: default; opacity: 1; }
tr.row-warn td:first-child { box-shadow: inset 4px 0 0 var(--orange); }
.declare { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); background: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: .9rem; margin-top: 10px; } .declare input { margin-top: 3px; flex: none; width: 20px; height: 20px; }
.pf-new { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 12px; } .pf-new summary { cursor: pointer; }
.doc-group { margin-bottom: 8px; } .doc-group + .doc-group { border-top: 1px dashed var(--line); padding-top: 8px; }
.nat-box { border: 2px solid var(--orange); border-radius: 12px; padding: 10px 12px; display: grid; gap: 10px; background: var(--orange-bg); }
.sig-block { margin-top: 8px; } .sig-pad { width: 100%; aspect-ratio: 3.1 / 1; border: 1.5px dashed var(--muted); border-radius: 10px; background: #fff; display: block; margin-top: 4px; cursor: crosshair; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 8px; } @media (max-width: 480px) { .grid3 { grid-template-columns: 1fr 1fr; } .grid3 > div:last-child { grid-column: 1 / -1; } } .sig-block { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-top: 10px; }
.co-sum { display: grid; gap: 6px; } .co-sum span { color: var(--muted); }
.ro { padding: 8px 0 4px; min-height: 1.5em; }

/* Verfügbarkeit */
.brushes { display: flex; flex-wrap: wrap; gap: 6px; }
.brush { background: #fff; color: var(--ink); border: 1px solid var(--line); padding: 8px 12px; border-radius: 99px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.brush.sel { outline: 3px solid var(--ink); }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: middle; border: 1px solid rgba(0,0,0,.15); }
.av-grid { border-collapse: separate; border-spacing: 3px; min-width: 100%; }
.av-grid th, .av-grid td { padding: 4px; text-align: center; font-size: .8rem; }
.av-day { cursor: pointer; border-radius: 8px; background: var(--bg); }
.av-slot { text-align: left !important; white-space: nowrap; }
.av-cell { height: 38px; min-width: 34px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.av-off { background: repeating-linear-gradient(45deg, #f2ede6, #f2ede6 4px, #fff 4px, #fff 8px); border-radius: 8px; }
.av-cell.past, .av-day.past { opacity: .4; cursor: default; }
.av-grid th { text-transform: none; letter-spacing: 0; } .av-slot { white-space: normal !important; max-width: 74px; font-size: .72rem !important; line-height: 1.15; } .av-slot b { font-size: .8rem; } .av-cell { min-width: 30px; }

/* Team-Chat */
.chat { display: flex; flex-direction: column; }
.chat-list { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; height: calc(100vh - 330px); min-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 821px) { .chat-list { height: calc(100vh - 260px); } }
.msg { display: flex; gap: 6px; align-items: flex-end; max-width: 85%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg .avatar { width: 30px; height: 30px; font-size: .7rem; }
.bubble { background: var(--bg); border-radius: 14px 14px 14px 4px; padding: 7px 10px; font-size: .95rem; word-break: break-word; }
.msg.mine .bubble { background: #e9d9bf; border-radius: 14px 14px 4px 14px; }
.msg-name { font-size: .75rem; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.msg-time { font-size: .68rem; color: var(--muted); margin-top: 3px; text-align: right; }
.chat-in { display: flex; gap: 8px; margin-top: 8px; align-items: flex-end; }
.chat-in textarea { flex: 1; resize: none; border-radius: 18px; padding: 10px 14px; }
.chat-in button { border-radius: 18px; }
.chat-rooms { margin-bottom: 8px; }
@media (max-width: 820px) { .chat-list { height: calc(100svh - 470px); min-height: 220px; } }
.chat-photo { cursor: pointer; font-size: 1.5rem; padding: 6px 4px; margin: 0; } .msg-img { display: block; max-width: 220px; max-height: 260px; border-radius: 10px; margin-bottom: 4px; object-fit: cover; }

.typebox { border: 2px solid var(--gold); border-radius: 14px; padding: 10px 12px; background: #fff8ec; }
.typebox h3 { margin-top: 0 !important; }
.emp-type select { font-size: 1.05rem; font-weight: 600; }
.choice-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.choice-btns button { background: #fff; color: var(--ink); border: 2px solid var(--line); border-radius: 12px; padding: 12px 8px; font-weight: 600; white-space: normal; }
.choice-btns button.sel { border-color: var(--green); background: #e6f4ea; }
@media (max-width: 480px) { .choice-btns { grid-template-columns: 1fr; } }
h3.hide-h { display: none !important; }
.dlg-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0; } .dlg-tabs button { background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-weight: 600; } .dlg-tabs button.sel { background: var(--ink); color: #fff; }

.chg { background: #fff3c4; border-radius: 8px; padding: 4px 6px; box-shadow: inset 4px 0 0 #e0b400; }
.chg-old { color: #8a6d00; margin-top: 2px; }
.sig-wrap { position: relative; }
.sig-ov { position: absolute; inset: 4px 0 0 0; background: rgba(255,255,255,.85); color: var(--ink); border: 1.5px dashed var(--muted); border-radius: 10px; font-weight: 600; }
.sig-clr { margin-top: 6px; }
.sig-block > .row [data-clr], [data-rvclr], #coClr { display: none !important; }

.chg-red { background: #fde3e1; border-radius: 8px; padding: 4px 6px; box-shadow: inset 4px 0 0 var(--red); }
.chg-green { background: #e6f4ea; border-radius: 8px; padding: 4px 6px; box-shadow: inset 4px 0 0 var(--green); }
.chg-mine { background: #fff3c4; border-radius: 8px; padding: 4px 6px; box-shadow: inset 4px 0 0 #e0b400; }
.ok-btn { padding: 2px 10px; font-size: .8rem; border-radius: 99px; background: var(--green); color: #fff; margin-left: 6px; }
.ok-btn:disabled { background: transparent; color: var(--green); }
.rv-banner { border-radius: 8px; padding: 8px 10px; background: var(--bg); margin: 6px 0; } .rv-banner.red { background: #fde3e1; } .rv-banner.green { background: #e6f4ea; }
.must { border: 2px solid var(--red); border-radius: 10px; padding: 6px 8px; background: #fdecea; } .must label { color: var(--red) !important; }
/* Datumsfelder dürfen nicht über den Rand ragen (v. a. iPhone/iPad) */
.must { box-sizing: border-box; max-width: 100%; overflow: hidden; }
.must input, .must select { box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; }
input[type=date], input[type=time] { box-sizing: border-box; max-width: 100%; min-width: 0; -webkit-appearance: none; appearance: none; display: block; }
.missing { border: 2px solid var(--red) !important; background: #fdecea !important; }
.briefkopf { display: flex; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 8px; } .briefkopf img { width: 44px; height: 44px; border-radius: 10px; }
/* Arbeitsverträge */
.ct .ct-p { margin: 4px 0; padding: 4px 6px; border-radius: 6px; font-size: .95rem; line-height: 1.45; }
.ct .ct-p textarea { width: 100%; resize: vertical; font: inherit; line-height: 1.4; min-height: 2.6em; }
.ct .ct-chg { background: #fff3c4; }
.ct-gap { background: #ffd9b0; color: #8a3b00; border-radius: 3px; padding: 0 2px; }
.ct .ct-gapta { border-color: var(--orange) !important; background: #fff4e8; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; padding: 10px 14px; border-radius: 10px; background: var(--ink, #2b211b); color: #fff; }
.ct .ct-ai { background: #ece8ff; outline: 2px solid #9b8cf0; }
#empyear th, #empyear td { padding: 4px 6px; border-bottom: 1px solid var(--line); } #empyear th { font-weight: 600; color: var(--muted); }
.bd-row { border-bottom: 1px solid var(--line); }
.bd-row > summary, .bd-plain { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 8px 0; cursor: pointer; list-style: none; }
.bd-plain { cursor: default; }
.bd-row > summary::-webkit-details-marker { display: none; }
.bd-row > summary .bd-t::before { content: '▸ '; color: var(--muted); }
.bd-row[open] > summary .bd-t::before { content: '▾ '; }
.bd-p { width: 100%; margin: 0 0 8px; background: var(--bg); border-radius: 8px; }
.bd-p td { padding: 4px 8px; }
#pf_k .sel { background: var(--ink); color: #fff; border-color: var(--ink); }
#docview { position: fixed; inset: 0; z-index: 1000; background: #fff; display: flex; flex-direction: column; }
#docview .dv-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--ink); color: #fff; }
#docview .dv-bar button { background: #fff; color: var(--ink); font-size: 1.05rem; }
#docview .dv-t { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#docview .dv-bar .btn { color: #fff; border-color: rgba(255,255,255,.5); background: transparent; }
#docview iframe { flex: 1; width: 100%; border: 0; -webkit-overflow-scrolling: touch; }
.msheet td, .msheet th { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
/* Übersicht (Home) */
.home-hello { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 14px; }
.home-hello .hh-t { font-size: 1.5rem; font-weight: 700; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.home-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 16px; min-height: 128px; border-radius: 20px;
  background: linear-gradient(145deg, var(--card), color-mix(in srgb, var(--tc) 9%, var(--card))); color: var(--ink); border: 1px solid color-mix(in srgb, var(--tc) 22%, var(--line));
  box-shadow: 0 2px 10px rgba(43,33,27,.06); transition: transform .12s, box-shadow .12s; font-weight: 400; }
.home-tile:hover, .home-tile:active { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(43,33,27,.12); }
.home-tile .ht-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.7rem; background: var(--tc); box-shadow: 0 3px 8px color-mix(in srgb, var(--tc) 40%, transparent); }
.home-tile .ht-l { font-weight: 700; font-size: 1.05rem; margin-top: 4px; }
.home-tile .ht-s { font-size: .78rem; color: var(--muted); line-height: 1.25; }
.home-tile .badge { position: absolute; top: 12px; right: 12px; margin: 0; }
@media (max-width: 480px) { .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .home-tile { min-height: 116px; padding: 12px; } .home-tile .ht-ic { width: 44px; height: 44px; font-size: 1.45rem; border-radius: 13px; } }
/* Leiste in den Bereichen: zurück zur Übersicht */
.secbar { display: none; }
.tabs.on-home { display: none !important; }
@media (max-width: 820px) {
  .tabs { display: none !important; }
  .secbar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
  .secbar .home-btn { background: var(--ink); color: #fff; border-radius: 12px; padding: 9px 14px; font-weight: 700; }
  .secbar .sec-t { font-weight: 700; display: inline-flex; gap: 6px; align-items: center; color: var(--tc); }
}
@media (min-width: 821px) { .tabs button[data-tab="home"] { font-weight: 700; } }
/* Fenster: Schließen immer oben sichtbar */
.modal .box { padding-top: 0; }
.modal .mbar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: flex-end; margin: 0 -20px 6px; padding: 10px 14px 6px; background: linear-gradient(var(--card) 75%, transparent); }
.modal .mclose { background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .85rem; font-weight: 600; }
/* Profilkopf Mitarbeiter */
.emp-head { display: flex; gap: 16px; align-items: center; }
.emp-head .av-edit { flex: none; display: block; }
.emp-head .av-edit .av-lbl { bottom: -6px; font-size: .7rem; padding: 1px 7px; white-space: nowrap; }
.emp-head-txt { min-width: 0; flex: 1; }
.emp-head-txt h2 { margin: 0 0 2px; overflow-wrap: anywhere; line-height: 1.2; }
.emp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 420px) { .emp-head .avatar.xl { width: 72px; height: 72px; font-size: 1.4rem; } }
/* Probetage */
.tr-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.tr-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tr-big { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; text-align: left; align-items: center; padding: 12px 16px; border-radius: 16px;
  background: linear-gradient(135deg, #a14b2a, #c8763f); color: #fff; box-shadow: 0 4px 14px rgba(161,75,42,.3); min-width: 240px; }
.tr-big span { grid-row: 1 / 3; font-size: 1.7rem; }
.tr-big small { font-weight: 400; opacity: .85; font-size: .75rem; }
.tr-big2 { background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.tr-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.tr-chips button { white-space: nowrap; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; font-weight: 500; font-size: .85rem; }
.tr-chips button b { margin-left: 4px; }
.tr-chips button.sel { background: var(--c, var(--ink)); border-color: var(--c, var(--ink)); color: #fff; }
.tr-card { border-left: 5px solid var(--c); }
.tr-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.tr-pill { font-size: .78rem; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
@media (max-width: 600px) { .tr-big { min-width: 0; width: 100%; } .tr-actions { width: 100%; } }
/* Adresse: Straße + Nr. und PLZ + Ort immer nebeneinander */
.addr-row, .plz-row { grid-column: 1 / -1; display: grid; gap: 12px; }
.addr-row { grid-template-columns: minmax(0, 1fr) 96px; }
.plz-row { grid-template-columns: 110px minmax(0, 1fr); }
/* Vorschlagsliste */
.sg-wrap { position: relative; }
.sg-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.15); max-height: 260px; overflow-y: auto; }
.sg-list button { display: block; width: 100%; text-align: left; background: none; color: var(--ink); border-radius: 0; padding: 11px 14px; border-bottom: 1px solid var(--line); font-weight: 400; }
.sg-list button:last-child { border-bottom: 0; }
.sg-list button:hover, .sg-list button:active { background: var(--bg); }
.tr-filters { display: grid; gap: 2px; margin-bottom: 4px; }
.tr-step { align-self: center; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; margin-right: 2px; }
.tr-table { width: 100%; border-collapse: collapse; }
.tr-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tr-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tr-table tbody tr { cursor: pointer; box-shadow: inset 4px 0 var(--c); }
.tr-table tbody tr:hover { background: var(--bg); }
.tl-steps { display: grid; gap: 0; border-left: 2px solid var(--line); margin-left: 14px; padding-left: 0; }
.tl-step { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0 12px; margin-left: -15px; opacity: .55; }
.tl-step.done { opacity: 1; }
.tl-dot { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--card); border: 2px solid var(--line); display: grid; place-items: center; font-size: .9rem; }
.tl-step.done .tl-dot { border-color: var(--green); }
.tr-dec { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 520px) { .tr-dec { grid-template-columns: 1fr; } }
.tr-search { gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.tr-search #trQ { flex: 1; min-width: 200px; }
.tr-search #trSort { width: auto; }
.tr-table th.tr-sort { cursor: pointer; user-select: none; color: var(--ink); }
.emp-actions { grid-template-columns: repeat(3, 1fr); }
.tl-steps .hy { margin: 8px 0 4px -15px; padding-left: 0; font-weight: 700; color: var(--muted); font-size: .8rem; background: var(--card); width: fit-content; padding-right: 6px; }
/* Kopfzeile: links Bereich + Standort, rechts Profilknopf mit Menü */
.topbar { position: relative; flex-wrap: nowrap; }
.topbar .title { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.topbar .t-main { font-weight: 700; white-space: nowrap; }
.top-loc { width: auto; max-width: 60vw; background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; padding: 6px 10px; font-size: .9rem; }
.top-loc option { color: var(--ink); }
.top-loc.ro { display: inline-block; }
.me-btn { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.12) !important; border-radius: 999px !important; padding: 4px 12px 4px 4px !important; }
.me-btn .caret { opacity: .7; font-size: .8rem; }
.avatar.sm { width: 30px; height: 30px; font-size: .75rem; }
.me-menu { position: absolute; right: 12px; top: calc(100% - 4px); z-index: 60; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.2); min-width: 240px; padding: 8px; display: grid; gap: 2px; }
.me-menu[hidden] { display: none; }
.me-menu .mm-head { display: flex; gap: 10px; align-items: center; padding: 6px 6px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.me-menu button { background: none !important; color: var(--ink) !important; text-align: left; justify-content: flex-start; padding: 10px 10px !important; border-radius: 10px; font-weight: 500; }
.me-menu button:hover { background: var(--bg) !important; }
.me-menu .mm-out { color: var(--red) !important; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 4px; }
@media (max-width: 820px) { .topbar .title { flex-basis: auto; } }
/* Vorschau als Mitarbeiter */
.pv-bar { position: sticky; top: 0; z-index: 70; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 12px; background: #f4b000; color: #2b211b; font-size: .9rem; }
.pv-bar span { flex: 1; min-width: 200px; }
.pv-bar button { background: rgba(0,0,0,.12); color: #2b211b; padding: 6px 10px; font-size: .85rem; }
.va-list { display: grid; gap: 4px; max-height: 55vh; overflow-y: auto; }
.va-list button { display: flex; align-items: center; gap: 10px; justify-content: flex-start; text-align: left; background: var(--bg); color: var(--ink); font-weight: 400; padding: 8px 10px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { background: var(--card); color: var(--ink); border-radius: 0; padding: 6px 10px; font-size: .8rem; font-weight: 500; }
.seg button.sel { background: var(--ink); color: #fff; }
.pv-row { gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding: 6px 0; }
#pvBar { position: fixed; top: 0; left: 0; right: 0; z-index: 200; }
body.has-pv { padding-top: 44px; }
@media (max-width: 600px) { body.has-pv { padding-top: 96px; } #pvBar { font-size: .8rem; padding: 6px 10px; } }
/* Fenster in der Vorschau unter der gelben Leiste öffnen, damit „Schließen“ sichtbar bleibt */
body.has-pv { padding-top: var(--pvh, 44px) !important; }
body.has-pv .modal { top: var(--pvh, 44px); }
body.has-pv .modal .box { max-height: calc(100dvh - var(--pvh, 44px) - 32px); }
/* Chat wie ein Messenger */
.chat2 { display: grid; grid-template-columns: 320px 1fr; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; height: calc(100dvh - 190px); min-height: 420px; }
.c2-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.c2-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; gap: 6px; flex-wrap: wrap; }
.c2-list #cQ { margin: 0 10px 8px; width: calc(100% - 20px); }
.c2-rooms { overflow-y: auto; flex: 1; }
.c2-room { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: none; color: var(--ink); border-radius: 0; padding: 10px 12px; border-bottom: 1px solid var(--line); font-weight: 400; }
.c2-room:hover { background: var(--bg); }
.c2-room.sel { background: color-mix(in srgb, var(--gold) 14%, var(--card)); }
.c2-mid { flex: 1; min-width: 0; display: grid; }
.c2-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c2-last { font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c2-side { display: grid; justify-items: end; gap: 4px; }
.c2-side .badge { position: static; margin: 0; }
.chat-ic { background: color-mix(in srgb, var(--gold) 22%, var(--card)); font-size: 1.3rem; }
.c2-conv { display: flex; flex-direction: column; min-height: 0; padding: 0 10px 8px; }
.c2-conv .chat-list { flex: 1; min-height: 0; max-height: none; }
.c2-chead { display: flex; gap: 10px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.c2-back { display: none; font-size: 1.2rem; }
.c2-empty { margin: auto; }
.va-list button.sel { background: color-mix(in srgb, var(--green) 16%, var(--card)); }
.va-list .pk { margin-left: auto; opacity: 0; color: var(--green); font-weight: 700; }
.va-list button.sel .pk { opacity: 1; }
@media (max-width: 820px) {
  .chat2 { grid-template-columns: 1fr; height: calc(100dvh - 150px); border-radius: 12px; }
  .chat2.has-open .c2-list { display: none; }
  .chat2:not(.has-open) .c2-conv { display: none; }
  .c2-list { border-right: 0; }
  .c2-back { display: inline-flex; }
}
.c2-conv .chat-list { height: auto; }
body.chat-app .secbar, body.chat-app nav.tabs { display: none !important; }
.chat-ic.main { background: var(--ink); }
.c2-pin { font-size: .75rem; }
.msg-name[data-dm]:hover, .msg-av[data-dm]:hover { text-decoration: underline; }
.task-hint { display: block; width: 100%; text-align: left; background: color-mix(in srgb, var(--red) 8%, var(--card)); color: var(--ink); border: 1px solid color-mix(in srgb, var(--red) 30%, var(--line)); font-weight: 500; padding: 12px 14px; }
.back-btn { background: var(--gold, #b8853f) !important; color: #fff !important; border-radius: 12px; padding: 9px 14px; font-weight: 700; }
@media (min-width: 821px) { .secbar.has-back { display: flex; gap: 10px; align-items: center; padding: 8px 16px; background: var(--card); border-bottom: 1px solid var(--line); } .secbar.has-back .home-btn, .secbar.has-back .sec-t { display: none; } }

/* Extra-Schichten im Plan */
.plan-xcell { vertical-align: top; cursor: pointer; min-width: 90px; }
.plan-xcell > .muted { display: block; text-align: center; }
.plan-x { border-radius: 8px; padding: 4px 6px; margin-bottom: 4px; font-size: .85rem; line-height: 1.25; }
.plan-x.set { background: color-mix(in srgb, var(--green) 16%, transparent); }
.plan-x.open { background: color-mix(in srgb, var(--orange) 14%, transparent); border: 1px dashed var(--orange); }

/* Schichtplan nach Mitarbeitern */
.pplan td.pp-cell { cursor: pointer; vertical-align: top; min-width: 86px; text-align: center; }
.pplan td.pp-cell:hover { background: #fbf3e6; }
.pplan td.pp-cell.set { background: var(--green-bg); }
.pp-sh { line-height: 1.2; margin-bottom: 3px; }
.pp-sh.other { opacity: .55; }
.pp-free { color: var(--muted, #999); font-size: .85rem; }
.pplan th.plan-slot { min-width: 150px; }

/* Änderungen bestätigen */
.nt-row { border-top: 1px solid var(--line, #e6ddd0); padding-top: 8px; display: grid; gap: 6px; }
.nt-no textarea { width: 100%; }

/* Probetag-Karte unter Aufgaben: groß und gut lesbar */
.tr-card { font-size: 1.08rem; padding: 20px; }
.tr-card input { font-size: 1.1rem; }

.home-tile.ht-off { opacity: .45; filter: grayscale(1); }
.home-tile.ht-off:hover { transform: none; box-shadow: none; }
.tr-yn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tr-yn > :only-child { grid-column: 1 / -1; }
.tr-move summary { cursor: pointer; padding: 6px 0; }
@media (max-width: 480px) { .tr-yn { grid-template-columns: 1fr; } }

/* Kleine Handys (iPhone SE/mini, 13/14/15 normal …): Fenster passen immer auf den Bildschirm */
.modal { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
.modal .box { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overscroll-behavior: contain; }
body.has-pv .modal { padding-top: 8px; }
body.has-pv .modal .box { max-height: calc(100vh - var(--pvh, 44px) - 20px); max-height: calc(100dvh - var(--pvh, 44px) - 20px - env(safe-area-inset-bottom)); }
@media (max-width: 430px) {
  .modal { padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)); }
  .modal .box { padding: 0 14px 14px; border-radius: 14px; }
  .modal .mbar { margin: 0 -14px 4px; padding: 8px 10px 4px; }
  .modal .box h2 { font-size: 1.2rem; }
  .modal .box .row { flex-wrap: wrap; }
  .modal .box .row > button.grow { min-width: 0; }
  .modal .box { max-height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  body.has-pv .modal .box { max-height: calc(100dvh - var(--pvh, 44px) - 16px - env(safe-area-inset-bottom)); }
  #pvBar { font-size: .78rem; } .pv-bar span { min-width: 0; flex-basis: 100%; }
}
/* niedrige Bildschirme: Fenster oben anfangen statt mittig, damit oben nichts abgeschnitten wird */
@media (max-height: 760px) { .modal { place-items: start center; } }
@media (max-width: 430px) { .emp-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } .emp-actions button { padding: 8px 4px; font-size: .82rem; flex-direction: column; gap: 2px; white-space: normal; text-align: center; } }
.modal .box { overflow-x: hidden; }
.modal .box .table-wrap, .modal .box table { max-width: 100%; }
@media (max-width: 430px) {
  #pvBar { padding: 5px 8px; gap: 5px; line-height: 1.25; }
  #pvBar span { font-size: .74rem; }
  #pvBar button { padding: 4px 8px; font-size: .74rem; }
}

/* Lohnlauf am Handy: Summe sauber untereinander, jede Person als Karte statt breiter Tabelle */
.kpi-btn { display: block; width: 100%; }
@media (max-width: 700px) {
  .kpis .kpi-btn { grid-column: 1 / -1; }
  .kpis .kpi .v { font-size: 1.6rem; word-break: break-word; }
  table.pay-tbl thead { display: none; }
  table.pay-tbl, table.pay-tbl tbody { display: block; width: 100%; }
  table.pay-tbl tr[data-e] { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.pay-tbl td { display: block; padding: 0; border: 0; text-align: left !important; }
  table.pay-tbl td[data-l]::before { content: attr(data-l); display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
  table.pay-tbl td.pay-name, table.pay-tbl td.pay-note { grid-column: 1 / -1; }
  table.pay-tbl td.pay-amt { grid-column: 1 / -1; }
  table.pay-tbl td input { width: 100% !important; max-width: 180px; text-align: left !important; }
  table.pay-tbl td.pay-note input { max-width: none; }
}

/* Passwort anzeigen (Auge) */
.pw-wrap{position:relative;display:block}
.pw-wrap>input{width:100%;padding-right:44px;box-sizing:border-box}
.pw-eye{position:absolute;right:4px;top:50%;transform:translateY(-50%);background:none!important;border:0!important;box-shadow:none!important;padding:6px 8px!important;min-height:0!important;width:auto!important;font-size:18px;line-height:1;cursor:pointer;color:inherit;opacity:.7}
.pw-eye:hover{opacity:1}

/* Heute-Liste: jeder aus dem Schichtplan mit Status */
.today-list { display: flex; flex-direction: column; gap: 6px; }
.today-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); border-left: 5px solid #c9bfb3; background: #fff; flex-wrap: wrap; }
.today-row .t-dot { width: 12px; height: 12px; border-radius: 50%; background: #c9bfb3; flex: none; }
.today-row .t-lbl { font-size: .85rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #eee7de; color: var(--muted); }
.today-row.in { border-left-color: var(--green); background: var(--green-bg); } .today-row.in .t-dot { background: var(--green); } .today-row.in .t-lbl { background: var(--green); color: #fff; }
.today-row.break { border-left-color: var(--orange); background: var(--orange-bg); } .today-row.break .t-dot { background: var(--orange); } .today-row.break .t-lbl { background: var(--orange); color: #fff; }
.today-row.late { border-left-color: #c62828; } .today-row.late .t-dot { background: #c62828; } .today-row.late .t-lbl { background: #fdecea; color: #c62828; }
.today-row.done { opacity: .6; } .today-row.done .t-dot { background: var(--muted); }
.pill.late { background: #fdecea; color: #c62828; }

.push-bar { display: flex; align-items: center; gap: 12px; max-width: 760px; margin: 12px auto 0; padding: 12px 14px; border-radius: 12px; background: #fff6e0; border: 2px solid var(--gold); }
@media (max-width: 760px) { .push-bar { margin: 12px 16px 0; } }

.late-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.late-grid button { padding: 14px 10px; font-size: 1rem; }
.t-late { font-size: .8rem; color: #c62828; }

.today-row.cancelled { border-left-color: #7a6c61; background: #f3efea; } .today-row.cancelled .t-dot { background: #7a6c61; } .today-row.cancelled .t-lbl { background: #7a6c61; color: #fff; } .today-row.cancelled b { text-decoration: line-through; }
.t-delay { color: var(--orange); font-size: .85rem; font-weight: 600; }
tr.sh-cancel td { opacity: .55; } tr.sh-cancel td:last-child { opacity: 1; }
