:root {
    --bg: #090d18;
    --bg-soft: #0d1322;
    --surface: #111827;
    --surface-2: #151e30;
    --surface-3: #1a263b;
    --surface-hover: #1d2a42;
    --text: #f4f7fb;
    --text-soft: #d7deea;
    --text-muted: #8f9bb0;
    --border: #27344a;
    --border-soft: rgba(255, 255, 255, .075);
    --accent: #6476ff;
    --accent-strong: #5264f5;
    --accent-soft: rgba(100, 118, 255, .14);
    --cyan: #43c7df;
    --success: #45d39c;
    --warning: #f2b84b;
    --danger: #f26f83;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, .16);
    --shadow: 0 20px 55px rgba(0, 0, 0, .24);
    --header-height: 76px;
}

* { box-sizing: border-box; }
html { min-width: 320px; color-scheme: dark; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px),
        radial-gradient(circle at 8% 0%, rgba(100,118,255,.11), transparent 30rem),
        radial-gradient(circle at 96% 2%, rgba(67,199,223,.07), transparent 28rem),
        var(--bg);
    background-size: 36px 36px, 36px 36px, auto, auto, auto;
    color: var(--text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.nav-open { overflow: hidden; }
a { color: #aeb7ff; text-decoration: none; }
a:hover { color: #fff; }
button, input { font: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.skip-link {
    position: fixed;
    left: 16px;
    top: -60px;
    z-index: 999;
    padding: 10px 14px;
    border-radius: 9px;
    background: #fff;
    color: #0b1020;
    font-weight: 800;
    transition: top .2s ease;
}
.skip-link:focus { top: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    border-bottom: 1px solid var(--border-soft);
    background: rgba(9, 13, 24, .84);
    backdrop-filter: blur(18px) saturate(135%);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
}
.header-inner {
    width: min(1480px, calc(100% - 40px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; min-width: 0; }
.brand:hover { color: #fff; }
.brand-mark {
    position: relative;
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 13px;
    background: linear-gradient(145deg, #202d4d, #111a30);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 25px rgba(0,0,0,.22);
}
.brand-mark::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(100,118,255,.22); border-radius: 9px; }
.brand-mark span { z-index: 1; width: 4px; border-radius: 3px; background: var(--accent); }
.brand-mark span:nth-child(1) { height: 9px; }
.brand-mark span:nth-child(2) { height: 17px; background: var(--cyan); }
.brand-mark span:nth-child(3) { height: 13px; }
.brand-mark-small { width: 34px; height: 34px; flex-basis: 34px; padding: 8px; border-radius: 10px; }
.brand-copy { display: grid; line-height: 1.08; }
.brand-copy strong { font-size: 15px; letter-spacing: -.01em; }
.brand-copy small { margin-top: 5px; color: var(--text-muted); font-size: 11px; font-weight: 650; letter-spacing: .035em; text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 7px; }
.nav-link, .link-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    font-weight: 720;
    font-size: 14px;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.nav-link svg { width: 18px; height: 18px; }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,.055); }
.nav-link.active { border-color: rgba(255,255,255,.055); }
.admin-link { color: #b7beff; }
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 6px;
    padding: 5px 10px 5px 5px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    color: var(--text-soft);
    background: rgba(255,255,255,.035);
    font-size: 13px;
    font-weight: 750;
}
.user-avatar {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 9px;
    background: var(--accent-soft);
    color: #c9ceff;
    font-size: 12px;
    font-weight: 900;
}
.inline-form { display: inline; margin: 0; }
.link-button { width: auto; }
.nav-toggle { display: none; width: 44px; height: 44px; padding: 11px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.nav-toggle > span:not(.sr-only) { display: block; width: 20px; height: 2px; margin: 4px 0; border-radius: 2px; background: #fff; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] > span:nth-of-type(2) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] > span:nth-of-type(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] > span:nth-of-type(4) { transform: translateY(-6px) rotate(-45deg); }

.container { width: min(1480px, calc(100% - 40px)); margin: 0 auto; padding: 52px 0 90px; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: var(--accent-strong);
    color: #fff;
    font-weight: 820;
    font-size: 14px;
    line-height: 1;
    box-shadow: 0 10px 24px rgba(82,100,245,.22);
    transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.button svg { width: 18px; height: 18px; }
.button:hover { color: #fff; transform: translateY(-1px); background: #6273ff; box-shadow: 0 14px 30px rgba(82,100,245,.28); }
.button:active { transform: translateY(0); }
.button:focus-visible, .nav-link:focus-visible, .nav-toggle:focus-visible, input:focus-visible, .mobile-day-nav button:focus-visible { outline: 3px solid rgba(100,118,255,.42); outline-offset: 2px; }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.button-secondary { border-color: var(--border); background: var(--surface-2); box-shadow: none; }
.button-secondary:hover { border-color: #3b4a65; background: var(--surface-hover); box-shadow: none; }
.button-ghost { border-color: var(--border); background: transparent; color: var(--text-muted); box-shadow: none; }
.button-ghost:hover { background: rgba(255,255,255,.04); box-shadow: none; }
.button-small { min-height: 38px; padding: 8px 13px; border-radius: 9px; font-size: 13px; }
.button-large { min-height: 52px; padding: 13px 21px; border-radius: 12px; }
.button-block { width: 100%; }

.eyebrow, .panel-kicker {
    color: #94a0ff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.muted { color: var(--text-muted); }

.hero {
    min-height: calc(100vh - var(--header-height) - 115px);
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(440px, .75fr);
    align-items: center;
    gap: clamp(48px, 7vw, 110px);
    padding: 26px 0 50px;
}
.hero-content { max-width: 830px; }
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 11px;
    border: 1px solid rgba(69,211,156,.22);
    border-radius: 999px;
    background: rgba(69,211,156,.07);
    color: #b9ead8;
    font-size: 12px;
    font-weight: 760;
}
.status-pill span { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(69,211,156,.12); }
.hero h1 {
    max-width: 780px;
    margin: 24px 0 21px;
    font-size: clamp(48px, 6.4vw, 84px);
    line-height: .98;
    letter-spacing: -.055em;
    font-weight: 860;
}
.hero-lead { max-width: 710px; margin: 0; color: #aab5c8; font-size: clamp(17px, 1.55vw, 20px); line-height: 1.65; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 31px; }
.hero-trust { display: flex; gap: 18px 24px; flex-wrap: wrap; margin-top: 24px; color: var(--text-muted); font-size: 12px; font-weight: 680; }
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust svg { width: 15px; height: 15px; color: var(--success); stroke-width: 2.4; }

.dashboard-preview {
    position: relative;
    width: 100%;
    min-height: 510px;
    padding: 24px;
    border: 1px solid #2b3950;
    border-radius: 25px;
    background: linear-gradient(155deg, rgba(24,35,55,.98), rgba(13,20,34,.98));
    box-shadow: 0 32px 85px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.045);
    overflow: hidden;
}
.dashboard-preview::before { content: ""; position: absolute; width: 280px; height: 280px; right: -110px; top: -130px; border-radius: 50%; background: rgba(100,118,255,.12); filter: blur(10px); }
.preview-topbar, .preview-metrics, .preview-note { position: relative; z-index: 1; }
.preview-topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.preview-topbar > div { display: grid; }
.preview-kicker { color: var(--text-muted); font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.preview-topbar strong { margin-top: 4px; font-size: 18px; }
.preview-live { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid rgba(69,211,156,.18); border-radius: 999px; background: rgba(69,211,156,.07); color: #aee5d1; font-size: 11px; font-weight: 800; }
.preview-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.preview-metrics { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; margin-top: 24px; }
.preview-metrics article { display: grid; padding: 16px; border: 1px solid var(--border-soft); border-radius: 13px; background: rgba(255,255,255,.03); }
.preview-metrics small, .preview-metrics span { color: var(--text-muted); font-size: 11px; }
.preview-metrics strong { margin: 5px 0 2px; font-size: 27px; line-height: 1; }
.preview-chart { position: relative; height: 185px; display: flex; align-items: end; gap: 9px; margin-top: 31px; padding: 18px 10px 0; border-bottom: 1px solid var(--border); }
.preview-chart .chart-grid { position: absolute; inset: 0 0 0; background: repeating-linear-gradient(to bottom, transparent 0, transparent 45px, rgba(255,255,255,.055) 46px); }
.preview-chart > span { position: relative; z-index: 1; flex: 1; height: var(--h); min-width: 8px; border-radius: 5px 5px 1px 1px; background: linear-gradient(to top, var(--accent-strong), var(--cyan)); opacity: .82; }
.preview-chart > span:nth-of-type(9), .preview-chart > span:nth-of-type(10) { opacity: 1; }
.preview-days { display: flex; justify-content: space-between; padding: 9px 5px 0; color: #748198; font-size: 10px; }
.preview-note { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding: 13px; border: 1px solid var(--border-soft); border-radius: 13px; background: rgba(8,13,24,.42); }
.preview-note-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; background: var(--accent-soft); color: #aeb7ff; }
.preview-note-icon svg { width: 19px; height: 19px; }
.preview-note div { display: grid; }
.preview-note strong { font-size: 13px; }
.preview-note small { margin-top: 2px; color: var(--text-muted); font-size: 11px; }

.feature-strip { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.feature-strip article { display: flex; gap: 16px; padding: 27px 26px; }
.feature-strip article + article { border-left: 1px solid var(--border-soft); }
.feature-number { color: #637089; font-size: 11px; font-weight: 900; letter-spacing: .1em; }
.feature-strip div { display: grid; gap: 6px; }
.feature-strip strong { font-size: 15px; }
.feature-strip p { margin: 0; color: var(--text-muted); font-size: 13px; }

.panel {
    margin-bottom: 22px;
    padding: clamp(20px, 2.5vw, 30px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(17,24,39,.88);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.025);
}
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; margin-bottom: 24px; }
.panel-heading h2 { margin: 6px 0 5px; font-size: clamp(21px,2.3vw,29px); line-height: 1.18; letter-spacing: -.025em; }
.panel-heading p { margin: 0; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.page-heading > div { max-width: 920px; }
.page-heading h1 { margin: 10px 0 10px; font-size: clamp(38px,5vw,62px); line-height: 1.02; letter-spacing: -.045em; }
.page-heading p { max-width: 820px; margin: 0; color: var(--text-muted); font-size: 17px; }
.heading-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.heading-separator { width: 24px; height: 1px; background: var(--border); }

.alert { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 18px; padding: 13px 15px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--text-soft); font-size: 14px; }
.alert-icon { width: 8px; height: 8px; flex: 0 0 8px; margin-top: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(67,199,223,.1); }
.alert ul { margin: 0; padding-left: 18px; }
.alert-success { border-color: rgba(69,211,156,.28); background: rgba(69,211,156,.07); }
.alert-success .alert-icon { background: var(--success); }
.alert-error { border-color: rgba(242,111,131,.3); background: rgba(242,111,131,.075); }
.alert-error .alert-icon { background: var(--danger); }
.alert-info { border-color: rgba(67,199,223,.27); background: rgba(67,199,223,.065); }

.auth-layout { min-height: calc(100vh - var(--header-height) - 180px); display: grid; grid-template-columns: minmax(0, .9fr) minmax(430px, 520px); align-items: center; gap: clamp(55px, 9vw, 140px); width: min(1120px, 100%); margin: 0 auto; }
.auth-aside { max-width: 560px; }
.auth-aside h1 { margin: 13px 0 19px; font-size: clamp(42px,5vw,64px); line-height: 1.02; letter-spacing: -.045em; }
.auth-aside > p { max-width: 520px; margin: 0; color: var(--text-muted); font-size: 17px; }
.auth-points { display: grid; gap: 12px; margin-top: 28px; }
.auth-points span { display: flex; align-items: center; gap: 12px; color: var(--text-soft); font-size: 14px; font-weight: 700; }
.auth-points i { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: #aeb7ff; font-size: 11px; font-style: normal; }
.auth-card-mini { margin-top: 30px; padding: 18px; border: 1px solid var(--border); border-radius: 15px; background: rgba(17,24,39,.72); }
.mini-calendar { display: grid; grid-template-columns: repeat(7,1fr); gap: 6px; margin-bottom: 14px; }
.mini-calendar span { display: grid; place-items: center; height: 33px; border-radius: 8px; background: var(--surface-3); color: var(--text-muted); font-size: 10px; font-weight: 900; }
.mini-calendar span:nth-child(5), .mini-calendar span:nth-child(6) { background: var(--accent-soft); color: #b9c0ff; }
.auth-card-mini strong, .auth-card-mini small { display: block; }
.auth-card-mini small { margin-top: 4px; color: var(--text-muted); }
.auth-panel { width: 100%; margin: 0; padding: clamp(23px, 4vw, 34px); }
.auth-panel-head { display: flex; align-items: center; gap: 14px; }
.auth-panel-head h2 { margin: 3px 0 0; font-size: 29px; letter-spacing: -.025em; }
.auth-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 48px; border: 1px solid rgba(100,118,255,.22); border-radius: 14px; background: var(--accent-soft); color: #b7beff; }
.auth-icon svg { width: 23px; height: 23px; }
.auth-panel > .muted { margin: 15px 0 0; }
.stack-form { display: grid; gap: 17px; margin-top: 24px; }

.stack-form > label:not(.field) { display: grid; gap: 8px; color: var(--text-soft); font-size: 13px; font-weight: 780; }
.stack-form > label:not(.field) input { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; outline: 0; background: #0c1322; color: #fff; }
.stack-form > label:not(.field) input:focus { border-color: rgba(100,118,255,.72); box-shadow: 0 0 0 4px rgba(100,118,255,.11); }

.field { display: grid; gap: 8px; }
.field > span:first-child { color: var(--text-soft); font-size: 13px; font-weight: 780; }
.field > small { color: #77849a; font-size: 11px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg { position: absolute; left: 13px; width: 18px; height: 18px; color: #71809a; pointer-events: none; }
.input-wrap input { width: 100%; min-height: 50px; padding: 12px 82px 12px 42px; border: 1px solid var(--border); border-radius: 10px; outline: 0; background: #0c1322; color: #fff; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.input-wrap input::placeholder { color: #59667c; }
.input-wrap input:focus { border-color: rgba(100,118,255,.72); background: #0d1525; box-shadow: 0 0 0 4px rgba(100,118,255,.11); }
.password-toggle { position: absolute; right: 9px; min-height: 32px; padding: 6px 8px; border: 0; border-radius: 7px; background: transparent; color: #8f9bb0; font-size: 11px; font-weight: 800; }
.password-toggle:hover { background: rgba(255,255,255,.05); color: #fff; }
.form-foot { margin: 21px 0 0; color: var(--text-muted); text-align: center; font-size: 13px; }
.form-foot a { font-weight: 800; }
.install-container { display: grid; min-height: 100vh; place-items: center; }

.info-banner { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; padding: 17px 19px; border: 1px solid rgba(67,199,223,.18); border-radius: 15px; background: rgba(67,199,223,.045); }
.info-banner-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; background: rgba(67,199,223,.1); color: #73d5e7; }
.info-banner-icon svg { width: 19px; height: 19px; }
.info-banner strong { display: block; font-size: 14px; }
.info-banner p { margin: 3px 0 0; color: var(--text-muted); font-size: 13px; }
.schedule-panel { overflow: hidden; }
.schedule-heading { align-items: center; }
.schedule-title h2 { margin-top: 12px; }
.period-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); color: var(--text-soft); font-size: 11px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.period-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(100,118,255,.1); }
.period-vacation .period-dot, .period-switch a[href*="vacation"] .period-dot { background: var(--cyan); box-shadow: 0 0 0 4px rgba(67,199,223,.1); }
.quick-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mobile-day-nav { display: none; }
.schedule-scroll, .table-scroll, .chart-wrap { width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; scrollbar-color: #3a4761 transparent; }
.schedule-scroll::-webkit-scrollbar, .table-scroll::-webkit-scrollbar, .chart-wrap::-webkit-scrollbar { height: 8px; }
.schedule-scroll::-webkit-scrollbar-thumb, .table-scroll::-webkit-scrollbar-thumb, .chart-wrap::-webkit-scrollbar-thumb { border-radius: 10px; background: #34415a; }
.schedule-table, .heatmap-table, .data-table { width: 100%; border-collapse: separate; }
.schedule-table, .heatmap-table { min-width: 930px; border-spacing: 6px; }
.schedule-table th, .heatmap-table th { color: var(--text-muted); font-size: 12px; font-weight: 780; }
.schedule-table thead th, .heatmap-table thead th { position: sticky; top: calc(var(--header-height) + 6px); z-index: 5; padding: 9px; border-radius: 8px; background: #111827; }
.schedule-table tbody th, .heatmap-table tbody th { position: sticky; left: 0; z-index: 4; min-width: 62px; padding: 8px; border: 1px solid var(--border-soft); border-radius: 9px; background: #111827; text-align: center; }
.schedule-table tbody th span, .heatmap-table tbody th span { font-size: 13px; color: var(--text-soft); }
.schedule-table tbody th small, .heatmap-table tbody th small { margin-left: 2px; color: var(--text-muted); font-size: 10px; }
.schedule-table td { height: 46px; padding: 0; border: 1px solid rgba(255,255,255,.025); border-radius: 9px; background: rgba(255,255,255,.018); text-align: center; transition: background .15s ease, border-color .15s ease; }
.schedule-table td:hover { border-color: rgba(100,118,255,.2); background: rgba(100,118,255,.045); }
.slot-checkbox { position: relative; display: grid; place-items: center; width: 100%; height: 46px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.slot-checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.slot-checkbox span[aria-hidden="true"] { width: 25px; height: 25px; border: 1.5px solid #3b4963; border-radius: 7px; background: #0a101d; transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.slot-checkbox:hover span[aria-hidden="true"] { border-color: #60708d; }
.slot-checkbox input:checked + span { border-color: var(--accent); background: var(--accent-strong); box-shadow: 0 5px 15px rgba(82,100,245,.25); }
.slot-checkbox input:checked + span::after { content: ""; display: block; width: 8px; height: 4px; margin: 7px 0 0 7px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg); }
.slot-checkbox input:focus-visible + span { outline: 3px solid rgba(100,118,255,.4); outline-offset: 2px; }
.slot-checkbox input:active + span { transform: scale(.92); }
.save-bar { position: sticky; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; padding: 14px 15px; border: 1px solid #33425d; border-radius: 16px; background: rgba(14,21,35,.93); box-shadow: 0 18px 50px rgba(0,0,0,.35); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.save-state { display: flex; align-items: center; gap: 11px; min-width: 0; }
.save-state-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; background: rgba(69,211,156,.1); color: var(--success); }
.save-state-icon svg { width: 19px; height: 19px; }
.save-state div { display: grid; min-width: 0; }
.save-state strong { font-size: 13px; }
.save-state small { overflow: hidden; color: var(--text-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.save-bar.is-dirty .save-state-icon { background: rgba(242,184,75,.11); color: var(--warning); }
.save-bar.is-dirty { border-color: rgba(242,184,75,.28); }

.period-switch-wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.period-switch { display: inline-flex; gap: 5px; padding: 5px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.period-switch a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 8px; color: var(--text-muted); font-size: 13px; font-weight: 800; }
.period-switch a.active { background: #27334f; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.period-context { color: var(--text-muted); font-size: 12px; }
.period-context strong { color: var(--text-soft); }
.stats-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin-bottom: 22px; }
.stat-card { min-height: 164px; padding: 19px; border: 1px solid var(--border); border-radius: 16px; background: rgba(17,24,39,.88); box-shadow: var(--shadow-sm); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.stat-top > span:first-child { color: var(--text-muted); font-size: 12px; font-weight: 760; }
.stat-icon { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 9px; background: rgba(100,118,255,.09); color: #9ea8ff; }
.stat-icon svg { width: 17px; height: 17px; }
.stat-card > strong { display: block; margin: 20px 0 8px; font-size: clamp(24px,2.5vw,35px); line-height: 1.08; letter-spacing: -.035em; }
.stat-card > small { color: var(--text-muted); font-size: 11px; }
.stat-success { border-color: rgba(69,211,156,.19); }
.stat-success .stat-icon { background: rgba(69,211,156,.09); color: var(--success); }
.stat-warning { border-color: rgba(242,184,75,.2); }
.stat-warning .stat-icon { background: rgba(242,184,75,.09); color: var(--warning); }
.chart-wrap { padding-bottom: 7px; }
#availability-chart { display: block; min-width: 650px; max-width: none; }
.heatmap-legend { display: flex; align-items: center; gap: 5px; color: var(--text-muted); font-size: 10px; }
.heatmap-legend i { width: 16px; height: 9px; border-radius: 3px; background: rgba(100,118,255,.12); }
.heatmap-legend i:nth-of-type(2) { background: rgba(100,118,255,.28); }
.heatmap-legend i:nth-of-type(3) { background: rgba(100,118,255,.48); }
.heatmap-legend i:nth-of-type(4) { background: rgba(100,118,255,.72); }
.heatmap-table td { min-width: 88px; padding: 10px 8px; border: 1px solid rgba(100,118,255,.22); border-radius: 9px; background: rgba(100,118,255,var(--alpha)); text-align: center; }
.heatmap-table td strong, .heatmap-table td small { display: block; }
.heatmap-table td strong { font-size: 17px; }
.heatmap-table td small { color: var(--text-muted); font-size: 10px; }
.staff-count-badge { padding: 7px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); color: var(--text-muted); font-size: 11px; font-weight: 800; }
.data-table { min-width: 720px; border-collapse: collapse; }
.data-table th, .data-table td { padding: 14px 12px; border-bottom: 1px solid var(--border-soft); text-align: left; vertical-align: middle; }
.data-table th { color: #748198; font-size: 10px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: rgba(255,255,255,.018); }
.staff-identity { display: inline-flex; align-items: center; gap: 10px; }
.progress-cell { display: grid; gap: 7px; min-width: 130px; }
.progress-cell span { color: var(--text-muted); font-size: 11px; }
.progress-cell span strong { color: var(--text-soft); }
.progress-cell > i { display: block; width: 100%; height: 5px; overflow: hidden; border-radius: 999px; background: #222d41; }
.progress-cell > i b { display: block; width: var(--progress); height: 100%; border-radius: inherit; background: var(--accent); }
.data-table td:nth-child(3) .progress-cell > i b { background: var(--cyan); }
.data-table time { color: var(--text-muted); font-size: 12px; }
.empty-cell { padding: 32px !important; text-align: center !important; }
.empty-state { display: grid; justify-items: center; gap: 4px; color: var(--text-muted); }
.empty-state span { font-size: 28px; }
.empty-state strong { color: var(--text-soft); }
.empty-state small { font-size: 11px; }

.site-footer { border-top: 1px solid var(--border-soft); background: rgba(7,11,19,.62); }
.footer-inner { width: min(1480px, calc(100% - 40px)); min-height: 88px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand > div { display: grid; }
.footer-brand strong { font-size: 13px; }
.footer-brand small { color: var(--text-muted); font-size: 10px; }
.footer-meta { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 11px; }

@media (max-width: 1180px) {
    .hero { grid-template-columns: minmax(0,1fr) minmax(380px,.75fr); gap: 48px; }
    .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .user-chip span:last-child { display: none; }
    .user-chip { padding-right: 5px; }
}

@media (max-width: 900px) {
    :root { --header-height: 70px; }
    .header-inner, .container, .footer-inner { width: min(100% - 28px, 1480px); }
    .nav-toggle { display: block; }
    .main-nav {
        position: fixed;
        left: 14px;
        right: 14px;
        top: calc(var(--header-height) + 8px);
        display: none;
        align-items: stretch;
        flex-direction: column;
        gap: 5px;
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: 15px;
        background: rgba(15,22,36,.98);
        box-shadow: 0 24px 65px rgba(0,0,0,.44);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
    .main-nav.open { display: flex; }
    .main-nav .nav-link, .main-nav .button, .main-nav .user-chip { width: 100%; justify-content: flex-start; }
    .main-nav .user-chip { margin: 2px 0 0; padding: 7px; border-radius: 10px; }
    .main-nav .user-chip span:last-child { display: inline; }
    .main-nav .inline-form { width: 100%; }
    .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 24px; }
    .hero-content { max-width: 760px; }
    .dashboard-preview { width: min(620px,100%); justify-self: center; }
    .feature-strip { grid-template-columns: 1fr; }
    .feature-strip article + article { border-left: 0; border-top: 1px solid var(--border-soft); }
    .auth-layout { min-height: auto; grid-template-columns: 1fr; gap: 35px; width: min(620px,100%); }
    .auth-aside { max-width: none; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .page-heading .button { width: 100%; }

    .mobile-day-nav { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 5px; margin: 0 0 15px; padding: 5px; border: 1px solid var(--border); border-radius: 12px; background: #0d1423; }
    .mobile-day-nav button { display: grid; place-items: center; min-width: 0; min-height: 48px; padding: 6px 2px; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); font-size: 10px; font-weight: 850; }
    .mobile-day-nav button small { display: none; }
    .mobile-day-nav button.active { background: #27334f; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
    .schedule-table, .heatmap-table { min-width: 0; width: 100%; border-spacing: 5px; table-layout: fixed; }
    .schedule-table [data-day-column], .heatmap-table [data-day-column] { display: none; }
    .schedule-table [data-day-column].mobile-day-active, .heatmap-table [data-day-column].mobile-day-active { display: table-cell; }
    .schedule-table th:first-child, .heatmap-table th:first-child { width: 74px; }
    .schedule-table thead th, .heatmap-table thead th { top: calc(var(--header-height) + 6px); }
    .schedule-table tbody th, .heatmap-table tbody th { position: static; }
    .schedule-scroll { overflow: visible; }
    .schedule-table td { height: 50px; }
    .slot-checkbox { height: 50px; }
    .heatmap-table td { min-width: 0; }
    .period-switch-wrap { align-items: stretch; flex-direction: column; gap: 9px; }
    .period-switch { width: 100%; }
    .period-switch a { flex: 1; justify-content: center; text-align: center; }
    .period-context { text-align: center; }
}

@media (max-width: 640px) {
    .container { padding: 31px 0 76px; }
    .brand-copy small { display: none; }
    .brand-copy strong { font-size: 14px; }
    .hero { gap: 40px; padding-top: 10px; }
    .hero h1 { margin-top: 20px; font-size: clamp(42px,13vw,58px); }
    .hero-lead { font-size: 16px; }
    .hero-actions { display: grid; grid-template-columns: 1fr; }
    .hero-actions .button { width: 100%; }
    .hero-trust { display: grid; gap: 8px; }
    .dashboard-preview { min-height: 0; padding: 18px; border-radius: 19px; }
    .preview-chart { gap: 5px; height: 155px; }
    .feature-strip article { padding: 22px 4px; }
    .panel { padding: 18px 14px; border-radius: 18px; }
    .page-heading { gap: 20px; margin-bottom: 23px; }
    .page-heading h1 { font-size: clamp(37px,11.8vw,51px); }
    .page-heading p { font-size: 15px; }
    .heading-meta { align-items: flex-start; flex-direction: column; gap: 5px; }
    .heading-separator { display: none; }
    .info-banner { padding: 14px; }
    .info-banner-icon { width: 34px; height: 34px; flex-basis: 34px; }
    .schedule-heading, .panel-heading { align-items: stretch; flex-direction: column; gap: 18px; }
    .quick-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .quick-actions .button { width: 100%; padding-inline: 8px; }
    .mobile-day-nav { gap: 3px; padding: 4px; }
    .mobile-day-nav button { min-height: 44px; font-size: 9px; }
    .schedule-table th:first-child, .heatmap-table th:first-child { width: 62px; }
    .save-bar { align-items: stretch; flex-direction: column; bottom: max(8px, env(safe-area-inset-bottom)); padding: 12px; }
    .save-bar .button { width: 100%; }
    .save-state small { white-space: normal; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card { min-height: 145px; }
    .heatmap-legend { justify-content: flex-start; }
    .period-switch { display: grid; grid-template-columns: 1fr; }
    .period-switch a { min-height: 43px; }
    .auth-layout { gap: 28px; }
    .auth-aside h1 { font-size: clamp(39px,12vw,53px); }
    .auth-panel { padding: 22px 17px; }
    .auth-aside > p { font-size: 15px; }
    .auth-points { margin-top: 21px; }
    .footer-inner { min-height: 110px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 12px; }
    .footer-meta { flex-wrap: wrap; }

    .staff-panel .table-scroll { overflow: visible; }
    .data-table { min-width: 0; display: block; }
    .data-table thead { display: none; }
    .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
    .data-table tbody { display: grid; gap: 10px; }
    .data-table tr { padding: 13px; border: 1px solid var(--border); border-radius: 13px; background: rgba(255,255,255,.018); }
    .data-table td { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); text-align: right; }
    .data-table td:last-child { border-bottom: 0; }
    .data-table td::before { content: attr(data-label); color: #78859b; font-size: 10px; font-weight: 850; letter-spacing: .07em; text-align: left; text-transform: uppercase; }
    .data-table td:first-child { padding-top: 0; }
    .data-table td:last-child { padding-bottom: 0; }
    .progress-cell { width: min(170px,55%); text-align: right; }
    .empty-cell::before { display: none; }
    .empty-cell { padding: 25px 10px !important; }
}

@media (max-width: 390px) {
    .header-inner, .container, .footer-inner { width: min(100% - 20px, 1480px); }
    .brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
    .brand-copy strong { font-size: 13px; }
    .preview-metrics { grid-template-columns: 1fr; }
    .preview-chart { height: 140px; }
    .mobile-day-nav button { min-height: 40px; }
    .quick-actions { grid-template-columns: 1fr; }
    .schedule-table th:first-child, .heatmap-table th:first-child { width: 56px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Accueil après authentification */
.home-connected-actions article > div { align-content: start; }
.home-connected-actions .button { width: fit-content; margin-top: 9px; }
@media (max-width: 700px) {
    .home-connected-actions .button { width: 100%; }
}
