.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;
}

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

.portal-today-panel {
    margin-top: 0;
}

.portal-compact-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .6rem;
}

.day-switcher {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .45rem;
}

.day-switcher input {
    width: 10.4rem;
    min-height: 2.15rem;
    border-radius: 999px;
    padding: .45rem .7rem;
    font-size: .84rem;
    font-weight: 850;
}

.compact-mode-button {
    min-height: 2.15rem;
    padding: .55rem .8rem;
    font-size: .84rem;
}

.inline-warning {
    margin-top: 0;
}

.today-heading {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
}

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

.today-summary-strip div {
    padding: .85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #fff;
}

.today-summary-strip span,
.today-summary-strip strong {
    display: block;
}

.today-summary-strip span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 850;
}

.today-summary-strip strong {
    margin-top: .2rem;
    font-size: 1.7rem;
    letter-spacing: -.05em;
}

.day-timeline {
    position: relative;
    display: grid;
    gap: .22rem;
    overflow: visible;
}

.timeline-hours,
.timeline-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: .22rem;
    align-items: center;
}

.timeline-hours {
    display: grid;
    margin-bottom: .08rem;
    padding: 0 .2rem;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 850;
}

.timeline-hours::before,
.timeline-hours::after {
    display: none;
}

.timeline-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem .95rem;
    margin-top: .45rem;
    padding-top: .7rem;
    border-top: 1px solid rgba(21, 21, 21, .06);
    color: var(--muted);
    font-size: .76rem;
    font-weight: 850;
}

.timeline-legend span {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: .4rem;
    white-space: nowrap;
}

.timeline-legend-swatch {
    display: inline-block;
    width: 1.65rem;
    height: .42rem;
    border-radius: 999px;
    background: #bbf7d0;
}

.timeline-legend-swatch.is-planned {
    border: 1px dashed rgba(146, 64, 14, .5);
    background: rgba(250, 204, 21, .24);
}

.timeline-legend-swatch.is-break {
    width: .7rem;
    height: .8rem;
    border-radius: .12rem;
    border-inline: 2px solid rgba(194, 65, 12, .62);
    background:
        repeating-linear-gradient(
            135deg,
            rgba(249, 115, 22, .32) 0 .25rem,
            rgba(249, 115, 22, .12) .25rem .5rem
        );
}

.timeline-legend-swatch.is-now {
    width: .18rem;
    height: 1rem;
    border-radius: 999px;
    background: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .08);
}

.timeline-scale {
    grid-column: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 .2rem;
}

.timeline-scale span {
    min-width: 0;
    flex: 0 0 auto;
    text-align: center;
}

.timeline-scale span:first-child {
    text-align: left;
}

.timeline-scale span:last-child {
    text-align: right;
}

.timeline-row {
    padding: .22rem 0;
    border-bottom: 0;
}

.timeline-row:last-child {
    border-bottom: 0;
}

.timeline-now-line {
    position: absolute;
    top: 1.55rem;
    bottom: .2rem;
    z-index: 6;
    width: 2px;
    transform: translateX(-1px);
    border-radius: 999px;
    background: rgba(220, 38, 38, .78);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, .08);
    pointer-events: none;
}

.timeline-now-line::before {
    content: "";
    position: absolute;
    top: -.25rem;
    left: 50%;
    width: .45rem;
    height: .45rem;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: #dc2626;
}

.timeline-person {
    display: grid;
    gap: .2rem;
    align-items: center;
}

.timeline-person strong,
.timeline-person small,
.timeline-summary span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-person strong {
    font-size: .95rem;
}

.timeline-person small {
    color: var(--muted);
    font-size: .78rem;
}

.timeline-person .status-chip {
    margin-top: .15rem;
    width: fit-content;
}

.timeline-track {
    position: relative;
    min-width: 0;
    height: 4.2rem;
    border: 1px solid var(--line);
    border-radius: .55rem;
    background:
        repeating-linear-gradient(90deg, rgba(21,21,21,.06) 0 1px, transparent 1px calc(100% / 6)),
        #fff;
    overflow: hidden;
}

.timeline-person,
.timeline-summary {
    display: none;
}

.timeline-track-person {
    position: absolute;
    inset: .35rem .45rem auto .45rem;
    z-index: 5;
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: .45rem;
    pointer-events: none;
}

.timeline-track-person strong,
.timeline-track-person small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.1;
}

.timeline-track-person strong {
    color: var(--text);
    font-size: .82rem;
    font-weight: 950;
}

.timeline-track-person small {
    flex: 0 1 auto;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 850;
}

.timeline-track-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .08rem;
    text-align: right;
}

.timeline-track-status span {
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-block {
    position: absolute;
    inset-block: .8rem .8rem;
    display: flex;
    min-width: 3.7rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding-inline: .28rem;
    color: #151515;
    background: #ffe08a;
    box-shadow: none;
}

.timeline-planned-block {
    inset-block: 2.56rem .46rem;
    z-index: 1;
    border: 1px dashed rgba(146, 64, 14, .34);
    background: rgba(250, 204, 21, .18);
}

.timeline-actual-block {
    inset-block: 1.55rem 1.47rem;
    z-index: 2;
}

.timeline-block-label {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    color: currentColor;
    font-size: .62rem;
    font-weight: 950;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-break-block {
    display: grid;
    place-items: center;
    position: absolute;
    inset-block: 1.55rem 1.47rem;
    z-index: 3;
    min-width: 1.15rem;
    overflow: hidden;
    border-radius: .25rem;
    border: 1px solid color-mix(in srgb, var(--break-color, #f59e0b) 78%, #151515);
    background: var(--break-color, #f59e0b);
    color: var(--break-text-color, #151515);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24);
    opacity: .9;
    pointer-events: none;
}

.timeline-break-block span {
    display: block;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: .08rem .24rem;
    font-size: .56rem;
    font-weight: 950;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-block.is-working,
.status-chip.is-working {
    background: #dcfce7;
    color: #166534;
}

.timeline-actual-block.is-working {
    background: #bbf7d0;
    color: #14532d;
}

.timeline-block.is-complete,
.status-chip.is-complete {
    background: #e0f2fe;
    color: #075985;
}

.timeline-block.is-planned,
.status-chip.is-planned {
    background: #fef3c7;
    color: #92400e;
}

.timeline-block.is-open,
.status-chip.is-open {
    background: #fee2e2;
    color: #991b1b;
}

.timeline-actual-block.is-open {
    background: #fecaca;
}

.timezone-note {
    color: var(--muted);
    font-weight: 850;
    white-space: nowrap;
}

.away-list {
    display: grid;
    gap: .55rem;
    padding-top: .85rem;
    border-top: 1px solid var(--line);
}

.away-list-heading,
.away-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.away-list-heading span,
.away-row span {
    color: var(--muted);
}

.away-row {
    padding: .75rem .9rem;
    border: 1px solid var(--line);
    border-radius: .9rem;
    background: #fff;
}

.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;
    }

    .today-heading,
    .away-list-heading,
    .away-row {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-compact-actions,
    .day-switcher {
        justify-content: flex-start;
    }

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

    .day-timeline {
        gap: .18rem;
    }

    .timeline-hours,
    .timeline-row {
        grid-template-columns: 1fr;
        gap: .2rem;
    }

    .timeline-hours {
        display: grid;
        margin-bottom: .05rem;
        padding: 0 .15rem;
    }

    .timeline-legend {
        padding-left: 0;
        margin-top: .4rem;
    }

    .timeline-scale {
        grid-column: 1;
        padding: 0 .15rem;
        font-size: .68rem;
    }

    .timeline-row {
        padding: .18rem 0;
        border-bottom: 0;
    }

    .timeline-person,
    .timeline-summary {
        display: none;
    }

    .timeline-track {
        height: 4.2rem;
        border-radius: .55rem;
    }

    .timeline-track-person {
        position: absolute;
        inset: .35rem .45rem auto .45rem;
        z-index: 5;
        display: flex;
        min-width: 0;
        align-items: center;
        justify-content: space-between;
        gap: .45rem;
        pointer-events: none;
    }

    .timeline-track-person strong,
    .timeline-track-person small {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        line-height: 1.1;
    }

    .timeline-track-person strong {
        color: var(--text);
        font-size: .78rem;
        font-weight: 950;
    }

    .timeline-track-person small {
        flex: 0 1 auto;
        color: var(--muted);
        font-size: .68rem;
        font-weight: 850;
    }

    .timeline-track-status {
        align-items: flex-end;
        gap: .05rem;
    }

    .timeline-track-status span {
        max-width: 7rem;
    }

    .timeline-block {
        min-width: 3.7rem;
        display: flex;
        align-items: center;
        justify-content: center;
        padding-inline: .25rem;
    }

    .timeline-actual-block {
        inset-block: 1.55rem 1.47rem;
    }

    .timeline-planned-block {
        inset-block: 2.56rem .46rem;
    }

    .timeline-break-block {
        inset-block: 1.55rem 1.47rem;
    }

    .timeline-block-label {
        display: block;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        color: currentColor;
        font-size: .58rem;
        font-weight: 950;
        line-height: 1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .timeline-hours::before,
    .timeline-hours::after {
        display: none;
    }

    .timeline-now-line {
        display: none;
    }
}

.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%);
}

.export-dialog {
    width: min(46rem, 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 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr));
    align-items: stretch;
    justify-content: stretch;
    margin-top: 1rem;
}

.modal-actions > * {
    width: 100%;
    justify-content: center;
}

.success-message {
    background: rgba(31, 122, 62, .1);
    border-color: rgba(31, 122, 62, .28);
    color: #175a2d;
}

.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);
}

.nav-section-link {
    display: block;
    padding: .85rem .95rem;
    color: inherit;
    text-decoration: none;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

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

.nav-section-link > span > span {
    color: #fffaf3;
    font-size: .92rem;
    font-weight: 950;
}

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

.nav-section-link:hover,
.nav-section-link:focus-visible {
    border-color: rgba(242, 183, 5, .42);
    background: rgba(242, 183, 5, .13);
    transform: translateX(2px);
    outline: none;
}

.nav-section-link.is-active {
    border-color: rgba(242, 183, 5, .62);
    background: rgba(242, 183, 5, .16);
}

.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);
}

.switch-field {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 3rem;
    padding: .55rem .75rem;
    border: 1px solid var(--line);
    border-radius: .75rem;
    background: #fff;
    cursor: pointer;
}

.switch-field input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.switch-control {
    position: relative;
    flex: 0 0 auto;
    width: 2.75rem;
    height: 1.45rem;
    border: 1px solid #d8cec1;
    border-radius: 999px;
    background: #e9e2d8;
    box-shadow: inset 0 1px 2px rgba(41, 31, 19, .08);
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.switch-control::after {
    content: "";
    position: absolute;
    top: .14rem;
    left: .14rem;
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 8px rgba(41, 31, 19, .22);
    transition: transform .18s ease;
}

.switch-field input[type="checkbox"]:checked ~ .switch-control {
    border-color: var(--brand);
    background: var(--brand);
    box-shadow: inset 0 1px 2px rgba(41, 31, 19, .12), 0 0 0 .2rem rgba(242, 183, 5, .16);
}

.switch-field input[type="checkbox"]:checked ~ .switch-control::after {
    transform: translateX(1.28rem);
}

.switch-field input[type="checkbox"]:focus-visible ~ .switch-control {
    outline: 3px solid rgba(242, 183, 5, .34);
    outline-offset: 3px;
}

.switch-field:has(input[type="checkbox"]:disabled) {
    cursor: default;
    background: #f8f2e8;
}

.switch-copy {
    display: block;
    min-width: 0;
    flex: 1 1 auto;
}

.switch-copy strong {
    color: var(--text);
    font-size: .9rem;
    font-weight: 900;
    line-height: 1.15;
}

.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; }

.pause-lock-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(21, 21, 21, .72);
    backdrop-filter: blur(8px);
}

