:root {
  color-scheme: light;
  --color-accent: #6d38e8;
  --color-accent-strong: #5623c9;
  --color-accent-soft: #eee8ff;
  --color-accent-text: #4a1caf;
  --color-success: #087d5b;
  --color-success-soft: #e5f7f0;
  --color-warning: #a65a08;
  --color-warning-soft: #fff1db;
  --color-danger: #b4233f;
  --color-danger-soft: #ffe8ed;
  --color-info: #2463c5;
  --color-info-soft: #e7efff;
  --color-canvas: #f7f7fb;
  --color-surface: #fff;
  --color-surface-raised: #fff;
  --color-surface-subtle: #fbfafd;
  --color-sidebar: #101017;
  --color-sidebar-raised: #181821;
  --color-sidebar-text: #f7f5fc;
  --color-sidebar-muted: #9e9aaa;
  --color-text: #191821;
  --color-text-muted: #686571;
  --color-border: #dedce6;
  --color-border-strong: #c4c0ce;
  --shadow-sm: 0 8px 24px rgb(23 20 45 / 6%);
  --shadow-md: 0 22px 56px rgb(24 17 64 / 14%);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --font-sans: Inter, Aptos, "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --motion-fast: 140ms;
  --motion-normal: 220ms;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --color-accent: #8d61ff;
  --color-accent-strong: #a986ff;
  --color-accent-soft: #2b2145;
  --color-accent-text: #c7b2ff;
  --color-success: #4fd0a7;
  --color-success-soft: #15352c;
  --color-warning: #f3b464;
  --color-warning-soft: #3c2c19;
  --color-danger: #ff8097;
  --color-danger-soft: #44202a;
  --color-info: #80aaff;
  --color-info-soft: #1c2c4c;
  --color-canvas: #0e0e14;
  --color-surface: #15151d;
  --color-surface-raised: #1a1a24;
  --color-surface-subtle: #121219;
  --color-sidebar: #09090e;
  --color-sidebar-raised: #14141c;
  --color-sidebar-text: #f7f5fc;
  --color-sidebar-muted: #9e9aaa;
  --color-text: #f4f2f8;
  --color-text-muted: #a9a5b2;
  --color-border: #2a2934;
  --color-border-strong: #3b3947;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 18%);
  --shadow-md: 0 14px 34px rgb(0 0 0 / 24%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --color-accent: #8d61ff; --color-accent-strong: #a986ff; --color-accent-soft: #2b2145; --color-accent-text: #c7b2ff;
    --color-success: #4fd0a7; --color-success-soft: #15352c; --color-warning: #f3b464; --color-warning-soft: #3c2c19;
    --color-danger: #ff8097; --color-danger-soft: #44202a; --color-info: #80aaff; --color-info-soft: #1c2c4c;
    --color-canvas: #0e0e14; --color-surface: #15151d; --color-surface-raised: #1a1a24; --color-surface-subtle: #121219;
    --color-sidebar: #09090e; --color-sidebar-raised: #14141c; --color-sidebar-text: #f7f5fc; --color-sidebar-muted: #9e9aaa;
    --color-text: #f4f2f8; --color-text-muted: #a9a5b2; --color-border: #2a2934; --color-border-strong: #3b3947;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 18%); --shadow-md: 0 14px 34px rgb(0 0 0 / 24%);
  }
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; overflow-x: clip; scrollbar-gutter: stable; background: var(--color-canvas); font-family: var(--font-sans); }
body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--color-text); background: var(--color-canvas); font-family: var(--font-sans); font-size: 14px; line-height: 1.5; }
button, input, select, textarea { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--color-accent) 58%, white); outline-offset: 2px; }
::selection { color: var(--color-accent-text); background: var(--color-accent-soft); }
.skip-link { position: fixed; z-index: 40; top: 8px; left: 8px; transform: translateY(-160%); padding: 10px 14px; border-radius: var(--radius-md); color: #fff; background: var(--color-sidebar); }
.skip-link:focus { transform: translateY(0); }
.boot-state { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--color-text-muted); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--color-border); border-top-color: var(--color-accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 10; inset: 0 auto 0 0; display: flex; width: 252px; flex-direction: column; padding: 26px 16px 18px; color: var(--color-sidebar-text); background: var(--color-sidebar); }
.brand { display: flex; align-items: center; min-height: 54px; padding: 0 12px 22px; border-bottom: 1px solid rgb(255 255 255 / 9%); }
.brand__word { font-size: 20px; font-weight: 750; letter-spacing: -.055em; }
.brand__label { display: block; margin-top: 1px; color: var(--color-sidebar-muted); font-size: 10px; letter-spacing: .04em; }
.nav-group { display: grid; gap: 4px; margin-top: 26px; }
.nav-heading { padding: 0 12px 8px; color: var(--color-sidebar-muted); font-size: 10px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border: 1px solid transparent; border-radius: 11px; color: var(--color-sidebar-muted); text-decoration: none; font-size: 13px; font-weight: 570; transition: background var(--motion-fast), color var(--motion-fast); }
.nav-link:hover { color: var(--color-sidebar-text); background: var(--color-sidebar-raised); }
.nav-link[aria-current='page'] { border-color: rgb(255 255 255 / 8%); color: #fff; background: #221b32; }
.nav-link[aria-current='page'] .nav-icon { color: #b497ff; }
.nav-icon { display: inline-grid; width: 20px; height: 20px; place-items: center; color: #aaa7b3; flex: 0 0 auto; }
.nav-icon svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-bottom { margin-top: auto; padding: 14px 12px 0; border-top: 1px solid rgb(255 255 255 / 9%); color: var(--color-sidebar-muted); font-size: 11px; }
.local-indicator { display: inline-flex; align-items: center; gap: 8px; color: #ceccd4; }
.local-indicator::before { width: 7px; height: 7px; border-radius: 50%; background: #a78aff; content: ''; }
.local-caption { display: block; margin-top: 7px; line-height: 1.55; }
.main-column { min-height: 100vh; margin-left: 252px; }
.topbar { position: sticky; z-index: 8; top: 0; display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 16px; padding: 12px clamp(22px, 4vw, 56px); border-bottom: 1px solid var(--color-border); background: color-mix(in srgb, var(--color-surface) 90%, transparent); backdrop-filter: blur(18px); }
.topbar-start, .topbar-end { display: flex; align-items: center; gap: 12px; }
.context-select { display: grid; gap: 2px; }
.context-select label { color: var(--color-text-muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.context-select select { min-width: min(280px, 50vw); height: 36px; padding: 0 30px 0 0; border: 0; color: var(--color-text); background: transparent; font-size: 13px; font-weight: 650; }
.user-chip { display: flex; align-items: center; gap: 9px; padding-left: 12px; border-left: 1px solid var(--color-border); }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: var(--color-accent-text); background: var(--color-accent-soft); font-size: 12px; font-weight: 750; }
.user-meta { display: grid; line-height: 1.3; }
.user-meta strong { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.user-meta small { color: var(--color-text-muted); font-size: 10px; }
.icon-button { display: inline-grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--color-border); border-radius: 11px; color: var(--color-text-muted); background: var(--color-surface); cursor: pointer; transition: color var(--motion-fast), border var(--motion-fast), background var(--motion-fast); }
.icon-button:hover { border-color: var(--color-border-strong); color: var(--color-text); background: var(--color-surface-subtle); }
.icon-button svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mobile-menu { display: none; }
.content { width: min(1180px, 100%); margin: 0 auto; padding: clamp(26px, 4vw, 48px) clamp(22px, 4vw, 56px) 64px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.eyebrow { margin: 0 0 8px; color: var(--color-accent); font-size: 10px; font-weight: 780; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(27px, 3vw, 38px); font-weight: 700; letter-spacing: -.055em; line-height: 1.1; }
h2 { margin-bottom: 8px; font-size: 18px; letter-spacing: -.035em; }
h3 { margin-bottom: 6px; font-size: 14px; letter-spacing: -.02em; }
.page-description { max-width: 640px; margin: 0; color: var(--color-text-muted); font-size: 13px; line-height: 1.65; }
.header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { min-width: 0; padding: 22px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-sm); }
.card--subtle { background: var(--color-surface-subtle); }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.muted { color: var(--color-text-muted); }
.small { font-size: 12px; }
.tiny { font-size: 10px; }
.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.row-start { display: flex; align-items: center; gap: 12px; min-width: 0; }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid transparent; border-radius: 10px; color: #fff; background: var(--color-accent); cursor: pointer; text-decoration: none; font-size: 12px; font-weight: 700; transition: background var(--motion-fast), transform var(--motion-fast); }
.button:hover { background: var(--color-accent-strong); }
.button:active { transform: translateY(1px); }
.button:disabled { cursor: not-allowed; opacity: .46; }
.button--secondary { border-color: var(--color-border-strong); color: var(--color-text); background: var(--color-surface); }
.button--secondary:hover { background: var(--color-surface-subtle); }
.button--ghost { color: var(--color-text-muted); background: transparent; }
.button--ghost:hover { color: var(--color-text); background: var(--color-surface-subtle); }
.button--danger { color: var(--color-danger); border-color: color-mix(in srgb, var(--color-danger) 30%, var(--color-border)); background: var(--color-danger-soft); }
.button--danger:hover { color: #fff; background: var(--color-danger); }
.button--small { min-height: 34px; padding: 0 11px; border-radius: 8px; font-size: 11px; }
.badge { display: inline-flex; min-height: 24px; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; color: var(--color-text-muted); background: var(--color-surface-subtle); font-size: 10px; font-weight: 680; white-space: nowrap; }
.badge::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ''; }
.badge--good { color: var(--color-success); background: var(--color-success-soft); }
.badge--warn { color: var(--color-warning); background: var(--color-warning-soft); }
.badge--bad { color: var(--color-danger); background: var(--color-danger-soft); }
.badge--accent { color: var(--color-accent-text); background: var(--color-accent-soft); }
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.module-card { position: relative; display: flex; min-height: 216px; flex-direction: column; overflow: hidden; }
.module-card::after { position: absolute; top: -66px; right: -62px; width: 180px; height: 180px; border: 1px solid color-mix(in srgb, var(--color-accent) 12%, transparent); border-radius: 50%; content: ''; pointer-events: none; }
.module-icon { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid color-mix(in srgb, var(--color-accent) 15%, var(--color-border)); border-radius: 14px; color: var(--color-accent); background: var(--color-accent-soft); }
.module-icon svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.module-copy { margin: 18px 0 20px; }
.module-copy p { max-width: 460px; margin: 0; color: var(--color-text-muted); font-size: 12px; line-height: 1.65; }
.module-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: auto; }
.module-status { display: flex; flex-wrap: wrap; gap: 6px; }
.attention { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--color-warning) 30%, var(--color-border)); border-radius: 12px; color: var(--color-warning); background: var(--color-warning-soft); }
.attention p { margin: 2px 0 0; color: var(--color-text-muted); font-size: 12px; }
.info-panel { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--color-info) 24%, var(--color-border)); border-radius: 12px; color: var(--color-info); background: var(--color-info-soft); }
.info-panel p { margin: 2px 0 0; color: var(--color-text-muted); font-size: 12px; }
.empty-state { display: grid; min-height: 230px; place-items: center; padding: 34px; border: 1px dashed var(--color-border-strong); border-radius: var(--radius-lg); text-align: center; }
.empty-state > div { max-width: 430px; }
.empty-icon { display: grid; width: 48px; height: 48px; place-items: center; margin: 0 auto 15px; border-radius: 16px; color: var(--color-accent); background: var(--color-accent-soft); }
.empty-icon svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.empty-state p { margin-bottom: 0; color: var(--color-text-muted); font-size: 12px; }
.metric-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 14px; padding: 19px; }
.metric-icon { display: grid; width: 40px; height: 40px; grid-row: span 2; place-items: center; border-radius: 12px; color: var(--color-accent); background: var(--color-accent-soft); }
.metric-icon svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.metric-value { font-size: 23px; font-weight: 740; letter-spacing: -.055em; line-height: 1; }
.metric-label { color: var(--color-text-muted); font-size: 11px; }
.section { margin-top: 30px; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-title p { margin: 0; color: var(--color-text-muted); font-size: 11px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field label, .field-label { color: var(--color-text); font-size: 11px; font-weight: 680; }
.field-help { color: var(--color-text-muted); font-size: 10px; }
.field input, .field select, .field textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--color-border-strong); border-radius: 9px; color: var(--color-text); background: var(--color-surface); }
.field textarea { min-height: 112px; resize: vertical; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--color-text-muted) 70%, transparent); }
.check-row { display: flex; align-items: center; gap: 10px; min-height: 42px; color: var(--color-text-muted); font-size: 11px; }
.check-row input { width: 17px; height: 17px; accent-color: var(--color-accent); }
.table-wrap { overflow: auto; border: 1px solid var(--color-border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; }
th { padding: 11px 13px; color: var(--color-text-muted); background: var(--color-surface-subtle); font-size: 10px; font-weight: 730; white-space: nowrap; }
td { padding: 12px 13px; border-top: 1px solid var(--color-border); vertical-align: middle; }
td strong { font-size: 11px; }
td .muted { display: block; margin-top: 2px; font-size: 10px; }
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.tenant-card { padding: 0; overflow: hidden; }
.tenant-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 21px 22px; border-bottom: 1px solid var(--color-border); }
.tenant-card-body { padding: 20px 22px; }
.tenant-section { padding: 19px 0; border-bottom: 1px solid var(--color-border); }
.tenant-section:first-child { padding-top: 0; }
.tenant-section:last-child { padding-bottom: 0; border-bottom: 0; }
.tenant-section > .row { margin-bottom: 12px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.inline-form .field { flex: 1 1 180px; }
.grant-row { display: grid; grid-template-columns: minmax(125px, 1fr) minmax(145px, 1.1fr) auto; align-items: center; gap: 12px; min-height: 46px; padding: 8px 0; border-top: 1px solid var(--color-border); }
.grant-row:first-child { border-top: 0; }
.switch { position: relative; display: inline-flex; width: 38px; height: 22px; align-items: center; padding: 3px; border: 1px solid var(--color-border-strong); border-radius: 999px; background: var(--color-surface-subtle); cursor: pointer; vertical-align: middle; }
.switch::after { width: 14px; height: 14px; border-radius: 50%; background: var(--color-text-muted); content: ''; transition: transform var(--motion-fast), background var(--motion-fast); }
.switch[aria-checked='true'] { border-color: var(--color-accent); background: var(--color-accent); }
.switch[aria-checked='true']::after { transform: translateX(16px); background: #fff; }
.switch:disabled { cursor: not-allowed; opacity: .45; }
.switch-label { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 11px; }
.switch-label[aria-disabled='true'] { cursor: not-allowed; opacity: .52; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.doc-list { display: grid; gap: 12px; }
.doc-card { padding: 19px 20px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface); }
.doc-content { margin: 12px 0 0; color: var(--color-text-muted); font-size: 12px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.time-hero { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(240px,.8fr); gap: 18px; }
.clock-card { position: relative; display: flex; min-height: 220px; flex-direction: column; justify-content: space-between; overflow: hidden; color: #fff; background: linear-gradient(135deg, #211538, #4b2c83 62%, #6d38e8); }
.clock-card::after { position: absolute; right: -58px; bottom: -140px; width: 280px; height: 280px; border: 1px solid rgb(255 255 255 / 16%); border-radius: 50%; box-shadow: 0 0 0 26px rgb(255 255 255 / 3%), 0 0 0 52px rgb(255 255 255 / 3%); content: ''; }
.clock-card .muted { color: rgb(255 255 255 / 73%); }
.clock-card .button { position: relative; z-index: 1; align-self: flex-start; color: #331d5a; background: #fff; }
.clock-card .button:hover { background: #f2edff; }
.clock-status { display: flex; align-items: center; gap: 8px; color: rgb(255 255 255 / 78%); font-size: 11px; }
.clock-status::before { width: 8px; height: 8px; border-radius: 50%; background: #abf2d1; box-shadow: 0 0 0 4px rgb(171 242 209 / 17%); content: ''; }
.clock-status--off::before { background: #d0c2e8; box-shadow: 0 0 0 4px rgb(255 255 255 / 12%); }
.time-total { display: grid; align-content: center; }
.time-total strong { font-size: clamp(30px, 4vw, 43px); letter-spacing: -.06em; line-height: 1.08; }
.time-total span { margin-top: 9px; color: var(--color-text-muted); font-size: 11px; }
.login-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(0, 1.12fr) minmax(420px, .88fr); background: var(--color-surface); }
.login-story { position: relative; display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; overflow: hidden; padding: clamp(32px, 6vw, 76px); color: #fff; background: #111017; }
.login-story::before, .login-story::after { position: absolute; width: 58vw; height: 58vw; border: 1px solid rgb(183 155 255 / 12%); border-radius: 50%; content: ''; pointer-events: none; }
.login-story::before { right: -31vw; bottom: -23vw; box-shadow: 0 0 0 40px rgb(183 155 255 / 3%), 0 0 0 80px rgb(183 155 255 / 2%); }
.login-story::after { right: -24vw; bottom: -17vw; width: 43vw; height: 43vw; }
.login-copy { position: relative; z-index: 1; max-width: 560px; margin: auto 0; }
.login-copy h1 { max-width: 510px; margin: 18px 0; font-size: clamp(42px, 5vw, 68px); line-height: 1.02; letter-spacing: -.065em; }
.login-copy p { max-width: 440px; color: #b5b1be; font-size: 14px; line-height: 1.8; }
.login-kicker { display: inline-flex; align-items: center; gap: 9px; color: #cbbcff; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.login-kicker::before { width: 20px; height: 2px; background: #9c7af2; content: ''; }
.login-foot { position: relative; z-index: 1; color: #8d8996; font-size: 10px; }
.login-panel { display: grid; min-height: 100vh; place-items: center; padding: 36px; background: var(--color-canvas); }
.login-box { width: min(410px, 100%); }
.login-brand { margin-bottom: 52px; color: var(--color-text); font-size: 19px; font-weight: 750; letter-spacing: -.05em; }
.login-brand small { display: block; margin-top: 1px; color: var(--color-text-muted); font-size: 10px; font-weight: 500; letter-spacing: .02em; }
.login-box h2 { margin-bottom: 8px; font-size: 27px; letter-spacing: -.05em; }
.login-box > p { margin-bottom: 26px; color: var(--color-text-muted); font-size: 12px; line-height: 1.65; }
.login-form { display: grid; gap: 17px; }
.login-form .field input { min-height: 47px; }
.login-notice { margin-top: 17px; color: var(--color-text-muted); font-size: 10px; line-height: 1.6; text-align: center; }
.toast { position: fixed; z-index: 30; right: 24px; bottom: 24px; max-width: min(440px, calc(100vw - 40px)); padding: 13px 16px; border: 1px solid var(--color-border); border-radius: 12px; color: var(--color-text); background: var(--color-surface-raised); box-shadow: var(--shadow-md); font-size: 12px; animation: toast-in var(--motion-normal) ease-out; }
.toast--error { border-color: color-mix(in srgb, var(--color-danger) 34%, var(--color-border)); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }
.error-state { max-width: 620px; margin: 50px auto; }
.footer-note { display: flex; justify-content: space-between; gap: 12px; margin-top: 36px; padding-top: 15px; border-top: 1px solid var(--color-border); color: var(--color-text-muted); font-size: 10px; }
.disclosure { border-top: 1px solid var(--color-border); }
.disclosure summary { padding: 14px 0; cursor: pointer; font-size: 12px; font-weight: 700; }
.disclosure-body { padding-bottom: 15px; color: var(--color-text-muted); font-size: 11px; line-height: 1.7; }
.operator-link-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface-subtle); }
.operator-link-copy p { margin: 0; color: var(--color-text-muted); font-size: 11px; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.permission-chip { display: inline-block; margin: 3px; padding: 4px 8px; border: 1px solid var(--color-border); border-radius: 7px; color: var(--color-text-muted); font-family: ui-monospace, monospace; font-size: 9px; }
.school-mini { margin: 10px 0 0; padding: 0; list-style: none; color: var(--color-text-muted); font-size: 10px; }
.school-mini li { padding: 5px 0; border-top: 1px solid var(--color-border); }
.field-inline { width: auto; max-width: 180px; min-height: 34px !important; padding: 5px 8px !important; font-size: 11px; }
.dialog-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 20px; background: rgb(10 9 18 / 58%); backdrop-filter: blur(5px); }
.dialog { width: min(430px, 100%); padding: 25px; border: 1px solid var(--color-border); border-radius: var(--radius-xl); color: var(--color-text); background: var(--color-surface); box-shadow: var(--shadow-md); }
.dialog .empty-icon { margin: 0 0 14px; }
.dialog h2 { font-size: 21px; }

/* SchulGeist dashboard: dark surfaces and violet accents match the current GeistID workspace. */
.sidebar {
  width: 232px;
  padding: 21px 14px 17px;
  border-right: 1px solid rgb(161 116 255 / 15%);
  background: linear-gradient(180deg, #17111f 0%, #101017 52%, #0d0d13 100%);
}
.brand { min-height: 57px; padding-inline: 12px; }
.brand__word { font-size: 18px; }
.brand__label { font-size: 9px; }
.nav-group { gap: 3px; margin-top: 24px; }
.nav-heading { font-size: 9px; letter-spacing: .14em; }
.nav-link { min-height: 40px; gap: 11px; border-radius: 9px; font-size: 12px; }
.nav-link[aria-current='page'] { border-color: color-mix(in srgb, var(--color-accent) 36%, transparent); color: #fff; background: linear-gradient(100deg, rgb(109 56 232 / 23%), rgb(109 56 232 / 7%)); }
.nav-link[aria-current='page'] .nav-icon { color: #b99cff; }
.nav-link--button { width: 100%; text-align: left; cursor: pointer; }
.nav-link--disabled { cursor: not-allowed; opacity: .58; }
.sidebar-bottom { padding: 13px 10px 0; font-size: 10px; }
.local-indicator { min-height: 27px; padding: 0 9px; border: 1px solid rgb(255 255 255 / 9%); border-radius: 999px; background: rgb(255 255 255 / 3%); font-size: 9px; }
.local-indicator::before { background: #48d7a5; box-shadow: 0 0 0 3px rgb(72 215 165 / 11%); }
.local-caption { margin-top: 9px; }
.main-column { margin-left: 232px; }
.topbar { min-height: 68px; padding-inline: clamp(20px, 3vw, 42px); border-color: var(--color-border); background: color-mix(in srgb, var(--color-canvas) 91%, transparent); }
.context-select select { min-width: min(300px, 48vw); }
.content { width: min(1320px, 100%); min-height: calc(100vh - 68px); padding: clamp(27px, 3.4vw, 45px) clamp(22px, 3.6vw, 48px) 56px; border-right: 1px solid rgb(109 56 232 / 34%); border-bottom: 1px solid rgb(109 56 232 / 34%); border-left: 1px solid rgb(109 56 232 / 34%); }
.page-header { align-items: center; margin-bottom: 25px; }
.page-header--dashboard { align-items: flex-end; margin-bottom: 25px; }
.page-header--dashboard h1 { font-size: clamp(28px, 2.8vw, 36px); }
.page-header--dashboard .eyebrow { color: #a98aff; }
.page-header--dashboard .page-description { font-size: 12px; }
.card { border-color: color-mix(in srgb, var(--color-border) 88%, #8b61d6); box-shadow: 0 7px 24px rgb(0 0 0 / 10%); }
.button { min-height: 40px; border-radius: 9px; }
.button--small { min-height: 34px; }

@media (max-width: 1050px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-meta strong { max-width: 115px; }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-102%); transition: transform var(--motion-normal) ease; box-shadow: var(--shadow-md); }
  .sidebar.is-open { transform: translateX(0); }
  .main-column { margin-left: 0; }
  .mobile-menu { display: inline-grid; }
  .topbar { min-height: 68px; padding: 10px 20px; }
  .content { padding: 28px 20px 54px; }
  .topbar-end { gap: 7px; }
  .user-chip { padding-left: 8px; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .module-grid, .time-hero { grid-template-columns: 1fr; }
  .content { padding-inline: 16px; }
  .topbar { padding-inline: 14px; }
  .page-header { display: grid; align-items: start; gap: 16px; margin-bottom: 23px; }
  .header-actions { justify-content: flex-start; }
  .user-meta { display: none; }
  .user-chip { border-left: 0; padding-left: 0; }
  .context-select select { min-width: 112px; max-width: 42vw; font-size: 11px; }
  .context-select label { font-size: 9px; }
  .form-grid { grid-template-columns: 1fr; }
  .field--wide { grid-column: auto; }
  .card { padding: 18px; }
  .tenant-card-head, .tenant-card-body { padding: 17px; }
  .grant-row { grid-template-columns: minmax(100px, 1fr) minmax(110px, 1fr) auto; gap: 7px; font-size: 10px; }
  .tenant-card-head { flex-direction: column; }
  .login-layout { display: block; }
  .login-story { display: none; }
  .login-panel { min-height: 100vh; padding: 26px; }
  .login-brand { margin-bottom: 45px; }
  .metric-card { padding: 16px; }
  .operator-link-card { align-items: flex-start; flex-direction: column; }
  .footer-note { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Navigation and dashboard layout follow the established SchulGeist workspace. */
.sidebar { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgb(190 170 225 / 30%) transparent; }
.sidebar-context { margin: 14px 3px 0; padding: 10px 11px; border: 1px solid rgb(255 255 255 / 9%); border-radius: 11px; background: rgb(255 255 255 / 4%); }
.sidebar-context .context-select { gap: 4px; }
.sidebar-context .context-select label { color: #9e96ad; font-size: 8px; }
.sidebar-context .context-select select { width: 100%; min-width: 0; max-width: 100%; height: 30px; padding-right: 13px; color: #f7f5fc; font-size: 11px; }
.sidebar-context .context-select select option { color: #191821; background: #fff; }
.nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-bottom { display: grid; gap: 11px; margin-top: auto; }
.sidebar-account { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; align-items: center; gap: 9px; padding-bottom: 11px; border-bottom: 1px solid rgb(255 255 255 / 9%); }
.sidebar-account .avatar { width: 34px; height: 34px; color: #fff; background: #7e34de; }
.sidebar-account__meta { display: grid; min-width: 0; gap: 2px; }
.sidebar-account__meta strong { overflow: hidden; color: #f6f3fa; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account__meta small { overflow: hidden; color: var(--color-sidebar-muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-logout { width: 32px; height: 32px; border-color: rgb(255 255 255 / 10%); color: #bcb4c7; background: rgb(255 255 255 / 4%); }
.sidebar-logout:hover { border-color: rgb(255 255 255 / 22%); color: #fff; background: rgb(255 255 255 / 9%); }
.sidebar-logout svg { width: 16px; height: 16px; }
.local-caption { margin-top: -6px; font-size: 9px; }
.topbar-context { color: var(--color-text-muted); font-size: 11px; font-weight: 620; }
.workspace-search { position: relative; display: flex; width: min(420px, 38vw); min-width: 220px; min-height: 38px; align-items: center; gap: 9px; padding: 0 9px 0 12px; border: 1px solid var(--color-border); border-radius: 10px; color: #ae98d2; background: var(--color-surface); }
.workspace-search:focus-within { border-color: color-mix(in srgb, var(--color-accent) 55%, var(--color-border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 12%, transparent); }
.workspace-search > svg { width: 16px; height: 16px; flex: 0 0 auto; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.workspace-search input { width: 100%; min-width: 0; height: 34px; padding: 0; border: 0; outline: 0; color: var(--color-text); background: transparent; font: inherit; font-size: 11px; }
.workspace-search input::placeholder { color: var(--color-text-muted); }
.workspace-search kbd { flex: 0 0 auto; padding: 3px 6px; border: 1px solid var(--color-border); border-radius: 5px; color: var(--color-text-muted); font: 9px var(--font-sans); white-space: nowrap; }
.workspace-mode { display: inline-flex; min-height: 28px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--color-border); border-radius: 999px; color: var(--color-text-muted); background: var(--color-surface); font-size: 9px; font-weight: 620; }
.workspace-mode > span { width: 7px; height: 7px; border-radius: 50%; background: #4ad0a3; box-shadow: 0 0 0 3px rgb(74 208 163 / 12%); }
.sidebar-backdrop { display: none; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 18px; }
.attention-card { min-height: 254px; padding: 21px 22px; }
.attention-card__header, .card-heading, .section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.attention-card h2, .card-heading h2, .section-heading h2 { margin: 0; font-size: 19px; }
.attention-card .eyebrow, .dashboard-security-card .eyebrow, .transparency-card .eyebrow, .lower-grid .eyebrow { margin-bottom: 6px; font-size: 9px; }
.count-pill { flex: 0 0 auto; padding: 5px 9px; border: 1px solid color-mix(in srgb, var(--color-warning) 20%, transparent); border-radius: 999px; color: var(--color-warning); background: var(--color-warning-soft); font-size: 9px; font-weight: 750; }
.attention-list { display: grid; margin: 15px -8px -8px; }
.attention-list article { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 64px; padding: 10px 8px; border-top: 1px solid var(--color-border); }
.attention-list article:first-child { border-top: 0; }
.attention-list strong { color: var(--color-text); font-size: 11px; }
.attention-list p { margin: 3px 0 0; color: var(--color-text-muted); font-size: 9px; line-height: 1.5; }
.attention-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; color: #c3a7ff; background: #302144; }
.attention-icon svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.attention-icon--purple { color: #c8acff; background: #302144; }
.attention-icon--blue { color: #91b3ff; background: #1d2943; }
.attention-icon--info { color: #79b9ff; background: #1b2e49; }
.workspace-open { display: inline-flex; min-width: 42px; min-height: 34px; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; color: #c6abff; background: transparent; cursor: pointer; text-decoration: none; font: inherit; font-size: 10px; font-weight: 720; white-space: nowrap; }
.workspace-open:hover { color: #e5d9ff; background: color-mix(in srgb, var(--color-accent) 15%, transparent); }
.workspace-open:focus-visible, .quick-action-arrow:focus-visible { outline: 3px solid color-mix(in srgb, var(--color-accent) 58%, white); outline-offset: 2px; }
.workspace-open--disabled { color: var(--color-text-muted); cursor: not-allowed; opacity: .7; }
.workspace-open--disabled:hover { color: var(--color-text-muted); background: transparent; }
.quick-action-arrow { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 9px; color: var(--color-text-muted); text-decoration: none; }
.quick-action-arrow:hover { color: var(--color-accent-text); background: var(--color-accent-soft); }
.quick-action-arrow svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.quick-empty { padding: 17px 8px 8px; border-top: 1px solid var(--color-border); color: var(--color-text-muted); font-size: 10px; }
.dashboard-security-card { position: relative; min-height: 254px; overflow: hidden; padding: 19px; background: linear-gradient(145deg, var(--color-surface), color-mix(in srgb, var(--color-accent-soft) 50%, var(--color-surface))); }
.dashboard-security-card::after { position: absolute; top: 6px; right: -32px; color: color-mix(in srgb, var(--color-accent) 10%, transparent); content: 'S'; font-size: 124px; font-weight: 900; line-height: 1; pointer-events: none; }
.dashboard-security-card > .badge { position: relative; z-index: 1; min-height: 23px; font-size: 8px; }
.dashboard-security-card > .badge svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-security-card h2 { position: relative; z-index: 1; margin: 20px 0 8px; font-size: 17px; line-height: 1.3; }
.dashboard-security-card > p { position: relative; z-index: 1; margin-bottom: 16px; color: var(--color-text-muted); font-size: 10px; line-height: 1.65; }
.dashboard-security-card ul, .lower-grid .security-card ul { position: relative; z-index: 1; display: grid; gap: 9px; padding: 13px 0 0; margin: 0; border-top: 1px solid var(--color-border); list-style: none; }
.dashboard-security-card li, .lower-grid .security-card li { display: flex; align-items: center; gap: 8px; color: var(--color-text-muted); font-size: 9px; }
.dashboard-security-card li svg, .lower-grid .security-card li svg { width: 14px; height: 14px; flex: 0 0 auto; color: var(--color-success); stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.overview-section { margin-top: 31px; }
.section-heading { align-items: flex-end; margin-bottom: 13px; }
.section-heading h2 { font-size: 17px; }
.section-heading .eyebrow { margin-bottom: 5px; font-size: 9px; }
.section-heading > p { margin: 0; color: var(--color-text-muted); font-size: 9px; }
.workspace-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.workspace-card { display: flex !important; min-height: 142px; flex-direction: column; gap: 0 !important; padding: 15px 16px !important; border-radius: 13px; }
.workspace-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.workspace-card .metric-icon { display: grid; width: 37px; height: 37px; grid-row: auto; place-items: center; border-radius: 10px; color: #c2a3ff; background: #302144; }
.workspace-card .metric-icon svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.workspace-card__copy { margin: 10px 0 9px; }
.workspace-card__copy h3 { margin-bottom: 3px; font-size: 11px; }
.workspace-card__copy p { min-height: 28px; margin: 0; color: var(--color-text-muted); font-size: 9px; line-height: 1.5; }
.workspace-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding-top: 8px; border-top: 1px solid var(--color-border); }
.workspace-doc-link { display: inline-flex; align-items: center; gap: 5px; color: var(--color-text-muted); text-decoration: none; font-size: 8px; }
.workspace-doc-link:hover { color: var(--color-accent-text); }
.workspace-doc-link svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.workspace-status { display: inline-flex; align-items: center; gap: 5px; color: var(--color-text-muted); font-size: 8px; }
.workspace-status > span { width: 6px; height: 6px; border: 1px solid var(--color-success); border-radius: 50%; color: var(--color-success); }
.workspace-reachability { margin-top: 7px; color: color-mix(in srgb, var(--color-text-muted) 80%, transparent); font-size: 8px; }
.dashboard-empty { min-height: 178px; background: var(--color-surface); }
.lower-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; margin-top: 15px; }
.transparency-card, .lower-grid .security-card { min-height: 150px; padding: 18px; }
.transparency-card > svg { width: 17px; height: 17px; color: var(--color-text-muted); }
.transparency-card h2, .lower-grid .security-card h2 { font-size: 15px; }
.transparency-card > p { max-width: 680px; margin: 15px 0 0; color: var(--color-text-muted); font-size: 10px; line-height: 1.7; }
.lower-grid .security-card .card-heading { margin-bottom: 12px; }
.lower-grid .security-card ul { gap: 7px; padding-top: 11px; }
.lower-grid .security-card .badge { min-height: 21px; font-size: 8px; }
.sidebar-backdrop.is-visible { display: block; position: fixed; z-index: 9; inset: 0; border: 0; background: rgb(4 3 9 / 62%); backdrop-filter: blur(2px); }

@media (max-width: 1050px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1.25fr) minmax(260px, .8fr); }
  .workspace-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .sidebar-context { margin-top: 13px; }
  .sidebar-backdrop.is-visible { display: block; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-security-card { min-height: 0; }
  .lower-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .workspace-mode { font-size: 8px; }
  .workspace-search { width: min(380px, 43vw); min-width: 180px; }
}
@media (max-width: 640px) {
  .topbar-context { display: none; }
  .topbar-start { min-width: 0; flex: 1; gap: 8px; }
  .workspace-search { width: auto; min-width: 0; flex: 1; padding-left: 9px; }
  .workspace-search kbd { display: none; }
  .workspace-mode { display: none; }
  .dashboard-grid, .lower-grid, .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .attention-card { min-height: 0; padding: 18px; }
  .attention-list article { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 9px; }
  .attention-icon { width: 33px; height: 33px; }
  .workspace-card { min-height: 0; }
  .section-heading { align-items: flex-start; }
}

/* SchulGeist brand mark and role-based account preview */
.brand { gap: 9px; }
.brand__mark { position: relative; display: block; width: 42px; height: 38px; flex: 0 0 42px; overflow: hidden; }
.brand__mark img { position: absolute; top: 50%; left: 50%; width: 150px; height: 100px; max-width: none; transform: translate(-50%, -50%); object-fit: contain; }
.login-brand { display: flex; align-items: center; gap: 10px; }
.login-brand .brand__mark { width: 42px; }
.account-card-actions { display: flex; justify-content: flex-start; margin: 11px 0 7px; }
.account-permissions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.permission-chip { display: inline-grid; gap: 1px; vertical-align: middle; font-family: inherit; font-size: 10px; font-weight: 700; }
.permission-chip small { color: var(--color-text-muted); font-size: 8px; font-weight: 500; }
.permission-chip--revoked { opacity: .55; }
.account-preview .sidebar { overflow-y: auto; }
.account-preview .brand { flex: 0 0 auto; }
.account-preview .context-select select { width: 100%; min-width: 0; color: var(--color-sidebar-text); }
.account-preview .nav-link { cursor: default; }
.account-preview .nav-link:hover { color: var(--color-sidebar-muted); background: transparent; }
.account-preview .nav-link[aria-current='page'] { color: #fff; background: #221b32; }
.account-preview .nav-link .module-icon { display: inline-flex; color: currentColor; }
.account-preview .sidebar-account { grid-template-columns: 34px minmax(0, 1fr) 24px; }
.preview-avatar-mark { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid rgb(189 160 255 / 38%); border-radius: 7px; color: #d5c3ff; background: rgb(125 72 218 / 18%); font-size: 9px; font-weight: 800; }
.workspace-mode--preview > span { background: var(--color-warning); }
.preview-readonly-label { padding: 6px 10px; border: 1px solid var(--color-border); border-radius: 999px; color: var(--color-text-muted); font-size: 10px; }
.preview-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; margin-bottom: 22px; border: 1px solid color-mix(in srgb, var(--color-accent) 34%, var(--color-border)); border-radius: var(--radius-md); background: linear-gradient(100deg, color-mix(in srgb, var(--color-accent-soft) 72%, var(--color-surface)), var(--color-surface)); }
.preview-banner strong { display: block; font-size: 12px; }
.preview-banner p { margin: 3px 0 0; color: var(--color-text-muted); font-size: 10px; line-height: 1.55; }
.preview-banner .button { flex: 0 0 auto; }
.dashboard-metrics { margin-bottom: 20px; }
.dashboard-metrics .metric-label { line-height: 1.45; }
.dashboard-action-card { display: flex; align-items: flex-start; gap: 16px; }
.dashboard-action-card > .metric-icon { flex: 0 0 auto; }
.dashboard-action-card h2 { margin: 0 0 5px; }
.dashboard-action-card p { max-width: 620px; margin: 0 0 13px; color: var(--color-text-muted); font-size: 10px; line-height: 1.6; }
.school-account-card { display: grid; gap: 13px; }
.school-account-card h3 { margin: 0 0 3px; }
.school-account-card .row { align-items: flex-start; }
.school-account-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.account-module-fieldset { min-width: 0; padding: 13px; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.account-module-fieldset legend { padding: 0 7px; color: var(--color-text); font-size: 10px; font-weight: 700; }
.account-module-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface-subtle, transparent); cursor: pointer; }
.checkbox-row input { flex: 0 0 auto; margin-top: 2px; accent-color: var(--color-accent); }
.checkbox-row strong, .checkbox-row small { display: block; }
.checkbox-row strong { font-size: 10px; }
.checkbox-row small { margin-top: 3px; color: var(--color-text-muted); font-size: 9px; }
.account-module-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 39px; padding: 7px 0; border-top: 1px solid var(--color-border); color: var(--color-text-muted); font-size: 10px; }
.account-module-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-visual { position: relative; width: 33px; height: 19px; flex: 0 0 auto; border-radius: 99px; background: #4a4653; transition: background .15s ease; }
.switch-visual::after { position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #fff; content: ''; transition: transform .15s ease; }
.account-module-toggle input:checked + .switch-visual { background: var(--color-accent); }
.account-module-toggle input:checked + .switch-visual::after { transform: translateX(14px); }
.account-module-toggle input:focus-visible + .switch-visual { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.account-module-toggle input:disabled + .switch-visual { opacity: .45; }
@media (max-width: 720px) { .account-module-list { grid-template-columns: 1fr; } .school-account-actions > * { flex: 1 1 auto; } }
.preview-roles { padding: 18px; }
.preview-roles .section-title { margin-bottom: 10px; }
.preview-roles .account-permissions { align-items: center; }
.account-preview .content > .footer-note { margin-top: 22px; }
@media (max-width: 640px) {
  .preview-banner { align-items: flex-start; flex-direction: column; }
  .preview-banner .button { width: 100%; }
  .preview-readonly-label { display: none; }
}
.header-actions { flex-wrap: wrap; }
.account-card-actions { flex-wrap: wrap; gap: 8px; }
.admin-overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.account-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; }
.account-settings-avatar { width: 46px; height: 46px; color: #fff; background: #7e34de; font-size: 14px; }
.account-security-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-top: 1px solid var(--color-border); }
.account-security-row > span:first-child { display: grid; gap: 2px; }
.account-security-row strong { font-size: 11px; }
.account-security-row small { color: var(--color-text-muted); font-size: 9px; }
.account-school-list { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.account-school-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface-subtle); font-size: 11px; }
.access-flow { padding: 20px; }
.access-flow__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.access-flow__steps > div { display: grid; align-content: start; gap: 5px; min-height: 92px; padding: 14px; border: 1px solid var(--color-border); border-radius: 11px; background: var(--color-surface-subtle); }
.access-flow__steps > div > span { color: var(--color-accent-text); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.access-flow__steps strong { font-size: 11px; }
.access-flow__steps small { color: var(--color-text-muted); font-size: 9px; line-height: 1.5; }
.access-flow__result { margin: 12px 0 0; color: var(--color-text-muted); font-size: 10px; }
.dashboard-customizer { margin-bottom: 18px; padding: 18px; }
.dashboard-config-list { display: grid; margin-top: 12px; }
.dashboard-config-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 2px; border-top: 1px solid var(--color-border); }
.dashboard-config-meta { display: flex; min-width: 0; align-items: center; gap: 12px; }
.dashboard-config-meta > .module-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: #c2a3ff; background: #302144; }
.dashboard-config-meta .module-icon svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-config-meta > span:last-child { display: grid; min-width: 0; gap: 2px; }
.dashboard-config-meta strong { font-size: 11px; }
.dashboard-config-meta small { color: var(--color-text-muted); font-size: 9px; }
.dashboard-config-controls { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; }
.dashboard-order-button { width: 30px; height: 30px; border-radius: 8px; color: var(--color-text-muted); font-size: 15px; }
.dashboard-order-button:disabled { cursor: not-allowed; opacity: .38; }
@media (max-width: 1050px) {
  .admin-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .account-settings-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .admin-overview-grid, .access-flow__steps { grid-template-columns: minmax(0, 1fr); }
  .dashboard-config-row { align-items: flex-start; flex-direction: column; }
  .dashboard-config-controls { width: 100%; justify-content: flex-end; }
}

/* Schulgebundene Konten und PassGeist-Rechtegruppen */
.section-tabs { display: flex; gap: 6px; width: fit-content; max-width: 100%; padding: 4px; margin: 0 0 18px; border: 1px solid var(--color-border); border-radius: 11px; background: var(--color-surface-subtle); }
.section-tabs a { padding: 9px 15px; border-radius: 8px; color: var(--color-text-muted); font-size: 10px; font-weight: 700; text-decoration: none; }
.section-tabs a[aria-current='page'] { color: var(--color-text); background: var(--color-accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-accent) 35%, transparent); }
.account-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.account-stats .metric-card { min-width: 0; padding: 15px; }
.account-directory { padding: 0; overflow: hidden; }
.account-directory > .card-heading { padding: 20px 20px 14px; margin: 0; }
.account-directory-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.account-directory-actions .button svg, .page-header .button svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.9; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.account-filter-row { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(145px, 180px) minmax(120px, 150px) auto; align-items: end; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.account-search { width: 100%; min-width: 0; min-height: 40px; }
.filter-field { display: grid; gap: 5px; }
.filter-field > span { color: var(--color-text-muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.filter-field select, .account-role-select { min-height: 38px; padding: 0 10px; border: 1px solid var(--color-border); border-radius: 9px; color: var(--color-text); background: var(--color-surface); font: inherit; font-size: 10px; }
.accounts-table { width: 100%; min-width: 690px; table-layout: fixed; }
.accounts-table th:nth-child(1) { width: 26%; }
.accounts-table th:nth-child(2) { width: 25%; }
.accounts-table th:nth-child(3) { width: 18%; }
.accounts-table th:nth-child(4) { width: 15%; }
.accounts-table th:nth-child(5) { width: 16%; }
.accounts-table th { font-size: 8px; letter-spacing: .08em; }
.accounts-table td { vertical-align: middle; }
.account-table-person { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.account-table-person .avatar { width: 34px; height: 34px; font-size: 10px; }
.account-table-person > span:last-child { display: grid; gap: 3px; }
.account-table-person strong { font-size: 10px; }
.account-table-person small { color: var(--color-text-muted); font-size: 9px; }
.account-role-select { max-width: 210px; width: 100%; }
.text-action { display: inline-block; padding: 5px; border: 0; color: var(--color-accent-text); background: none; font: inherit; font-size: 10px; font-weight: 750; text-decoration: none; cursor: pointer; }
.text-action:hover { text-decoration: underline; }
.account-detail-row > td { padding: 0 14px 10px; }
.account-detail-row .disclosure { margin: 0; }
.account-detail-content { display: grid; gap: 12px; padding: 12px 5px 3px; }
.account-permission-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.account-permission-list .permission-chip { padding: 6px 8px; }
.account-permission-list .permission-chip small { font-family: ui-monospace, monospace; }
.error-state-reload { margin-top: 16px; }
.account-detail-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px; background: linear-gradient(115deg, var(--color-accent-soft), var(--color-surface) 62%); }
.account-detail-identity { display: flex; align-items: center; gap: 16px; min-width: 0; }
.account-detail-identity h2 { margin: 0; font-size: clamp(20px, 2vw, 28px); }
.account-detail-identity p { margin: 4px 0 0; }
.account-detail-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.account-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.account-permissions-card { grid-column: 1 / -1; }
.account-detail-grid .account-module-list { grid-template-columns: 1fr; }
.account-detail-grid .account-permission-list { margin-top: 0; }
.account-create-card { margin-bottom: 16px; }
.account-create-card .card-heading { align-items: center; }
.account-local-note { padding: 0 18px 15px; margin: 0; }
.role-group-list { padding: 0; overflow: hidden; }
.role-group-list .account-filter-row { grid-template-columns: minmax(250px, 1fr) auto; }
.role-group-rows { display: grid; }
.role-group-card { display: grid; grid-template-columns: 38px minmax(180px, 1fr) auto auto 40px; align-items: center; gap: 12px; padding: 15px 18px; border: 0; border-bottom: 1px solid var(--color-border); border-radius: 0; box-shadow: none; }
.role-group-card:last-child { border-bottom: 0; }
.role-group-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: var(--color-accent); background: var(--color-accent-soft); }
.role-group-icon svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.role-group-info h2 { margin: 0 0 3px; font-size: 13px; }
.role-group-info p { margin: 0; color: var(--color-text-muted); font-size: 9px; }
.role-group-count { color: var(--color-text-muted); font-size: 9px; white-space: nowrap; }
.role-security-note { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.role-security-note .metric-icon { flex: 0 0 auto; }
.role-security-note p { margin: 0; color: var(--color-text-muted); font-size: 10px; line-height: 1.6; }
.role-security-note strong { color: var(--color-accent-text); }
.role-editor-backdrop { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 16px; background: rgb(7 6 12 / 76%); backdrop-filter: blur(6px); }
.role-editor { width: min(1100px, 100%); max-height: min(94vh, 920px); overflow: auto; border: 1px solid var(--color-border); border-radius: 18px; background: var(--color-surface); box-shadow: 0 28px 90px rgb(0 0 0 / 45%); }
.role-editor-header { position: sticky; z-index: 2; top: 0; display: grid; grid-template-columns: 48px 1fr 40px; align-items: start; gap: 14px; padding: 22px 24px; border-bottom: 1px solid var(--color-border); background: linear-gradient(120deg, var(--color-accent-soft), var(--color-surface) 65%); }
.role-editor-header .role-group-icon { width: 48px; height: 48px; }
.role-editor-header .eyebrow { margin: 0 0 4px; }
.role-editor-header h2 { margin: 0; font-size: 20px; }
.role-editor-header p:last-child { margin: 5px 0 0; color: var(--color-text-muted); font-size: 9px; }
.role-editor-details { padding: 18px 22px; }
.role-permission-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 22px 20px; }
.role-permission-module { margin: 0 22px 18px; overflow: hidden; border: 1px solid var(--color-border); border-radius: 14px; }
.role-permission-module > header { padding: 14px 16px 12px; background: var(--color-accent-soft); }
.role-permission-module > header .eyebrow { margin: 0 0 4px; }
.role-permission-module > header h3 { margin: 0; font-size: 16px; }
.role-permission-module .role-permission-sections { padding: 12px; }
.role-permission-category { overflow: hidden; border: 1px solid var(--color-border); border-radius: 12px; }
.role-permission-category h4 { padding: 10px 12px; margin: 0; color: var(--color-accent-text); background: var(--color-accent-soft); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.role-permission-empty { margin: 0 22px 20px; padding: 18px; border: 1px dashed var(--color-border); border-radius: 12px; color: var(--color-text-muted); }
.role-permission-empty strong { color: var(--color-text); }
.role-permission-empty p { margin: 5px 0 0; font-size: 12px; line-height: 1.55; }
.role-permission-row { display: flex; align-items: center; gap: 10px; min-height: 45px; padding: 8px 12px; border-top: 1px solid var(--color-border); cursor: pointer; }
.role-permission-row input { flex: 0 0 auto; accent-color: var(--color-accent); }
.role-permission-row span { display: grid; gap: 3px; }
.role-permission-row strong { font-size: 9px; }
.role-permission-row small { color: var(--color-text-muted); font-family: ui-monospace, monospace; font-size: 8px; }
.role-editor-footer { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 22px; border-top: 1px solid var(--color-border); background: var(--color-surface); }
.role-editor-footer > div { display: flex; gap: 8px; }
@media (max-width: 760px) {
  .account-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-detail-grid { grid-template-columns: 1fr; }
  .account-permissions-card { grid-column: auto; }
  .account-filter-row { grid-template-columns: minmax(0, 1fr) minmax(120px, .6fr); }
  .account-filter-row > .muted { grid-column: 1 / -1; }
  .role-group-card { grid-template-columns: 38px minmax(0, 1fr) auto 40px; }
  .role-group-count { grid-column: 2; }
  .role-group-card .icon-button { grid-column: 4; grid-row: 1 / span 2; }
  .role-permission-sections { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .account-stats { grid-template-columns: 1fr; }
  .account-detail-hero { align-items: flex-start; flex-direction: column; padding: 16px; }
  .account-directory > .card-heading { align-items: flex-start; flex-direction: column; }
  .account-directory-actions { width: 100%; justify-content: space-between; }
  .account-filter-row { grid-template-columns: 1fr; }
  .role-group-card { grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 9px; padding: 13px; }
  .role-group-card > .badge { grid-column: 2; justify-self: start; }
  .role-group-count { grid-column: 2; }
  .role-group-card .icon-button { grid-column: 3; grid-row: 1 / span 3; }
  .role-editor-backdrop { padding: 7px; }
  .role-editor { max-height: 98vh; border-radius: 13px; }
  .role-editor-header { grid-template-columns: 38px minmax(0, 1fr) 34px; gap: 9px; padding: 15px; }
  .role-editor-header .role-group-icon { width: 38px; height: 38px; }
  .role-editor-details, .role-permission-sections { padding-right: 14px; padding-left: 14px; }
  .role-editor-footer { align-items: flex-start; flex-direction: column; padding-right: 14px; padding-left: 14px; }
  .role-editor-footer > div { width: 100%; }
  .role-editor-footer button { flex: 1; }
}

.school-statistics { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 20px; margin: 20px 0 0; }
.school-statistics dt { font-weight: 500; }
.school-statistics dd { margin: 0; text-align: right; font-weight: 700; }
