[hidden][hidden] { display:none!important; }
.toolbar { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.notice { padding:10px 16px; color:#325b48; white-space:pre-wrap; }
.notice:empty { display:none; }
.error { color:#a32929; background:#fff0ec; }
.task-field { min-height:0; }
.task-line { align-items:center; }
.task-text { flex:1; min-width:0; }
.task-text p { margin:0; }
.task-meta { color:var(--muted); font-size:.83rem; }
.overdue { color:#aa3924; }
.group-controls { display:flex; gap:6px; }
.drag-handle { touch-action:none; cursor:grab; }
.dragging { opacity:.6; outline:2px dashed #4f7969; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }
.form-grid label { display:grid; gap:5px; }
.form-grid input:not([type=checkbox]), .form-grid select, .form-grid textarea { width:100%; padding:9px; border:1px solid var(--line-strong); border-radius:8px; background:white; }
.full-width { grid-column:1/-1; }
.checkbox-row { display:flex!important; align-items:center; gap:8px; }
.weekdays { display:flex; flex-wrap:wrap; gap:14px; }
.weekdays label { display:flex; gap:5px; }
.preview-dates { background:#eff5f0; border-radius:10px; padding:12px; }
.admin-shell-v2 { display:grid; grid-template-columns:220px minmax(0,1fr); gap:24px; max-width:1350px; margin:24px auto; padding:0 20px; }
.admin-sidebar-v2 { display:flex; flex-direction:column; gap:8px; align-self:start; position:sticky; top:15px; }
.admin-sidebar-v2 button, .admin-sidebar-v2 a { text-align:left; padding:12px; border:1px solid var(--line); border-radius:8px; background:var(--surface); text-decoration:none; }
.admin-sidebar-v2 button.active { background:#dcece3; border-color:#8fb49d; }
.panel-v2 { background:var(--surface); padding:24px; border-radius:16px; border:1px solid var(--line); }
.panel-v2 h2 { margin-top:0; }
.panel-v2 button, .toolbar button, .group-controls button, .task-dialog button { padding:9px 14px; border:1px solid var(--line-strong); border-radius:8px; background:#f5f7f3; min-height:44px; cursor:pointer; }
.panel-v2 button.danger { color:#a32929; background:#fff2ef; }
.list-v2 { display:grid; gap:10px; margin-top:22px; }
.list-row { display:flex; gap:12px; align-items:center; justify-content:space-between; padding:13px; border:1px solid var(--line); border-radius:10px; }
.list-row .row-content { flex:1; min-width:0; }
.list-row small { display:block; color:var(--muted); }
.report-scroll { overflow:auto; margin:18px 0; }
.report-scroll table { width:100%; border-collapse:collapse; font-size:.9rem; }
.report-scroll th, .report-scroll td { padding:9px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; white-space:pre-wrap; }
.report-scroll th { background:#eef3ed; }
.task-dialog { max-height:92vh; overflow:auto; width:min(850px,94vw); padding:18px; }
.task-dialog.small-dialog { width:min(440px,94vw); padding:0; }
.task-dialog header { display:flex; align-items:center; justify-content:space-between; gap:15px; }
.task-dialog textarea, .task-dialog select { width:100%; padding:10px; margin:8px 0 16px; }
.expanded-dialog { width:96vw!important; max-width:1400px!important; height:95vh; }
.pdf-toolbar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; position:sticky; top:0; padding:8px; background:#e9eee9; z-index:1; }
.pdf-scroll { overflow:auto; max-height:65vh; padding:10px 0; background:#ddd; }
.expanded-dialog .pdf-scroll { max-height:75vh; }
.pdf-scroll canvas { display:block; background:white; margin:auto; }
.info-grid { display:grid; grid-template-columns:140px 1fr; gap:8px; }
.info-grid dt { color:var(--muted); }
.info-grid dd { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; }
.subtle { color:var(--muted); font-size:.9rem; }
.section-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px; }
.section-heading h2 { margin:0; }
.panel-v2 .primary { background:#31544c; color:white; border-color:#31544c; }
.form-grid { row-gap:22px; }
.form-grid input:not([type=checkbox]), .form-grid select { min-height:44px; }
input[type=checkbox] { width:19px; height:19px; accent-color:#31544c; }
.optional-field { display:grid; gap:14px; align-content:start; }
.disclosure { border-top:1px solid var(--line); padding:16px 0; margin-top:8px; }
summary { cursor:pointer; min-height:44px; align-content:center; }
summary small { margin-left:10px; color:var(--muted); font-weight:normal; }
.disclosure-body { padding-top:16px; }
.schedule-summary { color:var(--muted); font-size:.92rem; }
.schedule-summary p { margin:0; }
.schedule-summary summary { font-size:.88rem; }
.schedule-summary ol { margin:0; padding-left:24px; line-height:1.9; }
.editor-footer { border-top:1px solid var(--line); padding-top:20px; }
.inline-error { color:#a32929; white-space:pre-wrap; margin:0; }
.inline-error:empty { display:none; }
.attachment-status { overflow-wrap:anywhere; font-size:.92rem; margin:8px 0; }
.compact-form { margin:20px 0; padding:18px; background:#f7f8f4; border-radius:10px; }
.help-disclosure { color:var(--muted); font-size:.9rem; }
.segmented { display:flex; gap:8px; margin:0 0 24px; }
.segmented .active { background:#e0ebe4; border-color:#8eaa9a; }
.action-menu { position:relative; }
.action-menu summary { list-style:none; width:44px; text-align:center; font-size:1.4rem; }
.action-menu summary::-webkit-details-marker { display:none; }
.action-menu button { position:absolute; right:0; top:44px; z-index:2; box-shadow:0 4px 16px #0002; }
.list-v2 { margin-top:12px; gap:0; }
.list-row { border:0; border-bottom:1px solid var(--line); border-radius:0; padding:18px 0; }
.list-row:last-child { border-bottom:0; }
.list-row strong { font-size:1rem; font-weight:600; }
.list-row small { margin-top:5px; }
.task-dialog h2 { font-size:1.3rem; }
#detailDescription { white-space:pre-wrap; overflow-wrap:anywhere; }
#message { max-width:1310px; margin:0 auto; }
@media(max-width:760px) { .section-heading { flex-wrap:wrap; } .panel-v2 { padding:18px; } .info-grid { grid-template-columns:110px 1fr; } .task-field-header { flex-wrap:wrap; } }
@media(max-width:760px) { .admin-shell-v2 { grid-template-columns:1fr; padding:0 12px; } .admin-sidebar-v2 { position:static; flex-direction:row; flex-wrap:wrap; } .form-grid { grid-template-columns:1fr; } .panel-v2 { padding:16px; } .list-row { flex-wrap:wrap; } .staff-header { flex-wrap:wrap; } }

/* Verbindungsstatus und Offline-Puffer (cloud-api.js) */
.net-bar { position:fixed; left:12px; right:12px; bottom:12px; z-index:50; max-width:760px; margin:0 auto; padding:12px 16px; border-radius:10px; background:#fff; box-shadow:0 6px 24px #0003; font-size:.95rem; }
.net-bar[hidden] { display:none; }
.net-bar p { margin:4px 0; }
.net-bar button { min-height:36px; padding:4px 12px; margin-left:8px; }
.net-offline { color:#7a4b00; }
.net-pending { color:#304f4b; }
.net-info { color:#304f4b; font-weight:600; }
.net-rejected { color:#a32929; }
.net-rejected ul { margin:6px 0; padding-left:20px; }
.update-overlay { position:fixed; inset:0; z-index:100; display:grid; place-items:center; background:#f4f6f2f2; padding:24px; text-align:center; }
.update-overlay > div { max-width:420px; background:#fff; padding:32px; border-radius:14px; box-shadow:0 8px 32px #0002; }
.activation-panel form { display:grid; gap:14px; }
.code-input { font-size:1.4rem; letter-spacing:.12em; text-transform:uppercase; font-family:ui-monospace, Consolas, monospace; }
/* Platz für die Statusleiste, damit sie keine Aufgabe verdeckt */
body:has(#praxisNetBar:not([hidden])) .staff-shell, body:has(#praxisNetBar:not([hidden])) .admin-shell-v2 { padding-bottom:180px; }
.help-shell { width:min(820px, calc(100% - 32px)); margin:8px auto 46px; display:grid; gap:18px; }
.help-shell h2 { margin:0 0 12px; font-size:1.2rem; }
.help-shell .disclosure summary { cursor:pointer; font-weight:600; }
.help-shell .disclosure p { margin:10px 0 0; line-height:1.55; }
.help-shell .info-grid { margin:0 0 14px; }
.ok-text { color:#2f7a52; }
.support-line { margin-top:16px; color:#5d6b64; }
.help-link { margin-left:8px; }

.list-tools { display:flex; gap:12px; flex-wrap:wrap; align-items:end; margin:-4px 0 12px; }
.list-tools input[type=search] { flex:1; min-width:220px; min-height:44px; padding:8px 12px; border:1px solid var(--line-strong); border-radius:8px; }
.sort-select { display:grid; gap:4px; font-size:.85rem; color:var(--muted); }
.sort-select select { min-height:44px; padding:6px 10px; border:1px solid var(--line-strong); border-radius:8px; }
.tag-filter, .tag-row, .tag-suggestions { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.tag-filter { margin-bottom:8px; }
.tag-row { margin-top:6px; }
.tag-suggestions { margin-top:6px; }
.panel-v2 button.tag-chip, .tag-chip { min-height:30px; padding:3px 11px; border:1px solid #c9d6cf; border-radius:999px; background:#eef4f0; color:#2c4a40; font-size:.85rem; cursor:pointer; }
.tag-chip span { color:var(--muted); margin-left:2px; }
.panel-v2 button.tag-chip.active, .tag-chip.active { background:#304f4b; border-color:#304f4b; color:#fff; }
.tag-chip.active span { color:#d9e6e0; }
.list-section { margin:22px 0 2px; font-size:1rem; color:var(--muted); font-weight:600; }
.list-section small { font-weight:400; }
.tag-field small { font-weight:400; }

.time-field { display:grid; gap:8px; justify-items:start; }
.time-list { display:flex; flex-wrap:wrap; gap:8px; }
.time-row { display:flex; align-items:center; gap:4px; }
.time-row input[type=time] { min-height:44px; padding:6px 10px; border:1px solid var(--line-strong); border-radius:8px; font:inherit; }
.panel-v2 button.remove-time, .remove-time { min-height:36px; min-width:36px; padding:0 10px; border-radius:8px; }
/* Einfache Bedienung: ganze Zeile antippbar, grössere Ziele, klare Hauptaktion */
.task-line { grid-template-columns:48px minmax(0,1fr) 48px; min-height:62px; }
.task-line.is-open { cursor:pointer; }
.task-line.is-open:hover { border-color:#8fb89c; background:#fbfdfb; }
.task-line.is-open:focus-visible { outline:3px solid #6fa680; outline-offset:2px; }
.task-check-button, .task-info-button { width:44px; height:44px; }
.task-check-button::before { width:16px; height:16px; }
.task-meta { color:#5d584f; font-size:.9rem; }
.task-meta.overdue { color:#a32929; font-weight:600; }
.person-picker { border:0; padding:0; margin:0 0 14px; }
.person-picker legend { padding:0; margin-bottom:8px; color:var(--muted); }
.person-choices { display:grid; grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); gap:8px; }
.task-dialog button.person-choice { min-height:48px; text-align:left; background:#fff; }
.task-dialog button.person-choice.selected { background:#304f4b; border-color:#304f4b; color:#fff; font-weight:600; }
.task-dialog #completeButton { background:#304f4b; border-color:#304f4b; color:#fff; font-weight:600; min-width:140px; }
.task-dialog.small-dialog { width:min(520px,94vw); }
.admin-button { min-height:44px; padding:9px 15px; }

.quick-range { display:flex; flex-wrap:wrap; gap:8px; }
.panel-v2 .quick-range button.active { background:#304f4b; border-color:#304f4b; color:#fff; }
.panel-v2 button.primary { background:#304f4b; border-color:#304f4b; color:#fff; font-weight:600; }
.panel-v2 button.order-button { min-width:44px; padding:0; }
.panel-v2 button:disabled { opacity:.4; cursor:default; }

/* Medikamente: Hinweis in der Mitarbeiteransicht */
.med-alert { margin:0 0 18px; padding:16px 20px; border:1px solid #e3c37f; border-left:6px solid #d39b2a; border-radius:var(--radius); background:#fff8e8; box-shadow:var(--shadow); display:grid; gap:10px; }
.med-alert.has-expired { border-color:#e2a49b; border-left-color:#b42318; background:#fff3f1; }
.med-alert header { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.med-alert h2 { margin:0; font-size:1.15rem; }
.med-alert ul { margin:0; padding:0; list-style:none; display:grid; gap:6px; }
.med-alert li { display:flex; flex-wrap:wrap; gap:4px 10px; align-items:baseline; }
.med-alert li span { color:#6a4a0a; font-size:.92rem; }
.med-alert li.expired span { color:#a32929; font-weight:600; }
.med-alert .admin-button { justify-self:start; }

/* Medikamente: Liste und Erfassung */
.med-shell { width:min(980px, calc(100% - 32px)); margin:8px auto 46px; display:grid; gap:18px; }
.med-actions { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr); gap:12px; }
.med-scan-button, .med-manual-button { min-height:64px; border-radius:14px; border:1px solid var(--line-strong); background:var(--surface); font-size:1.05rem; display:inline-flex; align-items:center; justify-content:center; gap:12px; padding:10px 18px; }
.med-scan-button { background:#304f4b; border-color:#304f4b; color:#fff; font-weight:600; font-size:1.15rem; }
.med-scan-button:disabled { opacity:.7; }
.scan-icon { width:26px; height:20px; border:2px solid currentColor; border-radius:4px; position:relative; }
.scan-icon::after { content:""; position:absolute; left:3px; right:3px; top:50%; height:2px; background:currentColor; }
.med-row { gap:14px; }
.med-row .row-content strong { margin-right:8px; }
.med-badge { display:inline-block; padding:2px 10px; border-radius:999px; font-size:.82rem; font-weight:600; vertical-align:middle; }
.med-badge.expired { background:#fde4e0; color:#a32929; }
.med-badge.soon { background:#fbefd3; color:#7a4b00; }
.med-row-actions { display:flex; gap:8px; }
.med-list-panel .tag-chip.status-expired.active { background:#a32929; border-color:#a32929; }
.med-list-panel .tag-chip.status-soon.active { background:#94600a; border-color:#94600a; }
.med-dialog form { display:grid; gap:14px; padding:18px; }
.med-dialog label { display:grid; gap:6px; }
.med-dialog input, .med-dialog select { width:100%; min-height:48px; padding:10px 12px; border:1px solid var(--line-strong); border-radius:8px; background:#fff; font-size:1.05rem; }
.med-dialog select { margin:0; }
.med-dialog footer, #removeForm footer { display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap; }
#removeForm { padding:18px; }
.task-dialog footer button.primary-action { background:#304f4b; border-color:#304f4b; color:#fff; font-weight:600; min-width:140px; }
.task-dialog footer button.primary-action.danger-action { background:#a32929; border-color:#a32929; }
.input-with-button { display:flex; gap:8px; }
.input-with-button input { flex:1; min-width:0; }
.med-dialog p { margin:0; }
#lookupInfo:empty, .expiry-info:empty { display:none; }
.scan-info { padding:10px 12px; border-radius:8px; background:#eef4f0; color:#2c4a40; }
.expiry-info { font-size:.92rem; color:#2f7a52; margin-top:-6px!important; }
.expiry-info.bad, .expiry-info.expired { color:#a32929; font-weight:600; }
.expiry-info.soon { color:#7a4b00; font-weight:600; }
.reason-choice { display:flex!important; align-items:center; gap:10px; min-height:48px; padding:0 12px; border:1px solid var(--line-strong); border-radius:8px; background:#fff; cursor:pointer; }
.reason-choice:has(input:checked) { background:#304f4b; border-color:#304f4b; color:#fff; font-weight:600; }
.reason-choice input { width:18px; height:18px; }
/* Kamera-Scan im Browser */
.scan-dialog { width:min(640px,96vw); padding:12px; border:0; border-radius:14px; background:#111; color:#fff; text-align:center; }
.scan-dialog::backdrop { background:#000c; }
.scan-frame { position:relative; }
.scan-frame video { width:100%; border-radius:10px; display:block; background:#000; }
.scan-target { position:absolute; inset:22% 15%; border:3px solid #9fe0b5; border-radius:12px; box-shadow:0 0 0 999px #0005; }
.scan-hint { margin:12px 0; }
.scan-cancel { min-height:48px; padding:8px 24px; border-radius:10px; border:1px solid #fff6; background:#fff1; color:#fff; }
@media(max-width:600px) { .med-actions { grid-template-columns:1fr; } .med-row-actions { width:100%; } .med-row-actions button { flex:1; } }

/* Marke: Symbol in der Kopfzeile, Logo auf Anmelde- und Aktivierungsseite */
.brand-head { display:flex; align-items:center; gap:14px; min-width:0; }
.brand-mark { width:44px; height:44px; flex:none; }
.brand-logo { display:block; width:173px; height:auto; margin:0 0 18px; }
@media(max-width:600px) { .brand-mark { width:36px; height:36px; } }

/* Menü in der Mitarbeiteransicht: Symbol wird zum X, Einträge klappen darunter auf */
.app-menu { position:relative; flex:none; }
.menu-toggle { width:52px; height:52px; display:grid; place-items:center; border:1px solid var(--line-strong); border-radius:14px; background:var(--surface); color:#304f4b; cursor:pointer; transition:background .2s, border-color .2s; }
.menu-toggle:hover { border-color:#8fb49d; }
.menu-toggle:focus-visible, .menu-item:focus-visible { outline:3px solid #6fa680; outline-offset:2px; }
.menu-toggle[aria-expanded="true"] { background:#304f4b; border-color:#304f4b; color:#fff; }
.menu-icon { position:relative; width:22px; height:16px; display:block; }
.menu-icon span { position:absolute; left:0; width:22px; height:2.5px; border-radius:2px; background:currentColor; transition:transform .28s cubic-bezier(.2,.8,.2,1), opacity .18s, top .28s cubic-bezier(.2,.8,.2,1); }
.menu-icon span:nth-child(1) { top:0; } .menu-icon span:nth-child(2) { top:6.75px; } .menu-icon span:nth-child(3) { top:13.5px; }
.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(1) { top:6.75px; transform:rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(2) { opacity:0; transform:scaleX(.2); }
.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(3) { top:6.75px; transform:rotate(-45deg); }
.menu-panel { position:absolute; right:0; top:calc(100% + 10px); z-index:40; width:240px; display:grid; gap:8px; pointer-events:none; }
.menu-panel.open { pointer-events:auto; }
.menu-item { display:flex; align-items:center; gap:12px; min-height:52px; padding:0 16px; border:1px solid var(--line-strong); border-radius:12px; background:var(--surface); color:var(--text); text-decoration:none; font-weight:600; box-shadow:0 8px 22px rgb(48 79 75 / .14);
  opacity:0; transform:translateY(-14px) scale(.96); transform-origin:top right; transition:opacity .18s, transform .22s cubic-bezier(.2,.8,.2,1); }
.menu-item svg { color:#304f4b; flex:none; }
.menu-item:hover { border-color:#8fb49d; background:#fbfdfb; }
.menu-panel.open .menu-item { opacity:1; transform:none; }
.menu-panel.open .menu-item:nth-child(2) { transition-delay:.05s; } .menu-panel.open .menu-item:nth-child(3) { transition-delay:.1s; }
.menu-badge { margin-left:auto; min-width:24px; height:24px; padding:0 7px; border-radius:999px; background:#d39b2a; color:#fff; font-size:.8rem; display:grid; place-items:center; }
.menu-badge.expired { background:#b42318; }
.menu-badge[hidden] { display:none; }
@media (prefers-reduced-motion: reduce) { .menu-icon span, .menu-item { transition:none; } }
.menu-toggle { position:relative; }
.menu-toggle.has-alert::after { content:""; position:absolute; top:-4px; right:-4px; width:14px; height:14px; border-radius:50%; background:#d39b2a; border:2px solid var(--bg); }
.menu-toggle.alert-expired::after { background:#b42318; }
.menu-toggle[aria-expanded="true"]::after { display:none; }
/* Kopfzeile mit Menü bleibt auch am Handy einzeilig: Menü immer rechts */
.staff-home .staff-header { flex-wrap:nowrap!important; flex-direction:row!important; align-items:flex-start; justify-content:space-between; }
.staff-home .brand-head h1 { overflow-wrap:anywhere; }
@media(max-width:420px) { .menu-panel { width:min(240px, calc(100vw - 32px)); } }