.pause-lock-panel {
    width: min(100%, 31rem);
    display: grid;
    gap: 1rem;
    padding: clamp(1.15rem, 4vw, 1.65rem);
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 1.15rem;
    background: #fffaf3;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .32);
    text-align: center;
}

.pause-lock-panel h2 {
    margin: 0;
    font-size: clamp(1.35rem, 4vw, 1.9rem);
    line-height: 1.1;
}

.pause-lock-timer {
    display: block;
    font-variant-numeric: tabular-nums;
    font-size: clamp(2.25rem, 12vw, 4.6rem);
    line-height: 1;
    letter-spacing: 0;
}

.pause-lock-hint {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.pause-lock-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
}

.pause-lock-actions > * {
    min-height: 3.25rem;
}

@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;
    }

    .pause-lock-actions {
        grid-template-columns: 1fr;
    }
}

.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,
.admin-tabs button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.65rem;
    border: 0;
    border-radius: .8rem;
    background: transparent;
    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,
.admin-tabs button:hover,
.admin-tabs button:focus-visible,
.admin-tabs button.is-active {
    background: #151515;
    color: #fffaf3;
    outline: none;
}

.master-data-tabs {
    margin-bottom: .9rem;
}

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

.color-swatch-label {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 850;
}

.color-swatch-label i {
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    background: var(--swatch-color, #151515);
    box-shadow: inset 0 0 0 1px rgba(21, 21, 21, .16);
}

.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) {
    .team-table.employee-admin-table {
        min-width: 0;
        width: 100%;
    }

    .team-table.employee-admin-table .table-row {
        grid-template-columns: minmax(0, 1.45fr) minmax(5.4rem, .55fr) minmax(8rem, .78fr) minmax(5.4rem, .5fr) minmax(5.6rem, .5fr);
        gap: .55rem;
    }

    .team-table.employee-admin-table .table-row > span:nth-child(3),
    .team-table.employee-admin-table .table-row > span:nth-child(6),
    .team-table.employee-admin-table .table-row > span:nth-child(7) {
        display: none;
    }

    .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;
    }
}

@media (max-width: 760px) {
    .employee-admin-table-scroll {
        overflow-x: visible;
    }

    .employee-admin-table,
    .responsive-table {
        min-width: 0;
        width: 100%;
    }

    .responsive-table .table-head,
    .employee-admin-table .table-head {
        display: none;
    }

    .responsive-table .table-row,
    .time-review-table .table-row,
    .correction-review-table .table-row,
    .absence-table .table-row,
    .roles-table .table-row,
    .documents-table .table-row,
    .settings-audit-table .table-row,
    .time-review-table.employee-admin-table .table-row,
    .absence-table.employee-admin-table .table-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: .65rem;
        padding: .9rem;
        border-radius: 1rem;
        box-shadow: 0 10px 26px rgba(24, 18, 12, .06);
    }

    .responsive-table .table-row > span,
    .employee-admin-table .table-row > span {
        min-width: 0;
        display: grid;
        grid-template-columns: minmax(6.8rem, .42fr) minmax(0, 1fr);
        gap: .7rem;
        align-items: start;
        padding-block: .35rem;
        border-bottom: 1px solid rgba(31, 27, 22, .08);
        overflow-wrap: anywhere;
    }

    .responsive-table .table-row > span:last-child,
    .employee-admin-table .table-row > span:last-child {
        border-bottom: 0;
    }

    .responsive-table .table-row > span[data-label]::before,
    .employee-admin-table .table-row > span[data-label]::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: .72rem;
        font-weight: 950;
        letter-spacing: .04em;
        line-height: 1.35;
        text-transform: uppercase;
    }

    .responsive-table .table-row > span:not([data-label]),
    .employee-admin-table .table-row > span:not([data-label]) {
        grid-template-columns: 1fr;
    }

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

    .team-table.employee-admin-table .table-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(5.8rem, max-content);
        gap: .5rem;
        align-items: center;
        padding: .7rem .75rem;
        border-radius: .7rem;
        box-shadow: none;
    }

    .team-table.employee-admin-table .table-row > span {
        display: block;
        min-width: 0;
        padding: 0;
        border-bottom: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .team-table.employee-admin-table .table-row > span[data-label]::before {
        content: none;
    }

    .team-table.employee-admin-table .table-row > span:nth-child(2),
    .team-table.employee-admin-table .table-row > span:nth-child(3),
    .team-table.employee-admin-table .table-row > span:nth-child(4),
    .team-table.employee-admin-table .table-row > span:nth-child(6),
    .team-table.employee-admin-table .table-row > span:nth-child(7),
    .team-table.employee-admin-table .table-row > span:nth-child(8) {
        display: none;
    }

    .team-table.employee-admin-table .table-row > span:nth-child(5) {
        justify-self: end;
        text-align: right;
        white-space: nowrap;
    }
}

@media (max-width: 420px) {
    .responsive-table .table-row > span,
    .employee-admin-table .table-row > span {
        grid-template-columns: 1fr;
        gap: .25rem;
    }

    .team-table.employee-admin-table .table-row {
        grid-template-columns: minmax(0, 1fr) minmax(4.8rem, max-content);
    }
}

