.time-tracking-shell {
    color-scheme: light;
    --bg: #f4f1ec;
    --surface: #fffaf3;
    --surface-strong: #fff;
    --text: #151515;
    --muted: #6e665f;
    --line: #e6ddd2;
    --brand: #f2b705;
    --brand-dark: #211807;
    --success: #167a4a;
    --warning: #b76b00;
    --danger: #b42318;
    --shadow: 0 24px 70px rgba(41, 31, 19, .12);
    min-height: 100vh;
    display: grid;
    grid-template-columns: 18rem minmax(0, 1fr);
    background:
        radial-gradient(circle at top left, rgba(242, 183, 5, .22), transparent 36rem),
        linear-gradient(135deg, #f9f6f0 0%, var(--bg) 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    scroll-behavior: smooth;
}

.time-tracking-shell, .time-tracking-shell * { box-sizing: border-box; }
.time-tracking-shell button, .time-tracking-shell input, .time-tracking-shell select, .time-tracking-shell textarea { font: inherit; }
.time-tracking-shell button { cursor: pointer; }
.time-tracking-shell button:disabled { cursor: not-allowed; opacity: .42; }
.time-tracking-shell a { color: inherit; text-decoration: none; }
.time-tracking-shell h1, .time-tracking-shell h2, .time-tracking-shell h3, .time-tracking-shell p { margin-top: 0; }

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 1.5rem;
    background: #151515;
    color: #fff7e5;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.brand { display: flex; align-items: center; gap: .85rem; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 1.1rem;
    background: var(--brand);
    color: var(--brand-dark);
    font-weight: 950;
    letter-spacing: -.08em;
}
.brand strong, .brand small { display: block; }
.brand small { color: #cfc3ad; margin-top: .2rem; }
.side-nav { display: grid; gap: .6rem; }
.side-nav a, .sidebar-note {
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 1rem;
    padding: .9rem 1rem;
    background: rgba(255,255,255,.04);
}
.sidebar-note { margin-top: auto; display: grid; gap: .2rem; color: #cfc3ad; }
.sidebar-note strong { color: white; }
.content-area { width: min(1240px, 100%); padding: 2rem; margin: 0 auto; }

.portal-hero, .hero-panel {
    min-height: 22rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20rem;
    align-items: end;
    gap: 2rem;
    padding: clamp(2rem, 6vw, 4.5rem);
    border-radius: 2rem;
    background:
        linear-gradient(135deg, rgba(21,21,21,.88), rgba(21,21,21,.64)),
        url('images/modern_workshop.jpeg') center/cover;
    color: white;
    box-shadow: var(--shadow);
}

.eyebrow {
    margin: 0 0 .6rem;
    color: var(--warning);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.portal-hero .eyebrow, .hero-panel .eyebrow { color: var(--brand); }
.time-tracking-shell h1 { max-width: 820px; margin-bottom: 1rem; font-size: clamp(2.4rem, 5vw, 5rem); line-height: .92; letter-spacing: -.08em; }
.time-tracking-shell h2 { margin-bottom: .45rem; font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1; letter-spacing: -.05em; }
.time-tracking-shell h3 { margin-bottom: .5rem; font-size: 1.25rem; }
.hero-copy { max-width: 760px; color: #efe6d6; font-size: 1.08rem; line-height: 1.65; }
.hero-actions, .button-row { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.hero-card {
    padding: 1.25rem;
    border-radius: 1.5rem;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.22);
    backdrop-filter: blur(16px);
}
.hero-card strong, .hero-card small { display: block; }
.hero-card strong { margin-top: .7rem; font-size: 1.5rem; }
.hero-card small { color: #efe6d6; }
.stack-card { display: grid; gap: .4rem; }
.status-dot { width: .9rem; height: .9rem; border-radius: 999px; display: inline-block; background: #23c55e; box-shadow: 0 0 0 .45rem rgba(35,197,94,.16); }

.grid { display: grid; gap: 1.25rem; margin-top: 1.25rem; }
.two-columns { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
.portal-overview-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.panel {
    padding: clamp(1.1rem, 3vw, 1.6rem);
    border: 1px solid var(--line);
    border-radius: 1.6rem;
    background: rgba(255, 250, 243, .9);
    box-shadow: 0 16px 45px rgba(41, 31, 19, .08);
}
.panel-heading p { color: var(--muted); line-height: 1.55; }
.row-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: start; }
.metric-card { display: grid; gap: .35rem; }
.metric-card span, .metric-card small { color: var(--muted); }
.metric-card strong { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.06em; }

.time-tracking-shell input, .time-tracking-shell select, .time-tracking-shell textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: var(--surface-strong);
    color: var(--text);
    padding: .95rem 1rem;
    outline: none;
}
.time-tracking-shell input:focus, .time-tracking-shell select:focus, .time-tracking-shell textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 .25rem rgba(242,183,5,.2); }
.primary-action, .secondary-action, .ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: .95rem 1.2rem;
    font-weight: 900;
    min-height: 2.7rem;
}
.primary-action { background: #151515; color: white; }
.secondary-action { background: var(--brand); color: var(--brand-dark); }
.ghost-button { background: #f1e8dc; color: var(--brand-dark); }

.employee-status-card, .status-card {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .7rem;
    margin: 1rem 0;
}
.employee-status-card > div, .status-card > div {
    padding: 1rem;
    border-radius: 1rem;
    background: #fff;
    border: 1px solid var(--line);
}
.employee-status-card span, .employee-status-card small, .status-card span { display: block; color: var(--muted); font-size: .85rem; margin-bottom: .35rem; }
.employee-status-card strong, .status-card strong { display: block; font-size: 1.25rem; }

.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.employee-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.clock-button {
    min-height: 6.2rem;
    border: 0;
    border-radius: 1.25rem;
    color: white;
    background: #2d5b83;
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    font-weight: 950;
    letter-spacing: -.04em;
}
.clock-button.success { background: var(--success); }
.clock-button.warning { background: var(--warning); }
.clock-button.neutral { background: #2d5b83; }
.clock-button.danger { background: var(--danger); }

.person-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.person-header span, .person-header small { display: block; color: var(--muted); }
.person-header strong { display: block; font-size: 1.35rem; }
.pin-pad { display: grid; gap: .8rem; }
.pin-pad label { color: var(--muted); font-weight: 800; }
.web-action-strip { display: flex; flex-wrap: wrap; gap: .65rem; margin: 1rem 0; }
.message { margin: .8rem 0 0; font-weight: 800; }
.error { color: var(--danger); }
.login-error,
.success-message {
    margin: .9rem 0;
    padding: .8rem 1rem;
    border-radius: .95rem;
    font-weight: 850;
}
.login-error {
    color: #7f1d1d;
    background: #fef2f2;
    border: 1px solid #fecaca;
}
.success-message {
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}
.empty-state { color: var(--muted); margin-bottom: 0; }

.portal-list { display: grid; gap: .7rem; margin-top: 1.25rem; }
.portal-list-row {
    display: grid;
    grid-template-columns: 8rem minmax(0, 1fr) auto;
    gap: .8rem;
    align-items: center;
    padding: .85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: white;
}
.portal-list-row span, .portal-list-row small { color: var(--muted); }

.admin-panel { margin-top: 1.25rem; }
.admin-badge {
    border-radius: 999px;
    background: #151515;
    color: white;
    padding: .5rem .8rem;
    font-weight: 800;
    white-space: nowrap;
}
.tab-strip {
    display: flex;
    gap: .55rem;
    overflow-x: auto;
    padding: .35rem 0 1rem;
    margin-bottom: .4rem;
}
.tab-strip a {
    white-space: nowrap;
    padding: .65rem .85rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--brand-dark);
    font-weight: 850;
}
.search-filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 14rem auto;
    gap: .75rem;
    margin: .5rem 0 1.25rem;
}
.admin-section {
    border-top: 1px solid var(--line);
    padding-top: 1.25rem;
    margin-top: 1.25rem;
}
.section-topline { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-topline h3 { margin: 0; }
.section-metric { min-width: 9rem; padding: .8rem 1rem; border-radius: 1rem; background: #151515; color: white; text-align: right; }
.section-metric strong { display: block; font-size: 1.7rem; }
.section-metric span { color: #efe6d6; font-size: .85rem; }
.overview-table { display: grid; gap: .55rem; }
.overview-row {
    display: grid;
    grid-template-columns: 1.4fr .9fr .9fr 1.35fr;
    gap: .8rem;
    align-items: center;
    padding: .85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: white;
}
.overview-head { background: transparent; border: 0; color: var(--muted); font-weight: 900; }
.overview-row small { display: block; color: var(--muted); margin-top: .15rem; }
.compact-table .overview-row span:last-child { display: flex; flex-wrap: wrap; gap: .45rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.mini-card, .calendar-chip {
    display: grid;
    gap: .45rem;
    padding: 1rem;
    border-radius: 1rem;
    background: white;
    border: 1px solid var(--line);
}
.mini-card span, .mini-card small, .calendar-chip span, .calendar-chip small { color: var(--muted); }
.calendar-demo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }

.status-pill { display: inline-flex; width: fit-content; align-items: center; border-radius: 999px; padding: .38rem .7rem; font-weight: 900; font-size: .82rem; }
.status-pill.is-working { background: #e6f7ee; color: var(--success); }
.status-pill.is-break { background: #fff2d2; color: var(--warning); }
.status-pill.is-done { background: #e7e9ee; color: #394150; }
.status-pill.is-idle { background: #f2ede6; color: var(--muted); }
.system-warning { margin-top: 1.25rem; display: grid; gap: .35rem; background: #fff3f1; border-color: #ffd1cc; color: var(--danger); }

@media (max-width: 1100px) {
    .portal-overview-grid, .card-grid, .calendar-demo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .employee-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
    .time-tracking-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; }
    .side-nav { display: flex; }
    .sidebar-note { margin-top: 0; margin-left: auto; }
    .portal-hero, .hero-panel, .two-columns { grid-template-columns: 1fr; }
    .overview-row { grid-template-columns: 1fr; }
    .search-filter-bar { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .content-area { padding: 1rem; }
    .sidebar { padding: 1rem; }
    .side-nav, .sidebar-note { display: none; }
    .portal-hero, .hero-panel { padding: 1.4rem; border-radius: 1.4rem; }
    .portal-overview-grid, .employee-status-card, .status-card, .action-grid, .employee-actions, .card-grid, .calendar-demo-grid { grid-template-columns: 1fr; }
    .portal-list-row { grid-template-columns: 1fr; }
    .clock-button { min-height: 4.8rem; }
    .row-heading, .section-topline { flex-direction: column; }
    .section-metric { width: 100%; text-align: left; }
}

.process-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(18rem, .65fr);
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.process-panel {
    display: grid;
    gap: 1rem;
}

.step-indicator {
    width: fit-content;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    padding: .45rem .75rem;
    font-size: .86rem;
    font-weight: 850;
}

.single-primary-actions .primary-action {
    order: -1;
}

.primary-task-card {
    display: grid;
    gap: .5rem;
    padding: clamp(1.1rem, 3vw, 1.5rem);
    border-radius: 1.35rem;
    background: #151515;
    color: white;
}

.primary-task-card span {
    color: var(--brand);
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: .8rem;
}

.primary-task-card strong {
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1;
    letter-spacing: -.06em;
}

.primary-task-card p {
    color: #efe6d6;
    max-width: 46rem;
    line-height: 1.55;
}

.primary-task-card .primary-action {
    width: fit-content;
    background: var(--brand);
    color: var(--brand-dark);
}

.secondary-action-panel {
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    background: #fff;
    padding: .85rem 1rem;
}

.secondary-action-panel summary {
    cursor: pointer;
    color: var(--brand-dark);
    font-weight: 900;
}

.secondary-action-list {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: .8rem;
}

.task-list-panel {
    align-self: start;
}

.task-list {
    display: grid;
    gap: .7rem;
}

.task-row {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: .8rem;
    align-items: start;
    padding: .85rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #fff;
}

.task-row strong,
.task-row small {
    display: block;
}

.task-row small {
    color: var(--muted);
    margin-top: .2rem;
    line-height: 1.45;
}

.task-state {
    width: fit-content;
    border-radius: 999px;
    padding: .3rem .55rem;
    background: #f2ede6;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 900;
}

.task-row.is-done .task-state {
    background: #e6f7ee;
    color: var(--success);
}

.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}

.calm-search {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 1rem 0;
}

.admin-task-list {
    display: grid;
    gap: .7rem;
    margin-top: 1rem;
}

.admin-task-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: white;
}

.admin-task-row span,
.admin-task-row small {
    display: block;
    color: var(--muted);
}

.admin-task-row > div > span:first-child {
    margin-bottom: .35rem;
    font-weight: 900;
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--warning);
}

.admin-task-row strong {
    display: block;
    font-size: 1.1rem;
}

.admin-task-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: end;
}

.admin-task-meta > span {
    padding: .35rem .6rem;
    border-radius: 999px;
    background: #f7f2ea;
    color: var(--brand-dark);
    font-weight: 850;
}

.check-answers-preview {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 1rem;
    margin-top: 1.25rem;
    padding: 1rem;
    border-radius: 1.2rem;
    background: #fff;
    border: 1px solid var(--line);
}

.check-answers-preview p {
    color: var(--muted);
    line-height: 1.55;
}

.check-answers-preview ul {
    display: grid;
    gap: .55rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.check-answers-preview li {
    display: grid;
    grid-template-columns: 8rem minmax(0, 1fr);
    gap: .8rem;
    padding: .65rem 0;
    border-bottom: 1px solid var(--line);
}

.check-answers-preview li:last-child {
    border-bottom: 0;
}

.check-answers-preview li span {
    color: var(--muted);
}

.kiosk-panel {
    margin-top: 1.25rem;
}

.kiosk-panel details > summary {
    cursor: pointer;
    display: grid;
    gap: .2rem;
    list-style: none;
}

.kiosk-panel details > summary::-webkit-details-marker {
    display: none;
}

.kiosk-panel summary span {
    color: var(--warning);
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: .78rem;
}

.kiosk-panel summary strong {
    font-size: 1.2rem;
}

.kiosk-panel details[open] summary {
    margin-bottom: 1rem;
}

@media (max-width: 1100px) {
    .process-layout,
    .check-answers-preview {
        grid-template-columns: 1fr;
    }

    .admin-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .admin-summary-grid,
    .admin-task-row,
    .check-answers-preview li,
    .task-row {
        grid-template-columns: 1fr;
    }

    .admin-task-meta {
        justify-content: start;
    }
}

.side-nav-mode {
    margin-top: -.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,.1);
}

.side-nav-mode > span {
    color: #cfc3ad;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.side-nav-mode a {
    background: rgba(242, 183, 5, .12);
    border-color: rgba(242, 183, 5, .28);
}

.context-hero .hero-actions .ghost-button:last-child {
    display: none;
}

.context-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.context-card {
    display: grid;
    gap: .55rem;
    min-height: 11rem;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: 1.35rem;
    background: rgba(255, 250, 243, .92);
    box-shadow: 0 16px 45px rgba(41, 31, 19, .06);
}

.context-card span {
    color: var(--warning);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.context-card strong {
    font-size: 1.35rem;
    letter-spacing: -.04em;
}

.context-card small {
    color: var(--muted);
    line-height: 1.5;
}

.primary-context {
    background: #151515;
    color: white;
}

.primary-context small {
    color: #efe6d6;
}

.muted-context {
    opacity: .82;
}

.compact-context-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: .5rem;
}

.status-label {
    width: fit-content;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--muted);
    padding: .45rem .75rem;
    font-weight: 850;
}

.hint-text {
    margin: .8rem 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.admin-start-layout {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.admin-priority-panel {
    display: grid;
    gap: 1rem;
}

.priority-list .admin-task-row:first-child {
    border-color: rgba(242, 183, 5, .55);
    background: #fff8df;
}

.quiet-admin-section {
    background: rgba(255, 250, 243, .65);
}

.admin-group-list {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.admin-group-list a {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: white;
    color: var(--brand-dark);
    padding: .65rem .85rem;
    font-weight: 850;
}

.kiosk-screen {
    min-height: calc(100vh - 4rem);
    display: grid;
    place-items: center;
}

.kiosk-card {
    width: min(42rem, 100%);
    padding: clamp(1.4rem, 4vw, 2.4rem);
    border-radius: 2rem;
    background: #151515;
    color: white;
    box-shadow: var(--shadow);
}

.kiosk-card h1 {
    margin-bottom: .65rem;
}

.kiosk-card p:not(.eyebrow):not(.message) {
    color: #efe6d6;
}

.touch-pin-pad input {
    margin: 1rem 0;
    min-height: 4rem;
    border-radius: 1.2rem;
    text-align: center;
    font-size: 2rem;
    letter-spacing: .35em;
}

.number-pad {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.number-pad button {
    min-height: 5rem;
    border: 0;
    border-radius: 1.15rem;
    background: #2a2a2a;
    color: white;
    font-size: 1.65rem;
    font-weight: 950;
}

.number-pad .confirm-key {
    background: var(--brand);
    color: var(--brand-dark);
}

.kiosk-person-header span,
.kiosk-person-header small {
    color: #efe6d6;
}

.kiosk-actions .primary-action {
    min-height: 5rem;
    min-width: 12rem;
    background: var(--brand);
    color: var(--brand-dark);
    font-size: 1.2rem;
}

@media (max-width: 900px) {
    .context-grid,
    .compact-context-grid {
        grid-template-columns: 1fr;
    }
}

.sidebar {
    overflow: hidden;
}

.sidebar-scroll {
    min-height: 0;
    overflow-y: auto;
    display: grid;
    gap: 1.35rem;
    padding-right: .2rem;
}

.sidebar-scroll::-webkit-scrollbar {
    width: .45rem;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.18);
    border-radius: 999px;
}

.side-nav-section {
    gap: .45rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,.1);
}

.side-nav-section > span {
    color: #cfc3ad;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.sidebar-note form {
    margin-top: .7rem;
}

.sidebar-note button {
    width: 100%;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: .8rem;
    background: rgba(255,255,255,.06);
    color: white;
    padding: .65rem .8rem;
    font-weight: 850;
}

.login-shell {
    min-height: calc(100vh - 4rem);
    display: grid;
    place-items: center;
}

.login-card {
    width: min(34rem, 100%);
    padding: clamp(1.5rem, 4vw, 2.4rem);
    border-radius: 1.8rem;
    background: rgba(255, 250, 243, .94);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.login-form,
.form-grid {
    display: grid;
    gap: .9rem;
}

.login-form label,
.form-grid label {
    display: grid;
    gap: .35rem;
    color: var(--muted);
    font-weight: 850;
}

.login-form label span,
.form-grid label span {
    font-size: .88rem;
}

.login-warning {
    display: grid;
    gap: .4rem;
}

.admin-page-shell {
    display: grid;
    gap: 1.25rem;
}

.page-title-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
}

.page-title-row p:not(.eyebrow) {
    color: var(--muted);
    line-height: 1.55;
}

.admin-edit-grid {
    display: grid;
    grid-template-columns: minmax(20rem, .72fr) minmax(0, 1.28fr);
    gap: 1.25rem;
    align-items: start;
}

.two-form-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wide-field {
    grid-column: 1 / -1;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: .55rem !important;
    color: var(--text) !important;
}

.checkbox-label input {
    width: auto;
}

.admin-table {
    display: grid;
    gap: .55rem;
}

.admin-table-row {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr) minmax(0, .75fr) auto;
    gap: .8rem;
    align-items: center;
    padding: .8rem .9rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #fff;
}

.admin-table-row.three-cols {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto;
}

.admin-table-row.five-cols {
    grid-template-columns: minmax(0, .85fr) minmax(0, 1fr) minmax(0, .95fr) minmax(0, .95fr) minmax(0, 1.1fr);
}

.admin-table-head {
    background: transparent;
    border: 0;
    color: var(--muted);
    font-weight: 900;
}

.admin-table-row strong,
.admin-table-row small {
    display: block;
}

.admin-table-row small {
    color: var(--muted);
    margin-top: .2rem;
    line-height: 1.4;
}

.settings-list {
    display: grid;
    gap: .7rem;
}

.settings-list > div {
    display: grid;
    gap: .25rem;
    padding: .85rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: white;
}

.settings-list span {
    color: var(--muted);
    font-size: .85rem;
}

@media (max-width: 980px) {
    .sidebar-scroll {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        gap: .8rem;
    }

    .side-nav-section,
    .side-nav-mode {
        border-top: 0;
        padding-top: 0;
    }

    .side-nav-section > span,
    .side-nav-mode > span {
        display: none;
    }

    .admin-edit-grid,
    .two-form-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .admin-table-row,
    .admin-table-row.three-cols,
    .admin-table-row.five-cols {
        grid-template-columns: 1fr;
    }
}

.time-tracking-shell.login-layout {
    grid-template-columns: 1fr;
}

.time-tracking-shell.login-layout .content-area {
    width: 100%;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(1.25rem, 5vw, 3rem);
}

.time-tracking-shell.login-layout .login-shell {
    min-height: 0;
    width: min(34rem, 100%);
}

.time-tracking-shell.login-layout .login-card h1 {
    margin-bottom: 1.3rem;
}

/* V1 UX polish: calm business app patterns for all time-tracking masks */
.time-tracking-shell {
    --bg: #f6f2eb;
    --surface: #fffaf3;
    --surface-strong: #ffffff;
    --line: #e8ded1;
    --soft-line: #f1e8dc;
    --shadow: 0 18px 48px rgba(41, 31, 19, .08);
}

.content-area {
    width: min(1160px, 100%);
    padding: clamp(1rem, 2.4vw, 2rem);
}

.panel {
    border-radius: 1.35rem;
    background: rgba(255, 250, 243, .96);
    box-shadow: 0 10px 32px rgba(41, 31, 19, .055);
}

.admin-page-shell {
    gap: 1rem;
}

.page-title-row {
    align-items: start;
    padding: clamp(1.15rem, 2.6vw, 1.75rem);
    border: 1px solid var(--line);
    border-radius: 1.45rem;
    background: rgba(255, 250, 243, .88);
    box-shadow: 0 10px 30px rgba(41, 31, 19, .045);
}

.admin-page-shell .page-title-row h1,
.process-layout h1,
.admin-start-layout h1 {
    margin-bottom: .45rem;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1;
    letter-spacing: -.055em;
}

.page-title-row p:not(.eyebrow) {
    max-width: 48rem;
    margin-bottom: 0;
    font-size: .98rem;
}

.admin-edit-grid {
    grid-template-columns: minmax(19rem, .76fr) minmax(0, 1.24fr);
    gap: 1rem;
}

.admin-edit-grid > .panel:first-child {
    position: sticky;
    top: 1rem;
}

.panel-heading {
    margin-bottom: 1rem;
}

.panel-heading h2 {
    margin-bottom: .35rem;
    font-size: clamp(1.35rem, 2vw, 1.85rem);
    letter-spacing: -.035em;
}

.panel-heading p {
    margin-bottom: 0;
}

.form-grid {
    gap: .78rem;
}

.two-form-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid label,
.login-form label {
    gap: .42rem;
    color: #544c44;
    font-size: .88rem;
    font-weight: 800;
}

.form-grid label span,
.login-form label span {
    color: #4e453b;
    font-size: .82rem;
    letter-spacing: .01em;
}

.time-tracking-shell input,
.time-tracking-shell select,
.time-tracking-shell textarea {
    border-radius: .82rem;
    padding: .78rem .85rem;
    background: #fff;
}

.time-tracking-shell textarea {
    min-height: 6.5rem;
    resize: vertical;
}

.button-row,
.time-tracking-shell form > .primary-action {
    margin-top: 1rem;
}

.primary-action,
.secondary-action,
.ghost-button {
    min-height: 2.65rem;
    padding: .78rem 1rem;
    border-radius: .9rem;
}

.ghost-button {
    border: 1px solid var(--soft-line);
    background: #fff7ec;
}

.message {
    padding: .75rem .9rem;
    border-radius: .9rem;
    background: #edf8f1;
}

.error {
    background: #fff1ef;
}

.empty-state {
    padding: 1rem;
    border: 1px dashed var(--line);
    border-radius: 1rem;
    background: #fffdf9;
    color: var(--muted);
}

.admin-table {
    gap: .7rem;
}

.admin-table-head {
    display: none;
}

.admin-table-row {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, .9fr) minmax(0, .8fr) auto;
    padding: 1rem;
    border-radius: 1.05rem;
    border-color: var(--soft-line);
    box-shadow: 0 8px 22px rgba(41, 31, 19, .04);
}

.admin-table-row:hover {
    border-color: #dccdbb;
    background: #fffdf9;
}

.admin-table-row strong {
    font-size: 1.02rem;
    letter-spacing: -.015em;
}

.admin-table-row small {
    color: #766d63;
}

.admin-table-row > span:not(:first-child) {
    color: #403830;
    font-weight: 700;
}

.admin-table-row .ghost-button,
.admin-table-row button {
    justify-self: end;
}

.admin-table-row.five-cols {
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr);
}

.wide-table .admin-table-row.five-cols > span:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    align-items: center;
}

.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: .35rem .65rem;
    background: #f4eadb;
    color: #42382e;
    font-size: .82rem;
    font-weight: 900;
}

.quick-context-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin-top: .9rem;
}

.quick-context-row > div {
    padding: .85rem;
    border: 1px solid var(--soft-line);
    border-radius: 1rem;
    background: #fffdf9;
}

.quick-context-row span,
.quick-context-row small {
    display: block;
    color: var(--muted);
    font-size: .82rem;
}

.quick-context-row strong {
    display: block;
    margin-top: .15rem;
    font-size: 1.05rem;
}

.employee-hero .hero-copy {
    max-width: 48rem;
}

@media (max-width: 1080px) {
    .admin-edit-grid,
    .admin-summary-grid,
    .quick-context-row {
        grid-template-columns: 1fr;
    }

    .admin-edit-grid > .panel:first-child {
        position: static;
    }
}

@media (max-width: 760px) {
    .page-title-row {
        padding: 1rem;
    }

    .admin-table-row,
    .admin-table-row.three-cols,
    .admin-table-row.five-cols {
        grid-template-columns: 1fr;
    }

    .admin-table-row .ghost-button,
    .admin-table-row button {
        justify-self: stretch;
        width: 100%;
    }
}

/* Administration guideline refactor: list-first management pages */
.management-page {
    gap: 1rem;
}

.management-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: 1.15rem;
    background: rgba(255, 250, 243, .96);
    box-shadow: 0 8px 24px rgba(41, 31, 19, .045);
}

.management-header h1 {
    margin-bottom: .35rem;
    font-size: clamp(1.7rem, 2.4vw, 2.35rem);
    line-height: 1.02;
    letter-spacing: -.045em;
}

.management-header p:not(.eyebrow) {
    max-width: 46rem;
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.45;
}

.management-header .primary-action {
    white-space: nowrap;
}

.list-toolbar {
    display: grid;
    grid-template-columns: minmax(16rem, 1fr) minmax(12rem, .28fr) minmax(12rem, .28fr);
    gap: .75rem;
    align-items: end;
}

.list-toolbar label {
    display: grid;
    gap: .35rem;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 850;
}

.search-field {
    grid-column: span 1;
}

.list-panel {
    padding: .75rem;
}

.responsive-table {
    display: grid;
    gap: .45rem;
}

.table-row {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .8fr) minmax(0, .8fr) minmax(0, .65fr) minmax(0, .9fr);
    gap: .75rem;
    align-items: center;
    padding: .85rem .9rem;
    border: 1px solid var(--soft-line);
    border-radius: .85rem;
    background: #fff;
}

.table-head {
    background: transparent;
    border: 0;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 950;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.table-row strong,
.table-row small {
    display: block;
}

.table-row small {
    margin-top: .18rem;
    color: var(--muted);
    line-height: 1.35;
}

.table-row:not(.table-head):hover {
    background: #fffdf9;
    border-color: #dccdbb;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    justify-content: flex-end;
}

.row-actions .ghost-button {
    min-height: 2.25rem;
    padding: .55rem .75rem;
}

.team-table .table-row { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr) minmax(0, .8fr) minmax(0, .7fr) minmax(0, 1fr); }
.time-review-table .table-row { grid-template-columns: minmax(0, .75fr) minmax(0, 1fr) minmax(0, .9fr) minmax(0, .9fr) minmax(0, .55fr) minmax(0, .65fr) minmax(0, .7fr) minmax(0, .9fr); }
.absence-table .table-row { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr) minmax(0, .75fr) minmax(0, .7fr) minmax(0, .75fr) minmax(0, 1fr); }
.roles-table .table-row { grid-template-columns: minmax(0, .9fr) minmax(0, .55fr) minmax(0, 1.45fr) minmax(0, .75fr); }
.documents-table .table-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .7fr) minmax(0, .7fr); }
.settings-audit-table .table-row { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) minmax(0, 1fr); }

