.header-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:9px}
.head,.account{flex-wrap:wrap}
.theme-toggle{display:inline-flex;align-items:center;gap:9px;white-space:nowrap;min-height:38px}
.theme-indicator{display:inline-block;width:30px;height:18px;padding:3px;border-radius:12px;background:#637c83}
.theme-indicator::before{content:"";display:block;width:12px;height:12px;background:#fff;border-radius:50%;transition:transform .15s}
.theme-toggle[aria-checked="true"] .theme-indicator{background:#13886d}
.theme-toggle[aria-checked="true"] .theme-indicator::before{transform:translateX(12px)}
.button-link{display:inline-block;text-decoration:none;font-weight:700;border-radius:10px;padding:10px 13px;text-align:center}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #599cd0;outline-offset:2px}
@media screen{
  :root[data-theme="dark"]{color-scheme:dark;--bg:#101b22;--panel:#1b2a33;--text:#e7f0f2;--muted:#b1c3ca;--line:#3c5360;--brand:#13886d;--brand-dark:#89dec5;--dark:#102c36;--danger:#ffb5b5}
  [data-theme="dark"] .card,[data-theme="dark"] .device,[data-theme="dark"] dialog{background:var(--panel);color:var(--text)}
  [data-theme="dark"] input,[data-theme="dark"] select,[data-theme="dark"] textarea{background:#13222b;color:var(--text);border-color:var(--line)}
  [data-theme="dark"] input::placeholder,[data-theme="dark"] textarea::placeholder{color:#a1b5bf;opacity:1}
  [data-theme="dark"] .intake-wrap label{color:var(--muted)}
  [data-theme="dark"] .secondary,[data-theme="dark"] .file-icon{background:#304550;color:var(--text)}
  [data-theme="dark"] .entry,[data-theme="dark"] .audit-entry,[data-theme="dark"] .attachment,[data-theme="dark"] .user-row{background:#223640}
  [data-theme="dark"] .badge,[data-theme="dark"] .priority{background:#304550;color:#e7f0f2}
  [data-theme="dark"] .priority-hoch,[data-theme="dark"] .notice{background:#493c21;color:#ffe2a0}
  [data-theme="dark"] .priority-dringend,[data-theme="dark"] .danger-soft,[data-theme="dark"] .badge.inactive,[data-theme="dark"] .errorbox,[data-theme="dark"] .notice.bad{background:#4f2d34;color:#ffccd2}
  [data-theme="dark"] .priority-niedrig,[data-theme="dark"] .notice.ok{background:#1c4037;color:#adedd8}
  [data-theme="dark"] .overdue{color:#ffc0c4}
  [data-theme="dark"] .primary:hover{background:#0e745d;color:#fff}
  [data-theme="dark"] .danger{background:#9b363e;color:#fff}
  [data-theme="dark"] .intake-admin-actions a{color:var(--brand-dark)}
  [data-theme="dark"] .qr-frame,[data-theme="dark"] .intake-qr{background:#fff}
  [data-theme="dark"] .permission-switch input{background:#637c83}
  [data-theme="dark"] .permission-switch input:checked{background:#13886d}
  [data-theme="dark"] dialog::backdrop{background:#000a}
}
@media(max-width:600px){.header-actions{justify-content:flex-start}.button-link{max-width:100%}}
@media print{.theme-toggle{display:none!important}}