/* 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 workshop management 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);
    cursor: context-menu;
}

.month-calendar-day .calendar-entry.is-context-highlighted {
    outline: 3px solid rgba(177, 27, 34, .82);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(177, 27, 34, .14), 0 10px 24px rgba(66, 24, 18, .2);
}

.calendar-context-menu {
    grid-template-columns: 1fr;
    min-width: 15rem;
    max-width: min(20rem, calc(100vw - 1.5rem));
}

.calendar-context-menu button.danger {
    color: #991b1b;
}

.calendar-context-menu button.danger:hover,
.calendar-context-menu button.danger:focus-visible {
    background: #991b1b;
    color: #fffaf3;
}

.calendar-context-menu button.subtle-danger {
    color: #7f1d1d;
    background: rgba(153, 27, 27, .08);
}

.calendar-context-menu .context-menu-note {
    display: block;
    padding: .1rem .65rem .45rem;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 750;
}

.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;
}

.long-press-action {
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.break-reason-settings .table-row {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, .7fr) minmax(0, .55fr);
}

.break-reason-button-grid {
    display: grid;
    gap: .7rem;
    margin-top: .35rem;
}

.break-reason-choice-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.25rem;
    width: 100%;
    padding: .85rem 1rem;
    border: 1px solid rgba(21, 21, 21, .1);
    border-radius: .8rem;
    background: var(--break-reason-color, #f59e0b);
    color: var(--break-reason-text-color, #151515);
    box-shadow: 0 12px 24px rgba(21, 21, 21, .12);
    font-weight: 950;
    line-height: 1.15;
    text-align: center;
    cursor: pointer;
}

.break-reason-choice-button:hover,
.break-reason-choice-button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(21, 21, 21, .16);
}

.break-reason-choice-button:active {
    transform: translateY(0);
    box-shadow: 0 8px 16px rgba(21, 21, 21, .12);
}

.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;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

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

.context-timeline-row {
    cursor: context-menu;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.context-timeline-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: flex;
    flex-direction: column;
    gap: .2rem;
    min-width: 15rem;
    max-width: min(20rem, calc(100vw - 1.5rem));
    padding: .4rem;
    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;
    justify-content: flex-start;
    width: 100%;
    min-height: 2.55rem;
    padding: .72rem .85rem;
    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);
}

.break-editor-meta,
.break-editor-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: .75rem;
    align-items: end;
}

.break-editor-meta {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin-bottom: 1rem;
}

.break-editor-list {
    display: grid;
    gap: .65rem;
    margin-bottom: .75rem;
}

.break-editor-meta label,
.break-editor-row label {
    display: grid;
    gap: .35rem;
    color: rgba(21, 21, 21, .72);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.break-editor-meta input,
.break-editor-row input {
    width: 100%;
    min-height: 2.75rem;
    border: 1px solid rgba(21, 21, 21, .12);
    border-radius: .75rem;
    padding: .65rem .75rem;
    background: #fffaf3;
    color: #151515;
    font: inherit;
    font-weight: 800;
}

.break-editor-meta input:disabled {
    color: rgba(21, 21, 21, .72);
}

.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;
    }

    .break-editor-meta,
    .break-editor-row {
        grid-template-columns: 1fr;
    }
}

.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-actions > * {
    min-width: 11.5rem;
    justify-content: center;
}

.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;
    }
}

.time-tracking-shell.kiosk-layout {
    grid-template-columns: minmax(0, 1fr);
}

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

.kiosk-lock-screen {
    width: min(920px, 100%);
}

.kiosk-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.kiosk-topline h1 {
    margin-bottom: .5rem;
}

.kiosk-exit-button {
    flex: 0 0 auto;
}

.kiosk-exit-dialog label span {
    display: block;
    margin-bottom: .45rem;
    color: var(--muted);
    font-weight: 850;
}

.profile-settings-layout {
    align-items: start;
}

@media (max-width: 720px) {
    .kiosk-topline {
        display: grid;
    }

    .kiosk-exit-button {
        justify-self: start;
    }
}

.work-time-composite {
    display: grid;
    gap: .75rem;
    padding: .9rem;
    border: 1px solid var(--line);
    border-radius: 1.15rem;
    background: linear-gradient(135deg, #fffaf3, #f8f0e4);
}

.work-time-composite-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    color: var(--brand-dark);
}

.work-time-composite-header span {
    color: var(--brand-dark) !important;
    font-size: .88rem;
    font-weight: 950;
}

.work-time-composite-header small {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 850;
}

.work-time-control-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(14rem, 1.35fr);
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: var(--surface-strong);
}

.work-time-control-row label {
    gap: .25rem !important;
    padding: .75rem;
    background: transparent;
}

.work-time-control-row label + label,
.work-time-pause-group {
    border-left: 1px solid var(--line);
}

.work-time-control-row input {
    border: 0;
    border-radius: .7rem;
    padding: .55rem 0 0;
    background: transparent;
    box-shadow: none !important;
    color: var(--text);
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: -.03em;
}

.work-time-control-row input:focus {
    box-shadow: none !important;
}

.work-time-pause-group {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
    gap: .55rem;
    align-items: center;
    padding: .55rem .75rem;
    background: rgba(242, 183, 5, .12);
}

.work-time-pause-group label {
    padding: 0;
}

.work-time-pause-group label + label {
    border-left: 0;
}

.pause-group-label {
    display: inline-flex;
    align-items: center;
    align-self: stretch;
    padding: 0 .7rem;
    border-radius: .75rem;
    background: rgba(242, 183, 5, .22);
    color: var(--brand-dark) !important;
    font-size: .78rem !important;
    font-weight: 950;
    letter-spacing: .06em;
    text-transform: uppercase;
}

@media (max-width: 760px) {
    .work-time-control-row,
    .work-time-pause-group {
        grid-template-columns: 1fr;
    }

    .work-time-control-row label + label,
    .work-time-pause-group {
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .work-time-pause-group label {
        padding: .25rem 0;
    }

    .pause-group-label {
        justify-content: center;
        min-height: 2.25rem;
    }
}

.work-time-composite {
    margin: 0;
    min-width: 0;
}

.work-time-legend {
    float: left;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.work-time-explainer {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem .9rem;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 850;
}

.work-time-explainer span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.legend-dot {
    width: .62rem;
    height: .62rem;
    border-radius: 999px;
    flex: 0 0 auto;
}

.legend-dot.work-dot {
    background: #151515;
}

.legend-dot.pause-dot {
    background: var(--brand);
    box-shadow: 0 0 0 .22rem rgba(242, 183, 5, .18);
}

.booking-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(18rem, .7fr);
    gap: 1rem;
}

.hp-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.calendar-mini-list {
    display: grid;
    gap: .65rem;
}

.calendar-mini-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: .75rem;
    align-items: center;
    width: 100%;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: .85rem;
    background: rgba(15, 23, 42, .52);
    color: inherit;
    padding: .75rem;
    text-align: left;
}

.calendar-mini-row.is-active,
.calendar-mini-row:hover:not(:disabled) {
    border-color: rgba(34, 211, 238, .7);
}

.calendar-mini-row.is-muted,
.calendar-mini-row:disabled {
    opacity: .55;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.row-actions button,
.calendar-mini-row button {
    border: 1px solid rgba(148, 163, 184, .25);
    border-radius: 999px;
    background: rgba(15, 23, 42, .7);
    color: inherit;
    padding: .35rem .6rem;
}

@media (max-width: 860px) {
    .booking-grid {
        grid-template-columns: 1fr;
    }

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

.admin-table tr.is-selected {
    outline: 1px solid rgba(34, 211, 238, .75);
    outline-offset: -1px;
    background: rgba(34, 211, 238, .08);
}

.context-action-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-top: 1rem;
    padding: .75rem;
    border: 1px solid rgba(34, 211, 238, .35);
    border-radius: .9rem;
    background: rgba(15, 23, 42, .78);
}

.context-action-bar button {
    border: 1px solid rgba(148, 163, 184, .25);
    border-radius: 999px;
    background: rgba(15, 23, 42, .7);
    color: inherit;
    padding: .4rem .7rem;
}

.booking-shell {
    display: grid;
    gap: 1.2rem;
    max-width: 72rem;
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2rem);
}

.booking-intro-card,
.booking-process-card {
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 1.4rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, .92), rgba(15, 23, 42, .74));
    box-shadow: 0 1.4rem 4rem rgba(2, 6, 23, .32);
    padding: clamp(1rem, 3vw, 1.6rem);
}

.booking-intro-card h1,
.booking-step-panel h2 {
    margin: .2rem 0 .45rem;
}

.booking-intro-card p,
.step-heading p {
    max-width: 46rem;
    color: rgba(226, 232, 240, .78);
}

.booking-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .65rem;
    margin: 1.2rem 0 0;
    padding: 0;
    list-style: none;
}

.booking-steps li {
    display: flex;
    align-items: center;
    gap: .45rem;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 999px;
    padding: .55rem .7rem;
    color: rgba(226, 232, 240, .7);
    background: rgba(15, 23, 42, .55);
    font-size: .9rem;
}

.booking-steps span {
    display: grid;
    place-items: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, .18);
    font-size: .78rem;
    font-weight: 800;
}

.booking-steps li.is-current,
.booking-steps li.is-done {
    border-color: rgba(34, 211, 238, .55);
    color: #f8fafc;
}

.booking-steps li.is-current span,
.booking-steps li.is-done span {
    background: linear-gradient(135deg, #22d3ee, #a3e635);
    color: #031316;
}

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

.choice-grid,
.slot-grid,
.guided-form-grid {
    display: grid;
    gap: .75rem;
}

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

.choice-card,
.slot-chip {
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 1rem;
    background: rgba(15, 23, 42, .62);
    color: inherit;
    padding: .9rem;
    text-align: left;
}

.choice-card strong,
.choice-card span,
.choice-card small,
.slot-chip strong,
.slot-chip span {
    display: block;
}

.choice-card small,
.slot-chip span {
    color: rgba(226, 232, 240, .64);
}

.choice-card.is-selected,
.slot-chip.is-selected {
    border-color: rgba(34, 211, 238, .75);
    background: rgba(34, 211, 238, .11);
}

.slot-layout {
    display: grid;
    grid-template-columns: minmax(16rem, .75fr) minmax(0, 1.25fr);
    gap: 1rem;
}

.slot-grid {
    grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
    align-content: start;
}

.slot-chip:disabled {
    opacity: .36;
}

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

.guided-form-grid label {
    display: grid;
    gap: .35rem;
    color: rgba(226, 232, 240, .74);
    font-weight: 700;
}

.guided-form-grid input,
.guided-form-grid textarea {
    border: 1px solid rgba(148, 163, 184, .25);
    border-radius: .85rem;
    background: rgba(2, 6, 23, .48);
    color: #f8fafc;
    padding: .75rem .85rem;
}

.full-span {
    grid-column: 1 / -1;
}

.check-answers {
    display: grid;
    gap: .65rem;
    margin: 0;
}

.check-answers div {
    display: grid;
    grid-template-columns: 10rem 1fr;
    gap: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, .14);
    padding: .65rem 0;
}

.check-answers dt {
    color: rgba(226, 232, 240, .58);
}

.check-answers dd {
    margin: 0;
    color: #f8fafc;
    font-weight: 700;
}

.step-actions {
    display: flex;
    justify-content: flex-end;
    gap: .65rem;
    padding-top: .4rem;
}

@media (max-width: 760px) {
    .booking-steps,
    .choice-grid,
    .slot-layout,
    .guided-form-grid {
        grid-template-columns: 1fr;
    }

    .check-answers div {
        grid-template-columns: 1fr;
        gap: .2rem;
    }

    .step-actions {
        flex-direction: column-reverse;
    }

    .step-actions .primary-action,
    .step-actions .ghost-button {
        width: 100%;
        text-align: center;
    }
}

/* Workshop admin ribbon scaffold */
.workshop-admin-page {
    display: grid;
    gap: 1rem;
    color: #f8fafc;
    background: linear-gradient(135deg, rgba(15, 23, 42, .94), rgba(15, 23, 42, .82));
}

.workshop-page-header {
    display: flex;
    align-items: center;
    gap: .8rem;
    min-height: 3rem;
}

.workshop-page-header h1 {
    margin: .1rem 0 0;
    font-size: clamp(1.25rem, 3vw, 2rem);
    letter-spacing: -.04em;
}

.workshop-burger {
    display: inline-grid;
    place-items: center;
    gap: .22rem;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: .9rem;
    background: rgba(2, 6, 23, .5);
}

.workshop-burger span {
    display: block;
    width: 1.15rem;
    height: .13rem;
    border-radius: 999px;
    background: #f8fafc;
}

.ribbon {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 1rem;
    background: rgba(2, 6, 23, .38);
}

.ribbon-tabs {
    display: flex;
    gap: .35rem;
    padding: .45rem .55rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, .14);
}

.ribbon-tab {
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: .75rem .75rem 0 0;
    background: transparent;
    color: rgba(226, 232, 240, .72);
    padding: .55rem .8rem;
    font-weight: 900;
}

.ribbon-tab.is-active {
    border-color: rgba(148, 163, 184, .18);
    background: rgba(15, 23, 42, .78);
    color: #f8fafc;
}

.ribbon-body {
    display: flex;
    gap: .8rem;
    padding: .8rem;
}

.ribbon-group {
    display: grid;
    gap: .45rem;
    min-width: 12rem;
}

.ribbon-group-title {
    color: rgba(226, 232, 240, .62);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.ribbon-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.ribbon-action {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 2.8rem;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: .85rem;
    background: rgba(15, 23, 42, .72);
    color: #f8fafc;
    padding: .55rem .75rem;
    font-weight: 900;
}

.ribbon-action.is-primary {
    border-color: rgba(242, 183, 5, .42);
    background: var(--brand);
    color: var(--brand-dark);
}

.material-symbol {
    font-size: 1.1rem;
    line-height: 1;
}

.workshop-summary-strip {
    margin: 0;
}

.workshop-calendar-panel {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 1.1rem;
    background: rgba(2, 6, 23, .36);
}

.workshop-calendar-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, .14);
}