.list-empty {
    margin-top: .75rem;
    display: grid;
    gap: .25rem;
}

.list-empty strong,
.list-empty span {
    display: block;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(18, 15, 12, .48);
    backdrop-filter: blur(8px);
}

.modal-dialog {
    width: min(42rem, 100%);
    max-height: min(90vh, 58rem);
    overflow: auto;
    padding: 1.25rem;
    border-radius: 1.25rem;
    background: #fffaf3;
    border: 1px solid var(--line);
    box-shadow: 0 24px 80px rgba(0,0,0,.24);
}

.confirm-dialog {
    width: min(34rem, 100%);
}

.modal-header,
.modal-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.modal-header {
    margin-bottom: 1rem;
}

.modal-close-button {
    width: 2.35rem;
    height: 2.35rem;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 900;
    cursor: pointer;
}

.modal-close-button:hover {
    background: #151515;
    color: #fff;
}

.modal-header h2 {
    margin: 0;
    font-size: clamp(1.4rem, 2vw, 2rem);
}

.modal-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-top: 1rem;
}

.confirm-list {
    display: grid;
    gap: .55rem;
    margin: 0;
}

.confirm-list > div {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr);
    gap: .75rem;
    padding: .75rem;
    border: 1px solid var(--soft-line);
    border-radius: .8rem;
    background: #fff;
}

