:root {
  color-scheme: dark;
  --bg: #1d1f20; --sidebar: #111214; --panel: #151719; --panel-soft: #272a2e;
  --line: #3b3f45; --text: #f1f3f5; --muted: #a9b2c0; --subtle: #8d98a9;
  --accent: #3b82f6; --accent-dark: #1b335c; --sidebar-width: 246px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.5; background: var(--bg); color: var(--text); }
a { text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.icon { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 30px; font-weight: 680; line-height: 1.25; letter-spacing: -.8px; margin-bottom: 9px; }
h2 { font-size: 17px; font-weight: 650; letter-spacing: -.25px; margin-bottom: 10px; }
h3 { font-size: 15px; font-weight: 630; margin-bottom: 6px; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 10; background: var(--accent); color: #ffffff; padding: 12px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-width); background: var(--sidebar); border-right: 1px solid var(--line); z-index: 40; display: flex; flex-direction: column; padding: 28px 16px 20px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); padding: 0 6px 30px; }
.brand-mark { width: 43px; height: 43px; flex: 0 0 43px; border: 1px solid #304f78; border-radius: 12px; background: #192f4c; color: var(--accent); display: grid; place-items: center; }
.brand-mark .icon { width: 25px; height: 25px; }
.brand-mark img { max-width: 100%; max-height: 100%; border-radius: 9px; object-fit: contain; }
.brand-copy { min-width: 0; }
.brand-copy strong { font-size: 20px; font-weight: 750; letter-spacing: -.5px; display: block; }
.brand-copy strong span { color: var(--subtle); font-size: 12px; font-weight: 500; letter-spacing: .8px; margin-left: 5px; }
.brand-copy small { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.nav-caption { font-size: 10px; font-weight: 650; color: var(--subtle); letter-spacing: 1.5px; margin: 9px 12px 13px; }
.nav-caption-secondary { margin-top: 26px; }
.nav-list { display: flex; flex-direction: column; gap: 6px; }
.nav-link { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 500; padding: 12px 14px; border-radius: 8px; min-height: 46px; transition: color .15s, background .15s; }
.nav-link:hover { color: var(--text); background: #25282d; }
.nav-link.active { color: #bfdbfe; background: #193660; box-shadow: inset 3px 0 var(--accent); }
.nav-link small { font-size: 10px; margin-left: auto; }
.nav-link.is-disabled { color: var(--subtle); cursor: default; }
.sidebar-bottom { margin-top: auto; padding-top: 36px; }
.sidebar-note { font-size: 10px; color: var(--subtle); border-top: 1px solid var(--line); padding: 18px 10px; display: flex; gap: 7px; align-items: center; }
.rp-mark { font-size: 9px; margin-left: auto; border: 1px solid var(--line); border-radius: 4px; padding: 2px 4px; }
.status-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.app-shell { margin-left: var(--sidebar-width); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { min-height: 80px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 36px; }
.topbar-location { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--subtle); }
.topbar-location strong { color: var(--text); font-weight: 500; }
.breadcrumb-separator { padding: 0 12px; color: #4c6079; }
.user-profile { display: flex; align-items: center; gap: 12px; }
.avatar { width: 37px; height: 37px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: #293346; border: 1px solid #3a495d; color: #d6e0ef; font-size: 11px; font-weight: 650; }
.profile-copy strong { display: block; font-size: 12px; color: var(--text); font-weight: 600; }
.profile-copy small { color: var(--muted); font-size: 10px; display: block; margin-top: 1px; }
.icon-button { border: 1px solid transparent; display: inline-grid; place-items: center; background: transparent; color: var(--muted); width: 36px; height: 36px; border-radius: 8px; cursor: pointer; font-size: 23px; }
.icon-button:hover { background: var(--panel-soft); color: var(--text); border-color: var(--line); }
.page-content { padding: 34px 36px 44px; width: 100%; max-width: 1700px; margin: 0 auto; flex: 1; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 26px; }
.page-heading p { color: var(--muted); margin-bottom: 0; font-size: 13px; }
.eyebrow, .panel-kicker { font-size: 10px; font-weight: 600; letter-spacing: 1.7px; color: var(--subtle); margin-bottom: 9px; }
.eyebrow { color: #93c5fd; }
.tag { display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; padding: 5px 9px; font-size: 10px; font-weight: 550; border: 1px solid transparent; line-height: 1.3; }
.tag .icon { width: 14px; height: 14px; }
.tag-admin { background: #272842; color: #c1b9ff; border-color: #42415d; }
.tag-success, .tag-aktiv, .tag-aufgenommen { background: #173b32; color: #8fe8c7; border-color: #295044; }
.tag-geplant, .tag-offen { background: #19334b; color: #a0cff8; border-color: #304d65; }
.tag-verschoben { background: #3a3021; color: #ebc88f; border-color: #574632; }
.tag-abgeschlossen, .tag-entlassen { background: #292944; color: #c5baff; border-color: #444161; }
.tag-neutral, .tag-verstorben { background: #212d3d; color: #b5c2d4; border-color: #354255; }
.admin-tabs { display: flex; gap: 5px; padding: 6px; background: #141618; border: 1px solid var(--line); border-radius: 11px; margin-bottom: 25px; overflow-x: auto; }
.admin-tab { color: var(--muted); padding: 9px 18px; border-radius: 7px; white-space: nowrap; font-size: 12px; font-weight: 520; }
.admin-tab:hover { color: var(--text); background: #292c31; }
.admin-tab.active { color: var(--text); background: #33373d; box-shadow: 0 2px 6px #0003; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; margin-bottom: 26px; }
.stat-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 19px 20px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; color: #b8c5d5; margin-bottom: 12px; }
.stat-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: #173931; color: var(--accent); flex-shrink: 0; }
.stat-icon .icon { width: 18px; height: 18px; }
.stat-icon.blue { background: #1c3247; color: #8fc7f8; }
.stat-icon.purple { background: #2b2946; color: #b9aafa; }
.stat-icon.amber { background: #3a3023; color: #e4bd79; }
.stat-number { font-size: 30px; font-weight: 650; letter-spacing: -.7px; display: block; line-height: 1.15; margin-bottom: 8px; }
.stat-caption { color: var(--subtle); font-size: 10px; }
.panel { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 24px; min-width: 0; }
.panel-heading { display: flex; gap: 12px; align-items: center; margin-bottom: 24px; }
.panel-heading h2 { margin-bottom: 4px; }
.panel-heading p { color: var(--subtle); font-size: 11px; margin-bottom: 0; }
.panel-heading.split { justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.panel-heading-icon { width: 36px; height: 36px; background: #262c34; color: #c0cddc; border-radius: 8px; display: grid; place-items: center; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(260px, 1fr); gap: 22px; align-items: start; }
.side-panels { display: flex; flex-direction: column; gap: 22px; }
.two-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.narrow-panel { max-width: 760px; }
.form-stack { display: flex; flex-direction: column; gap: 23px; }
.form-label { font-size: 11px; font-weight: 600; color: #c9d5e5; margin-bottom: 9px; }
.form-control, .form-select { display: block; width: 100%; background-color: #0e0f11; border: 1px solid var(--line); color: #e5edf8; border-radius: 7px; padding: 11px 13px; font-size: 13px; min-width: 0; }
.form-select { padding-right: 36px; }
.form-control:focus, .form-select:focus { background-color: #15181c; border-color: var(--accent); color: var(--text); box-shadow: 0 0 0 3px #3b82f61a; }
.form-control::placeholder { color: #8596ab; }
.form-control::file-selector-button { background: #243549; color: #d9e5f3; }
.form-text { font-size: 10px; color: var(--subtle); margin-top: 8px; line-height: 1.7; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-footer { margin-top: 4px; border-top: 1px solid var(--line); padding-top: 20px; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 11px; font-weight: 650; border-radius: 7px; min-height: 38px; padding: 10px 15px; white-space: nowrap; }
.btn .icon { width: 15px; height: 15px; }
.btn-primary { background: #3b82f6; color: #fff; border: 1px solid #478dff; }
.btn-primary:hover { background: #2563eb; }
.btn-quiet { color: #bfcdde; background: #25282d; border-color: #434951; }
.btn-quiet:hover { color: var(--text); background: #33383f; border-color: #545d69; }
.btn-sm { min-height: 31px; font-size: 10px; padding: 6px 10px; }
.logo-upload { display: flex; align-items: center; gap: 18px; background: #111315; border: 1px dashed #434951; border-radius: 9px; padding: 18px; }
.logo-upload > div { min-width: 0; flex: 1; }
.logo-preview { display: grid; place-items: center; width: 70px; height: 70px; flex: 0 0 70px; border: 1px solid #304f78; border-radius: 13px; color: var(--accent); background: #192f4c; }
.logo-preview .icon { width: 33px; height: 33px; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; }
.detail-list { margin: 20px 0; font-size: 11px; }
.detail-list > div { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { font-weight: 450; color: var(--muted); }
.detail-list dd { margin: 0; color: var(--text); font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.text-link { color: #93c5fd; font-size: 11px; font-weight: 550; }
.text-link .icon { width: 14px; height: 14px; margin-left: 3px; }
.activity-list > div { display: flex; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.activity-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.activity-list strong { display: block; font-size: 11px; font-weight: 500; overflow-wrap: anywhere; }
.activity-list small { display: block; font-size: 10px; margin-top: 3px; color: var(--subtle); }
.activity-dot { background: #607c96; width: 6px; height: 6px; border-radius: 50%; margin-top: 6px; flex: 0 0 6px; }
.empty-copy { font-size: 12px; color: var(--subtle); margin: 17px 0 0; line-height: 1.8; }
.empty-state { text-align: center; padding: 34px 20px; color: var(--subtle); }
.empty-state > .icon { width: 34px; height: 34px; color: #64869e; margin-bottom: 16px; }
.empty-state h2, .empty-state h3 { color: var(--muted); }
.empty-state p { font-size: 12px; margin-bottom: 0; }
.notice { border: 1px solid; border-radius: 8px; padding: 13px 16px; display: flex; align-items: center; gap: 10px; font-size: 12px; margin-bottom: 22px; }
.notice-success { background: #15342d; border-color: #285b4c; color: #a3eed6; }
.notice-info { background: #192d40; border-color: #35516b; color: #bad7f1; }
.notice-error { background: #3a242c; border-color: #75404e; color: #ffd1da; }
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.module-card { display: flex; gap: 18px; justify-content: space-between; background: #111315; border: 1px solid #3b3f45; padding: 20px; border-radius: 9px; }
.module-card p { font-size: 11px; color: var(--muted); margin-bottom: 14px; }
.module-planned { border-style: dashed; }
.form-check-input { background-color: #172433; border-color: #496078; cursor: pointer; }
.form-check-input:checked { background-color: #2ab295; border-color: #46dfc0; }
.form-check-input:disabled { cursor: not-allowed; }
.form-check-label { color: var(--muted); font-size: 11px; }
.role-row { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.employee-row { display: grid; grid-template-columns: minmax(160px, 1.1fr) 1fr 1fr auto auto; gap: 20px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.employee-name strong, .employee-name small { display: block; }
.employee-name small { color: var(--subtle); font-size: 11px; margin-top: 4px; }
.inline-form { display: flex; align-items: center; gap: 8px; }
.table { margin-bottom: 0; font-size: 12px; }
.table > :not(caption) > * > * { padding: 15px 12px; }
.table th { color: var(--subtle); font-size: 10px; text-transform: uppercase; letter-spacing: .65px; font-weight: 550; white-space: nowrap; }
.table .inline-form { min-width: 160px; }
.empty-cell { text-align: center; padding: 36px !important; color: var(--subtle) !important; }
.record-list > div { display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); padding: 16px 0; }
.record-list > div:last-child { border-bottom: 0; }
.record-list > div > div { flex: 1; min-width: 0; }
.record-list strong { display: block; font-size: 12px; color: var(--text); overflow-wrap: anywhere; }
.record-list small { display: block; color: var(--subtle); font-size: 10px; margin-top: 4px; }
.record-symbol { width: 37px; height: 37px; flex-shrink: 0; border-radius: 9px; background: #1b3042; color: #94cbed; display: grid; place-items: center; }
.station-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.station-card h2 { margin-top: 20px; }
.station-card p { min-height: 42px; font-size: 12px; }
.app-dialog { background: var(--panel); color: var(--text); border: 1px solid #41556d; border-radius: 14px; padding: 26px; width: min(600px, calc(100vw - 28px)); max-height: calc(100dvh - 40px); overflow-y: auto; box-shadow: 0 20px 80px #0009; }
.app-dialog::backdrop { background: #050b15b8; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
.dialog-heading h2 { margin-bottom: 0; }
.calendar-scroll { overflow-x: auto; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); min-width: 700px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.calendar-weekday { padding: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #25282c; color: var(--muted); font-size: 11px; text-align: center; }
.calendar-day { min-height: 120px; padding: 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.day-number { display: inline-grid; place-items: center; font-size: 11px; width: 24px; height: 24px; margin-bottom: 6px; color: #b5c8df; }
.other-month { background: #191b1e; }
.other-month .day-number { color: #63758b; }
.today .day-number { background: var(--accent); border-radius: 50%; color: #ffffff; font-weight: 650; }
.calendar-event { display: block; padding: 7px 8px; border-radius: 6px; border-left: 3px solid #8fc7f8; background: #1a3147; color: #c0dcf4; margin-bottom: 6px; }
.calendar-event small, .calendar-event strong, .calendar-event span { display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.calendar-event small, .calendar-event span { font-size: 9px; }
.calendar-event strong { font-size: 10px; margin: 3px 0; }
.event-aktiv { border-color: var(--accent); background: #173b32; color: #acf1da; }
.event-verschoben { border-color: #ebc88f; background: #3a3021; color: #ebc88f; }
.event-abgeschlossen { border-color: #c5baff; background: #292944; color: #c5baff; }
.calendar-controls { display: flex; align-items: center; gap: 8px; }
.calendar-controls input { max-width: 160px; }
.calendar-panel { padding-bottom: 24px; }
.treatment-entry { border-bottom: 1px solid var(--line); padding: 20px 0; }
.report-text { color: #c2d0e2; font-size: 12px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.app-footer { padding: 18px 36px; border-top: 1px solid #34383e; display: flex; justify-content: space-between; gap: 10px; font-size: 10px; color: var(--subtle); }
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at 50% 0%, #1b3440 0, #0b111b 65%); }
.auth-card { width: min(430px, 100%); background: #131d2bec; border: 1px solid #304356; border-radius: 18px; padding: 36px; box-shadow: 0 30px 90px #0004; }
.auth-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 35px; font-size: 24px; font-weight: 650; }
.auth-brand strong { color: var(--subtle); font-size: 14px; letter-spacing: 1px; font-weight: 500; }
.auth-card h1 { font-size: 25px; margin-bottom: 14px; }
.auth-card > .muted { font-size: 12px; margin-bottom: 30px; }
.auth-card .form-stack { gap: 20px; }
.auth-footer { font-size: 10px; line-height: 1.9; color: var(--subtle); text-align: center; margin: 26px 0 0; }
.mobile-menu, .sidebar-shade { display: none; }
@media (max-width: 1240px) {
  :root { --sidebar-width: 218px; }
  .page-content { padding: 28px 25px 35px; }
  .topbar { padding: 18px 25px; }
  .stats-grid { gap: 12px; }
  .stat-card { padding: 16px; }
  .stat-top { font-size: 10px; }
  .admin-grid { grid-template-columns: minmax(0, 1.5fr) minmax(240px, 1fr); gap: 18px; }
  .panel { padding: 21px; }
  .employee-row { grid-template-columns: 1fr 1fr; }
  .employee-name { grid-column: 1 / -1; }
  .three-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .station-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .admin-grid, .two-panels { grid-template-columns: 1fr; }
  .side-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-top { font-size: 11px; }
  .module-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { width: 245px; transform: translateX(-100%); transition: transform .2s; }
  .sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-open { overflow: hidden; }
  .sidebar-open .sidebar-shade { display: block; position: fixed; inset: 0; z-index: 35; border: 0; background: #02060baa; }
  .app-shell { margin-left: 0; }
  .topbar { min-height: 72px; padding: 14px 18px; gap: 8px; }
  .mobile-menu { display: inline-grid; }
  .topbar-location > span { display: none; }
  .user-profile { gap: 8px; }
  .page-content { padding: 24px 18px 32px; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; gap: 16px; }
  h1 { font-size: 26px; }
  .page-heading .tag-admin { display: none; }
  .admin-tabs { margin-bottom: 20px; }
  .admin-tab { padding: 9px 13px; }
  .stat-number { font-size: 27px; }
  .stats-grid { gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-top { align-items: flex-start; font-size: 10px; }
  .stat-icon { width: 29px; height: 29px; }
  .stat-caption { font-size: 9px; }
  .side-panels, .station-grid { grid-template-columns: 1fr; }
  .panel { padding: 20px; }
  .logo-upload { padding: 12px; gap: 12px; align-items: flex-start; }
  .logo-preview { width: 50px; height: 50px; flex-basis: 50px; }
  .field-grid, .three-columns, .role-row { grid-template-columns: 1fr; }
  .role-row { gap: 14px; }
  .role-row .btn { justify-self: start; }
  .employee-row { grid-template-columns: 1fr; gap: 16px; }
  .employee-name { grid-column: auto; }
  .employee-row .btn { justify-self: start; }
  .app-footer { padding: 16px 18px; font-size: 9px; flex-wrap: wrap; }
  .calendar-controls { flex-wrap: wrap; }
  .calendar-panel .panel-heading { align-items: flex-start; }
  .record-list .tag { max-width: 90px; font-size: 9px; }
  .auth-card { padding: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Component styling shared by the locally compiled Tailwind templates. */
.form-label { display: block; }
.btn { border: 1px solid transparent; cursor: pointer; }
.btn-quiet { border-color: var(--line); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-discharge { background: #d64b1d; border-color: #ed652e; color: white; }
.btn-discharge:hover { background: #b83a16; }
input:disabled, select:disabled { opacity: .55; }
input[type=checkbox] { appearance: auto; accent-color: var(--accent); width: 16px; height: 16px; flex: 0 0 16px; cursor: pointer; }
.form-check { display: flex; align-items: center; gap: 8px; }
.checkbox-label { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; cursor: pointer; }
.table { width: 100%; border-collapse: collapse; color: #d4dae3; }
.table td { border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { text-align: left; border-bottom: 1px solid var(--line); }
.table tbody tr:last-child td { border-bottom: 0; }
.table-responsive { overflow-x: auto; }
p { margin-bottom: 1rem; }
.role-card { background: #111214; }
.role-dot { display: inline-block; width: 12px; height: 12px; flex: 0 0 12px; border-radius: 50%; background: var(--accent); }
.permission-badge { font-size: 10px; line-height: 1.5; font-weight: 650; letter-spacing: .3px; color: #d0d7e2; background: #272a2e; border: 1px solid #3a3e44; border-radius: 999px; padding: 4px 9px; }
.role-color-input { display: block; width: 100%; height: 43px; border: 1px solid var(--line); background: #101214; padding: 4px; border-radius: 8px; cursor: pointer; }
.role-color-input::-webkit-color-swatch { border: 0; border-radius: 4px; }
.permission-group { background: #202327; border: 1px solid #3a3f46; border-radius: 12px; padding: 17px; }
.permission-option { display: flex; align-items: center; gap: 10px; background: #111315; border: 1px solid #30353c; border-radius: 7px; padding: 12px; font-size: 12px; cursor: pointer; }
.permission-option:has(input:disabled) { opacity: .5; cursor: default; }
.danger-icon:hover { color: #fca5a5; background: #3c2025; }
.dialog-wide { width: min(800px, calc(100vw - 28px)); }
.dialog-room { width: min(520px, calc(100vw - 28px)); }
.app-dialog { margin: auto; background: #111214; }
.dialog-structured { padding: 0; border-radius: 20px; overflow: hidden; }
.dialog-structured form { display: flex; flex-direction: column; max-height: calc(100dvh - 40px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; gap: 16px; border-bottom: 1px solid var(--line); padding: 23px 26px; }
.dialog-header h2 { font-size: 20px; margin: 0; }
.dialog-body { padding: 25px 26px; overflow-y: auto; min-height: 0; }
.dialog-footer { display: flex; justify-content: flex-end; gap: 12px; padding: 20px 26px; border-top: 1px solid var(--line); flex: 0 0 auto; background: #17191c; }
.search-bar { display: flex; align-items: center; gap: 12px; }
.search-bar > .icon { color: var(--subtle); }
.empty-icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; color: #8f99ac; background: #2b2e34; }
.empty-icon .icon { width: 34px; height: 34px; }
.station-picker { display: block; border: 1px solid var(--line); border-radius: 9px; padding: 16px; color: var(--muted); }
.station-picker strong { display: block; color: var(--text); margin-bottom: 7px; }
.station-picker span { display: block; font-size: 11px; margin-top: 4px; }
.station-picker:hover { background: #24272c; }
.station-picker.selected { background: #19345b; border-color: #3976ca; }
.room-card { background: #111315; }
.room-patient { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #23262c; border-radius: 7px; padding: 12px; }
.room-patient strong { display: block; font-size: 12px; }
.room-patient small { font-size: 10px; color: var(--subtle); }
.patient-avatar { display: grid; place-items: center; width: 64px; height: 64px; flex: 0 0 64px; border-radius: 15px; background: #273346; color: #a9c9fc; }
.patient-avatar .icon { width: 32px; height: 32px; }
.patient-tabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--line); gap: 18px; }
.patient-tab { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; border-bottom: 2px solid transparent; padding: 15px 3px; color: var(--muted); font-size: 13px; }
.patient-tab.active { border-color: var(--accent); color: #93c5fd; }
.patient-data dt { color: var(--subtle); font-size: 12px; margin-bottom: 7px; }
.patient-data dd { font-size: 14px; overflow-wrap: anywhere; margin: 0; }
.form-switch input[role=switch] { appearance: none; position: relative; width: 36px; height: 20px; flex: 0 0 36px; border: 1px solid #58616f; border-radius: 999px; background: #30353d; }
.form-switch input[role=switch]::after { content: ''; position: absolute; width: 14px; height: 14px; top: 2px; left: 3px; border-radius: 50%; background: #c4cdd9; transition: transform .15s; }
.form-switch input[role=switch]:checked { background: #2563eb; border-color: #60a5fa; }
.form-switch input[role=switch]:checked::after { transform: translateX(14px); background: white; }
.auth-body { background: radial-gradient(ellipse at 50% 0%, #29313d 0, #17191d 65%); }
.auth-card { background: #15181d; border-color: var(--line); }
@media (max-width: 640px) { .dialog-header, .dialog-body, .dialog-footer { padding: 18px; } .patient-avatar { width: 46px; height: 46px; flex-basis: 46px; } .search-bar { gap: 8px; } .search-bar > .icon { display: none; } }

/* MDT 0.3: centered navigation, scrollable clinical tabs and reference modals. */
.nav-caption { text-align: center; }
.nav-link { justify-content: center; text-align: center; }
.nav-link .icon { flex-shrink: 0; }
.admin-tab { flex-shrink: 0; }
.admin-tab:first-child { margin-left: auto; }
.admin-tab:last-child { margin-right: auto; }
.centered-tab-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #202326; }
.patient-tabs { width: max-content; min-width: 100%; justify-content: center; overflow: visible; border: 0; gap: 5px; padding: 7px; }
.patient-tab { border: 1px solid transparent; border-radius: 9px; padding: 10px 14px; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.patient-tab .icon { width: 17px; height: 17px; }
.patient-tab.active { color: #8eaeff; background: #111; border-color: #41454b; }
.patient-avatar { width: 70px; height: 70px; flex-basis: 70px; border-radius: 50%; background: #3075ed; color: white; font-size: 18px; font-weight: 650; }
.patient-heading { align-items: flex-start; }
.patient-heading h1 { margin-bottom: 7px; }
.patient-stats .stat-card { background: #111; border-radius: 17px; padding: 24px; }
.patient-stats .stat-top { color: #8d9fb8; font-size: 11px; margin-bottom: 12px; }
.patient-stats strong { font-size: 20px; letter-spacing: -.3px; }
.btn-export { background: #222d40; border: 1px solid #354f79; color: #75a3ff; }
.medical-section { min-width: 0; }
.medical-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; flex-wrap: wrap; margin-bottom: 17px; }
.medical-section-heading h2 { margin: 0; font-size: 23px; letter-spacing: -.4px; }
.medical-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 260px; padding: 40px 24px; background: #111; border: 1px solid #44474b; border-radius: 18px; text-align: center; }
.empty-icon-circle { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 50%; background: #202428; color: #8daccd; margin-bottom: 23px; }
.empty-icon-circle .icon { width: 33px; height: 33px; }
.medical-empty h3 { color: #e9edf3; font-size: 18px; margin: 0; }
.medical-entry { background: #111; padding: 22px; border: 1px solid #40454b; border-radius: 16px; min-width: 0; }
.medical-entry h3 { font-size: 16px; }
.medical-entry .patient-data dd { font-size: 13px; }
.medical-dialog { background: #111; border-color: #303338; border-radius: 24px; }
.medical-dialog .dialog-header { padding: 23px 25px; }
.medical-dialog .dialog-header h2 { font-size: 20px; }
.medical-dialog .dialog-footer { background: #111; padding: 22px 25px; }
.medical-dialog .form-label { font-size: 13px; color: #e0e6ed; }
.medical-dialog .form-control, .medical-dialog .form-select { background: #111; padding: 12px 14px; min-height: 44px; font-size: 14px; border-color: #363a40; }
.medical-dialog .btn-quiet { background: #111; }
.medical-fieldset { min-width: 0; background: #242527; border-radius: 12px; padding: 18px; }
.medical-fieldset legend { float: left; width: 100%; margin-bottom: 20px; font-weight: 650; font-size: 15px; }
.medical-fieldset > div { clear: both; }
.gcs-score-box { display: flex; flex-direction: column; align-items: center; gap: 8px; background: #242629; border-radius: 12px; padding: 23px; }
.gcs-score-box > span { font-size: 13px; color: #abb9cc; }
.gcs-score-box output { font-size: 46px; line-height: 1.2; color: #a7baff; font-weight: 700; }
.gcs-score-box small { color: #a8b5c8; }
.export-option { display: flex; align-items: center; gap: 13px; min-height: 80px; padding: 15px; border: 1px solid #42464c; border-radius: 11px; cursor: pointer; }
.export-option:hover, .export-option:has(input:checked) { border-color: #6091e5; background: #151e2b; }
.export-option input { width: 17px; height: 17px; flex: 0 0 17px; accent-color: #3b82f6; }
.export-option strong { display: block; font-size: 13px; }
.export-option small { display: block; color: #8b9bb2; font-size: 11px; margin-top: 6px; }
.export-icon { color: #7da5ee; }
.export-neurologie { color: #a78bfa; } .export-vitalparameter, .export-wundversorgung { color: #f87171; }
.export-medikation { color: #fbbf24; } .export-diagnostik { color: #fb923c; } .export-berichte { color: #86efac; } .export-konsile { color: #2dd4bf; }
.export-feedback { margin: 12px 0 0; color: #a9c9fd; font-size: 12px; }
.consult-completed { border: 1px solid #42464c; border-radius: 16px; overflow: hidden; }
.consult-completed > h3 { margin: 0; background: #222528; padding: 20px 22px; border-bottom: 1px solid #42464c; font-size: 20px; }
.consult-completed .medical-empty { border: 0; border-radius: 0; }
.status-select { width: 180px; }
.vital-chart-panel { background: #121416; }
.vital-chart { position: relative; height: 350px; width: 100%; }
.vital-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 24px 0 16px; }
.vital-toolbar input[type=date] { max-width: 175px; }
.vital-table-scroll { overflow-x: auto; border: 1px solid #44474e; border-radius: 12px; }
.vital-table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; background: #141619; }
.vital-table th, .vital-table td { padding: 10px 6px; border-right: 1px solid #363b42; border-bottom: 1px solid #363b42; text-align: center; }
.vital-table th { color: #aebcd1; font-size: 11px; font-weight: 500; }
.vital-table th:first-child { position: sticky; left: 0; background: #252932; min-width: 100px; z-index: 1; }
.vital-table th strong, .vital-table th small { display: block; }
.vital-table th small { font-size: 9px; margin-top: 4px; }
.vital-table td { min-width: 85px; }
.vital-input { width: 65px; min-height: 30px; border: 1px solid #343b45; border-radius: 5px; background: #15191f; color: #e4ebf5; padding: 4px; font-size: 12px; text-align: center; }
.vital-input:focus { border-color: #60a5fa; outline: 1px solid #60a5fa; }
.vital-input:disabled { opacity: .7; }
.vital-table .rr-cell { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.hour-unavailable { background: repeating-linear-gradient(45deg, #141619, #141619 6px, #23262b 6px, #23262b 12px); }
@media (max-width: 640px) { .patient-stats .stat-card { padding: 18px 14px; } .patient-stats strong { font-size: 16px; } .medical-section-heading h2 { font-size: 19px; } .medical-dialog .dialog-header h2 { font-size: 18px; } .vital-chart { height: 290px; } .patient-avatar { width: 52px; height: 52px; flex-basis: 52px; } }