.workshop-calendar-header h2 {
    margin: 0;
}

.workshop-calendar-header span {
    color: rgba(226, 232, 240, .68);
    font-weight: 800;
}

.workshop-week-calendar {
    display: grid;
    grid-template-columns: 4.5rem repeat(7, minmax(8.5rem, 1fr));
    grid-template-rows: 3rem minmax(42rem, calc(var(--hour-count) * 4.7rem));
    overflow-x: auto;
}

.workshop-calendar-corner,
.workshop-day-header {
    background: rgba(15, 23, 42, .86);
    border-bottom: 1px solid rgba(148, 163, 184, .12);
}

.workshop-day-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    border-left: 1px solid rgba(148, 163, 184, .1);
    text-transform: uppercase;
}

.workshop-time-grid {
    display: grid;
    grid-template-rows: repeat(var(--hour-count), 1fr) 0;
    border-right: 1px solid rgba(148, 163, 184, .12);
    background: rgba(2, 6, 23, .24);
}

.workshop-time-grid div {
    display: flex;
    justify-content: flex-end;
    padding: .45rem .5rem 0 0;
    border-top: 1px solid rgba(148, 163, 184, .1);
    color: rgba(226, 232, 240, .5);
    font-size: .76rem;
}

.workshop-day-column {
    position: relative;
    display: grid;
    grid-template-rows: repeat(var(--hour-count), 1fr);
    min-width: 8.5rem;
    border-left: 1px solid rgba(148, 163, 184, .1);
}

.workshop-hour-line {
    border-top: 1px solid rgba(148, 163, 184, .1);
}

.workshop-calendar-card {
    position: absolute;
    z-index: 2;
    display: grid;
    gap: .1rem;
    min-height: 2.7rem;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, .48);
    border-radius: .75rem;
    background: linear-gradient(135deg, rgba(14, 165, 233, .94), rgba(37, 99, 235, .82));
    box-shadow: 0 .8rem 1.8rem rgba(14, 165, 233, .18);
    color: white;
    padding: .45rem;
    text-align: left;
    cursor: pointer;
}

.workshop-calendar-card.is-overlapping {
    border-color: rgba(242, 183, 5, .8);
    box-shadow: 0 .8rem 1.8rem rgba(242, 183, 5, .14);
}

.workshop-calendar-card strong,
.workshop-calendar-card span,
.workshop-calendar-card small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workshop-calendar-card span,
.workshop-calendar-card small {
    color: rgba(255, 255, 255, .8);
    font-size: .75rem;
}

.workshop-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(2, 6, 23, .68);
    backdrop-filter: blur(.35rem);
}

.workshop-modal {
    position: relative;
    width: min(52rem, 100%);
    max-height: min(48rem, calc(100vh - 2rem));
    overflow: auto;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 1.25rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, .98), rgba(15, 23, 42, .92));
    color: #f8fafc;
    box-shadow: 0 2rem 7rem rgba(2, 6, 23, .55);
    padding: 1rem;
}

.workshop-modal-header,
.workshop-modal-actions,
.workshop-dialog-toolbar,
.workshop-inline-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.workshop-modal-header h2,
.workshop-dialog-toolbar h3 {
    margin: 0;
}

.workshop-dialog-toolbar p {
    margin: .15rem 0 0;
    color: rgba(226, 232, 240, .68);
}

.workshop-modal-close {
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 999px;
    background: rgba(2, 6, 23, .42);
    color: #f8fafc;
    font-size: 1.6rem;
    line-height: 1;
}

.workshop-popup-view {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.workshop-popup-form label,
.workshop-reason-editor label {
    color: rgba(226, 232, 240, .74);
}

.workshop-reason-editor {
    grid-template-columns: minmax(0, 1.2fr) 9rem 9rem auto auto;
    align-items: end;
}

.workshop-reasons-table-wrap {
    max-height: 24rem;
    overflow: auto;
}

.workshop-context-menu {
    position: fixed;
    z-index: 90;
    display: grid;
    gap: .25rem;
    min-width: 12rem;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: .85rem;
    background: #0f172a;
    box-shadow: 0 1rem 3rem rgba(2, 6, 23, .45);
    padding: .35rem;
}

.workshop-context-menu button {
    border: 0;
    border-radius: .55rem;
    background: transparent;
    color: #f8fafc;
    padding: .65rem .75rem;
    text-align: left;
    font-weight: 800;
}

.workshop-context-menu button:hover {
    background: rgba(34, 211, 238, .14);
}

@media (max-width: 900px) {
    .workshop-calendar-header,
    .workshop-modal-header,
    .workshop-modal-actions,
    .workshop-dialog-toolbar,
    .workshop-inline-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .workshop-week-calendar {
        grid-template-columns: 3.75rem repeat(7, minmax(7.5rem, 1fr));
    }

    .workshop-reason-editor {
        grid-template-columns: 1fr;
    }

    .ribbon-body,
    .ribbon-actions {
        flex-direction: column;
    }
}

/* Workshop admin UI alignment: use backend titlebar + light management surfaces */
.workshop-titlebar {
    pointer-events: none;
}

.workshop-admin-page {
    display: grid;
    gap: .85rem;
    color: var(--text);
    background: rgba(255, 250, 243, .9);
}

.workshop-admin-page .eyebrow {
    color: var(--warning);
}

.workshop-page-header,
.workshop-burger {
    display: none !important;
}

.workshop-admin-page .ribbon {
    border-color: var(--line);
    border-radius: 1rem;
    background: rgba(255, 250, 243, .72);
    box-shadow: none;
}

.workshop-admin-page .ribbon-tabs {
    border-bottom-color: var(--line);
    background: rgba(255, 250, 243, .55);
}

.workshop-admin-page .ribbon-tab {
    color: var(--muted);
}

.workshop-admin-page .ribbon-tab.is-active {
    border-color: var(--line);
    background: var(--surface-strong);
    color: var(--text);
}

.workshop-admin-page .ribbon-group-title {
    color: var(--muted);
}

.workshop-admin-page .ribbon-action {
    border-color: var(--line);
    background: var(--surface-strong);
    color: var(--brand-dark);
    box-shadow: 0 .5rem 1.2rem rgba(41, 31, 19, .06);
}

.workshop-admin-page .ribbon-action:hover,
.workshop-admin-page .ribbon-action:focus-visible {
    border-color: rgba(21, 21, 21, .2);
    background: #151515;
    color: #fffaf3;
    outline: none;
}

.workshop-admin-page .ribbon-action.is-primary {
    border-color: #151515;
    background: #151515;
    color: #fffaf3;
}

.workshop-admin-page .ribbon-action.is-primary:hover,
.workshop-admin-page .ribbon-action.is-primary:focus-visible {
    background: var(--brand);
    color: var(--brand-dark);
}

.workshop-calendar-panel {
    border-color: var(--line);
    background: var(--surface-strong);
    box-shadow: none;
}

.workshop-calendar-header {
    border-bottom-color: var(--line);
    background: rgba(255, 250, 243, .76);
}

.workshop-calendar-header span {
    color: var(--muted);
}

.workshop-calendar-corner,
.workshop-day-header {
    background: #fffaf3;
    border-bottom-color: var(--line);
    color: var(--text);
}

.workshop-day-header {
    border-left-color: var(--line);
}

.workshop-time-grid {
    border-right-color: var(--line);
    background: rgba(244, 241, 236, .72);
}

.workshop-time-grid div {
    border-top-color: var(--line);
    color: var(--muted);
}

.workshop-day-column {
    border-left-color: var(--line);
    background: linear-gradient(180deg, rgba(255, 250, 243, .9), rgba(244, 241, 236, .72));
}

.workshop-hour-line {
    border-top-color: var(--line);
}

.workshop-calendar-card {
    border-color: rgba(21, 21, 21, .14);
    background: #151515;
    color: #fffaf3;
    box-shadow: 0 .8rem 1.8rem rgba(41, 31, 19, .16);
}

.workshop-calendar-card.is-overlapping {
    border-color: var(--brand);
    box-shadow: 0 .8rem 1.8rem rgba(242, 183, 5, .18);
}

.workshop-calendar-card span,
.workshop-calendar-card small {
    color: rgba(255, 250, 243, .78);
}

.workshop-modal {
    background: var(--surface-strong);
    color: var(--text);
}

.workshop-modal .eyebrow,
.workshop-dialog-toolbar .eyebrow {
    color: var(--warning);
}

.workshop-dialog-toolbar p,
.workshop-popup-form label,
.workshop-reason-editor label {
    color: var(--muted);
}

.workshop-modal-close {
    border-color: var(--line);
    background: #f1e8dc;
    color: var(--brand-dark);
}

.workshop-popup-form input,
.workshop-popup-form select,
.workshop-popup-form textarea,
.workshop-reason-editor input,
.workshop-reason-editor select,
.workshop-reason-editor textarea {
    background: var(--surface-strong);
    color: var(--text);
}

@media (max-width: 980px) {
    .workshop-titlebar h1 {
        color: #151515;
    }
}

/* Generic ribbon + responsive workshop calendar interval navigation */
.workshop-titlebar {
    position: fixed;
    top: 1rem;
    left: 4.45rem;
    z-index: 65;
    display: grid;
    gap: .08rem;
    min-height: 3.1rem;
    max-width: calc(100vw - 5.6rem);
    pointer-events: none;
}

.workshop-titlebar .eyebrow {
    display: block !important;
    margin: 0;
    color: var(--warning);
    font-size: .68rem;
    font-weight: 950;
    letter-spacing: .11em;
    line-height: 1;
    text-transform: uppercase;
}

.workshop-titlebar h1 {
    overflow: hidden;
    max-width: 100%;
    margin: 0;
    color: #151515;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-weight: 950;
    line-height: 1.05;
    letter-spacing: -.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ribbon {
    border: 0 !important;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.ribbon-tabs {
    border-bottom: 0;
    padding: 0;
    background: transparent;
}

.ribbon-body {
    padding: .65rem 0 0;
}

.workshop-admin-page .ribbon,
.workshop-admin-page .ribbon-tabs {
    border: 0 !important;
    background: transparent;
}

.workshop-admin-page .ribbon-tab.is-active {
    border-color: var(--line);
    box-shadow: 0 .45rem 1rem rgba(41, 31, 19, .05);
}

.workshop-calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .45rem;
    color: var(--muted);
    font-weight: 850;
}

.workshop-calendar-nav {
    width: 2.25rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
    padding: 0;
    border-radius: .7rem;
    font-size: 1.35rem;
    line-height: 1;
}

.workshop-calendar-nav-three,
.workshop-calendar-nav-day {
    display: none;
}

.workshop-day-header {
    align-items: center;
    justify-content: space-between;
    padding: .35rem .45rem;
    text-transform: none;
}

.workshop-day-header > div {
    display: grid;
    gap: .1rem;
    min-width: 0;
}

.workshop-day-header span {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.workshop-day-header strong {
    color: var(--text);
    font-size: .9rem;
}

.workshop-day-header button {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-strong);
    color: var(--brand-dark);
    padding: .28rem .55rem;
    font-size: .72rem;
    font-weight: 900;
}

.workshop-day-header button:hover,
.workshop-day-header button:focus-visible {
    border-color: #151515;
    background: #151515;
    color: #fffaf3;
    outline: none;
}

@media (max-width: 1000px) {
    .workshop-calendar-nav-week {
        display: none;
    }

    .workshop-calendar-nav-three {
        display: inline-flex;
    }

    .workshop-week-calendar {
        grid-template-columns: 4.25rem repeat(3, minmax(11rem, 1fr));
    }

    .workshop-day-offset-3,
    .workshop-day-offset-4,
    .workshop-day-offset-5,
    .workshop-day-offset-6 {
        display: none;
    }
}

@media (max-width: 764px) {
    .workshop-titlebar {
        top: .98rem;
        left: 4.3rem;
    }

    .workshop-titlebar .eyebrow {
        font-size: .58rem;
    }

    .workshop-titlebar h1 {
        font-size: .98rem;
    }

    .workshop-calendar-header {
        align-items: stretch;
        flex-direction: column;
    }

    .workshop-calendar-toolbar {
        justify-content: space-between;
    }

    .workshop-calendar-toolbar span {
        flex: 1;
        min-width: 0;
        text-align: center;
    }

    .workshop-calendar-nav-three {
        display: none;
    }

    .workshop-calendar-nav-day {
        display: inline-flex;
    }

    .workshop-week-calendar {
        grid-template-columns: 3.8rem minmax(14rem, 1fr);
        grid-template-rows: 3.25rem minmax(42rem, calc(var(--hour-count) * 4.7rem));
    }

    .workshop-day-offset-1,
    .workshop-day-offset-2,
    .workshop-day-offset-3,
    .workshop-day-offset-4,
    .workshop-day-offset-5,
    .workshop-day-offset-6 {
        display: none;
    }

    .workshop-day-header button {
        padding-inline: .7rem;
    }
}

/* Workshop 15-minute selection and customer/vehicle order flow */
.workshop-slot-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    grid-template-rows: repeat(var(--slot-count), 1fr);
}

.workshop-slot-marker {
    min-height: 0;
    border-top: 1px solid transparent;
    cursor: crosshair;
}

.workshop-slot-marker:hover,
.workshop-slot-marker.is-selecting {
    background: rgba(242, 183, 5, .18);
    border-top-color: rgba(242, 183, 5, .45);
}

.workshop-slot-marker.is-selecting {
    box-shadow: inset 0 0 0 1px rgba(242, 183, 5, .38);
}

.workshop-calendar-card {
    z-index: 3;
}

.workshop-selected-vehicle-card {
    display: grid;
    gap: .15rem;
    border: 1px solid rgba(242, 183, 5, .45);
    border-radius: 1rem;
    background: rgba(242, 183, 5, .12);
    padding: .85rem;
}

.workshop-selected-vehicle-card span,
.workshop-selected-vehicle-card small {
    color: var(--muted);
    font-weight: 750;
}

.vehicle-choice-backdrop {
    position: fixed;
    inset: 0;
    z-index: 95;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(21, 21, 21, .48);
    backdrop-filter: blur(2px);
}

.vehicle-choice-dialog {
    width: min(42rem, 100%);
    max-height: min(36rem, calc(100vh - 2rem));
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 1.25rem;
    background: var(--surface-strong);
    box-shadow: 0 2rem 7rem rgba(41, 31, 19, .3);
    padding: 1rem;
}

.vehicle-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: .75rem;
    margin-top: 1rem;
}