.confirm-list dt {
    color: var(--muted);
    font-weight: 850;
}

.confirm-list dd {
    margin: 0;
    font-weight: 800;
}

.calendar-panel {
    padding: .75rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .55rem;
}

.calendar-day {
    min-height: 8.5rem;
    padding: .75rem;
    border: 1px solid var(--soft-line);
    border-radius: .9rem;
    background: #fff;
}

.calendar-day.is-today {
    border-color: var(--brand);
    box-shadow: inset 0 0 0 1px var(--brand);
}

.calendar-day > span,
.calendar-day > strong {
    display: block;
}

.calendar-day > span {
    color: var(--muted);
    font-size: .82rem;
}

.calendar-entry {
    width: 100%;
    margin-top: .45rem;
    border: 0;
    border-radius: .65rem;
    padding: .45rem .5rem;
    background: #151515;
    color: white;
    text-align: left;
    font-size: .82rem;
    font-weight: 800;
}

.settings-layout {
    display: grid;
    grid-template-columns: minmax(18rem, .65fr) minmax(0, 1.35fr);
    gap: 1rem;
    align-items: start;
}

@media (max-width: 1080px) {
    .management-header {
        flex-direction: column;
    }

    .management-header .primary-action {
        width: 100%;
    }

    .list-toolbar,
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .calendar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .table-head {
        display: none;
    }

    .table-row,
    .team-table .table-row,
    .time-review-table .table-row,
    .absence-table .table-row,
    .roles-table .table-row,
    .documents-table .table-row,
    .settings-audit-table .table-row {
        grid-template-columns: 1fr;
    }

    .row-actions {
        justify-content: stretch;
    }

    .row-actions .ghost-button {
        width: 100%;
    }

    .calendar-grid {
        grid-template-columns: 1fr;
    }

    .confirm-list > div {
        grid-template-columns: 1fr;
    }
}

