:root {
    color-scheme: light;
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-strong: #eef2f7;
    --text: #172033;
    --text-strong: #0f172a;
    --muted: #6b7280;
    --muted-light: #94a3b8;
    --border: #e4e9f1;
    --border-strong: #cfd7e3;
    --primary: #5b5ce2;
    --primary-dark: #4446c7;
    --primary-soft: #eeefff;
    --nav: #111827;
    --nav-soft: #1b2434;
    --nav-muted: #8792a5;
    --success: #0f9f6e;
    --success-soft: #e8f8f2;
    --danger: #d14343;
    --danger-soft: #fff0f0;
    --warning: #b26a00;
    --warning-soft: #fff7e6;
    --info: #2563eb;
    --info-soft: #edf4ff;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 12px rgba(15, 23, 42, .03);
    --shadow-md: 0 12px 32px rgba(15, 23, 42, .08);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, .14);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --sidebar-width: 278px;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); line-height: 1.5; font-size: 15px; }
button, input, select, textarea { font: inherit; }
a { color: var(--primary); }
svg.icon { width: 20px; height: 20px; flex: 0 0 auto; }
.container { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }
.page { padding-block: 34px 54px; }

/* Application shell */
.app-shell { min-height: 100vh; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 15% 0%, rgba(91, 92, 226, .22), transparent 32%),
        linear-gradient(180deg, #121a29 0%, #0f1724 100%);
    color: #fff;
    box-shadow: 12px 0 36px rgba(15, 23, 42, .08);
}
.sidebar-brand { min-height: 88px; padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand-lockup { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-lockup strong { display: block; letter-spacing: .08em; font-size: .95rem; }
.brand-lockup small { display: block; margin-top: 2px; color: var(--nav-muted); font-size: .72rem; letter-spacing: .01em; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg, #7778ff, #5253d5); box-shadow: 0 10px 24px rgba(91, 92, 226, .34); }
.brand-icon { width: 22px; height: 22px; }
.sidebar-close { display: none !important; color: white; }
.side-nav { flex: 1; overflow-y: auto; padding: 18px 14px 20px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.16) transparent; }
.nav-section + .nav-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.07); }
.nav-label { display: block; padding: 0 12px 8px; color: var(--nav-muted); font-size: .69rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px; margin: 3px 0; border-radius: 11px; color: #bec7d7; text-decoration: none; font-weight: 600; font-size: .92rem; transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.065); transform: translateX(2px); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(91, 92, 226, .34), rgba(91, 92, 226, .14)); box-shadow: inset 3px 0 0 #8586ff; }
.nav-item.active svg { color: #a8a9ff; }
.sidebar-profile { display: flex; align-items: center; gap: 10px; margin: 12px 14px 18px; padding: 13px; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(255,255,255,.045); }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #eef0ff; color: var(--primary-dark); font-weight: 800; font-size: .79rem; }
.profile-copy { min-width: 0; flex: 1; }
.profile-copy strong, .profile-copy small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-copy strong { color: #fff; font-size: .84rem; }
.profile-copy small { color: var(--nav-muted); font-size: .72rem; margin-top: 2px; }
.profile-action { color: #aab4c5; padding: 5px; display: grid; place-items: center; }
.profile-action:hover { color: #fff; }
.profile-action svg { width: 18px; height: 18px; }
.sidebar-overlay { display: none; }
.workspace { min-height: 100vh; margin-left: var(--sidebar-width); display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 30px; border-bottom: 1px solid rgba(228,233,241,.92); background: rgba(255,255,255,.88); backdrop-filter: blur(16px); }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-left > div { display: grid; }
.topbar-kicker { color: var(--muted); font-size: .74rem; }
.topbar-title { color: var(--text-strong); font-size: 1rem; }
.server-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .78rem; }
.server-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(15,159,110,.12); }
.topbar-date { padding-left: 14px; border-left: 1px solid var(--border); color: var(--muted); font-size: .8rem; }
.icon-button { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 0; border-radius: 11px; padding: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-button:hover { background: var(--surface-strong); color: var(--text-strong); }
.menu-button { display: none; }
.logout-button { background: #f5f7fa; }
.content-area { flex: 1; padding: 30px; }
.content-container { width: min(1420px, 100%); margin: 0 auto; }
.app-footer { display: flex; justify-content: space-between; gap: 20px; padding: 18px 30px 24px; color: var(--muted-light); font-size: .75rem; }

/* Typography and common layout */
h1, h2, h3 { margin-top: 0; color: var(--text-strong); line-height: 1.16; letter-spacing: -.025em; }
h1 { margin-bottom: 8px; font-size: clamp(1.8rem, 3vw, 2.55rem); }
h2 { margin-bottom: 8px; font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin-top: 0; }
.muted { color: var(--muted); }
.eyebrow { display: inline-block; margin-bottom: 8px; color: var(--primary); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.eyebrow.light { color: #bfc6ff; }
.page-head, .dashboard-heading, .document-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-head p, .dashboard-heading p { color: var(--muted); margin-bottom: 0; }
.dashboard-heading { align-items: center; }
.document-head { align-items: flex-start; padding: 22px 24px; background: linear-gradient(135deg, #fff, #f7f8ff); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.right { text-align: right; }
.narrow { max-width: 610px; margin-inline: auto; }
.stack { display: grid; gap: 16px; }

/* Cards */
.card { margin-bottom: 22px; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.action-card { color: inherit; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.action-card:hover { transform: translateY(-3px); border-color: #cfd2ff; box-shadow: var(--shadow-md); }
.card-heading-row { min-height: 52px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 0 0 18px; }
.card-heading-row h2 { margin: 0; }
.text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--primary); text-decoration: none; font-size: .84rem; font-weight: 700; }
.text-link svg { width: 17px; height: 17px; transition: transform .18s ease; }
.text-link:hover svg { transform: translateX(3px); }

/* Buttons and forms */
button, .button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 16px; border: 1px solid var(--primary); border-radius: 11px; background: linear-gradient(135deg, #6667e8, #5556d7); color: #fff; text-decoration: none; font-weight: 750; line-height: 1; cursor: pointer; box-shadow: 0 7px 18px rgba(91,92,226,.18); transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
button:hover, .button:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(91,92,226,.24); }
button.secondary, .button.secondary { border-color: var(--border-strong); background: #fff; color: var(--text); box-shadow: none; }
button.secondary:hover, .button.secondary:hover { border-color: #b6bfd0; background: #f8fafc; box-shadow: var(--shadow-sm); }
button.danger, .button.danger { border-color: var(--danger); background: var(--danger); }
button.danger-soft, .button.danger-soft { border-color: #f2c8c8; background: var(--danger-soft); color: #ad3030; box-shadow: none; }
button.small, .button.small { min-height: 34px; padding: 7px 11px; border-radius: 9px; font-size: .78rem; }
button:disabled { opacity: .48; cursor: not-allowed; transform: none; box-shadow: none; }
.button-with-icon svg { width: 18px; height: 18px; }
.inline-form { display: inline-flex; margin: 0; }
label { display: grid; gap: 7px; color: #344054; font-size: .84rem; font-weight: 700; }
.field-label > span { color: var(--muted-light); font-weight: 500; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: #fff; color: var(--text); box-shadow: inset 0 1px 2px rgba(15,23,42,.02); transition: border-color .15s ease, box-shadow .15s ease; }
textarea { min-height: 92px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #a3acba; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #8586ed; box-shadow: 0 0 0 4px rgba(91,92,226,.11); }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-actions, .filter-row, .review-actions { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.review-actions .grow { flex: 1; min-width: 280px; }
.filter-row { padding: 10px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-sm); }
.filter-row label { min-width: 180px; }
.filter-row input, .filter-row select { min-height: 40px; }
.checkbox { grid-template-columns: auto 1fr; align-items: center; font-weight: 500; }
.checkbox input { width: auto; min-height: auto; }
fieldset { min-width: 0; }
fieldset.card { padding-top: 16px; }
legend { padding: 0 8px; color: var(--text-strong); }

/* Alerts and badges */
.alert { position: relative; padding: 13px 16px; margin-bottom: 18px; border: 1px solid; border-radius: 12px; font-size: .88rem; }
.alert-success { color: #087752; background: var(--success-soft); border-color: #bfe9d9; }
.alert-error { color: #a83232; background: var(--danger-soft); border-color: #f1c6c6; }
.alert-warning { color: #925a05; background: var(--warning-soft); border-color: #eed7a6; }
.alert-info { color: #1d56aa; background: var(--info-soft); border-color: #cbdcf9; }
.compact-alert { margin: 10px 0 0; padding: 10px 12px; }
.badge { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 9px; border-radius: 999px; background: #edf1f6; color: #526071; font-size: .72rem; font-weight: 750; white-space: nowrap; }
.badge-approved { background: #e4f7ef; color: #0b7653; }
.badge-submitted { background: #eaf1ff; color: #2859aa; }
.badge-rejected, .badge-violation { background: #ffe9e9; color: #a73131; }
.badge-warning { background: #fff2d8; color: #8e5800; }
.badge-info { background: #e8f2ff; color: #245da8; }
.badge-cancelled { background: #edf0f4; color: #697383; }

/* Tables */
.table-card { padding: 0; overflow: hidden; }
.table-card > h2 { padding: 22px 24px 6px; }
.modern-table-card .card-heading-row { padding: 22px 24px 12px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; }
th, td { padding: 14px 16px; border-bottom: 1px solid #edf0f4; text-align: left; vertical-align: middle; }
th { background: #f8fafc; color: #697386; font-size: .69rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
tbody tr { transition: background .14s ease; }
tbody tr:hover { background: #fbfcff; }
tr:last-child td { border-bottom: 0; }
.weekend { background: #fafbfc; color: #6f7988; }
.actions { white-space: nowrap; }
.decision-cell { min-width: 270px; }
.time-pill { display: inline-flex; padding: 5px 9px; border-radius: 8px; background: var(--primary-soft); color: var(--primary-dark); font-variant-numeric: tabular-nums; font-weight: 800; }
.empty-state { min-height: 150px; display: grid; place-items: center; align-content: center; gap: 7px; color: var(--muted); text-align: center; }
.empty-state svg { width: 30px; height: 30px; color: #aab3c1; }
.empty-state strong { color: var(--text); }
.empty-state span { font-size: .8rem; }

/* Dashboard */
.clock-panel { position: relative; display: grid; grid-template-columns: minmax(340px, .95fr) minmax(390px, 1.05fr); margin-bottom: 22px; border: 1px solid #dfe3ec; border-radius: var(--radius-lg); overflow: hidden; background: #fff; box-shadow: var(--shadow-md); }
.clock-visual { position: relative; min-height: 350px; padding: clamp(28px, 4vw, 44px); overflow: hidden; background:
    radial-gradient(circle at 80% 15%, rgba(154,155,255,.22), transparent 28%),
    radial-gradient(circle at 12% 90%, rgba(67,210,170,.14), transparent 32%),
    linear-gradient(145deg, #111a2b, #17243b 68%, #1b2944); color: white; }
.clock-status-row { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 9px; color: #d9dfeb; font-size: .8rem; font-weight: 700; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #9aa4b6; box-shadow: 0 0 0 6px rgba(154,164,182,.12); }
.clock-panel.running .live-dot { background: #37d39a; box-shadow: 0 0 0 6px rgba(55,211,154,.13); animation: pulse 2s infinite; }
.clock-panel.paused .live-dot { background: #ffc35d; box-shadow: 0 0 0 6px rgba(255,195,93,.12); }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(.78); } }
.clock-time-block { position: relative; z-index: 2; margin-top: 70px; }
.clock-caption { display: block; color: #aeb9ca; font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.clock-time { display: block; margin: 8px 0 20px; font-size: clamp(3rem, 7vw, 5.4rem); line-height: .98; letter-spacing: -.07em; font-variant-numeric: tabular-nums; }
.clock-time-block > p { max-width: 430px; color: #b9c3d3; font-size: .88rem; }
.clock-meta { display: flex; gap: 28px; color: #9da9bb; font-size: .76rem; }
.clock-meta span { display: grid; gap: 3px; }
.clock-meta strong { color: #fff; font-size: .94rem; font-variant-numeric: tabular-nums; }
.clock-orbit { position: absolute; inset: 0; pointer-events: none; }
.clock-orbit::before, .clock-orbit::after, .clock-orbit span { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.06); border-radius: 50%; }
.clock-orbit::before { width: 280px; height: 280px; right: -90px; top: -80px; }
.clock-orbit::after { width: 180px; height: 180px; right: -45px; top: -30px; }
.clock-orbit span:first-child { width: 120px; height: 120px; left: -50px; bottom: -45px; }
.clock-control { padding: clamp(28px, 4vw, 44px); display: flex; flex-direction: column; justify-content: center; }
.clock-control-head { margin-bottom: 20px; }
.clock-control-head h2 { font-size: clamp(1.4rem, 2vw, 1.8rem); }
.clock-start-form { display: grid; gap: 16px; }
.clock-main-action, .clock-secondary-action { min-height: 54px; width: 100%; border-radius: 13px; font-size: .94rem; }
.clock-button-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.clock-button-grid form { margin: 0; }
.clock-note-details { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--border); }
.clock-note-details summary { color: var(--muted); font-size: .8rem; cursor: pointer; }
.clock-note-details form { display: grid; gap: 10px; margin-top: 12px; }
.clock-legal { display: flex; align-items: flex-start; gap: 8px; margin: 20px 0 0; color: var(--muted); font-size: .74rem; line-height: 1.45; }
.clock-legal svg { width: 17px; height: 17px; color: var(--success); }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 22px; }
.metric-card { min-height: 116px; display: flex; align-items: center; gap: 15px; padding: 20px; background: #fff; border: 1px solid var(--border); border-radius: 15px; box-shadow: var(--shadow-sm); }
.metric-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; }
.metric-icon.indigo { background: #eeefff; color: #5b5ce2; }
.metric-icon.emerald { background: #e7f8f1; color: #07966b; }
.metric-icon.amber { background: #fff4df; color: #bb7100; }
.metric-card > div { min-width: 0; display: grid; gap: 2px; }
.metric-card span:not(.metric-icon) { color: var(--muted); font-size: .75rem; }
.metric-card strong { color: var(--text-strong); font-size: 1.04rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-card small { color: var(--muted-light); font-size: .7rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(310px, .7fr); gap: 22px; }
.dashboard-grid .card { margin-bottom: 0; }
.quick-actions-card { padding: 22px; }
.quick-action { display: grid; grid-template-columns: 42px minmax(0,1fr) 20px; align-items: center; gap: 12px; padding: 12px 5px; color: inherit; text-decoration: none; border-bottom: 1px solid #edf0f4; }
.quick-action:last-child { border-bottom: 0; }
.quick-action > svg { width: 17px; height: 17px; color: #a0a9b7; transition: transform .16s ease; }
.quick-action:hover > svg { color: var(--primary); transform: translateX(3px); }
.quick-action span:nth-child(2) { min-width: 0; }
.quick-action strong, .quick-action small { display: block; }
.quick-action strong { color: var(--text-strong); font-size: .85rem; }
.quick-action small { margin-top: 2px; color: var(--muted); font-size: .72rem; }
.quick-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; }
.quick-icon svg { width: 18px; height: 18px; }
.quick-icon.blue { background: #eaf2ff; color: #3c6fd8; }
.quick-icon.violet { background: #f1ecff; color: #7655cc; }
.quick-icon.green { background: #e8f8f1; color: #138a65; }
.quick-icon.orange { background: #fff1df; color: #bd7000; }

/* Summary cards */
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 14px; margin: 0 0 22px; }
.summary-item { min-height: 96px; display: grid; align-content: center; gap: 5px; padding: 18px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm); }
.summary-item span { color: var(--muted); font-size: .72rem; }
.summary-item strong { color: var(--text-strong); font-size: 1.25rem; }
code { padding: 2px 6px; border-radius: 6px; background: #eef1f5; color: #374151; }

/* Login */
.auth-body { background: #fff; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(430px, .95fr) minmax(430px, 1.05fr); }
.auth-visual { position: relative; min-height: 100vh; overflow: hidden; padding: 42px clamp(34px, 5vw, 76px); display: flex; flex-direction: column; justify-content: space-between; background:
    radial-gradient(circle at 20% 20%, rgba(112,113,255,.36), transparent 28%),
    radial-gradient(circle at 85% 75%, rgba(45,205,162,.18), transparent 25%),
    linear-gradient(145deg, #111827, #17233a 60%, #192844); color: white; }
.auth-brand { align-self: flex-start; }
.auth-brand small { color: #9ba7bb; }
.auth-message { position: relative; z-index: 2; max-width: 610px; margin: auto 0; }
.auth-message h2 { max-width: 570px; margin: 0 0 20px; color: #fff; font-size: clamp(2.4rem, 5vw, 4.7rem); line-height: 1.02; letter-spacing: -.055em; }
.auth-message > p { max-width: 540px; color: #aeb9ca; font-size: 1rem; line-height: 1.75; }
.auth-feature-list { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.auth-feature-list span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.09); border-radius: 999px; background: rgba(255,255,255,.05); color: #dce2ec; font-size: .76rem; }
.auth-feature-list svg { width: 16px; height: 16px; color: #a6a7ff; }
.auth-decoration span { position: absolute; border: 1px solid rgba(255,255,255,.06); border-radius: 50%; }
.auth-decoration span:nth-child(1) { width: 420px; height: 420px; right: -180px; top: -130px; }
.auth-decoration span:nth-child(2) { width: 260px; height: 260px; right: -95px; top: -55px; }
.auth-decoration span:nth-child(3) { width: 180px; height: 180px; left: -80px; bottom: -80px; }
.auth-content { min-height: 100vh; display: grid; place-items: center; padding: 34px; background: #fff; }
.auth-content-inner { width: min(450px, 100%); }
.auth-card { margin: 0; padding: 0; border: 0; box-shadow: none; }
.auth-card h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.auth-card > p { margin-bottom: 28px; }
.auth-card button { min-height: 50px; margin-top: 4px; }

/* Installer */
.installer-card { max-width: 960px; margin-inline: auto; }

/* Compatibility / utilities */
.clock-card { padding: 24px; }
.clock-head { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.clock-display { min-width: 210px; text-align: right; display: grid; gap: 3px; }
.clock-display strong { font-size: 2.4rem; font-variant-numeric: tabular-nums; }
.clock-actions { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.clock-stop-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.clock-note { min-width: min(340px, 100%); flex: 1; }
.legal-note { margin: 16px 0 0; color: var(--muted); font-size: .78rem; }
.compact-form { gap: 6px; margin-top: 8px; }
.compact-form input, .compact-form textarea { min-width: 230px; }

@media (max-width: 1180px) {
    .clock-panel { grid-template-columns: 1fr; }
    .clock-visual { min-height: 300px; }
    .clock-time-block { margin-top: 48px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .quick-actions-card { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 20px; }
    .quick-actions-card .card-heading-row { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
    .sidebar { transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
    .nav-open .sidebar { transform: translateX(0); }
    .sidebar-close { display: grid !important; }
    .sidebar-overlay { position: fixed; inset: 0; z-index: 45; display: block; background: rgba(15,23,42,.48); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease; }
    .nav-open .sidebar-overlay { opacity: 1; visibility: visible; }
    .workspace { margin-left: 0; }
    .menu-button { display: grid; }
    .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-visual { min-height: auto; padding: 28px; }
    .auth-message { margin: 75px 0 42px; }
    .auth-message h2 { font-size: clamp(2.2rem, 8vw, 3.6rem); }
    .auth-content { min-height: auto; padding: 54px 28px; }
}

@media (max-width: 720px) {
    .topbar { padding: 12px 16px; }
    .server-status, .topbar-date { display: none; }
    .content-area { padding: 20px 14px; }
    .app-footer { padding: 14px 16px 20px; flex-direction: column; gap: 4px; }
    .page-head, .dashboard-heading, .document-head { align-items: stretch; flex-direction: column; }
    .page-head .filter-row { width: 100%; }
    .filter-row label { flex: 1; min-width: 150px; }
    .metric-grid { grid-template-columns: 1fr; }
    .metric-card { min-height: 98px; }
    .clock-visual { min-height: 280px; padding: 28px; }
    .clock-time { font-size: clamp(3rem, 17vw, 4.6rem); }
    .clock-control { padding: 28px; }
    .clock-button-grid { grid-template-columns: 1fr; }
    .quick-actions-card { display: block; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .wide { grid-column: auto; }
    .review-actions .grow { min-width: 100%; }
    .clock-head { align-items: flex-start; flex-direction: column; }
    .clock-display { text-align: left; }
    .clock-actions, .clock-stop-form { align-items: stretch; flex-direction: column; }
    .clock-actions form, .clock-actions button, .clock-note { width: 100%; }
    .auth-feature-list { display: grid; }
    .auth-content { padding: 42px 20px; }
    th, td { padding: 12px 13px; }
}

@media (max-width: 480px) {
    .topbar-title { font-size: .9rem; }
    .clock-meta { gap: 18px; }
    .clock-control, .clock-visual { padding: 23px; }
    .card { padding: 19px; }
    .table-card { padding: 0; }
    .summary-grid { grid-template-columns: 1fr 1fr; }
    .document-head .right { text-align: left; }
}

@media print {
    @page { size: A4 landscape; margin: 10mm; }
    body { background: white; font-size: 9pt; }
    .sidebar, .topbar, .app-footer, .no-print { display: none !important; }
    .workspace { margin-left: 0; }
    .content-area { padding: 0; }
    .content-container { width: 100%; }
    .document-head, .print-flat { border: 0; box-shadow: none; padding: 0; }
    .table-wrap { overflow: visible; }
    table { font-size: 7.5pt; }
    th, td { padding: 3px 4px; }
    .summary-grid { grid-template-columns: repeat(6, 1fr); }
}

/* Urlaub und Abwesenheiten */
.absence-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 22px; align-items: start; }
.absence-request-card, .vacation-balance-card { margin-bottom: 22px; }
.card-heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.card-heading-row h2, .card-heading-row p { margin-bottom: 0; }
.request-state { padding: 7px 11px; border-radius: 999px; background: var(--surface-strong); color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.absence-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.absence-preview { min-height: 73px; display: flex; align-items: center; gap: 12px; padding: 13px 15px; border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--surface-soft); }
.absence-preview > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.absence-preview svg { width: 18px; height: 18px; }
.absence-preview strong, .absence-preview small { display: block; }
.absence-preview strong { color: var(--text-strong); font-size: .82rem; }
.absence-preview small { color: var(--muted); font-size: .7rem; margin-top: 2px; }
.form-submit-row { display: flex; align-items: center; gap: 14px; }
.form-submit-row button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.form-submit-row button svg { width: 18px; height: 18px; }
.form-submit-row > span { font-size: .73rem; }
button:disabled { cursor: not-allowed; opacity: .52; }
.vacation-balance-card { position: sticky; top: 98px; overflow: hidden; background: linear-gradient(145deg, #ffffff, #f8f8ff); }
.vacation-balance-number { display: flex; align-items: flex-end; gap: 10px; margin: 24px 0 16px; }
.vacation-balance-number strong { color: var(--text-strong); font-size: clamp(2.6rem, 5vw, 4.1rem); line-height: .9; letter-spacing: -.06em; }
.vacation-balance-number span { color: var(--muted); font-size: .82rem; padding-bottom: 5px; }
.vacation-progress { height: 8px; overflow: hidden; border-radius: 999px; background: #e7eaf0; }
.vacation-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #8889ff); }
.vacation-breakdown { display: grid; gap: 0; margin: 22px 0; }
.vacation-breakdown > div { display: flex; justify-content: space-between; gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.vacation-breakdown dt { color: var(--muted); font-size: .78rem; }
.vacation-breakdown dd { margin: 0; color: var(--text-strong); font-weight: 800; }
.model-info { display: flex; align-items: center; gap: 11px; padding: 14px; border-radius: 12px; background: #fff; border: 1px solid var(--border); }
.model-info > svg { color: var(--primary); }
.model-info span, .model-info strong, .model-info small { display: block; }
.model-info span, .model-info small { color: var(--muted); font-size: .69rem; }
.model-info strong { color: var(--text-strong); font-size: .82rem; margin: 2px 0; }
.empty-table { padding: 40px 20px !important; text-align: center; }
.empty-table strong, .empty-table span { display: block; }
.empty-table span { margin-top: 4px; color: var(--muted); font-size: .78rem; }
.alert a { font-weight: 800; }

@media (max-width: 1100px) {
    .absence-layout { grid-template-columns: 1fr; }
    .vacation-balance-card { position: static; }
}

@media (max-width: 720px) {
    .absence-form { grid-template-columns: 1fr; }
    .form-submit-row { align-items: stretch; flex-direction: column; }
    .form-submit-row button { width: 100%; }
    .card-heading-row { flex-direction: column; }
}

/* Version 0.5 workflows */
.badge-pending_admin { background: #fff2d8; color: #8e5800; }
.page-head-actions { display:flex; align-items:flex-end; gap:12px; flex-wrap:wrap; }
.two-column-layout { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(280px,.55fr); gap:22px; margin-bottom:22px; }
.info-card { align-self:start; }
.process-list { list-style:none; margin:20px 0 0; padding:0; display:grid; gap:18px; counter-reset:steps; }
.process-list li { position:relative; padding-left:46px; display:grid; gap:3px; counter-increment:steps; }
.process-list li::before { content:counter(steps); position:absolute; left:0; top:0; width:32px; height:32px; display:grid; place-items:center; border-radius:10px; color:var(--primary); background:var(--primary-soft); font-weight:800; }
.process-list span { color:var(--muted); font-size:.8rem; }
.action-details { position:relative; }
.action-details > summary { list-style:none; cursor:pointer; }
.action-details > summary::-webkit-details-marker { display:none; }
.action-popover { position:absolute; z-index:20; right:0; top:36px; width:min(330px,85vw); padding:16px; border:1px solid var(--border); border-radius:14px; background:#fff; box-shadow:var(--shadow-lg); }
.action-popover label { font-size:.76rem; }
.action-popover textarea { min-height:70px; }
.notification-button { position:relative; width:38px; height:38px; display:grid; place-items:center; color:#606b7b; border:1px solid var(--border); border-radius:11px; background:#fff; }
.notification-button svg { width:18px; height:18px; }
.notification-button > span { position:absolute; right:-5px; top:-6px; min-width:19px; height:19px; padding:0 5px; display:grid; place-items:center; border:2px solid #fff; border-radius:999px; background:var(--danger); color:#fff; font-size:.62rem; font-weight:800; }
.notification-list { display:grid; gap:12px; }
.notification-item { display:grid; grid-template-columns:10px 1fr; gap:14px; margin:0; padding:18px 20px; }
.notification-item.unread { border-color:#c8c9ff; box-shadow:0 0 0 2px rgba(91,92,226,.06), var(--shadow-sm); }
.notification-dot { width:9px; height:9px; margin-top:5px; border-radius:50%; background:#8b95a5; }
.notification-dot.type-success { background:var(--success); }
.notification-dot.type-warning { background:var(--warning); }
.notification-dot.type-error { background:var(--danger); }
.notification-dot.type-info { background:var(--info); }
.notification-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.notification-head time { color:var(--muted-light); font-size:.7rem; white-space:nowrap; }
.notification-item p { margin:5px 0 0; color:var(--muted); font-size:.84rem; }
.notification-preview-card { margin-top:22px; }
.notification-preview-list { display:grid; }
.notification-preview { display:grid; grid-template-columns:10px 1fr; align-items:start; gap:12px; padding:13px 4px; color:inherit; text-decoration:none; border-bottom:1px solid var(--border); }
.notification-preview:last-child { border-bottom:0; }
.notification-preview strong,.notification-preview small { display:block; }
.notification-preview small { margin-top:2px; color:var(--muted); font-size:.7rem; }
.notification-preview.unread strong { color:var(--primary-dark); }
.text-danger { color:var(--danger); }
.setup-banner { display:flex; gap:6px; flex-wrap:wrap; }
.setup-score { min-width:110px; padding:14px 18px; display:grid; text-align:center; border-radius:16px; color:#fff; background:linear-gradient(145deg,var(--primary),#7b68ee); box-shadow:var(--shadow-md); }
.setup-score strong { font-size:1.55rem; }
.setup-score small { opacity:.85; }
.setup-progress { height:9px; margin:-5px 0 22px; border-radius:999px; overflow:hidden; background:#e9edf3; }
.setup-progress span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--primary),var(--success)); }
.setup-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-bottom:22px; }
.setup-check { margin:0; display:grid; grid-template-columns:44px 1fr auto; align-items:center; gap:14px; padding:18px; }
.setup-check-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:12px; }
.setup-check.complete .setup-check-icon { color:var(--success); background:var(--success-soft); }
.setup-check.open .setup-check-icon { color:var(--warning); background:var(--warning-soft); }
.setup-check h2 { font-size:.94rem; }
.setup-check p { margin:3px 0 0; color:var(--muted); font-size:.75rem; }
.calendar-toolbar { display:flex; align-items:center; gap:10px; }
.calendar-toolbar strong { min-width:90px; text-align:center; }
.calendar-filter { margin-bottom:16px; }
.team-calendar-card { padding:0; overflow:hidden; }
.calendar-weekdays,.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.calendar-weekdays { background:#f7f8fb; border-bottom:1px solid var(--border); }
.calendar-weekdays span { padding:11px; color:var(--muted); font-size:.7rem; font-weight:800; text-align:center; text-transform:uppercase; }
.calendar-day { min-height:128px; padding:9px; border-right:1px solid var(--border); border-bottom:1px solid var(--border); background:#fff; }
.calendar-day:nth-child(7n) { border-right:0; }
.calendar-day.outside { background:#f8fafc; }
.calendar-day.today { box-shadow:inset 0 0 0 2px var(--primary); }
.calendar-day-number { display:flex; justify-content:space-between; align-items:center; margin-bottom:7px; }
.calendar-day-number > span { width:28px; height:28px; display:grid; place-items:center; border-radius:9px; color:var(--text-strong); font-weight:800; font-size:.78rem; }
.calendar-day.today .calendar-day-number > span { color:#fff; background:var(--primary); }
.calendar-day-number small { color:var(--primary); font-size:.62rem; font-weight:800; }
.calendar-items { display:grid; gap:4px; }
.calendar-item { padding:6px 7px; overflow:hidden; border-left:3px solid var(--success); border-radius:7px; background:#eef9f5; }
.calendar-item.status-submitted,.calendar-item.status-pending_admin { border-left-color:var(--warning); background:#fff7e8; }
.calendar-item strong,.calendar-item span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.calendar-item strong { font-size:.67rem; }
.calendar-item span { margin-top:1px; color:var(--muted); font-size:.6rem; }
.calendar-legend { display:flex; gap:18px; align-items:center; flex-wrap:wrap; margin-top:12px; font-size:.74rem; }
.calendar-legend span { display:flex; align-items:center; gap:6px; }
.calendar-legend i { width:10px; height:10px; border-radius:3px; }
.legend-approved { background:var(--success); }
.legend-pending { background:var(--warning); }

@media (max-width: 900px) {
  .two-column-layout,.setup-grid { grid-template-columns:1fr; }
  .calendar-day { min-height:95px; padding:5px; }
  .calendar-item span { display:none; }
  .calendar-item strong { font-size:.6rem; }
  .server-status { display:none; }
}
@media (max-width: 620px) {
  .calendar-weekdays span { padding:8px 2px; }
  .calendar-day { min-height:72px; }
  .calendar-item { padding:4px; border-left-width:2px; }
  .calendar-item strong { max-width:100%; }
  .setup-check { grid-template-columns:40px 1fr; }
  .setup-check .button { grid-column:1/-1; }
  .notification-head { align-items:flex-start; flex-direction:column; gap:3px; }
}

.running-entry { background: rgba(16, 185, 129, .055); }
.badge-running { background: #dcfce7; color: #047857; border-color: #a7f3d0; }

.inline-editor { display: inline-block; position: relative; }
.inline-editor > summary { list-style: none; cursor: pointer; }
.inline-editor > summary::-webkit-details-marker { display: none; }
.inline-editor[open] .compact-form { position: absolute; z-index: 20; right: 0; top: calc(100% + 8px); width: min(330px, 85vw); padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.compact-form label { min-width: 0; }

.update-page-head { margin-bottom: 24px; }
.update-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.update-stat-card { min-height: 132px; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.update-stat-card > span { color: var(--muted); font-size: .78rem; font-weight: 800; }
.update-stat-card > strong { font-size: clamp(1.35rem, 2vw, 2rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.update-stat-card > small { color: var(--muted); }
.update-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 20px; align-items: start; }
.update-main, .update-side { display: grid; gap: 20px; }
.update-card { margin: 0; }
.migration-empty { border: 1px dashed var(--border-strong); border-radius: 13px; padding: 18px; color: var(--muted); background: var(--surface-soft); }
.migration-list { margin: 0; padding-left: 24px; display: grid; gap: 8px; }
.update-assurance { border-left: 4px solid var(--primary); background: var(--primary-soft); border-radius: 10px; padding: 14px 16px; margin: 14px 0; line-height: 1.6; }
.update-details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.update-details > div { padding: 12px; border-radius: 12px; background: var(--surface-soft); }
.update-details .wide { grid-column: 1 / -1; }
.update-details dt { color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.update-details dd { margin: 5px 0 0; font-weight: 800; overflow-wrap: anywhere; }
.file-drop { display: block; border: 1px dashed var(--border-strong); border-radius: 15px; background: var(--surface-soft); cursor: pointer; }
.file-drop input { position: absolute; opacity: 0; pointer-events: none; }
.file-drop span { min-height: 145px; display: grid; place-items: center; align-content: center; gap: 6px; text-align: center; padding: 20px; }
.file-drop svg { width: 34px; height: 34px; color: var(--primary); }
.file-drop small { color: var(--muted); }
.update-upload-form { display: grid; gap: 14px; }
.requirement-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.requirement-list li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.requirement-list li:last-child { border-bottom: 0; }
.requirement-list strong { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.requirement-list .ok { color: #047857; }
.requirement-list .bad { color: #b91c1c; }
.update-history { display: grid; gap: 14px; }
.update-history > div { display: flex; align-items: flex-start; gap: 10px; }
.update-history p { margin: 0; display: grid; gap: 2px; min-width: 0; }
.update-history small, .update-history em { color: var(--muted); font-size: .76rem; font-style: normal; overflow-wrap: anywhere; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; margin-top: 5px; background: #94a3b8; }
.status-installed { background: #10b981; }
.status-failed { background: #ef4444; }
.status-validated, .status-installing { background: #f59e0b; }
.status-discarded { background: #94a3b8; }
@media (max-width: 1100px) { .update-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .update-layout { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .update-stat-grid { grid-template-columns: 1fr; } .update-details { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