.vehicle-choice-card {
    display: grid;
    gap: .25rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #fffaf3;
    color: var(--text);
    padding: .9rem;
    text-align: left;
}

.vehicle-choice-card:hover,
.vehicle-choice-card:focus-visible {
    border-color: #151515;
    outline: none;
}

.vehicle-choice-card span,
.vehicle-choice-card small {
    color: var(--muted);
}

/* Workshop customers and vehicle history */
.workshop-customers-view {
    display: grid;
    grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
    gap: 1rem;
    min-height: 34rem;
}

.workshop-customer-list,
.workshop-customer-detail,
.workshop-vehicle-editor {
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    background: rgba(255, 250, 243, .72);
    padding: 1rem;
}

.workshop-customer-list {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    max-height: 35rem;
    overflow: auto;
}

.workshop-section-header.compact {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .75rem;
}

.workshop-section-header.with-gap {
    margin-top: 1rem;
}

.workshop-customer-row {
    display: grid;
    gap: .15rem;
    border: 1px solid transparent;
    border-radius: .9rem;
    background: #fffaf3;
    color: var(--text);
    padding: .8rem;
    text-align: left;
}

.workshop-customer-row:hover,
.workshop-customer-row.is-active {
    border-color: #151515;
    box-shadow: 0 .65rem 1.5rem rgba(41, 31, 19, .08);
}

.workshop-customer-row span,
.workshop-customer-row small,
.workshop-vehicle-management-card span,
.workshop-vehicle-management-card small,
.vehicle-history-list span,
.vehicle-history-list small {
    color: var(--muted);
}

.workshop-customer-detail {
    min-width: 0;
    max-height: 35rem;
    overflow: auto;
}

.workshop-inline-actions {
    display: flex;
    justify-content: flex-end;
    gap: .65rem;
    margin-top: .8rem;
}

.workshop-vehicle-list {
    display: grid;
    gap: .8rem;
}

.workshop-vehicle-management-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .75rem;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #fffaf3;
    padding: .9rem;
}

.workshop-vehicle-management-card > div {
    display: grid;
    gap: .2rem;
}

.workshop-vehicle-management-card details {
    grid-column: 1 / -1;
}

.workshop-vehicle-management-card summary {
    cursor: pointer;
    font-weight: 850;
}

.vehicle-history-list {
    display: grid;
    gap: .5rem;
    margin-top: .65rem;
}

.vehicle-history-list > div {
    display: grid;
    gap: .1rem;
    border-top: 1px solid var(--line);
    padding-top: .5rem;
}

.primary-action.small,
.ghost-button.small {
    min-height: 2.2rem;
    padding: .35rem .65rem;
    font-size: .82rem;
}

@media (max-width: 900px) {
    .workshop-customers-view {
        grid-template-columns: 1fr;
    }

    .workshop-customer-list,
    .workshop-customer-detail {
        max-height: none;
    }
}

/* Workshop toast feedback */
.workshop-toast {
    position: fixed;
    right: clamp(1rem, 3vw, 2rem);
    bottom: clamp(1rem, 3vw, 2rem);
    z-index: 120;
    display: grid;
    gap: .15rem;
    width: min(24rem, calc(100vw - 2rem));
    border: 1px solid var(--line);
    border-left: .35rem solid #151515;
    border-radius: 1rem;
    background: rgba(255, 250, 243, .98);
    box-shadow: 0 1.25rem 4rem rgba(41, 31, 19, .22);
    padding: .9rem 1rem;
    color: var(--text);
    animation: workshop-toast-in .18s ease-out;
}

.workshop-toast.is-success {
    border-left-color: #15803d;
}

.workshop-toast.is-error {
    border-left-color: #b91c1c;
}

.workshop-toast span {
    color: var(--muted);
    font-weight: 750;
}

@keyframes workshop-toast-in {
    from {
        opacity: 0;
        transform: translateY(.5rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Workshop calendar status accents */
.workshop-calendar-card.is-requested {
    border-color: rgba(242, 183, 5, .82);
    background: linear-gradient(135deg, #f2b705, #d97706);
    color: #151515;
}

.workshop-calendar-card.is-requested span,
.workshop-calendar-card.is-requested small {
    color: rgba(21, 21, 21, .78);
}

.workshop-calendar-card.is-completed {
    border-color: rgba(21, 128, 61, .6);
    background: linear-gradient(135deg, #15803d, #166534);
}

.workshop-calendar-card.is-muted {
    opacity: .58;
    filter: grayscale(.25);
}

/* Workshop calendar readability: duration blocks + selected action bar */
.workshop-calendar-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 0;
    border-width: 2px;
    border-radius: .9rem;
    padding: .5rem .55rem;
    background-image:
        linear-gradient(135deg, rgba(21, 21, 21, .98), rgba(21, 21, 21, .86)),
        repeating-linear-gradient(to bottom, transparent 0, transparent calc(25% - 1px), rgba(255, 250, 243, .16) calc(25% - 1px), rgba(255, 250, 243, .16) 25%);
}

.workshop-calendar-card::before {
    content: "";
    position: absolute;
    inset: .35rem auto .35rem .28rem;
    width: .22rem;
    border-radius: 999px;
    background: currentColor;
    opacity: .72;
}

.workshop-calendar-card strong {
    font-size: .84rem;
    line-height: 1.12;
}

.workshop-calendar-card span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: .22rem;
    border-radius: 999px;
    background: rgba(255, 250, 243, .14);
    padding: .12rem .42rem;
    font-size: .78rem;
    font-weight: 900;
}

.workshop-calendar-card small {
    margin-top: .22rem;
    font-size: .72rem;
    font-weight: 750;
    line-height: 1.18;
    white-space: normal;
}

.workshop-calendar-card.is-requested {
    background-image:
        linear-gradient(135deg, rgba(242, 183, 5, .96), rgba(217, 119, 6, .9)),
        repeating-linear-gradient(to bottom, transparent 0, transparent calc(25% - 1px), rgba(21, 21, 21, .18) calc(25% - 1px), rgba(21, 21, 21, .18) 25%);
}

.workshop-calendar-card.is-requested span {
    background: rgba(21, 21, 21, .12);
}

.context-action-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(4, auto);
    align-items: center;
    gap: .65rem;
    border-color: rgba(21, 21, 21, .12);
    background: #fffaf3;
    color: #151515;
    box-shadow: 0 .8rem 2rem rgba(41, 31, 19, .08);
    padding: .9rem;
}

.context-action-bar strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .95rem;
}

.context-action-bar button {
    border-color: rgba(21, 21, 21, .18);
    background: #151515;
    color: #fffaf3;
    font-weight: 850;
    min-height: 2.25rem;
}

.context-action-bar button:hover,
.context-action-bar button:focus-visible {
    border-color: var(--brand);
    background: var(--brand);
    color: #151515;
    outline: none;
}

@media (max-width: 760px) {
    .context-action-bar {
        grid-template-columns: 1fr 1fr;
    }

    .context-action-bar strong {
        grid-column: 1 / -1;
        white-space: normal;
    }
}

/* Workshop customer tab table + detail popup */
.workshop-customers-panel {
    display: grid;
    gap: .85rem;
}

.workshop-customers-panel .workshop-section-header h2 {
    margin: .15rem 0 0;
}

.workshop-customers-panel .workshop-section-header > span {
    align-self: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fffaf3;
    padding: .35rem .7rem;
    color: var(--muted);
    font-weight: 850;
}

.workshop-customer-table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #fffaf3;
}