/* Real calendar + compact toolbar band */
.compact-management-header {
    padding-block: .95rem;
}

.toolbar-band,
.calendar-toolbar {
    display: grid;
    grid-template-columns: minmax(16rem, 1fr) minmax(13rem, .42fr) minmax(13rem, .42fr) auto;
    gap: .75rem;
    align-items: end;
    padding: .8rem;
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    background: rgba(255, 250, 243, .96);
    box-shadow: 0 8px 24px rgba(41, 31, 19, .045);
}

.toolbar-band label,
.calendar-toolbar label {
    display: grid;
    gap: .28rem;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 850;
}

.toolbar-band .primary-action,
.calendar-toolbar .primary-action {
    white-space: nowrap;
}

.month-switcher {
    display: grid;
    grid-template-columns: auto minmax(9rem, 1fr) auto;
    gap: .45rem;
    align-items: center;
}

.month-switcher strong {
    text-align: center;
    font-size: 1.05rem;
    letter-spacing: -.02em;
    text-transform: capitalize;
}

.real-calendar-panel {
    padding: .65rem;
}

.calendar-weekdays,
.month-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .35rem;
}

.calendar-weekdays {
    margin-bottom: .35rem;
}

.calendar-weekdays span {
    padding: .55rem .65rem;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 950;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.month-calendar-day {
    min-height: clamp(7.4rem, 14vh, 10.6rem);
    padding: .55rem;
    border: 1px solid var(--soft-line);
    border-radius: .75rem;
    background: #fff;
    overflow: hidden;
}

.month-calendar-day.outside-month {
    background: #f5efe6;
    color: #938777;
}

.month-calendar-day.is-today {
    border-color: var(--brand);
    box-shadow: inset 0 0 0 1px var(--brand);
}

.day-number {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .4rem;
    margin-bottom: .4rem;
}

.day-number span {
    font-size: 1.05rem;
    font-weight: 950;
}

.day-number small {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 850;
}

.calendar-entry-stack {
    display: grid;
    gap: .3rem;
}

.month-calendar-day .calendar-entry {
    margin-top: 0;
    display: grid;
    gap: .08rem;
    padding: .42rem .48rem;
    border-left: .25rem solid var(--brand);
    background: #151515;
    color: #fff;
    line-height: 1.15;
}

.calendar-entry span,
.calendar-entry small {
    opacity: .82;
    font-size: .68rem;
    font-weight: 800;
}

.calendar-entry strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .78rem;
}

.calendar-entry.type-vacation { background: #1f6f50; }
.calendar-entry.type-sickleave { background: #8f2d24; }
.calendar-entry.type-vocationalschool,
.calendar-entry.type-guildtraining { background: #2d5b83; }
.calendar-entry.type-externalappointment { background: #6b3fa0; }
.calendar-entry.type-dayoff,
.calendar-entry.type-otherabsence { background: #695d4e; }

.team-table .table-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, .62fr) minmax(0, .72fr) minmax(0, 1.05fr) minmax(0, .58fr) minmax(0, .9fr); }

@media (max-width: 1180px) {
    .toolbar-band,
    .calendar-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .toolbar-band .primary-action,
    .calendar-toolbar .primary-action {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .calendar-weekdays {
        display: none;
    }

    .month-calendar-grid {
        grid-template-columns: 1fr;
    }

    .month-calendar-day {
        min-height: auto;
    }
}

@media (max-width: 760px) {
    .toolbar-band,
    .calendar-toolbar {
        grid-template-columns: 1fr;
    }
}

/* Mobile navigation drawer */
.mobile-menu-toggle,
.mobile-menu-button,
.mobile-menu-overlay,
.mobile-sidebar-header {
    display: none;
}

@media (max-width: 980px) {
    .time-tracking-shell:not(.login-layout) {
        display: block;
        min-height: 100vh;
    }

    .time-tracking-shell:not(.login-layout) .content-area {
        padding-top: 5.25rem;
    }

    .mobile-menu-toggle {
        position: fixed;
        width: 1px;
        height: 1px;
        opacity: 0;
        pointer-events: none;
    }

    .mobile-menu-button {
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 70;
        display: inline-grid;
        gap: .28rem;
        place-content: center;
        width: 3.1rem;
        height: 3.1rem;
        border: 1px solid rgba(21, 21, 21, .12);
        border-radius: 1rem;
        background: rgba(255, 250, 243, .96);
        box-shadow: 0 14px 34px rgba(41, 31, 19, .14);
    }

    .mobile-menu-button span {
        display: block;
        width: 1.25rem;
        height: .14rem;
        border-radius: 999px;
        background: #151515;
    }

    .mobile-sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid rgba(255,255,255,.12);
    }

    .mobile-sidebar-header strong {
        font-size: 1rem;
        letter-spacing: -.02em;
    }

    .mobile-menu-close {
        display: grid;
        place-items: center;
        width: 2.4rem;
        height: 2.4rem;
        border-radius: .8rem;
        border: 1px solid rgba(255,255,255,.16);
        background: rgba(255,255,255,.06);
        color: white;
        font-size: 1.7rem;
        line-height: 1;
    }

    .mobile-menu-overlay {
        position: fixed;
        inset: 0;
        z-index: 60;
        display: block;
        background: rgba(21, 21, 21, .48);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 80;
        width: min(22rem, calc(100vw - 2.25rem));
        height: 100dvh;
        padding: 1.1rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        overflow: hidden;
        transform: translateX(-105%);
        transition: transform .24s ease;
        box-shadow: 24px 0 60px rgba(0, 0, 0, .26);
    }

    .sidebar-scroll {
        display: grid;
        gap: 1rem;
        overflow-x: hidden;
        overflow-y: auto;
        padding-right: .15rem;
    }

    .side-nav,
    .side-nav-section,
    .side-nav-mode {
        display: grid;
        gap: .45rem;
    }

    .side-nav-section,
    .side-nav-mode {
        border-top: 1px solid rgba(255,255,255,.1);
        padding-top: .9rem;
    }

    .side-nav-section > span,
    .side-nav-mode > span {
        display: block;
    }

    .sidebar-note {
        display: grid;
        margin: 0;
    }

    .mobile-menu-toggle:checked ~ .mobile-menu-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-menu-toggle:checked ~ .sidebar {
        transform: translateX(0);
    }
}

@media (max-width: 640px) {
    .time-tracking-shell:not(.login-layout) .content-area {
        padding: 5rem .9rem 1rem;
    }

    .sidebar {
        width: min(21rem, calc(100vw - 1.5rem));
    }
}

/* Registration polish: focused, guided setup flow */
.registration-screen {
    width: min(42rem, 100%);
}

.registration-card {
    width: 100%;
    display: grid;
    gap: 1.15rem;
    padding: clamp(1.35rem, 4vw, 2.35rem);
}

.registration-hero {
    display: grid;
    gap: .45rem;
    padding: clamp(1rem, 3vw, 1.35rem);
    border-radius: 1.35rem;
    background:
        radial-gradient(circle at top right, rgba(242, 183, 5, .28), transparent 14rem),
        linear-gradient(135deg, #151515 0%, #2b2419 100%);
    color: #fffaf3;
}

.registration-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: .95;
    letter-spacing: -.065em;
}

.registration-hero p:not(.eyebrow) {
    max-width: 34rem;
    margin: 0;
    color: #efe6d6;
    line-height: 1.55;
}

.registration-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.registration-summary > div,
.registration-next-step {
    padding: .9rem 1rem;
    border: 1px solid var(--soft-line, var(--line));
    border-radius: 1rem;
    background: #fffdf9;
}

.registration-summary span,
.registration-next-step span,
.registration-next-step small {
    display: block;
    color: var(--muted);
    font-size: .82rem;
}

.registration-summary span,
.registration-next-step span {
    margin-bottom: .25rem;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.registration-summary strong,
.registration-next-step strong {
    display: block;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.35;
}

.registration-form {
    padding-top: .15rem;
}

.registration-form .primary-action {
    width: 100%;
    min-height: 3.15rem;
    margin-top: .45rem;
    background: var(--brand);
    color: var(--brand-dark);
    box-shadow: 0 12px 30px rgba(242, 183, 5, .24);
}

.registration-next-step {
    position: relative;
    padding-left: 3.35rem;
}

.registration-next-step::before {
    content: "✓";
    position: absolute;
    left: 1rem;
    top: 50%;
    display: grid;
    place-items: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    transform: translateY(-50%);
    background: #e6f7ee;
    color: var(--success);
    font-weight: 950;
}

@media (max-width: 640px) {
    .registration-card {
        border-radius: 1.35rem;
    }

    .registration-summary {
        grid-template-columns: 1fr;
    }
}

/* Password reset flow */
.password-forgot-link {
    justify-self: end;
    width: fit-content;
    color: var(--brand-dark);
    font-size: .9rem;
    font-weight: 850;
    text-decoration: underline;
    text-decoration-thickness: .08em;
    text-underline-offset: .18em;
}

.password-flow-screen {
    width: min(42rem, 100%);
}

.password-flow-card {
    width: 100%;
    display: grid;
    gap: 1.15rem;
}

.password-flow-hero {
    display: grid;
    gap: .45rem;
    padding: clamp(1rem, 3vw, 1.35rem);
    border-radius: 1.35rem;
    background:
        radial-gradient(circle at top right, rgba(242, 183, 5, .24), transparent 14rem),
        linear-gradient(135deg, #151515 0%, #2b2419 100%);
    color: #fffaf3;
}

.password-flow-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: .95;
    letter-spacing: -.065em;
}

.password-flow-hero p:not(.eyebrow) {
    margin: 0;
    color: #efe6d6;
    line-height: 1.55;
}

.password-flow-link {
    margin: .2rem 0 0;
    color: var(--muted);
    font-weight: 850;
}

.password-flow-link a {
    color: var(--brand-dark);
    text-decoration: underline;
    text-underline-offset: .18em;
}

/* Modern responsive app navigation */
.app-sidebar {
    padding: 1rem;
    background:
        radial-gradient(circle at top left, rgba(242, 183, 5, .18), transparent 16rem),
        linear-gradient(180deg, #171717 0%, #111 100%);
    border-right: 1px solid rgba(255,255,255,.08);
}

.sidebar-brand {
    padding: .65rem;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 1.25rem;
    background: rgba(255,255,255,.045);
}

.app-sidebar-scroll {
    gap: .9rem;
}

.sidebar-accordion {
    display: grid;
    gap: .6rem;
}

.nav-section {
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 1.1rem;
    background: rgba(255,255,255,.04);
    overflow: hidden;
}

.nav-section[open] {
    background: rgba(255,255,255,.065);
}

.nav-section summary {
    position: relative;
    display: grid;
    gap: .15rem;
    padding: .85rem 2.35rem .85rem .95rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.nav-section summary::-webkit-details-marker {
    display: none;
}

.nav-section summary::after {
    content: "";
    position: absolute;
    right: .95rem;
    top: 50%;
    width: .48rem;
    height: .48rem;
    border-right: 2px solid #f2b705;
    border-bottom: 2px solid #f2b705;
    transform: translateY(-62%) rotate(45deg);
    transition: transform .18s ease;
}

.nav-section[open] summary::after {
    transform: translateY(-38%) rotate(225deg);
}

.nav-section summary span,
.nav-section summary small {
    display: block;
}

.nav-section summary span {
    color: #fffaf3;
    font-size: .92rem;
    font-weight: 950;
    letter-spacing: -.015em;
}

.nav-section summary small {
    color: #cfc3ad;
    font-size: .74rem;
    line-height: 1.3;
}

.nav-section-links {
    display: grid;
    gap: .28rem;
    padding: 0 .55rem .65rem;
}

.nav-section-links a {
    display: flex;
    align-items: center;
    min-height: 2.45rem;
    border: 1px solid transparent;
    border-radius: .8rem;
    padding: .62rem .75rem;
    color: #efe6d6;
    font-size: .9rem;
    font-weight: 820;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.nav-section-links a:hover,
.nav-section-links a:focus-visible {
    background: rgba(255,255,255,.075);
    border-color: rgba(255,255,255,.1);
    color: #fff;
    transform: translateX(2px);
    outline: none;
}

.nav-section-links a.is-active {
    background: var(--brand);
    border-color: rgba(242, 183, 5, .8);
    color: var(--brand-dark);
    box-shadow: 0 12px 26px rgba(242, 183, 5, .16);
}

.nav-section-emphasis {
    border-color: rgba(242, 183, 5, .28);
    background: rgba(242, 183, 5, .09);
}

.sidebar-footer-card {
    border-radius: 1.1rem;
    background: rgba(255,255,255,.055);
}

.sidebar-footer-card button:hover,
.sidebar-footer-card button:focus-visible {
    background: rgba(242, 183, 5, .16);
    border-color: rgba(242, 183, 5, .28);
    outline: none;
}

@media (max-width: 980px) {
    .app-sidebar {
        padding: 1rem;
    }

    .app-sidebar-scroll {
        display: grid;
        gap: .85rem;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .sidebar-accordion {
        gap: .55rem;
    }

    .nav-section summary {
        min-height: 3.35rem;
    }

    .nav-section-links a {
        min-height: 2.8rem;
        font-size: .95rem;
    }
}

@media (max-width: 640px) {
    .mobile-menu-button {
        top: .85rem;
        left: .85rem;
        width: 2.85rem;
        height: 2.85rem;
        border-radius: .9rem;
    }

    .app-sidebar {
        width: min(22rem, calc(100vw - 1rem));
    }

    .nav-section summary {
        padding: .82rem 2.3rem .82rem .85rem;
    }
}

.day-focus-hero .primary-action,
.employee-primary-action .primary-action {
    min-width: min(100%, 14rem);
}

.status-dot.is-muted { background: #9ca3af; box-shadow: 0 0 0 .45rem rgba(156, 163, 175, .18); }

.employee-month-panel { margin-top: 1.25rem; }
.employee-month-toolbar { align-items: center; }
.employee-month-list { display: grid; gap: .7rem; margin-top: 1rem; }
.employee-month-row {
    display: grid;
    grid-template-columns: 10rem minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: .8rem;
    align-items: center;
    padding: .95rem 1rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #fff;
}
.employee-month-row span,
.employee-month-row small { display: block; }
.employee-month-row small { color: var(--muted); margin-top: .25rem; }

@media (max-width: 760px) {
    .employee-month-toolbar { display: grid; }
    .employee-month-toolbar .button-row { width: 100%; }
    .employee-month-toolbar .button-row a { flex: 1 1 100%; }
    .employee-month-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #fff;
    font-weight: 850;
}

.time-tracking-shell .checkbox-field input[type="checkbox"] {
    width: auto;
    min-width: 1.1rem;
    accent-color: var(--brand);
}

.employee-day-page {
    display: grid;
    gap: 1rem;
}

.employee-day-status-panel {
    display: grid;
    gap: 1rem;
    padding: clamp(1rem, 3vw, 1.35rem);
}

.employee-day-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.employee-day-topline h1 {
    margin-bottom: .25rem;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    line-height: 1;
}

.employee-day-date,
.employee-day-current-state small {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.45;
}

.employee-day-current-state {
    display: grid;
    justify-items: end;
    gap: .35rem;
    text-align: right;
}

.employee-status-pill,
.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: .5rem .75rem;
    background: #151515;
    color: white;
    font-size: .82rem;
    font-weight: 900;
    white-space: nowrap;
}

.employee-day-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .6rem;
    margin: 0;
}

.employee-day-facts > div {
    padding: .85rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #fff;
}

.employee-day-facts dt {
    margin-bottom: .3rem;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 850;
}

.employee-day-facts dd {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 950;
}

.employee-primary-actions,
.employee-sticky-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
}

.employee-primary-actions > *,
.employee-sticky-actions > * {
    flex: 1 1 12rem;
}

.employee-day-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, .42fr);
    gap: 1rem;
}

.employee-booking-list {
    display: grid;
    gap: .55rem;
}

.employee-booking-row {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: .8rem;
    align-items: center;
    padding: .75rem .85rem;
    border: 1px solid var(--line);
    border-radius: .9rem;
    background: #fff;
}

.employee-booking-row span {
    color: var(--muted);
    font-weight: 850;
}

.employee-other-actions-panel {
    display: grid;
    align-content: start;
    gap: .8rem;
}

.employee-other-actions-panel .secondary-action-list {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.employee-other-actions-panel .ghost-button {
    flex: 1 1 11rem;
}

.employee-sticky-actions { display: none; }

@media (max-width: 900px) {
    .employee-day-content-grid,
    .employee-day-facts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .content-area:has(.employee-day-page) {
        padding: .75rem .75rem 8.5rem;
    }

    .employee-day-status-panel {
        border-radius: 1.2rem;
    }

    .employee-day-topline {
        display: grid;
        gap: .65rem;
    }

    .employee-day-current-state {
        justify-items: start;
        text-align: left;
    }

    .employee-day-topline h1 {
        font-size: 1.55rem;
        letter-spacing: -.05em;
    }

    .employee-primary-actions .primary-action,
    .employee-primary-actions .secondary-action {
        min-height: 3.4rem;
    }

    .employee-sticky-actions {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 40;
        display: flex;
        padding: .75rem;
        background: rgba(255, 250, 243, .96);
        border-top: 1px solid var(--line);
        box-shadow: 0 -14px 34px rgba(41, 31, 19, .12);
    }

    .employee-sticky-actions > * {
        flex-basis: 0;
        min-width: 0;
    }
}

.employee-overview-page {
    display: grid;
    gap: 1rem;
}

.employee-month-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.employee-month-toolbar h1 {
    margin-bottom: .35rem;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    line-height: 1;
    letter-spacing: -.04em;
}

.employee-month-toolbar p:not(.eyebrow) {
    margin-bottom: 0;
    color: var(--muted);
}

.month-switcher {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 3.25rem);
    gap: .5rem;
    align-items: center;
    justify-content: end;
}

.month-icon-button {
    display: grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #fffaf3;
    color: var(--text);
    font-size: 1.85rem;
    font-weight: 950;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(41, 31, 19, .06);
}

.month-icon-button:hover,
.month-icon-button:focus-visible,
.month-picker[open] > .month-icon-button {
    border-color: rgba(242, 183, 5, .75);
    background: var(--brand);
    color: var(--brand-dark);
    outline: none;
}

.month-icon-button svg {
    width: 1.28rem;
    height: 1.28rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.month-picker {
    position: relative;
}

.month-picker summary {
    list-style: none;
    cursor: pointer;
}

.month-picker summary::-webkit-details-marker {
    display: none;
}

.month-picker-popover {
    position: absolute;
    top: calc(100% + .55rem);
    left: 50%;
    z-index: 30;
    width: min(17rem, calc(100vw - 2rem));
    padding: .9rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #fffaf3;
    box-shadow: 0 22px 46px rgba(41, 31, 19, .18);
    transform: translateX(-50%);
}

.month-picker-popover > strong {
    display: block;
    margin-bottom: .7rem;
    font-size: .95rem;
}

.month-picker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .4rem;
}

.month-picker-grid a,
.month-picker-today {
    display: grid;
    place-items: center;
    min-height: 2.35rem;
    border: 1px solid var(--line);
    border-radius: .75rem;
    background: white;
    color: var(--text);
    font-size: .85rem;
    font-weight: 900;
    text-decoration: none;
}

.month-picker-grid a.is-selected,
.month-picker-grid a:hover,
.month-picker-grid a:focus-visible,
.month-picker-today:hover,
.month-picker-today:focus-visible {
    border-color: rgba(242, 183, 5, .75);
    background: var(--brand);
    color: var(--brand-dark);
    outline: none;
}

.month-picker-today {
    margin-top: .55rem;
}

@media (max-width: 760px) {
    .employee-month-toolbar {
        display: grid;
        align-items: stretch;
    }

    .month-switcher {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        justify-content: stretch;
    }

    .month-icon-button {
        width: 100%;
    }

    .month-picker-popover {
        left: 50%;
    }

    .employee-month-toolbar h1 {
        font-size: 1.55rem;
        letter-spacing: -.05em;
    }
}

/* Mobile drawer refinement: compact, app-like navigation */
.mobile-sidebar-brand {
    display: none;
}

@media (max-width: 980px) {
    .mobile-sidebar-header {
        padding-bottom: .9rem;
        border-bottom-color: rgba(255, 255, 255, .08);
    }

    .mobile-sidebar-brand {
        display: flex;
        align-items: center;
        gap: .75rem;
        min-width: 0;
    }

    .mobile-sidebar-brand .brand-mark {
        width: 3rem;
        height: 3rem;
        border-radius: .95rem;
        flex: 0 0 auto;
    }

    .mobile-sidebar-brand strong,
    .mobile-sidebar-brand small {
        display: block;
    }

    .mobile-sidebar-brand strong {
        color: #fffaf3;
        font-size: 1rem;
        letter-spacing: -.02em;
    }

    .mobile-sidebar-brand small {
        color: #cfc3ad;
        font-size: .8rem;
        line-height: 1.25;
    }

    .mobile-menu-close {
        width: 2.65rem;
        height: 2.65rem;
        border-radius: .95rem;
        background: rgba(255, 255, 255, .075);
        font-size: 1.55rem;
    }

    .mobile-menu-overlay {
        background: rgba(21, 21, 21, .55);
        backdrop-filter: blur(2px);
    }

    .sidebar.app-sidebar {
        width: min(19.25rem, calc(100vw - 3rem));
        padding: 1rem;
        gap: .9rem;
        background: linear-gradient(180deg, #151515 0%, #101010 100%);
        box-shadow: 26px 0 70px rgba(0, 0, 0, .38);
    }

    .app-sidebar .sidebar-brand {
        display: none;
    }

    .app-sidebar-scroll {
        gap: .9rem;
        padding: .1rem 0 .25rem;
    }

    .sidebar-accordion,
    .nav-section-links {
        gap: .35rem;
    }

    .nav-section {
        border-color: rgba(255, 255, 255, .08);
        border-radius: 1rem;
        background: rgba(255, 255, 255, .035);
    }

    .nav-section[open] {
        background: rgba(255, 255, 255, .045);
    }

    .nav-section summary {
        min-height: auto;
        padding: .85rem 2.35rem .75rem .9rem;
    }

    .nav-section summary span {
        font-size: .88rem;
    }

    .nav-section summary small {
        font-size: .72rem;
    }

    .nav-section-links {
        padding: 0 .45rem .5rem;
    }

    .nav-section-links a {
        min-height: 2.95rem;
        border-radius: .85rem;
        padding: .78rem .85rem;
        font-size: .94rem;
    }

    .nav-section-links a.is-active {
        box-shadow: none;
    }

    .sidebar-footer-card {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .85rem;
        padding: .8rem;
        border: 1px solid rgba(255, 255, 255, .08);
        border-radius: 1rem;
        background: rgba(255, 255, 255, .045);
    }

    .sidebar-footer-card span,
    .sidebar-footer-card strong {
        display: block;
    }

    .sidebar-footer-card form {
        margin: 0;
        flex: 0 0 auto;
    }

    .sidebar-footer-card button {
        min-height: 2.75rem;
        padding: .72rem .9rem;
        border-radius: .85rem;
        white-space: nowrap;
    }
}

@media (max-width: 640px) {
    .sidebar.app-sidebar {
        width: min(18.75rem, calc(100vw - 2.25rem));
    }

    .mobile-menu-button {
        top: .8rem;
        left: .8rem;
    }
}

/* Mobile drawer refinement: full-width, left-aligned sections */
@media (max-width: 980px) {
    .sidebar.app-sidebar {
        align-items: stretch;
    }

    .app-sidebar-scroll,
    .sidebar-accordion {
        width: 100%;
        justify-items: stretch;
        align-items: stretch;
    }

    .nav-section,
    .nav-section-links,
    .sidebar-footer-card {
        width: 100%;
    }

    .nav-section summary,
    .nav-section-links a {
        text-align: left;
        justify-content: flex-start;
    }

    .sidebar-footer-card {
        margin-top: auto;
    }
}

/* Employee administration: merged tabs + table-first layout */
.employee-admin-page {
    gap: .85rem;
}

.admin-page-titlebar {
    display: flex;
    align-items: baseline;
    gap: .65rem;
    min-height: 2.4rem;
}

.admin-page-titlebar h1 {
    margin: 0;
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    line-height: 1;
    letter-spacing: -.04em;
}

.admin-page-titlebar .eyebrow {
    margin: 0;
    white-space: nowrap;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    padding: .25rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: rgba(255, 250, 243, .72);
}

.admin-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.65rem;
    border-radius: .8rem;
    padding: .72rem 1rem;
    color: var(--muted);
    font-weight: 900;
    text-decoration: none;
}

.admin-tabs a:hover,
.admin-tabs a:focus-visible,
.admin-tabs a.is-active {
    background: #151515;
    color: #fffaf3;
    outline: none;
}

.employee-table-panel {
    display: grid;
    gap: .75rem;
}

.table-panel-header {
    display: grid;
    grid-template-columns: minmax(10rem, .7fr) minmax(14rem, 1fr) minmax(10rem, .34fr) auto;
    gap: .7rem;
    align-items: end;
    padding: .25rem .25rem .55rem;
}

.table-panel-header h2 {
    margin: 0;
    font-size: clamp(1.25rem, 2vw, 1.7rem);
    letter-spacing: -.04em;
}

.table-panel-header label {
    display: grid;
    gap: .35rem;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 850;
}

.table-panel-header .primary-action {
    min-height: 3.05rem;
    white-space: nowrap;
}

.employee-admin-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.employee-admin-table {
    min-width: 58rem;
}

.employee-admin-table .table-row {
    border-radius: .7rem;
}

@media (max-width: 980px) {
    .admin-page-titlebar {
        position: fixed;
        top: 1.55rem;
        left: 4.45rem;
        z-index: 65;
        min-height: 2rem;
        max-width: calc(100vw - 5.4rem);
        padding: 0;
        pointer-events: none;
    }

    .admin-page-titlebar .eyebrow {
        display: none;
    }

    .admin-page-titlebar h1 {
        overflow: hidden;
        max-width: 100%;
        color: #151515;
        font-size: 1rem;
        font-weight: 950;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .admin-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: .22rem;
    }

    .admin-tabs a {
        flex: 1 0 max-content;
        min-height: 2.8rem;
    }

    .table-panel-header {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .table-panel-header .primary-action,
    .table-panel-header input,
    .table-panel-header select {
        width: 100%;
    }

    .employee-admin-table .table-head {
        display: grid;
    }

    .employee-admin-table .table-row,
    .team-table.employee-admin-table .table-row,
    .time-review-table.employee-admin-table .table-row,
    .absence-table.employee-admin-table .table-row {
        grid-template-columns: inherit;
    }

    .employee-admin-table .row-actions {
        justify-content: flex-start;
    }

    .employee-admin-table .row-actions .ghost-button {
        width: auto;
    }
}

/* Employee admin tabs: operational status blocks */
.tab-insight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .6rem;
}

.tab-insight-grid > div,
.review-focus-list {
    border: 1px solid var(--soft-line);
    border-radius: .9rem;
    background: #fffdf9;
}

.tab-insight-grid > div {
    display: grid;
    gap: .18rem;
    padding: .8rem .9rem;
}

.tab-insight-grid span,
.review-focus-heading span {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.tab-insight-grid strong {
    font-size: clamp(1.45rem, 3vw, 2rem);
    line-height: 1;
}

.tab-insight-grid small {
    color: var(--muted);
    line-height: 1.35;
}

.review-focus-list {
    display: grid;
    gap: .35rem;
    padding: .75rem;
}

.review-focus-heading,
.review-focus-item {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto;
    gap: .65rem;
    align-items: center;
}

.review-focus-heading {
    padding: 0 .1rem .35rem;
}

.review-focus-item {
    padding: .75rem;
    border: 1px solid var(--soft-line);
    border-radius: .75rem;
    background: #fff;
}

.review-focus-item strong,
.review-focus-item small {
    display: block;
}

.review-focus-item small {
    margin-top: .16rem;
    color: var(--muted);
}

@media (max-width: 760px) {
    .tab-insight-grid,
    .review-focus-heading,
    .review-focus-item {
        grid-template-columns: 1fr;
    }
}

/* Always-collapsed time tracking navigation */
.time-tracking-shell:not(.login-layout) {
    display: block;
    min-height: 100vh;
}

.time-tracking-shell:not(.login-layout) .content-area {
    padding-top: 5.25rem;
}

.mobile-menu-toggle {
    position: fixed;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.mobile-menu-button {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 70;
    display: inline-grid;
    gap: .28rem;
    place-content: center;
    width: 3.1rem;
    height: 3.1rem;
    border: 1px solid rgba(21, 21, 21, .12);
    border-radius: 1rem;
    background: rgba(255, 250, 243, .96);
    box-shadow: 0 14px 34px rgba(41, 31, 19, .14);
}

.mobile-menu-button span {
    display: block;
    width: 1.25rem;
    height: .14rem;
    border-radius: 999px;
    background: #151515;
}

.mobile-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: .9rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.mobile-sidebar-brand {
    display: flex;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: block;
    background: rgba(21, 21, 21, .55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    backdrop-filter: blur(2px);
}

.sidebar.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 80;
    width: min(19.25rem, calc(100vw - 3rem));
    height: 100dvh;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .9rem;
    overflow: hidden;
    transform: translateX(-105%);
    transition: transform .24s ease;
    background: linear-gradient(180deg, #151515 0%, #101010 100%);
    box-shadow: 26px 0 70px rgba(0, 0, 0, .38);
}

.mobile-menu-toggle:checked ~ .mobile-menu-overlay {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-toggle:checked ~ .sidebar.app-sidebar {
    transform: translateX(0);
}

.correction-review-table .table-row {
    grid-template-columns: minmax(0, .78fr) minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(0, .7fr) minmax(0, 1fr);
}

@media (max-width: 640px) {
    .time-tracking-shell:not(.login-layout) .content-area {
        padding: 5rem .9rem 1rem;
    }

    .sidebar.app-sidebar {
        width: min(18.75rem, calc(100vw - 2.25rem));
    }
}

/* Desktop also uses compact title beside burger */
.admin-page-titlebar {
    position: fixed;
    top: 1.55rem;
    left: 4.45rem;
    z-index: 65;
    min-height: 2rem;
    max-width: calc(100vw - 5.4rem);
    padding: 0;
    pointer-events: none;
}

.admin-page-titlebar .eyebrow {
    display: none;
}

.admin-page-titlebar h1 {
    overflow: hidden;
    max-width: 100%;
    color: #151515;
    font-size: 1rem;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Calendar employee colors and range selection */
.color-field {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) auto;
}

.color-field > span {
    grid-column: 1 / -1;
}

.color-field input[type="color"] {
    width: 4.6rem;
    min-height: 2.8rem;
    padding: .18rem;
}

.color-field strong {
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    padding: 0 .8rem;
    border-radius: .8rem;
    font-size: .82rem;
    font-weight: 950;
}

.calendar-selection-hint {
    display: flex;
    align-items: center;
    gap: .7rem;
    flex-wrap: wrap;
    margin-top: .75rem;
    padding: .7rem .8rem;
    border: 1px solid rgba(255, 186, 73, .45);
    border-radius: 1rem;
    background: rgba(255, 186, 73, .12);
    color: #151515;
}

.calendar-selection-hint strong {
    font-weight: 950;
}

.calendar-selection-hint span {
    color: var(--muted);
    font-weight: 750;
}

.month-calendar-grid {
    user-select: none;
    touch-action: none;
}

.month-calendar-day {
    cursor: crosshair;
    transition: background .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.month-calendar-day.is-selected {
    border-color: rgba(255, 186, 73, .78);
    background: rgba(255, 186, 73, .16);
    box-shadow: inset 0 0 0 1px rgba(255, 186, 73, .45);
}

.month-calendar-day.is-selection-edge {
    border-color: var(--brand);
    box-shadow: inset 0 0 0 2px var(--brand);
}

.month-calendar-day .calendar-entry {
    border-left-color: color-mix(in srgb, var(--employee-color, #2563EB), #000 16%);
    background: var(--employee-color, #2563EB);
    color: var(--employee-text-color, #FFFFFF);
}

.calendar-entry span,
.calendar-entry small {
    color: inherit;
}

@media (max-width: 640px) {
    .calendar-selection-hint {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Calendar page: no separate title card, compact control bar */
.calendar-management-page.no-page-card {
    gap: .85rem;
}

.calendar-control-bar {
    grid-template-columns: minmax(13rem, .72fr) minmax(18rem, 1fr) auto;
    align-items: center;
    padding: .55rem .65rem;
    border-radius: .95rem;
    background: rgba(255, 250, 243, .82);
    box-shadow: none;
}

.calendar-month-control {
    grid-template-columns: 2.25rem minmax(8.5rem, 1fr) 2.25rem;
    gap: .35rem;
}

.calendar-month-control .ghost-button {
    min-height: 2.25rem;
    padding: 0;
    border-radius: .7rem;
}

.calendar-month-control strong {
    font-size: .98rem;
}

.calendar-filter-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(10rem, 1fr));
    gap: .55rem;
}

.calendar-control-bar label {
    gap: .18rem;
    font-size: .72rem;
}

.calendar-control-bar select {
    min-height: 2.45rem;
    padding-block: .5rem;
    border-radius: .75rem;
}

.calendar-control-bar .primary-action {
    min-height: 2.45rem;
    padding: .62rem .9rem;
    border-radius: .8rem;
}

@media (max-width: 980px) {
    .calendar-control-bar {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .calendar-filter-group {
        grid-template-columns: 1fr;
    }
}

/* Strong contrast for primary buttons and mobile phone action */
.primary-action,
.primary-action:visited,
.primary-action:hover,
.primary-action:focus-visible {
    color: #fff !important;
}

.employee-phone-fact {
    border-color: rgba(21, 21, 21, .16);
    background: rgba(21, 21, 21, .035);
}

.employee-phone-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.25rem;
    padding: .42rem .7rem;
    border-radius: .72rem;
    background: #151515;
    color: #fff;
    font-weight: 950;
    text-decoration: none;
    white-space: nowrap;
}

.employee-phone-link:hover,
.employee-phone-link:focus-visible {
    color: #fff;
    text-decoration: none;
}

@media (max-width: 640px) {
    .employee-phone-fact {
        grid-column: 1 / -1;
    }

    .employee-phone-link {
        width: 100%;
        min-height: 2.75rem;
    }
}

/* Employee day refinement: compact header, no duplicate mobile CTAs, readable breaks */
.employee-day-title-row {
    display: flex;
    align-items: baseline;
    gap: .7rem;
    flex-wrap: wrap;
}

.employee-day-title-row h1,
.employee-day-title-row .employee-day-date {
    margin: 0;
}

.employee-break-fact {
    min-width: 0;
}

.employee-break-list {
    display: grid;
    gap: .18rem;
    margin-top: .35rem;
    font-size: .95rem;
    line-height: 1.25;
}

.employee-break-list.compact-break-list {
    margin-top: 0;
}

.break-toggle-button {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    border: 0;
    background: transparent;
    color: #151515;
    font: inherit;
    font-weight: 950;
    text-decoration: underline;
    text-underline-offset: .18rem;
}

@media (max-width: 760px) {
    .employee-day-status-panel .employee-primary-actions {
        display: none;
    }

    .employee-day-title-row {
        gap: .35rem .55rem;
    }
}

/* Table row context menus: desktop right click, mobile long press */
.context-table-row {
    cursor: context-menu;
}

.context-table-row:hover {
    background: rgba(255, 186, 73, .08);
}

.row-context-backdrop {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: transparent;
}

.row-context-menu {
    position: fixed;
    z-index: 130;
    display: grid;
    min-width: 12rem;
    max-width: min(18rem, calc(100vw - 1.5rem));
    padding: .35rem;
    border: 1px solid rgba(21, 21, 21, .12);
    border-radius: .9rem;
    background: #fffaf3;
    box-shadow: 0 20px 54px rgba(41, 31, 19, .24);
}

.row-context-menu button,
.row-context-menu span {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 2.55rem;
    padding: .65rem .75rem;
    border: 0;
    border-radius: .65rem;
    background: transparent;
    color: #151515;
    font-weight: 900;
    text-align: left;
}

.row-context-menu button:hover,
.row-context-menu button:focus-visible {
    background: rgba(255, 186, 73, .18);
}

.team-table .table-row {
    grid-template-columns: minmax(12rem, 1.35fr) minmax(7rem, .62fr) minmax(8rem, .72fr) minmax(9rem, 1fr) minmax(6rem, .58fr) minmax(7rem, .62fr) minmax(6rem, .55fr) minmax(6rem, .58fr);
}

.correction-review-table .table-row {
    grid-template-columns: minmax(0, .78fr) minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(0, .7fr);
}

.absence-table .table-row {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, .8fr) minmax(0, .7fr) minmax(0, .85fr);
}

.roles-table .table-row,
.closure-table .table-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, .75fr) minmax(0, 1.2fr);
}

@media (max-width: 640px) {
    .row-context-menu {
        left: .75rem !important;
        right: .75rem;
        max-width: none;
    }
}

.calendar-holiday-stack {
    display: grid;
    gap: .25rem;
    margin-top: .35rem;
}

.calendar-holiday-badge {
    display: grid;
    gap: .08rem;
    padding: .38rem .45rem;
    border: 1px solid rgba(255, 186, 73, .42);
    border-radius: .55rem;
    background: rgba(255, 186, 73, .16);
    color: #241708;
    font-size: .72rem;
    line-height: 1.15;
}

.calendar-holiday-badge strong {
    font-weight: 950;
}

.calendar-holiday-badge small {
    color: rgba(36, 23, 8, .68);
    font-weight: 800;
}

.positive-balance {
    color: #0f7a3b;
}

.negative-balance {
    color: #b42318;
}

.employee-calendar-page {
    display: grid;
    gap: 1rem;
}

.employee-calendar-toolbar {
    align-items: center;
}

.employee-calendar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    justify-content: end;
}

.employee-calendar-day {
    width: 100%;
    min-height: 8.8rem;
    border: 1px solid var(--line);
    text-align: left;
}

.employee-calendar-day.is-selected {
    outline: 2px solid var(--brand);
    outline-offset: -2px;
}

.employee-calendar-day .calendar-entry,
.employee-absence-entry {
    width: 100%;
    border: 0;
    text-align: left;
}

.employee-absence-entry.type-vacation {
    background: rgba(15, 122, 59, .12);
    color: #0f4d28;
}

.employee-absence-entry.type-sickleave {
    background: rgba(180, 35, 24, .12);
    color: #8a1c14;
}

@media (max-width: 760px) {
    .employee-calendar-toolbar,
    .employee-calendar-actions {
        display: grid;
        justify-content: stretch;
    }

    .employee-calendar-actions > * {
        width: 100%;
    }

    .employee-month-calendar-grid {
        grid-template-columns: 1fr;
    }

    .employee-calendar-day {
        min-height: 7rem;
    }
}