.workshop-customer-table {
    width: 100%;
    border-collapse: collapse;
}

.workshop-customer-table th,
.workshop-customer-table td {
    padding: .75rem .85rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.workshop-customer-table th {
    color: var(--muted);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.workshop-customer-table tbody tr {
    cursor: pointer;
}

.workshop-customer-table tbody tr:hover,
.workshop-customer-table tbody tr:focus-visible {
    background: rgba(242, 183, 5, .12);
    outline: none;
}

.workshop-customer-table small {
    color: var(--muted);
    font-weight: 750;
}

.workshop-customer-detail-view {
    display: grid;
    gap: 1rem;
}

.workshop-customer-detail-card {
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    background: rgba(255, 250, 243, .72);
    padding: 1rem;
}

@media (max-width: 760px) {
    .workshop-customer-table th:nth-child(3),
    .workshop-customer-table td:nth-child(3),
    .workshop-customer-table th:nth-child(5),
    .workshop-customer-table td:nth-child(5) {
        display: none;
    }
}

/* Workshop booking reasons tab */
.workshop-reasons-panel {
    display: grid;
    gap: .85rem;
}

.workshop-reasons-panel .workshop-section-header h2 {
    margin: .15rem 0 0;
}

.workshop-reasons-panel .workshop-section-header > span {
    align-self: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fffaf3;
    padding: .35rem .7rem;
    color: var(--muted);
    font-weight: 850;
}

.workshop-reasons-overview-table tbody tr {
    cursor: pointer;
}

.status-chip.is-muted {
    opacity: .65;
    filter: grayscale(.3);
}

.workshop-reason-detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: .65rem;
    margin-top: 1rem;
}

.ghost-button.danger {
    border-color: rgba(185, 28, 28, .28);
    color: #991b1b;
}

.ghost-button.danger:hover,
.ghost-button.danger:focus-visible {
    border-color: #991b1b;
    background: #991b1b;
    color: #fffaf3;
}

/* Workshop selected appointment edit action */
.context-action-bar {
    grid-template-columns: minmax(0, 1fr) repeat(5, auto);
}

/* Workshop admin lists use the shared admin-table-row pattern */
.workshop-admin-list {
    gap: .55rem;
}

.workshop-table-button {
    width: 100%;
    border: 1px solid var(--line);
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.workshop-table-button:hover,
.workshop-table-button:focus-visible {
    border-color: rgba(21, 21, 21, .22);
    background: #fff;
    box-shadow: 0 .65rem 1.5rem rgba(41, 31, 19, .06);
    outline: none;
}

.workshop-admin-list .admin-table-head {
    pointer-events: none;
}

.workshop-admin-list .status-chip {
    width: fit-content;
}


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

/* Workshop customer detail redesign */
.workshop-modal:has(.compact-detail) {
    width: min(58rem, 100%);
}

.workshop-customer-detail-view.compact-detail {
    gap: .85rem;
}

.workshop-detail-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid rgba(21, 21, 21, .1);
    border-radius: 1rem;
    background: #151515;
    color: #fffaf3;
    padding: 1rem;
}

.workshop-detail-summary h3 {
    margin: .15rem 0 .2rem;
    font-size: 1.25rem;
}

.workshop-detail-summary span,
.workshop-detail-summary .eyebrow {
    color: rgba(255, 250, 243, .72);
}

.workshop-detail-summary strong {
    border-radius: 999px;
    background: rgba(255, 250, 243, .12);
    padding: .45rem .75rem;
    white-space: nowrap;
}

.workshop-detail-section {
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #fffaf3;
    padding: .9rem;
}

.workshop-detail-section .workshop-section-header.compact {
    margin-bottom: .65rem;
}

.workshop-detail-section .workshop-section-header h3 {
    margin: .1rem 0 0;
}

.workshop-compact-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
}

.workshop-compact-form label {
    display: grid;
    gap: .25rem;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: .01em;
}

.workshop-compact-form input,
.workshop-compact-form textarea {
    min-height: 2.3rem;
    border: 1px solid var(--line);
    border-radius: .7rem;
    background: #fff;
    color: var(--text);
    padding: .42rem .6rem;
    font: inherit;
    font-size: .9rem;
}

.workshop-compact-form textarea {
    resize: vertical;
}

.workshop-compact-form .full-span {
    grid-column: 1 / -1;
}

.compact-actions {
    justify-content: flex-end;
    margin-top: .7rem;
}

.workshop-inline-editor {
    border: 1px dashed rgba(21, 21, 21, .18);
    border-radius: .9rem;
    background: rgba(244, 241, 236, .6);
    padding: .8rem;
    margin-bottom: .8rem;
}

.workshop-vehicle-table {
    gap: .45rem;
}

.workshop-vehicle-table .admin-table-row.five-cols {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, .75fr) minmax(0, .8fr) auto;
}

.workshop-vehicle-row {
    position: relative;
}

.vehicle-history-details {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    padding-top: .45rem;
}

.vehicle-history-details summary {
    width: fit-content;
    cursor: pointer;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 850;
}

.compact-history {
    gap: .35rem;
    margin-top: .45rem;
}

.compact-history > div {
    grid-template-columns: minmax(8rem, .8fr) minmax(0, 1fr) minmax(0, 1fr);
    display: grid;
    gap: .55rem;
    align-items: baseline;
    border-top: 0;
    padding: .35rem .5rem;
    border-radius: .55rem;
    background: rgba(244, 241, 236, .72);
}

@media (max-width: 900px) {
    .workshop-compact-form,
    .compact-history > div {
        grid-template-columns: 1fr;
    }

    .workshop-detail-summary {
        align-items: flex-start;
        flex-direction: column;
    }

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

/* Workshop exact 15-minute calendar placement + reason colors */
.workshop-reasons-overview-table .admin-table-row.five-cols {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .7fr) minmax(0, .7fr) minmax(0, .85fr) minmax(0, .7fr) minmax(0, .6fr);
}

.reason-color-field {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr);
    gap: .45rem;
    align-items: center;
}

.reason-color-field input[type="color"] {
    min-width: 2.75rem;
    width: 2.75rem;
    padding: .15rem;
}

.reason-color-swatch {
    display: inline-flex;
    width: .9rem;
    height: .9rem;
    margin-right: .45rem;
    border: 1px solid rgba(21, 21, 21, .16);
    border-radius: 999px;
    background: var(--reason-color, #151515);
    vertical-align: -.12rem;
}

.workshop-day-column {
    display: grid;
    grid-template-rows: repeat(var(--slot-count), minmax(0, 1fr));
    grid-template-columns: minmax(0, 1fr);
}

.workshop-hour-line {
    grid-column: 1;
    grid-row: span 4;
    min-height: 0;
}

.workshop-slot-layer {
    grid-column: 1;
    grid-row: 1 / -1;
}

.workshop-calendar-card {
    position: relative;
    z-index: 3;
    grid-column: 1;
    align-self: stretch;
    min-height: 0;
    margin: .08rem .12rem;
    border-color: color-mix(in srgb, var(--appointment-color, #151515) 78%, #151515 22%);
    background: linear-gradient(135deg, color-mix(in srgb, var(--appointment-color, #151515) 88%, white 12%), color-mix(in srgb, var(--appointment-color, #151515) 82%, black 18%));
    box-shadow: 0 .8rem 1.8rem color-mix(in srgb, var(--appointment-color, #151515) 24%, transparent);
}

.workshop-calendar-card.is-requested {
    background-image:
        linear-gradient(135deg, color-mix(in srgb, var(--appointment-color, #f59e0b) 86%, white 14%), color-mix(in srgb, var(--appointment-color, #f59e0b) 80%, black 20%)),
        repeating-linear-gradient(to bottom, transparent 0, transparent calc(25% - 1px), rgba(21, 21, 21, .18) calc(25% - 1px), rgba(21, 21, 21, .18) 25%);
}

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

/* Workshop appointment context menu */
.appointment-context-menu {
    grid-template-columns: 1fr;
    min-width: 13rem;
    max-width: min(18rem, calc(100vw - 1.5rem));
}

.appointment-context-menu span {
    justify-content: flex-start;
    min-height: auto;
    border-bottom: 1px solid rgba(21, 21, 21, .1);
    border-radius: .55rem .55rem .25rem .25rem;
    color: rgba(21, 21, 21, .72);
    font-size: .78rem;
    line-height: 1.2;
    text-align: left;
}

.appointment-context-menu button {
    justify-content: flex-start;
    text-align: left;
}

.appointment-context-menu button.danger {
    color: #991b1b;
}

.appointment-context-menu button.danger:hover,
.appointment-context-menu button.danger:focus-visible {
    background: #991b1b;
    color: #fffaf3;
}

.workshop-calendar-card {
    cursor: context-menu;
}

/* Time tracking settings: working days */
.working-days-settings .working-days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: .6rem;
}

.working-days-settings .working-days-grid label {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 3rem;
    padding: .7rem .8rem;
    border: 1px solid rgba(21, 21, 21, .12);
    border-radius: .9rem;
    background: rgba(255, 250, 243, .78);
    color: #151515;
    font-weight: 850;
    cursor: pointer;
}

.working-days-settings .working-days-grid input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--brand);
}

/* Public workshop booking: align UI with homepage hero language */
.booking-home-shell {
    position: relative;
    isolation: isolate;
    max-width: none;
    min-height: 100vh;
    margin: 0;
    padding: clamp(5.5rem, 9vw, 8rem) clamp(1rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem);
    overflow: hidden;
    color: #fff;
}

.booking-hero-background {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: #0d1b2a;
}

.booking-hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.06) contrast(1.04);
}

.booking-hero-background span {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 25%, rgba(255, 193, 7, .28), transparent 32rem),
        linear-gradient(135deg, rgba(66, 135, 245, .86), rgba(14, 35, 72, .72) 52%, rgba(8, 17, 35, .88));
}

.booking-home-hero,
.booking-progress-card,
.booking-process-card {
    width: min(1180px, 100%);
    margin-inline: auto;
}

.booking-home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(18rem, .72fr);
    align-items: end;
    gap: clamp(1.5rem, 4vw, 4rem);
    min-height: clamp(28rem, 58vh, 40rem);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.booking-hero-copy {
    max-width: 760px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, .55);
}

.booking-hero-copy .eyebrow,
.booking-step-panel .eyebrow {
    color: #ffc107;
    letter-spacing: .14em;
}

.booking-hero-copy h1 {
    margin: .2rem 0 1.35rem;
    font-size: clamp(2.6rem, 6vw, 5rem);
    line-height: .98;
    font-weight: 800;
}

.booking-hero-copy h1 span {
    color: #ffc107;
}

.booking-hero-copy p {
    max-width: 46rem;
    margin: 0 0 1.7rem;
    color: rgba(255, 255, 255, .94);
    font-size: clamp(1.05rem, 1.8vw, 1.32rem);
    line-height: 1.58;
}

.booking-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.booking-hero-panel {
    display: grid;
    gap: .8rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 1.35rem;
    background: rgba(9, 20, 40, .58);
    box-shadow: 0 1.4rem 4rem rgba(0, 0, 0, .32);
    backdrop-filter: blur(14px);
}

.booking-hero-panel div {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .1rem .75rem;
    padding: .85rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, .08);
}

.booking-hero-panel span {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    background: #ffc107;
    color: #1f2937;
    font-weight: 900;
}

.booking-hero-panel strong {
    color: #fff;
    font-size: 1rem;
}

.booking-hero-panel small {
    color: rgba(255, 255, 255, .75);
    line-height: 1.35;
}

.booking-progress-card,
.booking-process-card {
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 1.45rem;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 1.4rem 4rem rgba(0, 0, 0, .24);
    color: #1f2937;
    backdrop-filter: blur(18px);
}

.booking-progress-card {
    padding: .75rem;
}

.booking-process-card {
    padding: clamp(1rem, 3vw, 1.75rem);
}

.booking-steps {
    margin: 0;
}

.booking-steps li {
    border-color: rgba(31, 41, 55, .12);
    background: rgba(31, 41, 55, .04);
    color: rgba(31, 41, 55, .68);
    font-weight: 800;
}

.booking-steps span {
    background: rgba(31, 41, 55, .1);
    color: #1f2937;
}

.booking-steps li.is-current,
.booking-steps li.is-done {
    border-color: rgba(255, 193, 7, .72);
    background: rgba(255, 193, 7, .16);
    color: #1f2937;
}

.booking-steps li.is-current span,
.booking-steps li.is-done span {
    background: #ffc107;
    color: #1f2937;
}

.booking-step-panel {
    gap: 1.15rem;
}

.booking-step-panel h2 {
    color: #1f2937;
    font-size: clamp(1.8rem, 3vw, 2.45rem);
}

.booking-step-panel .step-heading p,
.booking-intro-card p {
    color: rgba(31, 41, 55, .72);
}

.choice-card,
.slot-chip,
.calendar-mini-row {
    border-color: rgba(31, 41, 55, .12);
    background: linear-gradient(180deg, #fff, #fff8e6);
    color: #1f2937;
    box-shadow: 0 .75rem 1.8rem rgba(31, 41, 55, .08);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.choice-card:hover:not(:disabled),
.slot-chip:hover:not(:disabled),
.calendar-mini-row:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: rgba(255, 193, 7, .72);
    box-shadow: 0 1rem 2.4rem rgba(31, 41, 55, .13);
}

.choice-card small,
.slot-chip span,
.calendar-mini-row small {
    color: rgba(31, 41, 55, .62);
}

.choice-card.is-selected,
.slot-chip.is-selected,
.calendar-mini-row.is-active {
    border-color: #ffc107;
    background: linear-gradient(135deg, #ffc107, #ffda6a);
    color: #1f2937;
}

.guided-form-grid label {
    color: rgba(31, 41, 55, .76);
}

.guided-form-grid input,
.guided-form-grid textarea {
    border-color: rgba(31, 41, 55, .16);
    background: #fff;
    color: #1f2937;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4);
}

.guided-form-grid input:focus,
.guided-form-grid textarea:focus {
    border-color: #ffc107;
    outline: 3px solid rgba(255, 193, 7, .22);
}

.check-answers div {
    border-bottom-color: rgba(31, 41, 55, .1);
}

.check-answers dt {
    color: rgba(31, 41, 55, .56);
}

.check-answers dd {
    color: #1f2937;
}

.booking-process-card .empty-state {
    color: rgba(31, 41, 55, .72);
}

.booking-process-card .ghost-button {
    border-color: rgba(31, 41, 55, .22);
    color: #1f2937;
}

.booking-process-card .ghost-button:hover,
.booking-process-card .ghost-button:focus-visible {
    border-color: #ffc107;
    background: rgba(255, 193, 7, .16);
}

@media (max-width: 900px) {
    .booking-home-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .booking-hero-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .booking-home-shell {
        padding-top: 5rem;
    }

    .booking-hero-copy h1 {
        font-size: clamp(2.25rem, 13vw, 3.5rem);
    }

    .booking-hero-actions .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .booking-progress-card,
    .booking-process-card,
    .booking-hero-panel {
        border-radius: 1.05rem;
    }
}

.booking-home-hero .booking-hero-copy p {
    color: rgba(255, 255, 255, .94);
}

/* Public booking slot picker: grouped, scannable free times */
.slot-picker-panel {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.slot-picker-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1rem;
    border: 1px solid rgba(31, 41, 55, .12);
    border-radius: 1rem;
    background: #1f2937;
    color: #fff;
    box-shadow: 0 .85rem 2rem rgba(31, 41, 55, .16);
}

.slot-picker-summary div,
.slot-picker-summary span,
.slot-picker-summary strong,
.slot-picker-summary small {
    display: block;
}

.slot-picker-summary span,
.slot-picker-summary small {
    color: rgba(255, 255, 255, .68);
}

.slot-picker-summary strong {
    margin-top: .12rem;
    font-size: 1.15rem;
}

.slot-time-section {
    display: grid;
    gap: .65rem;
    padding: .85rem;
    border: 1px solid rgba(31, 41, 55, .1);
    border-radius: 1rem;
    background: rgba(255, 255, 255, .72);
}

.slot-time-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.slot-time-section-header strong {
    color: #1f2937;
    font-size: 1rem;
}

.slot-time-section-header span {
    color: rgba(31, 41, 55, .58);
    font-weight: 800;
    font-size: .82rem;
}

.slot-picker-panel .slot-grid {
    grid-template-columns: repeat(auto-fit, minmax(6.6rem, 1fr));
    gap: .55rem;
}

.slot-picker-panel .slot-chip {
    min-height: 4.3rem;
    padding: .75rem .8rem;
}

.slot-picker-panel .slot-chip strong {
    font-size: 1.05rem;
}

@media (max-width: 760px) {
    .slot-picker-summary,
    .slot-time-section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: .35rem;
    }
}

.public-booking-toast {
    z-index: 250;
}

.public-booking-toast strong {
    color: #1f2937;
}

/* Workshop calendar: stable grid cards, requested-state review, dynamic text contrast */
.workshop-calendar-card {
    box-sizing: border-box;
    min-width: 0;
    max-width: calc(100% - .24rem);
    margin: .08rem 0;
    margin-left: calc(var(--appointment-left, 0%) + .12rem);
    width: calc(var(--appointment-width, 100%) - .24rem);
    color: var(--appointment-contrast, #fffaf3);
}

.workshop-calendar-card strong,
.workshop-calendar-card span,
.workshop-calendar-card small {
    color: inherit;
}

.workshop-calendar-card span {
    background: color-mix(in srgb, var(--appointment-contrast, #fffaf3) 16%, transparent);
}

.workshop-calendar-card small {
    opacity: .86;
}

.workshop-calendar-card::before {
    color: inherit;
}

.workshop-calendar-card.is-requested {
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, .22), 0 .8rem 1.8rem color-mix(in srgb, var(--appointment-color, #151515) 18%, transparent);
}

.workshop-calendar-card.is-requested::after {
    content: "Anfrage";
    position: absolute;
    top: .35rem;
    right: .4rem;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    padding: .08rem .34rem;
    font-size: .62rem;
    font-weight: 950;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.appointment-request-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin-top: auto;
    padding-top: .35rem;
}

.appointment-request-actions button {
    border: 1px solid color-mix(in srgb, var(--appointment-contrast, #fffaf3) 45%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--appointment-contrast, #fffaf3) 16%, transparent);
    color: inherit;
    padding: .16rem .42rem;
    font-size: .68rem;
    font-weight: 900;
    cursor: pointer;
}

.appointment-request-actions button:hover,
.appointment-request-actions button:focus-visible {
    background: var(--appointment-contrast, #fffaf3);
    color: var(--appointment-color, #151515);
}

.workshop-rejection-form {
    display: grid;
    gap: 1rem;
}

.workshop-rejection-form p {
    margin: 0;
    color: var(--muted);
    font-weight: 750;
}

.workshop-rejection-form label {
    display: grid;
    gap: .4rem;
    color: var(--muted);
    font-weight: 850;
}

.workshop-rejection-form textarea {
    width: 100%;
    resize: vertical;
    border: 1px solid var(--line);
    border-radius: .9rem;
    background: #fffaf3;
    color: var(--text);
    padding: .8rem;
    font: inherit;
}

.danger-action {
    background: #991b1b;
    color: #fffaf3;
}

.danger-action:hover,
.danger-action:focus-visible {
    background: #7f1d1d;
}

.customer-save-hint {
    margin: .7rem 0 0;
}

.vehicle-active-field {
    align-self: end;
    min-height: 2.9rem;
}

.workshop-vehicle-row.is-inactive {
    opacity: .62;
    filter: grayscale(.25);
}

.workshop-vehicle-row.is-inactive strong {
    text-decoration: line-through;
    text-decoration-thickness: .08em;
}

.vehicle-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

/* Workshop calendar readability: keep reason color, but render text on a stable readable plate */
.workshop-calendar-card {
    color: var(--appointment-contrast, #fffaf3);
    text-shadow: none;
}

.workshop-calendar-card strong,
.workshop-calendar-card span,
.workshop-calendar-card small {
    position: relative;
    z-index: 1;
    display: block;
    max-width: 100%;
    border: 1px solid var(--appointment-readable-border, rgba(255, 250, 243, .24));
    background: var(--appointment-readable-bg, rgba(15, 23, 42, .72));
    color: var(--appointment-contrast, #fffaf3);
    box-shadow: 0 .3rem .9rem rgba(0, 0, 0, .12);
}

.workshop-calendar-card strong {
    border-radius: .56rem .56rem .32rem .32rem;
    padding: .18rem .34rem .12rem;
    font-size: .76rem;
    font-weight: 950;
    line-height: 1.12;
}

.workshop-calendar-card span {
    width: fit-content;
    border-radius: 999px;
    margin-top: .22rem;
    padding: .1rem .34rem;
    font-size: .68rem;
    font-weight: 950;
    line-height: 1.05;
}

.workshop-calendar-card small {
    border-radius: .38rem;
    margin-top: .2rem;
    padding: .12rem .3rem;
    opacity: 1;
    font-size: .62rem;
    font-weight: 850;
    line-height: 1.15;
}

.workshop-calendar-card::before {
    opacity: .2;
}

.appointment-request-actions {
    position: relative;
    z-index: 1;
}

.appointment-request-actions button {
    border-color: var(--appointment-readable-border, rgba(255, 250, 243, .24));
    background: var(--appointment-readable-bg, rgba(15, 23, 42, .72));
    color: var(--appointment-contrast, #fffaf3);
    box-shadow: 0 .3rem .9rem rgba(0, 0, 0, .12);
}

.vehicle-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .55rem;
}

.vehicle-inactive-toggle {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    margin: 0;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 850;
    cursor: pointer;
    user-select: none;
}

.vehicle-inactive-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.vehicle-inactive-toggle span {
    position: relative;
    width: 2rem;
    height: 1.1rem;
    border: 1px solid rgba(21, 21, 21, .16);
    border-radius: 999px;
    background: rgba(21, 21, 21, .12);
    transition: background .16s ease, border-color .16s ease;
}

.vehicle-inactive-toggle span::after {
    content: "";
    position: absolute;
    top: .14rem;
    left: .14rem;
    width: .72rem;
    height: .72rem;
    border-radius: 999px;
    background: #fffaf3;
    box-shadow: 0 .15rem .35rem rgba(21, 21, 21, .22);
    transition: transform .16s ease;
}

.vehicle-inactive-toggle input:checked + span {
    border-color: rgba(230, 57, 70, .45);
    background: rgba(230, 57, 70, .75);
}

.vehicle-inactive-toggle input:checked + span::after {
    transform: translateX(.9rem);
}

.vehicle-inactive-toggle input:focus-visible + span {
    outline: 3px solid rgba(230, 57, 70, .24);
    outline-offset: 2px;
}

.workshop-vehicle-empty-row {
    grid-template-columns: 1fr;
    color: var(--muted);
    font-weight: 800;
}

/* Admin dashboard: today's appointments */
.today-appointments-list {
    display: grid;
    gap: .65rem;
    margin-top: 1rem;
}

.today-appointment-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .15rem .65rem;
    align-items: center;
    border: 1px solid color-mix(in srgb, var(--appointment-color, #151515) 28%, rgba(21, 21, 21, .12));
    border-left: .38rem solid var(--appointment-color, #151515);
    border-radius: 1rem;
    background: color-mix(in srgb, var(--appointment-color, #151515) 10%, #fffaf3);
    color: #151515;
    padding: .75rem .85rem;
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.today-appointment-row:hover,
.today-appointment-row:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 .85rem 1.8rem rgba(21, 21, 21, .12);
    border-color: color-mix(in srgb, var(--appointment-color, #151515) 48%, rgba(21, 21, 21, .12));
}

.today-appointment-row > span {
    grid-row: span 2;
    border-radius: 999px;
    background: var(--appointment-color, #151515);
    color: var(--appointment-text-color, #fffaf3);
    padding: .24rem .5rem;
    font-size: .72rem;
    font-weight: 950;
    white-space: nowrap;
}

.today-appointment-row strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .94rem;
}

.today-appointment-row small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-weight: 800;
}

.document-drop-area {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: .85rem;
    margin-top: 1rem;
    border: 1.5px dashed rgba(21, 21, 21, .24);
    border-radius: .75rem;
    background: #fffaf3;
    padding: .9rem 1rem;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.document-drop-area:hover,
.document-drop-area:focus-within {
    border-color: #0f766e;
    background: color-mix(in srgb, #0f766e 6%, #fffaf3);
    box-shadow: 0 .65rem 1.45rem rgba(21, 21, 21, .08);
}

.document-drop-area.has-file {
    border-style: solid;
    border-color: rgba(15, 118, 110, .48);
    background: color-mix(in srgb, #0f766e 8%, #fffaf3);
}

.document-drop-area input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.document-drop-icon {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .7rem;
    background: #151515;
    color: #fffaf3;
}

.document-drop-icon svg {
    width: 1.45rem;
    height: 1.45rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.document-drop-area strong,
.document-drop-area small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-drop-area strong {
    color: #151515;
    font-size: .95rem;
}

.document-drop-area small {
    margin-top: .18rem;
    color: var(--muted);
    font-weight: 750;
}

.workshop-reconnect-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: none;
    place-items: center;
    padding: 1.25rem;
    background:
        linear-gradient(rgba(21, 21, 21, .44), rgba(21, 21, 21, .5)),
        radial-gradient(circle at 50% 32%, rgba(242, 183, 5, .28), transparent 22rem);
    backdrop-filter: blur(4px);
}

.workshop-reconnect-modal.components-reconnect-show,
.workshop-reconnect-modal.components-reconnect-failed,
.workshop-reconnect-modal.components-reconnect-rejected {
    display: grid;
}

.workshop-reconnect-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    width: min(31rem, 100%);
    overflow: hidden;
    border: 1px solid rgba(255, 250, 243, .36);
    border-radius: .9rem;
    background:
        linear-gradient(135deg, rgba(255, 250, 243, .98), rgba(246, 239, 228, .98));
    box-shadow: 0 1.35rem 4rem rgba(21, 21, 21, .34);
    color: #151515;
    padding: 1rem 1.1rem;
}

.workshop-reconnect-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: .42rem;
    background: #f2b705;
}

.workshop-reconnect-icon {
    display: grid;
    place-items: center;
    width: 3.1rem;
    height: 3.1rem;
    border-radius: .75rem;
    background: #151515;
    color: #f2b705;
    box-shadow: inset 0 0 0 1px rgba(255, 250, 243, .14);
}

.workshop-reconnect-icon svg {
    width: 1.85rem;
    height: 1.85rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.workshop-reconnect-copy {
    display: grid;
    gap: .18rem;
    min-width: 0;
}

.workshop-reconnect-title {
    display: none;
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 1rem;
    line-height: 1.2;
}

.workshop-reconnect-text {
    display: none;
    color: #6e665f;
    font-size: .88rem;
    font-weight: 750;
    line-height: 1.35;
}

.workshop-reconnect-spinner {
    width: 2rem;
    height: 2rem;
    border: .22rem solid rgba(21, 21, 21, .12);
    border-top-color: #f2b705;
    border-radius: 999px;
    animation: workshopReconnectSpin .78s linear infinite;
}

.workshop-reconnect-modal.components-reconnect-show .workshop-reconnect-title-rejoining,
.workshop-reconnect-modal.components-reconnect-show .workshop-reconnect-text-rejoining,
.workshop-reconnect-modal.components-reconnect-failed .workshop-reconnect-title-failed,
.workshop-reconnect-modal.components-reconnect-failed .workshop-reconnect-text-failed,
.workshop-reconnect-modal.components-reconnect-rejected .workshop-reconnect-title-rejected,
.workshop-reconnect-modal.components-reconnect-rejected .workshop-reconnect-text-rejected {
    display: block;
}

.workshop-reconnect-modal.components-reconnect-failed .workshop-reconnect-card::before,
.workshop-reconnect-modal.components-reconnect-rejected .workshop-reconnect-card::before {
    background: #b42318;
}

.workshop-reconnect-modal.components-reconnect-failed .workshop-reconnect-icon,
.workshop-reconnect-modal.components-reconnect-rejected .workshop-reconnect-icon {
    color: #fffaf3;
    background: #b42318;
}

.workshop-reconnect-modal.components-reconnect-failed .workshop-reconnect-spinner,
.workshop-reconnect-modal.components-reconnect-rejected .workshop-reconnect-spinner {
    animation: none;
    border-color: rgba(180, 35, 24, .18);
    border-top-color: #b42318;
}

@keyframes workshopReconnectSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 520px) {
    .workshop-reconnect-card {
        grid-template-columns: auto minmax(0, 1fr);
        padding: .95rem 1rem;
    }

    .workshop-reconnect-spinner {
        grid-column: 1 / -1;
        justify-self: center;
        width: 1.6rem;
        height: 1.6rem;
    }
}


@media (max-width: 760px) {
    .today-appointment-row {
        grid-template-columns: 1fr;
    }

    .today-appointment-row > span {
        grid-row: auto;
        width: fit-content;
    }
}
