:root {
    --ink: #10233f;
    --ink-2: #36516f;
    --muted: #66788e;
    --line: #dce4ec;
    --line-strong: #c9d4df;
    --surface: #ffffff;
    --canvas: #f3f6f9;
    --navy: #102a47;
    --blue: #246bdb;
    --blue-dark: #1855b5;
    --blue-soft: #eaf2ff;
    --teal: #087f75;
    --teal-soft: #e6f7f3;
    --gold: #a46708;
    --gold-soft: #fff5d8;
    --red: #c93632;
    --red-soft: #fff0ef;
    --violet: #7156b8;
    --shadow: 0 10px 30px rgba(16, 35, 63, .08);
    --radius: 14px;
    --radius-sm: 9px;
    color-scheme: light;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--canvas); }

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 85% -10%, rgba(36, 107, 219, .1), transparent 32rem),
        var(--canvas);
    -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
img, svg { display: block; }

:focus-visible {
    outline: 3px solid rgba(36, 107, 219, .35);
    outline-offset: 2px;
}

.skip-link {
    position: fixed;
    left: 1rem;
    top: -5rem;
    z-index: 1000;
    padding: .65rem 1rem;
    border-radius: 8px;
    color: #fff;
    background: var(--navy);
}
.skip-link:focus { top: 1rem; }

.app-shell { min-height: 100vh; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    height: 68px;
    padding: 0 1.25rem;
    border-bottom: 1px solid rgba(220, 228, 236, .9);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(15px);
}

.brand { display: inline-flex; align-items: center; gap: .7rem; min-width: 220px; font-weight: 800; letter-spacing: -.025em; }
.brand > img { object-fit:contain; }
.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(145deg, var(--blue), var(--teal));
    box-shadow: 0 5px 14px rgba(36, 107, 219, .28);
}
.brand-mark svg { width: 21px; height: 21px; }
.brand small { display: block; color: var(--muted); font-size: .65rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }

.topbar-context { flex: 1; min-width: 0; }
.topbar-context strong { display: block; overflow: hidden; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.topbar-context span { display: block; color: var(--muted); font-size: .76rem; }
.topbar-context form { width: fit-content; max-width: 100%; }
.topbar-context select { width:auto; max-width:calc(100% + 12px); min-height:0; margin-left:-4px; padding:.05rem 1.75rem .05rem 0; border:0; color:var(--muted); background-color:transparent; font-size:.76rem; }
.topbar-actions { display: flex; align-items: center; gap: .55rem; }
.desktop-view-mode { display:inline-flex; align-items:center; gap:.22rem; padding:.2rem; border:1px solid var(--line); border-radius:10px; background:#f4f7fa; }
.desktop-view-choice { display:inline-flex; align-items:center; gap:.3rem; padding:.34rem .42rem; border-radius:7px; color:var(--muted); font-size:.7rem; font-weight:750; }
.desktop-view-choice.is-active { color:var(--blue-dark); background:#fff; box-shadow:0 1px 4px rgba(16,35,63,.12); }
.desktop-view-choice > svg, .desktop-push-status > svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.desktop-view-mode > i { position:relative; display:block; width:26px; height:16px; border-radius:999px; background:#cbd5df; }
.desktop-view-mode > i::after { content:""; position:absolute; top:2px; left:2px; width:12px; height:12px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(16,35,63,.25); }
.desktop-view-mode.is-management > i { background:var(--teal); }
.desktop-view-mode.is-management > i::after { transform:translateX(10px); }
.desktop-push-status { border:1px solid #efc1bf; color:var(--red); background:var(--red-soft); }
.desktop-push-status[data-state="enabled"] { border-color:#a9ddd4; color:var(--teal); background:var(--teal-soft); }
.desktop-push-status:disabled { opacity:1; }
.avatar {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--avatar, var(--blue));
    font-size: .75rem;
    font-weight: 800;
}

.workspace { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: calc(100vh - 68px); }
.sidebar {
    position: sticky;
    top: 68px;
    height: calc(100vh - 68px);
    padding: 1rem .8rem;
    border-right: 1px solid var(--line);
    background: rgba(255, 255, 255, .7);
}
.nav-group { display: grid; gap: .25rem; }
.nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .72rem .78rem;
    border-radius: 10px;
    color: var(--ink-2);
    font-size: .9rem;
    font-weight: 650;
}
.nav-link:hover { background: #eef3f8; color: var(--ink); }
.nav-link[aria-current="page"] { color: var(--blue-dark); background: var(--blue-soft); }
.nav-icon { display:grid; width:20px; height:20px; flex:0 0 20px; place-items:center; }
.nav-icon svg { width:20px; height:20px; }
.nav-divider { height: 1px; margin: .8rem .5rem; background: var(--line); }
.nav-meta { padding: .65rem .8rem; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.compact-signout { display:inline-flex; width:auto; align-items:center; gap:.38rem; }
.compact-signout > svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

.main { min-width: 0; padding: 1.5rem; }
.page { width: 100%; max-width: 1680px; margin: 0 auto; }
.home-notices { margin-bottom:1rem; }
.home-on-duty { margin-top:1rem; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.eyebrow { margin: 0 0 .3rem; color: var(--blue-dark); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .25rem; font-size: clamp(1.55rem, 2vw, 2.1rem); letter-spacing: -.035em; }
h2 { margin-bottom: .7rem; font-size: 1.15rem; letter-spacing: -.02em; }
h3 { margin-bottom: .5rem; font-size: .96rem; }
.lede { max-width: 60rem; margin-bottom: 0; color: var(--muted); line-height: 1.55; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.toolbar-cluster { display: flex; align-items: center; gap: .4rem; }
.toolbar-spacer { flex: 1; }
.week-title { min-width: 220px; margin: 0; font-size: 1.05rem; font-weight: 800; text-align: center; }
.week-picker-wrap { position: relative; }
.week-range-button { padding: 0; border: 0; cursor: pointer; color: var(--ink); background: transparent; font-size: clamp(1.55rem, 2vw, 2.1rem); font-weight: 700; letter-spacing: -.035em; }
.week-range-button:hover { color: var(--blue-dark); }
.visually-hidden-picker { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.print-menu { position: relative; }
.print-menu summary { list-style: none; }
.print-menu summary::-webkit-details-marker { display: none; }
.print-menu-panel { position: absolute; z-index: 20; top: calc(100% + .35rem); right: 0; display: grid; min-width: 190px; padding: .35rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.print-menu-panel button { padding: .55rem .65rem; border: 0; border-radius: 7px; cursor: pointer; background: transparent; text-align: left; }
.print-menu-panel button:hover { background: var(--blue-soft); }

.button, .icon-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    cursor: pointer;
    background: var(--surface);
    font-size: .84rem;
    font-weight: 750;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease, background .15s ease;
}
.button { padding: .58rem .88rem; }
.icon-button { width: 40px; padding: 0; }
.button:hover, .icon-button:hover { border-color: #9caec0; box-shadow: 0 4px 12px rgba(16, 35, 63, .08); }
.button:active, .icon-button:active { transform: translateY(1px); }
.button-primary { border-color: var(--blue); color: #fff; background: var(--blue); }
.button-primary:hover { border-color: var(--blue-dark); background: var(--blue-dark); }
.button-danger { border-color: #efc7c5; color: #9e2420; background: var(--red-soft); }
.button-quiet { border-color: transparent; background: transparent; }
.button-small { min-height: 32px; padding: .35rem .62rem; font-size: .76rem; }
.button-block { width: 100%; }
.button[disabled], button[disabled] { cursor: not-allowed; opacity: .55; }

.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #eef3f8; }
.page-subnav { display:flex; gap:.25rem; margin:0 0 1rem; padding:.25rem; border-bottom:1px solid var(--line); }
.page-subnav a { padding:.55rem .8rem; border-radius:8px 8px 0 0; color:var(--muted); font-size:.82rem; font-weight:800; }
.page-subnav a[aria-current="page"] { color:var(--blue-dark); background:var(--blue-soft); box-shadow:inset 0 -3px 0 var(--blue); }
.setup-primary-tabs { display:flex; gap:.2rem; margin:0; padding:.25rem .25rem 0; border:1px solid var(--line); border-radius:11px 11px 0 0; background:rgba(255,255,255,.78); }
.setup-primary-tabs a { padding:.7rem .9rem; border-bottom:3px solid transparent; color:var(--muted); font-size:.82rem; font-weight:800; }
.setup-primary-tabs a[aria-current="page"] { border-bottom-color:var(--blue); color:var(--blue-dark); background:var(--blue-soft); }
.setup-secondary-tabs { display:flex; flex-wrap:wrap; gap:.35rem; margin:0 0 1rem; padding:.65rem; border:1px solid var(--line); border-top:0; border-radius:0 0 11px 11px; background:rgba(255,255,255,.94); }
.setup-secondary-tabs a { padding:.45rem .65rem; border:1px solid transparent; border-radius:8px; color:var(--muted); font-size:.76rem; font-weight:750; }
.setup-secondary-tabs a:hover { color:var(--ink); border-color:var(--line); }
.setup-secondary-tabs a[aria-current="page"] { color:var(--blue-dark); border-color:#bfd3f6; background:var(--blue-soft); }
.setup-tab-panels + .setup-tab-panels { margin-top:0; }
.setup-panel { display:none; }
.setup-panel.is-active { display:block; }
.segmented a, .segmented button { min-height: 32px; padding: .35rem .65rem; border: 0; border-radius: 7px; cursor: pointer; color: var(--muted); background: transparent; font-size: .78rem; font-weight: 750; }
.segmented [aria-current="true"] { color: var(--ink); background: #fff; box-shadow: 0 2px 7px rgba(16, 35, 63, .1); }

.field { display: grid; gap: .35rem; min-width: 0; }
.field > span, .field-label { color: var(--ink-2); font-size: .74rem; font-weight: 750; }
.field small { color: var(--muted); line-height: 1.35; }
input, select, textarea {
    width: 100%;
    min-height: 42px;
    padding: .58rem .68rem;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    color: var(--ink);
    background: #fff;
}
textarea { min-height: 92px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 17px; min-height: 17px; padding: 0; accent-color: var(--blue); }
.color-control { display:grid; grid-template-columns:52px minmax(110px, 1fr); gap:.5rem; align-items:center; }
.color-control input[type="color"] { width:52px; min-height:42px; padding:.2rem; }
.color-control input[type="text"] { font-family:ui-monospace, SFMono-Regular, Menlo, monospace; text-transform:uppercase; }
.teammate-combobox { position:relative; display:block; }
.teammate-combobox > input { width:100%; }
.teammate-options { position:absolute; z-index:25; top:calc(100% + .25rem); left:0; right:0; display:grid; max-height:240px; overflow:auto; padding:.3rem; border:1px solid var(--line-strong); border-radius:9px; background:#fff; box-shadow:var(--shadow); }
.teammate-options[hidden] { display:none; }
.teammate-options button { padding:.6rem .7rem; border:0; border-radius:7px; cursor:pointer; color:var(--ink); background:transparent; text-align:left; }
.teammate-options button:hover, .teammate-options button:focus { background:var(--blue-soft); }
.check { display: flex; align-items: flex-start; gap: .55rem; color: var(--ink-2); font-size: .84rem; line-height: 1.4; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: .55rem; margin-top: 1rem; }

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--shadow);
}
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.05rem; border-bottom: 1px solid var(--line); }
.card-header h2, .card-header h3 { margin: 0; }
.card-header > .button { white-space: nowrap; }
.home-schedule-grid > .card > .card-header { min-height: 65px; box-sizing: border-box; }
.card-body { padding: 1.05rem; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.template-date-list { display:grid; gap:.5rem; margin-bottom:.55rem; }
.template-date-row { display:flex; align-items:center; gap:.5rem; }
.template-date-row input { flex:1; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.route-open-shifts .stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.stat { padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.stat-label { color: var(--muted); font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.stat-value { display: block; margin-top: .2rem; font-size: 1.45rem; font-weight: 850; letter-spacing: -.03em; }

.alert { display: flex; align-items: flex-start; gap: .7rem; margin-bottom: .9rem; padding: .8rem .9rem; border: 1px solid; border-radius: 11px; font-size: .84rem; line-height: 1.45; }
.alert-info { border-color: #bed4f5; color: #174c91; background: var(--blue-soft); }
.alert-warning { border-color: #eed394; color: #784b05; background: var(--gold-soft); }
.alert-danger { border-color: #efc1bf; color: #8f211d; background: var(--red-soft); }
.alert-success { border-color: #addfd7; color: #075f57; background: var(--teal-soft); }
.alert strong { display: block; }
.alert p { margin: .15rem 0 0; }

.badge { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .45rem; border-radius: 999px; font-size: .66rem; font-weight: 850; letter-spacing: .025em; text-transform: uppercase; white-space: nowrap; }
.badge-blue { color: #1954a4; background: var(--blue-soft); }
.badge-teal { color: #07685f; background: var(--teal-soft); }
.badge-gold { color: #7f5006; background: var(--gold-soft); }
.badge-red { color: #982420; background: var(--red-soft); }
.badge-neutral { color: #4f6277; background: #edf1f5; }
.badge-violet { color: #574095; background: #f0ecfb; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.announcement-strip { display: flex; gap: .65rem; overflow-x: auto; margin-bottom: .85rem; padding-bottom: .25rem; scrollbar-width: thin; }
.announcement { min-width: min(330px, 84vw); padding: .68rem .78rem; border-left: 4px solid var(--gold); border-radius: 8px; background: var(--gold-soft); }
.announcement strong { display: block; font-size: .8rem; }
.announcement p { margin: .2rem 0 0; color: #725522; font-size: .74rem; line-height: 1.35; }
.announcement small { display: block; margin-bottom: .2rem; color: #8a5b00; font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.announcement.is-calendar-notice { min-width: 0; }

.desktop-schedule, .schedule-board { min-width:0; max-width:100%; }
.schedule-board { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.coverage-grid { display: grid; grid-template-columns: repeat(var(--schedule-days, 7), minmax(0, 1fr)); width: 100%; min-width: 0; }
.day-column { min-height: 650px; border-right: 1px solid var(--line); }
.day-column:last-child { border-right: 0; }
.day-heading { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: .65rem .7rem; border-bottom: 1px solid var(--line); background: #f8fafc; }
.day-heading.today, .people-header .person-day.today { color:var(--blue-dark); font-weight:900; }
.people-header .person-day.today { position:relative; }
.day-heading.today::after, .people-header .person-day.today::after { content:""; position:absolute; right:.35rem; bottom:0; left:.35rem; height:3px; border-radius:3px 3px 0 0; background:var(--blue); }
.desktop-today { color:var(--blue-dark); font-size:.62rem; font-weight:900; letter-spacing:.06em; text-align:center; text-transform:uppercase; }
.day-heading.today { display:grid; grid-template-rows:auto auto; justify-items:stretch; gap:.12rem; }
.day-heading.today > .day-date { justify-self:start; }
.day-heading.today > .desktop-today { justify-self:center; }
.people-header .person-day.today { display:grid; grid-template-rows:auto auto; justify-items:stretch; gap:.12rem; }
.people-header .person-day.today > span { justify-self:start; }
.people-header .person-day.today > .desktop-today { justify-self:center; }
.day-heading.has-coverage-gap, .people-header .person-day.has-coverage-gap, .mobile-day-title.has-coverage-gap { color: #9e2420; background: var(--red-soft); }
.day-total { padding:.45rem .55rem; border-top:1px solid var(--line); color:var(--muted); background:#f8fafc; font-size:.65rem; font-weight:750; }
.coverage-alarm { display: inline-grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; color: #fff; background: var(--red); font-size: .7rem; line-height: 1; }
.day-heading span { font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.day-heading strong { font-size: 1rem; }
.day-content { display: grid; gap: .36rem; align-content: start; padding: .45rem; }

.shift-card {
    position: relative;
    display: grid;
    gap: .22rem;
    width: 100%;
    padding: .55rem .58rem .55rem .72rem;
    border: 1px solid var(--line);
    border: 1px solid color-mix(in srgb, var(--shift-color, var(--blue)) 35%, #fff);
    border-left: 5px solid var(--shift-color, var(--blue));
    border-radius: 8px;
    cursor: pointer;
    color: var(--ink);
    background: #f8fafc;
    background: color-mix(in srgb, var(--shift-color, var(--blue)) 9%, #fff);
    text-align: left;
}
.shift-card:hover { box-shadow: 0 5px 14px rgba(16, 35, 63, .11); transform: translateY(-1px); }
.shift-card.is-draft { padding-right:4.6rem; border-style:dashed; background:#fff; }
.shift-card.is-absent { overflow:hidden; padding-top:2.65rem; border-color:color-mix(in srgb, var(--red) 35%, #fff); border-left-color:var(--red); background:var(--red-soft); }
.shift-status-banner { position:absolute; top:0; right:0; left:0; display:flex; min-height:1.9rem; align-items:center; justify-content:center; gap:.35rem; padding:.35rem .5rem; color:#fff; background:var(--red); font-size:.62rem; font-weight:850; letter-spacing:.06em; }
.shift-status-icon { display:grid; width:15px; height:15px; place-items:center; border:1.5px solid currentColor; border-radius:50%; font-size:.58rem; line-height:1; }
.shift-corner-flag { position:absolute; z-index:2; top:-1px; right:-1px; padding:.4rem .52rem .4rem .72rem; border-radius:0 7px 0 15px; color:#fff; background:#526a84; font-size:.56rem; font-weight:850; letter-spacing:.07em; line-height:1; }
.shift-card.is-event { --shift-color: var(--violet); background: #f6f3ff; }
.shift-time { font-size: .78rem; font-weight: 850; letter-spacing: -.01em; }
.shift-name { overflow: hidden; font-size: .76rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.shift-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; color: var(--muted); font-size: .65rem; }
.shift-notes { display:block; margin-top:.25rem; color:var(--muted); font-size:.67rem; line-height:1.35; }
.shift-notes a, .announcement a, [data-event-description] a { color:var(--blue-dark); text-decoration:underline; }
.pre-wrap { white-space:pre-wrap; }
.recurring-mark { display:inline-flex; align-items:center; color:var(--blue-dark); }
.recurring-mark svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.shift-lock-mark { display:inline-flex; align-items:center; color:#8b4f05; }
.shift-lock-mark svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.shift-card .badge { font-size: .58rem; }
.shift-card[draggable="true"] { cursor: grab; }
.shift-card.is-dragging { opacity: .45; }


.people-board { width:100%; min-width:0; }
.people-board .people-row { width:100%; }
.people-row { display: grid; grid-template-columns: 205px repeat(var(--schedule-days, 7), minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.people-row:last-child { border-bottom: 0; }
.person-cell, .person-day { min-width: 0; min-height: 72px; padding: .35rem; border-right: 1px solid var(--line); }
.person-cell { position: sticky; left: 0; z-index: 2; display: flex; align-items: center; gap: .6rem; background: #fff; }
.people-row:not(.people-header) .person-cell { align-items: flex-start; padding-top: .75rem; }
.person-cell strong { display: block; font-size: .78rem; }
.person-cell small { color: var(--muted); font-size: .68rem; }
.person-day { display: grid; gap: .3rem; align-content: start; background: #fff; }
.person-day.has-cell-footer { position:relative; padding-bottom:1.65rem; }
.person-day.has-multiple-cell-footer { padding-bottom:3rem; }
.person-day.has-prefer-work { background: #eaf8f1; }
.person-day.has-prefer-off { background: #fff4d8; }
.person-day-footer { position:absolute; right:.25rem; bottom:.28rem; left:.25rem; display:flex; flex-direction:column; align-items:center; gap:.18rem; }
.preference-cell-label { color:#176454; font-size:.61rem; font-weight:800; text-align:center; white-space:nowrap; }
.person-day.has-prefer-off .preference-cell-label { color:#8a5208; }
.people-row.is-open-row .person-cell, .people-row.is-open-row .person-day { background: #fff9df; }
.person-day.is-over { outline: 2px solid var(--blue); outline-offset: -2px; background: var(--blue-soft); }
.schedule-board.is-two-week .people-row { grid-template-columns: 150px repeat(14, minmax(0, 1fr)); }
.schedule-board.is-two-week .person-cell, .schedule-board.is-two-week .person-day { padding: .24rem; }
.schedule-board.is-two-week .person-cell { gap: .3rem; }
.schedule-board.is-two-week .person-cell .avatar { display: none; }
.schedule-board.is-two-week .shift-card { gap: .1rem; padding: .32rem .22rem .32rem .34rem; border-left-width: 4px; }
.schedule-board.is-two-week .shift-name { display: none; }
.schedule-board.is-two-week .shift-time { font-size: .67rem; }
.schedule-board.is-two-week .shift-meta { gap: .12rem; font-size: .56rem; line-height: 1.1; }
.schedule-board.is-two-week .shift-meta .badge { display: none; }
.schedule-board.is-two-week .recurring-mark svg { width: 11px; height: 11px; }
.schedule-board.is-two-week .announcement p, .schedule-board.is-two-week .announcement button { display:none; }
.schedule-board.is-two-week .day-column { min-width: 0; min-height: 520px; overflow: hidden; }
.schedule-board.is-two-week .day-content { gap: .22rem; padding: .24rem; }
.schedule-board.is-two-week .day-heading { padding: .45rem .25rem; }
.schedule-board.is-two-week .day-heading span { font-size: .6rem; }
.schedule-board.is-two-week .day-heading strong { font-size: .78rem; }
.signal-row { display: flex; flex-wrap: wrap; gap: .3rem; padding: 0 .1rem .45rem; }
.schedule-signal { display: block; width: max-content; max-width: 100%; padding: .15rem .38rem; border-radius: 999px; color: var(--muted); background: #eef2f6; font-size: .62rem; font-weight: 750; line-height: 1.25; }
.schedule-signal.is-prefer_work { color: #08665d; background: #e6f6f2; }
.schedule-signal.is-request_off { color: #8a4b08; background: #fff0cc; }
.schedule-signal.is-pto_pending { color: #8a5b00; background: #fff5d9; }
.schedule-signal.is-pto_approved { color: #07543d; background: #dff4e9; }
.people-header { position: sticky; top: 0; z-index: 5; background: #f8fafc; }
.people-header .person-cell, .people-header .person-day { min-height: auto; padding: .6rem; color: var(--muted); background: #f8fafc; font-size: .68rem; font-weight: 800; text-transform: uppercase; }

.mobile-schedule { display: none; }
.mobile-scope { width: 100%; margin-bottom: .8rem; }
.mobile-scope a { flex: 1; justify-content: center; text-align: center; }
.mobile-day { margin-bottom: 1rem; }
.mobile-day-title { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; margin-bottom:.45rem; padding:.55rem .65rem; border-top:2px solid var(--line-strong); border-bottom:1px solid var(--line); color:var(--ink-2); background:#f5f8fb; font-size:.8rem; font-weight:800; }
.mobile-day > summary { cursor:pointer; list-style:none; }
.mobile-day > summary::-webkit-details-marker { display:none; }
.mobile-day > summary.mobile-day-title { margin-bottom:0; }
.mobile-day-marker { grid-column:3; justify-self:end; color:var(--blue-dark); font-size:.65rem; letter-spacing:.06em; text-transform:uppercase; }
.mobile-day-past .mobile-day-marker { color:var(--muted); }
.mobile-past-content { border-top:1px solid var(--line); }
.mobile-pto-pending { grid-column:2; justify-self:center; padding:.18rem .48rem; border-radius:999px; color:#8a5b00; background:#fff5d9; font-size:.68rem; white-space:nowrap; }
.mobile-day-list { display: grid; gap: .45rem; }
.mobile-open-shift-marker { position:absolute; right:.55rem; top:50%; transform:translateY(-50%); padding:.28rem .48rem; border-radius:999px; color:#fff; background:#b42318; font-size:.67rem; font-weight:900; letter-spacing:.05em; }
.coverage-mobile-alert { margin-bottom:.8rem; border:1px solid #efc1bf; border-radius:10px; color:#8f211d; background:var(--red-soft); }
.coverage-mobile-alert summary { display:flex; align-items:center; gap:.55rem; padding:.65rem .7rem; cursor:pointer; list-style:none; }
.coverage-mobile-alert summary::-webkit-details-marker { display:none; }
.coverage-mobile-alert summary span:last-child { margin-left:auto; }
.coverage-mobile-alert p { margin:0; padding:0 .75rem .75rem; font-size:.75rem; line-height:1.4; }
.schedule-date-navigation { display:flex; align-items:center; gap:.4rem; }
.schedule-date-navigation > .icon-button { font-size:1.55rem; line-height:1; }
.schedule-inline-filters { display:flex; min-width:0; align-items:center; gap:.4rem; }
.schedule-inline-filters select { width:auto; max-width:155px; min-height:34px; padding:.38rem 1.7rem .38rem .55rem; font-size:.72rem; }
.month-calendar { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); overflow:hidden; border:1px solid var(--line); border-radius:var(--radius); background:#fff; box-shadow:var(--shadow); }
.month-weekday { padding:.55rem; border-right:1px solid var(--line); border-bottom:1px solid var(--line); color:var(--muted); background:#f8fafc; font-size:.68rem; font-weight:850; text-align:center; text-transform:uppercase; }
.month-weekday:nth-child(7) { border-right:0; }
.month-day { min-height:142px; padding:.42rem; border-right:1px solid var(--line); border-bottom:1px solid var(--line); background:#fff; }
.month-day:nth-child(7n) { border-right:0; }
.month-day.is-outside { color:#8b98a8; background:#f7f9fb; }
.month-day > header { display:flex; align-items:center; justify-content:space-between; margin-bottom:.35rem; font-size:.72rem; font-weight:850; }
.month-day.today > header { padding-bottom:.25rem; border-bottom:3px solid var(--blue); color:var(--blue-dark); }
.month-day.today > header b { font-size:.58rem; letter-spacing:.06em; }
.month-items { display:grid; gap:.25rem; }
.month-item { min-width:0; padding:.3rem .35rem; border-left:4px solid var(--shift-color,var(--blue)); border-radius:5px; background:#edf4ff; }
.month-item.is-event { --shift-color:#7654c4; background:#f2effb; }
.month-item.is-notice { --shift-color:var(--gold); background:var(--gold-soft); }
.month-item time, .month-item strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.month-item time { color:var(--muted); font-size:.58rem; font-weight:800; }
.month-item strong { font-size:.66rem; }
.expiration-summary { grid-template-columns:repeat(4,minmax(0,1fr)); margin-bottom:1rem; }
.expiration-stat.is-warning { border-top:4px solid var(--gold); }
.expiration-stat.is-expired { border-top:4px solid var(--red); }
.series-renewal-bar { display:flex; align-items:end; justify-content:flex-end; gap:.65rem; padding:.85rem; border-top:1px solid var(--line); }
.series-renewal-bar .field { width:min(260px,100%); }

.open-list { display: grid; gap: .75rem; }
.open-shift-accordion { position:relative; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:#fff; }
.open-shift-collapsed { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.8rem; align-items:center; min-height:92px; padding:.8rem 1rem .8rem 1.25rem; cursor:pointer; list-style:none; }
.open-shift-collapsed::-webkit-details-marker { display:none; }
.open-shift-collapsed > span:nth-child(2) { display:grid; gap:.25rem; }
.open-shift-collapsed > span:nth-child(2) .badge { width:max-content; max-width:100%; justify-self:start; }
.open-shift-title-badges { display:flex; min-width:0; align-items:center; flex-wrap:wrap; gap:.35rem; }
.open-shift-collapsed strong, .open-shift-collapsed small { display:block; }
.open-shift-collapsed small { color:var(--muted); font-size:.72rem; }
.open-shift-color-bar { position:absolute; z-index:2; inset:0 auto 0 0; width:5px; background:var(--shift-color, var(--blue)); }
.open-shift-summary-badges { display:flex; align-items:center; gap:.35rem; }
.open-shift-accordion[open] .open-shift-summary-badges > b { transform:rotate(180deg); }
.open-shift-accordion > .open-shift { border:0; border-top:1px solid var(--line); border-left:0; border-radius:0; }
.open-shift {
    display: grid;
    grid-template-columns: minmax(230px, .9fr) minmax(310px, 1.25fr) minmax(260px, 1fr);
    align-items: stretch;
    padding: 0;
    border: 1px solid var(--line);
    border-left: 5px solid var(--shift-color, var(--blue));
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}
.open-shift h3 { margin: .1rem 0; }
.open-shift p { margin: 0; color: var(--muted); font-size: .78rem; }
.open-shift-section { min-width: 0; padding: 1rem; }
.open-shift-section + .open-shift-section { border-left: 1px solid var(--line); }
.open-shift-context { background: #fbfcfe; }
.open-shift-settings { display: grid; gap: .65rem; margin-top: 1rem; }
.open-shift-settings .form-grid { gap: .55rem; }
.open-shift-candidates { background: #fbfcfe; }
.open-shift-candidates > h3 { margin-bottom: .65rem; }
.bid-list { display: grid; gap: .35rem; margin-top: .65rem; }
.bid-row { display: grid; grid-template-columns: minmax(140px, 1fr) auto auto; gap: .55rem; align-items: center; padding: .48rem .55rem; border-radius: 8px; background: #f6f8fa; font-size: .75rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .68rem .7rem; border-bottom: 1px solid var(--line); text-align: left; font-size: .8rem; vertical-align: middle; }
th { color: var(--muted); background: #f8fafc; font-size: .68rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
.table-person { display: flex; align-items: center; gap: .55rem; }

.timeline { display: grid; gap: 0; }
.timeline-item { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: .55rem; padding-bottom: .85rem; }
.timeline-item::before { content: ""; position: absolute; left: 6px; top: 13px; bottom: -2px; width: 1px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { z-index: 1; width: 13px; height: 13px; margin-top: 2px; border: 3px solid #fff; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.timeline-item p { margin: 0; font-size: .8rem; }
.timeline-item small { color: var(--muted); }

.request-list, .task-list { display: grid; gap: .6rem; }
.seniority-list { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; counter-reset: seniority; }
.seniority-list li { display: grid; grid-template-columns: auto 1fr 22px; gap: .65rem; align-items: center; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 9px; cursor: grab; background: #fff; counter-increment: seniority; }
.drag-handle { width:18px; height:24px; border-radius:4px; background-image:radial-gradient(circle, #718399 1.6px, transparent 1.8px); background-position:0 0; background-size:7px 7px; opacity:.9; }
.seniority-list li::before { content: counter(seniority); display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: #fff; background: var(--navy); font-size: .7rem; font-weight: 800; }
.seniority-list li.is-dragging { opacity: .45; }
.template-groups { display: grid; gap: .8rem; }
.template-group { padding: .75rem; border: 1px solid var(--line); border-radius: 11px; background: #f8fafc; }
.template-group > header { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; margin-bottom: .65rem; }
.template-group > header h3, .template-group > header p { margin: 0; }
.template-group > header p { color: var(--muted); font-size: .72rem; }
.preference-calendar { overflow: visible; border: 1px solid var(--line); border-radius: 10px; background:#fff; }
.calendar-weekdays, .calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays b { padding: .4rem .15rem; color: var(--muted); background: #f8fafc; font-size: .62rem; text-align: center; text-transform: uppercase; }
.calendar-day-wrap { position:relative; min-width:0; min-height:58px; border-top:1px solid var(--line); border-right:1px solid var(--line); background:#fff; }
.calendar-day-wrap:nth-child(7n) { border-right:0; }
.calendar-day { position:relative; z-index:1; display:grid; width:100%; min-height:58px; padding:.25rem; border:0; border-radius:0; cursor:pointer; color:var(--ink); background:transparent; }
.calendar-day span { display: grid; place-items: center; font-size: .78rem; font-weight: 750; }
.calendar-day small { min-height:.8rem; font-size:.55rem; text-align:center; }
.calendar-day-wrap:not(.is-prefer):not(.is-avoid) .calendar-day:hover { background: var(--blue-soft); }
.calendar-day-wrap.is-prefer { color:#07543d; background:#fff; }
.calendar-day-wrap.is-avoid { color:#7b3d00; background:#fff; }
.calendar-day-wrap.is-prefer .calendar-day { color:#07543d; }
.calendar-day-wrap.is-avoid .calendar-day { color:#7b3d00; }
.calendar-day-wrap.is-prefer small, .calendar-day-wrap.is-avoid small { font-weight:800; }
.calendar-day-wrap.is-prefer::before,
.calendar-day-wrap.is-avoid::before,
.calendar-day-wrap.is-removing::before { content:""; position:absolute; z-index:0; inset:3px; border-radius:5px; pointer-events:none; }
.calendar-day-wrap.is-prefer::before { background:#dff4e9; }
.calendar-day-wrap.is-avoid::before { background:#ffead4; }
.calendar-day-wrap.is-removing::before { background:#f4f7fa; }
.calendar-day-wrap.is-saved::after,
.calendar-day-wrap.is-draft::after,
.calendar-day-wrap.is-removing::after { content:""; position:absolute; z-index:2; inset:3px; border:2px solid transparent; border-radius:5px; pointer-events:none; }
.calendar-day-wrap.is-saved.is-prefer::after { border-color:#2d9b71; }
.calendar-day-wrap.is-saved.is-avoid::after { border-color:#df8128; }
.calendar-day-wrap.is-draft::after,
.calendar-day-wrap.is-removing::after { border-style:dashed; }
.calendar-day-wrap.is-draft.is-prefer::after { border-color:#2d9b71; }
.calendar-day-wrap.is-draft.is-avoid::after { border-color:#df8128; }
.calendar-day-wrap.is-removing::after { border-color:#8495aa; }
.calendar-day-wrap.is-removing { color:var(--muted); background:#fff; }
.calendar-day-wrap.is-removing .calendar-day { color:var(--muted); }
.calendar-day-wrap.is-outside:not(.is-prefer):not(.is-avoid) { color:#a9b4c0; background:#f8fafc; }
.preference-key { display:inline-block; width:.75rem; height:.75rem; border-radius:3px; vertical-align:-.08rem; }
.preference-key.is-prefer { background:#2d9b71; }
.preference-key.is-avoid { background:#df8128; }
.preference-detail-trigger { position:absolute; z-index:3; top:.3rem; right:.3rem; display:grid; width:24px; height:24px; padding:0; place-items:center; border:1px solid color-mix(in srgb, currentColor 25%, #fff); border-radius:7px; color:inherit; background:#fff; box-shadow:0 2px 6px rgba(16,35,63,.12); cursor:pointer; }
.preference-detail-trigger svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.preference-detail-popover { position:absolute; z-index:12; right:.25rem; top:calc(100% - .15rem); display:none; width:max-content; max-width:min(240px, calc(100vw - 3rem)); padding:.5rem .6rem; border:1px solid var(--line); border-radius:8px; color:var(--ink); background:#fff; box-shadow:0 10px 26px rgba(16,35,63,.2); font-size:.7rem; line-height:1.35; text-align:left; }
.preference-detail-popover span { display:block; }
.preference-detail-popover span + span { margin-top:.25rem; color:var(--muted); white-space:normal; }
.preference-detail-trigger:hover + .preference-detail-popover,
.preference-detail-trigger:focus + .preference-detail-popover,
.preference-detail-trigger[aria-expanded="true"] + .preference-detail-popover,
.preference-detail-popover:hover { display:block; }
.calendar-day-wrap:has(.preference-detail-popover:hover),
.calendar-day-wrap:has(.preference-detail-trigger:hover),
.calendar-day-wrap:has(.preference-detail-trigger:focus),
.calendar-day-wrap:has(.preference-detail-trigger[aria-expanded="true"]) { z-index:10; }
.request-item, .task-item { display: flex; align-items: flex-start; gap: .75rem; padding: .8rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.home-shift-card { border-color: color-mix(in srgb, var(--shift-color, var(--blue)) 35%, #fff); border-left: 5px solid var(--shift-color, var(--blue)); background: color-mix(in srgb, var(--shift-color, var(--blue)) 9%, #fff); }
.home-assigned-shift { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:.55rem; }
.home-assigned-shift .request-item-main { min-width:0; }
.home-shift-card .request-item-main p { display:flex; min-width:0; align-items:baseline; flex-wrap:wrap; gap:.35rem; }
.home-shift-status { align-self:baseline; color:var(--shift-color, var(--blue-dark)); font-size:.68rem; font-weight:600; letter-spacing:.03em; line-height:inherit; text-transform:uppercase; white-space:nowrap; }
.home-shift-status::before { content:"•"; display:inline-block; margin:0 .38rem 0 .05rem; font-size:.95rem; line-height:0; vertical-align:.02em; }
.home-shift-status.is-event { color:#6941a5; }
.home-cs-incentive { align-self:baseline; }
.home-assigned-shift .coworker-button { grid-column:2; grid-row:1; align-self:center; gap:.15rem; }
.home-assigned-shift .coworker-button strong { font-size:.7rem; }
.home-open-shift { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:.55rem; }
.home-shift-chevron { align-self:center; color:var(--blue-dark); font-size:1.6rem; font-weight:800; line-height:1; }
.request-entry-grid { align-items:start; }
.request-entry-grid > .card { display:flex; min-width:0; flex-direction:column; }
.request-entry-grid > .card > form { display:flex; flex:1; flex-direction:column; }
.request-entry-grid > .card > form > .card-body { flex:1; }
.pto-request-card { align-self:start; }
.request-entry-grid > .pto-request-card > form { display:block; }
.request-entry-grid > .pto-request-card > form > .card-body { min-height:0; }
.pto-compact-flow { gap:.75rem; }
.pto-annual-election { margin:.05rem 0; }
.alert.pto-late-note { display:block; min-width:0; margin:0; }
.alert.pto-late-note strong { display:inline; }
.calendar-day .calendar-date-number.is-today { place-self:center; min-width:1.55rem; min-height:1.55rem; border-radius:50%; color:#fff; background:var(--blue); }
.calendar-day-wrap.is-locked-period .calendar-date-number:not(.is-today) { color:#784b05; }
.live-update-notice { position:fixed; z-index:1001; top:calc(env(safe-area-inset-top, 0px) + .5rem); left:50%; display:flex; align-items:center; gap:.65rem; width:max-content; max-width:calc(100% - 1rem); padding:.6rem .75rem; border:1px solid var(--line); border-radius:10px; background:#fff; box-shadow:var(--shadow); font-size:.76rem; transform:translateX(-50%); }
.pto-submitted-at { display:block; margin-top:.25rem; color:var(--muted); font-size:.7rem; }
.pto-history { margin-top:.55rem; padding:.5rem .6rem; border:1px solid var(--line); border-radius:8px; font-size:.72rem; }
.pto-history summary { cursor:pointer; color:var(--ink-2); font-weight:700; }
.pto-history ol { display:grid; gap:.55rem; margin:.6rem 0 0; padding-left:1rem; }
.pto-history time { display:block; color:var(--muted); }
.pwa-refresh-indicator { position:fixed; z-index:1000; top:calc(env(safe-area-inset-top, 0px) + .5rem); left:50%; padding:.6rem 1rem; border:1px solid var(--line); border-radius:999px; color:var(--ink); background:#fff; box-shadow:var(--shadow); font-size:.78rem; font-weight:700; transform:translate(-50%,-160%); pointer-events:none; opacity:0; }
.pwa-refresh-indicator.is-visible { opacity:1; }
html.is-standalone-pwa { overscroll-behavior-y:contain; }
.preference-calendar-card .card-header, .pto-request-card .card-header { min-height: 68px; padding-top:.9rem; padding-bottom:.9rem; }
.preference-card-header { align-items:center; }
.preference-month-nav { display:grid; width:min(100%, 320px); grid-template-columns:1fr auto 1fr; align-items:center; margin:0; }
.preference-month-nav .icon-button { justify-self:center; }
.preference-month-nav .icon-button { font-size:1.55rem; line-height:1; }
.preference-month-picker { position:relative; grid-column:2; align-self:center; justify-self:center; }
.preference-month-picker > summary { display:flex; align-items:center; justify-content:center; gap:.35rem; padding:.42rem .55rem; border-radius:8px; list-style:none; cursor:pointer; white-space:nowrap; }
.preference-month-picker > summary::-webkit-details-marker { display:none; }
.preference-month-picker > summary:hover, .preference-month-picker[open] > summary { background:var(--blue-soft); }
.preference-month-picker > summary span { display:inline-grid; min-width:1.15rem; place-items:center; color:var(--blue-dark); font-size:1.15rem; font-weight:900; line-height:.75; }
.preference-month-menu { position:absolute; z-index:40; top:calc(100% + .35rem); left:50%; display:grid; width:220px; max-height:310px; overflow-y:auto; padding:.35rem; border:1px solid var(--line); border-radius:10px; background:#fff; box-shadow:0 14px 36px rgba(16,35,63,.22); transform:translateX(-50%); }
.preference-month-menu a { padding:.55rem .65rem; border-radius:7px; color:var(--ink-2); font-size:.76rem; font-weight:700; }
.preference-month-menu a:hover { background:#f2f6fb; }
.preference-month-menu a[aria-current="page"] { color:var(--blue-dark); background:var(--blue-soft); }
.preference-draft-status { margin:.18rem 0 0; color:var(--blue-dark); font-size:.7rem; font-weight:700; }
.preference-deadline-alert { margin:0; padding:.65rem .75rem; }
.preference-deadline-alert p { margin:.12rem 0 0; font-size:.7rem; }
.preference-deadline-note { margin:0; padding:.55rem .65rem; border-radius:8px; color:var(--blue-dark); background:var(--blue-soft); font-size:.72rem; font-weight:700; }
.calendar-day-wrap.is-locked-period { background:#f7f8fa; }
.calendar-late-marker { position:absolute; right:8px; bottom:8px; padding:1px 2px; color:#9a3412; font-size:.48rem; font-weight:850; letter-spacing:.04em; line-height:1; text-transform:uppercase; }
.calendar-day:has(.calendar-late-marker:not([hidden])) { padding-bottom:18px; }
.pto-decision-actions { display:grid; justify-items:end; gap:.4rem; max-width:285px; }
.late-accommodation-check { align-items:flex-start; color:#784b05; font-size:.68rem; line-height:1.3; }
.late-accommodation-check input { margin-top:.1rem; }
.period-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.75rem; margin-bottom:1rem; }
.period-summary-grid .summary-card { display:grid; align-content:center; gap:.2rem; min-height:82px; padding:.85rem .95rem; border:1px solid var(--line); border-radius:10px; background:#fff; box-shadow:0 5px 16px rgba(16,35,63,.06); }
.period-summary-grid .summary-card > span { color:var(--muted); font-size:.7rem; font-weight:750; }
.period-summary-grid .summary-card > strong { color:var(--ink); font-size:.95rem; }
.schedule-period-list { display:grid; gap:.65rem; }
.schedule-period-row { display:grid; grid-template-columns:minmax(240px,1.25fr) minmax(220px,1fr) auto; align-items:center; gap:1rem; padding:.8rem; border:1px solid var(--line); border-radius:10px; background:#fff; }
.schedule-period-main h3 { margin:.3rem 0 .1rem; }
.schedule-period-main p, .schedule-period-main small { display:block; margin:0; color:var(--muted); font-size:.72rem; }
.schedule-period-counts { display:flex; flex-wrap:wrap; gap:.45rem; }
.schedule-period-counts span { padding:.35rem .5rem; border-radius:7px; color:var(--muted); background:#f2f5f8; font-size:.68rem; }
.schedule-period-counts span.is-late { color:#982420; background:var(--red-soft); }
.schedule-period-actions { display:flex; align-items:center; justify-content:flex-end; gap:.45rem; }
.schedule-period-actions details { position:relative; }
.schedule-period-actions summary { list-style:none; }
.schedule-period-actions summary::-webkit-details-marker { display:none; }
.period-deadline-form { position:absolute; z-index:30; top:calc(100% + .35rem); right:0; display:grid; width:300px; gap:.55rem; padding:.75rem; border:1px solid var(--line); border-radius:10px; background:#fff; box-shadow:0 14px 36px rgba(16,35,63,.22); }
.compound-field { display:grid; grid-template-columns:85px 1fr; align-items:center; gap:.5rem; }
.schedule-cycle-settings > .field { align-self:start; }
.schedule-cycle-toggle { padding:.62rem .7rem; border:1px solid var(--line); border-radius:9px; background:#f8fafc; }
.schedule-cycle-preview { padding:.65rem; border:1px solid var(--line); border-radius:9px; background:#f8fafc; }
.schedule-cycle-preview > strong { display:block; margin-bottom:.45rem; font-size:.74rem; }
.schedule-cycle-preview > div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.4rem; }
.schedule-cycle-preview span { display:grid; padding:.42rem .5rem; border-radius:7px; background:#fff; font-size:.68rem; }
.schedule-cycle-preview small { margin-top:.08rem; color:var(--muted); }
.request-section-tabs { display:flex; align-items:center; gap:.35rem; margin:0 0 1rem; padding:0 0 .45rem; border-bottom:1px solid var(--line); }
.request-section-tabs a { display:inline-flex; align-items:center; gap:.4rem; padding:.55rem .65rem; border-bottom:2px solid transparent; color:var(--muted); font-size:.78rem; font-weight:750; }
.request-section-tabs a:hover { color:var(--ink); }
.request-section-tabs a[aria-current="page"] { border-bottom-color:var(--blue); color:var(--blue-dark); }
.request-section-tabs svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.request-tab-short { display:none; }
.requests-page.request-focus-preferences .pto-request-card,
.requests-page.request-focus-preferences .request-status-grid,
.requests-page.request-focus-pto .preference-calendar-card,
.requests-page.request-focus-pto .exchange-transactions-card,
.requests-page.request-focus-exchanges .request-entry-grid,
.requests-page.request-focus-exchanges .pto-requests-card { display:none; }
.requests-page:not(.request-focus-all) .request-entry-grid,
.requests-page:not(.request-focus-all) .request-status-grid { grid-template-columns:1fr; }
.pto-request-group { overflow:hidden; border:1px solid var(--line); border-radius:11px; background:#fff; }
.pto-request-group + .pto-request-group { margin-top:.75rem; }
.pto-group-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:.7rem; padding:.72rem .8rem; border-bottom:1px solid var(--line); background:#f8fafc; }
.pto-group-heading h3 { margin:0; }
.pto-group-heading p { margin:.15rem 0 0; color:var(--muted); font-size:.72rem; }
.pto-group-days { display:grid; }
.pto-day-row { display:flex; align-items:center; justify-content:space-between; gap:.8rem; padding:.72rem .8rem; }
.pto-day-row + .pto-day-row { border-top:1px solid var(--line); }
.pto-day-main { min-width:0; }
.pto-day-main p { margin:.28rem 0 0; color:var(--muted); font-size:.72rem; }
.pto-day-row .toolbar { margin:0; }
.request-status-grid { margin-top:1rem; }
.exchange-list { display:grid; gap:.55rem; }
.exchange-transaction { align-items:center; }
.exchange-time { margin:.42rem 0 .15rem; color:var(--ink); font-size:1rem; letter-spacing:-.015em; }
.exchange-actions { display:flex; flex-wrap:wrap; gap:.4rem; flex:0 0 auto; }
.home-transaction-alert { align-items:center; text-decoration:none; }
.home-transaction-alert > span { margin-left:auto; font-size:1.35rem; }
.request-item-main, .task-item-main { flex: 1; min-width: 0; }
.request-item p, .task-item p { margin: .2rem 0 0; color: var(--muted); font-size: .76rem; line-height: 1.4; }
.department-tree > h3 { margin: 0 0 .65rem; padding: .15rem 0 .65rem; border-bottom: 1px solid var(--line); }
.department-children { margin-left: 1rem; padding-left: 1rem; border-left: 3px solid var(--blue-soft); }
.task-check { width: 23px; height: 23px; margin-top: .05rem; border: 2px solid var(--line-strong); border-radius: 50%; cursor: pointer; background: #fff; }
.task-item.is-complete { opacity: .68; }
.task-item.is-complete strong { text-decoration: line-through; }

.chat-shell { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 650px; overflow: hidden; }
.conversation-pane { border-right: 1px solid var(--line); background: #f8fafc; }
.conversation-toolbar { display: flex; gap: .4rem; padding: .75rem; border-bottom: 1px solid var(--line); }
.conversation-list { display: grid; }
.conversation-link { display: grid; gap: .2rem; padding: .72rem .8rem; border-bottom: 1px solid var(--line); }
.conversation-link:hover, .conversation-link.is-active { background: #fff; }
.conversation-link.is-active { box-shadow: inset 3px 0 var(--blue); }
.conversation-line { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.conversation-link strong { min-width:0; flex:1; overflow: hidden; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.conversation-link p { overflow: hidden; margin: 0; color: var(--muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.message-pane { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; background: #fff; }
.message-header { padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.message-header h2 { margin: 0; }
.on-duty-snapshot-meta { margin:.35rem 0 0; color:var(--muted); font-size:.72rem; }
.on-duty-snapshot-members { margin-top:.4rem; font-size:.72rem; }
.on-duty-snapshot-members summary { cursor:pointer; color:var(--blue-dark); }
.on-duty-snapshot-members ul { display:flex; flex-wrap:wrap; gap:.3rem 1.25rem; padding-left:1.1rem; margin:.45rem 0 0; }
.message-closed-note { margin:0; padding:.85rem 1rem; color:var(--muted); background:#f4f7fa; border-top:1px solid var(--line); font-size:.75rem; }
.messages { display: flex; flex-direction: column; gap: .55rem; overflow-y: auto; max-height: 560px; padding: 1rem; }
.message { max-width: min(72%, 560px); padding: .58rem .72rem; border-radius: 12px 12px 12px 3px; background: #eef3f8; }
.message.is-mine { align-self: flex-end; border-radius: 12px 12px 3px 12px; color: #fff; background: var(--blue); }
.message strong { display: block; margin-bottom: .2rem; font-size: .67rem; }
.message p { margin: 0; font-size: .82rem; line-height: 1.45; white-space: pre-wrap; }
.message small { display: block; margin-top: .2rem; font-size: .6rem; opacity: .75; }
.message-compose { display:grid; gap:.45rem; padding:.75rem; border-top:1px solid var(--line); }
.message-safety-note { display:flex; align-items:center; gap:.4rem; margin:0; color:var(--muted); font-size:.65rem; }
.info-icon { display:inline-grid; width:19px; height:19px; flex:0 0 19px; place-items:center; border-radius:50%; color:var(--blue-dark); background:var(--blue-soft); font-size:.7rem; font-weight:900; font-style:normal; }
.message-compose-row { display:grid; grid-template-columns:minmax(0,1fr) 82px; align-items:stretch; gap:.5rem; }
.message-compose textarea { min-height:54px; max-height:120px; }
.message-compose-row .button { height:auto; }
.credentials-card { margin-top:1rem; }
.credential-records-section { padding-bottom:.85rem; }
.credential-records-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.8rem 1rem .35rem; }
.credential-records-heading h3 { margin:0; font-size:.82rem; }
.credential-catalog-section { margin:0 1rem 1rem; overflow:hidden; border:1px solid #c5d3e2; border-radius:11px; background:#f3f7fb; box-shadow:inset 4px 0 0 var(--blue); }
.credential-catalog-header { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.9rem 1rem .6rem; }
.credential-catalog-header h3 { margin:0; }
.credential-catalog-header p { margin:.15rem 0 0; color:var(--muted); font-size:.72rem; }
.credential-catalog-table { padding:0 1rem 1rem; }
.credential-catalog-table table { overflow:hidden; border:1px solid var(--line); border-radius:10px; background:#fff; }
.credential-catalog-empty { padding:1rem; }
.agency-management-card { margin-bottom:0; }
.setup-agency-department-grid { margin-top:1rem; align-items:start; }
.team-management-grid > .card { min-width:0; }
.shift-lock-controls { padding-bottom:.55rem; }

.empty-state { padding: 2.5rem 1rem; color: var(--muted); text-align: center; }
.empty-icon { display: grid; width: 48px; height: 48px; margin: 0 auto .8rem; place-items: center; border-radius: 14px; color: var(--blue); background: var(--blue-soft); font-size: 1.3rem; }

dialog {
    width: min(620px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 16px;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 26px 80px rgba(16, 35, 63, .3);
}
dialog::backdrop { background: rgba(8, 24, 43, .58); backdrop-filter: blur(3px); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 0; }
.dialog-body { max-height: calc(100vh - 180px); overflow-y: auto; padding: 1.1rem; }
#absence-dialog, #assign-shift-dialog { width:min(880px, calc(100vw - 2rem)); max-height:calc(100vh - 2rem); overflow:hidden; }
#absence-dialog { height:min(520px, calc(100vh - 2rem)); }
#absence-dialog[open] { display:grid; grid-template-rows:auto auto minmax(0,1fr); }
#assign-shift-dialog[open] { display:grid; grid-template-rows:auto minmax(0,1fr); }
#absence-dialog .dialog-body, #assign-shift-dialog .dialog-body { flex:1; max-height:none; overflow-y:auto; }
#absence-dialog .dialog-body { padding:.8rem 1rem; }
#absence-dialog .form-grid { gap:.65rem .8rem; }
#absence-dialog .dialog-footer { padding:.68rem 1rem; }
.assignment-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); padding:.55rem 1.1rem 0; border-bottom:1px solid var(--line); background:#f8fafc; }
.assignment-tabs button { padding:.65rem .4rem; border:0; border-bottom:3px solid transparent; color:var(--muted); background:transparent; font:inherit; font-size:.76rem; font-weight:800; cursor:pointer; }
.assignment-tabs button[aria-selected="true"] { border-bottom-color:var(--blue); color:var(--blue-dark); }
.assignment-modal-main { display:grid; min-width:0; min-height:0; grid-template-columns:minmax(0,1fr) 180px; overflow:hidden; }
.assignment-panel-stack { min-width:0; min-height:0; overflow:hidden; }
.assignment-panel-stack [data-assignment-panel]:not([hidden]) { display:flex; height:100%; min-height:0; flex-direction:column; }
.assignment-panel-stack [data-assignment-panel] > form { display:flex; min-height:0; flex:1; flex-direction:column; }
.assignment-overlay-type { margin-top:.1rem; }
.overlay-block-field { padding-top:.75rem; border-top:1px solid var(--line); }
.overlay-block-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.45rem; padding:.65rem .7rem; border:1px solid var(--line); border-radius:10px; background:#fff; }
.overlay-block-options .check { min-width:0; }
.assignment-action-rail { display:flex; min-width:0; flex-direction:column; padding:1rem .8rem; border-left:1px solid var(--line); background:#f8fafc; }
.assignment-action-rail > strong { margin-bottom:.7rem; color:var(--muted); font-size:.68rem; letter-spacing:.05em; text-transform:uppercase; }
.assignment-action-rail form { margin:0; }
.assignment-action-rail .button { width:100%; }
.assignment-action-rail > .button-danger { margin-top:1.5rem; }
.shift-context-menu { position:fixed; z-index:10020; width:220px; padding:.35rem; border:1px solid var(--line); border-radius:10px; background:#fff; box-shadow:0 14px 40px rgba(16,35,63,.24); }
.shift-context-menu button { display:block; width:100%; padding:.55rem .65rem; border:0; border-radius:7px; color:var(--ink); background:transparent; font:inherit; font-size:.76rem; text-align:left; cursor:pointer; }
.shift-context-menu button:hover, .shift-context-menu button:focus { outline:none; background:var(--blue-soft); }
.shift-context-menu button.is-danger { color:var(--red); }
.shift-context-menu hr { margin:.3rem; border:0; border-top:1px solid var(--line); }
.assignment-audit { padding: .8rem 1.1rem 0; }
.assignment-audit > summary { display: inline-flex; cursor: pointer; list-style: none; }
.assignment-audit > summary::-webkit-details-marker { display: none; }
.audit-history { display: grid; gap: .35rem; margin-top: .7rem; padding: .7rem; border-radius: 8px; background: #f8fafc; }
.audit-history p { margin: 0; color: var(--muted); font-size: .76rem; }
.assignment-action-bar { display:flex; align-items:flex-start; gap:.55rem; padding:.8rem 1.1rem; border-bottom:1px solid var(--line); background:#f8fafc; }
.assignment-action-bar form { margin:0; }
.assignment-action-bar .assignment-audit { position:relative; padding:0; }
.assignment-action-bar .audit-history { position:absolute; z-index:5; top:calc(100% + .4rem); left:0; width:min(520px, calc(100vw - 4rem)); max-height:260px; overflow:auto; box-shadow:var(--shadow); }
.schedule-toolbar { width:100%; align-items:center; }
.schedule-toolbar-left, .schedule-toolbar-right { width:auto; margin:0; }
.schedule-toolbar-left { min-width:0; flex:1; flex-wrap:wrap; }
.schedule-toolbar-right { margin-left:auto; justify-content:flex-end; }
.additional-count { display:block; padding:.45rem .25rem; color:var(--blue-dark); font-size:.78rem; font-weight:750; }
.audit-scroll { max-height:480px; overflow-y:auto; scrollbar-width:thin; }
.on-duty-list { display:flex; flex-wrap:wrap; gap:.65rem; }
.on-duty-person { display:flex; align-items:center; gap:.55rem; min-width:210px; padding:.6rem .7rem; border:1px solid var(--line); border-radius:10px; background:#fff; }
.on-duty-person small { display:block; margin-top:.12rem; color:var(--muted); }
.dialog-footer { display: flex; justify-content: flex-end; gap: .55rem; padding: .8rem 1.1rem; border-top: 1px solid var(--line); background: #f8fafc; }

.toast-region { position: fixed; right: 1rem; bottom: 1rem; z-index: 100; display: grid; width: min(380px, calc(100vw - 2rem)); gap: .5rem; }
.dialog-toast-region { position: fixed; z-index: 10002; right: 1rem; bottom: 1rem; display: grid; width: min(380px, calc(100vw - 2rem)); gap: .5rem; pointer-events: none; }
.toast { display: flex; gap: .55rem; padding: .75rem .85rem; border-radius: 11px; color: #fff; background: var(--navy); box-shadow: 0 10px 35px rgba(16,35,63,.28); animation: toast-in .22s ease both; }
.toast.is-error { background: #8f211d; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.bottom-nav, .mobile-nav-shell { display: none; }
.auth-page { display: grid; min-height: 100vh; grid-template-columns: minmax(360px, .9fr) minmax(520px, 1.3fr); }
.auth-panel { display: grid; align-content: center; padding: clamp(2rem, 6vw, 5rem); background: #fff; }
.auth-form { width: 100%; max-width: 430px; margin: 0 auto; }
.login-brand-logo { width:min(100%, 390px); height:auto; margin:0 0 2.4rem; }
.login-policy-consent { margin:.85rem 0 0; color:var(--muted); font-size:.72rem; line-height:1.5; text-align:center; }
.login-policy-consent a { color:var(--blue-dark); font-weight:750; text-decoration:underline; text-underline-offset:2px; }
.auth-visual .login-visual-eyebrow { color:#9bded5; }
.login-policy-break { white-space:nowrap; }
.auth-panel .eyebrow { color:#008f8a; }
.auth-panel h1 { color:#0c2647; }
.auth-visual { position: relative; display: grid; overflow: hidden; align-content: center; padding: clamp(2rem, 6vw, 6rem); color: #fff; background: linear-gradient(145deg, #0c2744 0%, #164a7f 55%, #087f75 135%); }
.auth-visual::before { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -140px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; box-shadow: 0 0 0 80px rgba(255,255,255,.035), 0 0 0 160px rgba(255,255,255,.025); }
.auth-visual-content { position: relative; max-width: 580px; }
.auth-visual h1 { font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: .98; }
.auth-visual p { max-width: 36rem; color: #d7e7f5; font-size: 1.05rem; line-height: 1.6; }
.auth-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-top: 2.4rem; }
.auth-point { padding: .8rem; border: 1px solid rgba(255,255,255,.16); border-radius: 11px; background: rgba(255,255,255,.07); }
.auth-point strong { display: block; font-size: .82rem; }
.auth-point span { display: block; margin-top: .2rem; color: #c8dcec; font-size: .7rem; }
.legal-page { min-height:100vh; padding:clamp(1rem,4vw,3rem); background:var(--canvas); }
.legal-document { width:min(820px,100%); margin:0 auto; padding:clamp(1.25rem,4vw,2.5rem); border:1px solid var(--line); border-radius:var(--radius); background:#fff; box-shadow:var(--shadow); }
.legal-brand { display:block; width:min(260px,70%); margin-bottom:1.5rem; }
.legal-brand img { width:100%; height:auto; }
.legal-document > header { margin-bottom:1.6rem; }
.legal-document > section { padding:1rem 0; border-top:1px solid var(--line); }
.legal-document > section h2 { margin-bottom:.4rem; }
.legal-document > section p { margin:0; color:var(--ink-2); line-height:1.65; }
.legal-document > footer { padding-top:1.25rem; border-top:1px solid var(--line); }
.home-brand-wordmark { display:none; width:clamp(140px,16vw,205px); aspect-ratio:1494/272; margin-left:auto; overflow:hidden; }
.home-brand-wordmark img { display:block; width:100%; height:auto; }

.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.mobile-only { display: none; }

@media (max-width: 980px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: initial; }
    .home-brand-wordmark { display:block; }
    .topbar { display:none; }
    .visually-hidden-picker { inset:0; z-index:2; width:100%; height:100%; pointer-events:auto; cursor:pointer; }
    .workspace { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .main { padding: 1rem 1rem calc(5.8rem + 10px + env(safe-area-inset-bottom)); }
    .expiration-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .period-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .schedule-period-row { grid-template-columns:1fr; }
    .schedule-period-actions { justify-content:flex-start; }
    .period-deadline-form { right:auto; left:0; }
    .mobile-nav-shell {
        position:fixed;
        z-index:60;
        right:0;
        bottom:0;
        left:0;
        display:block;
    }
    .mobile-nav-shell::before { display:none; }
    .bottom-nav {
        position:relative;
        z-index:3;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        padding: .35rem max(.35rem, env(safe-area-inset-right)) calc(.35rem + env(safe-area-inset-bottom)) max(.35rem, env(safe-area-inset-left));
        border-top: 1px solid var(--line);
        background: rgba(255,255,255,.97);
        backdrop-filter: blur(14px);
    }
    .mobile-tray-handle {
        position:absolute;
        z-index:5;
        left:50%;
        bottom:calc(100% - 1px);
        display:grid;
        width:56px;
        height:26px;
        padding:0;
        place-items:center;
        transform:translateX(-50%);
        border:1px solid var(--line);
        border-bottom:0;
        border-radius:18px 18px 0 0;
        color:var(--blue-dark);
        background:#fff;
        box-shadow:0 -5px 12px rgba(16,35,63,.06);
    }
    .mobile-tray-handle svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; transition:transform .2s ease; }
    .mobile-nav-shell.is-open .mobile-tray-handle svg { transform:rotate(180deg); }
    .mobile-navigation-tray {
        position:absolute;
        z-index:2;
        right:0;
        bottom:100%;
        left:0;
        max-height:calc(100vh - 88px);
        overflow-y:auto;
        padding:.9rem max(.9rem, env(safe-area-inset-right)) .9rem max(.9rem, env(safe-area-inset-left));
        border-top:1px solid var(--line);
        background:#fff;
        box-shadow:0 -18px 35px rgba(16,35,63,.14);
        opacity:0;
        pointer-events:none;
        transform:translateY(calc(100% + 30px));
        transition:transform .22s ease, opacity .18s ease;
    }
    .mobile-agency-switcher { margin:0 0 .7rem; }
    .mobile-agency-switcher .field { gap:.25rem; }
    .mobile-agency-switcher .field > span { font-size:.62rem; }
    .mobile-agency-switcher select { min-height:38px; }
    .mobile-nav-shell.is-open .mobile-navigation-tray { opacity:1; pointer-events:auto; transform:translateY(0); }
    .mobile-tray-utility-row { display:flex; min-width:0; align-items:center; gap:.4rem; }
    .mobile-push-status { display:grid; width:38px; height:38px; flex:0 0 38px; padding:0; place-items:center; border:1px solid #efc1bf; border-radius:10px; color:var(--red); background:var(--red-soft); }
    .mobile-push-status[data-state="enabled"] { border-color:#a9ddd4; color:var(--teal); background:var(--teal-soft); }
    .mobile-push-status:disabled { cursor:default; opacity:1; }
    .mobile-push-status > svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
    .mobile-department-form { min-width:72px; flex:1; }
    .mobile-department-picker { position:relative; display:flex; min-height:38px; min-width:0; align-items:center; gap:.25rem; padding:.45rem .5rem; border:1px solid var(--line-strong); border-radius:10px; color:var(--ink); background:#f8fafc; font-size:.7rem; font-weight:750; }
    .mobile-department-picker > span { min-width:0; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .mobile-department-picker > svg { width:15px; height:15px; flex:0 0 15px; transform:rotate(180deg); fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
    .mobile-department-picker select { position:absolute; inset:0; width:100%; cursor:pointer; opacity:0; }
    .mobile-view-switch { display:flex; min-width:0; flex:0 1 auto; align-items:center; justify-content:center; gap:.28rem; margin:0; }
    .mobile-view-switch label { position:relative; display:block; width:38px; height:22px; flex:0 0 38px; }
    .mobile-view-switch input { position:absolute; width:1px; height:1px; opacity:0; }
    .mobile-view-switch i { position:absolute; inset:0; border-radius:999px; background:#cbd5df; transition:background .18s ease; }
    .mobile-view-switch i::after { content:""; position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%; background:#fff; box-shadow:0 1px 4px rgba(16,35,63,.25); transition:transform .18s ease; }
    .mobile-view-switch input:checked + i { background:var(--teal); }
    .mobile-view-switch input:checked + i::after { transform:translateX(16px); }
    .mobile-view-icon { display:grid; width:24px; height:24px; place-items:center; border-radius:7px; color:var(--muted); }
    .mobile-view-icon.is-active { color:var(--blue-dark); background:var(--blue-soft); }
    .mobile-view-icon > svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
    .mobile-general-shortcuts, .mobile-request-shortcuts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.55rem; margin-top:.8rem; }
    .mobile-request-shortcuts { padding-top:.8rem; border-top:1px solid var(--line); }
    .mobile-general-shortcuts a, .mobile-request-shortcuts a { display:flex; min-height:66px; flex-direction:column; align-items:center; justify-content:center; gap:.35rem; padding:.45rem; border:1px solid var(--line); border-radius:10px; color:var(--ink-2); background:#fff; font-size:.68rem; font-weight:750; line-height:1.15; text-align:center; }
    .mobile-general-shortcuts svg, .mobile-request-shortcuts svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
    .upcoming-preference-list { grid-template-columns: 1fr; }
    .bottom-nav a { display: grid; gap: .18rem; place-items: center; min-height: 48px; border-radius: 8px; color: var(--muted); font-size: .61rem; font-weight: 750; }
    .bottom-nav a[aria-current="page"] { color: var(--blue-dark); background: var(--blue-soft); }
    .bottom-nav .nav-icon, .bottom-nav .nav-icon svg { width:21px; height:21px; }
    .page-heading { align-items: stretch; }
    .schedule-page > .page-heading { display:block; }
    .schedule-page > .page-heading > .toolbar:empty { display:none; }
    .desktop-schedule { display: none; }
    .mobile-schedule { display: block; }
    .schedule-date-navigation { display:grid; width:100%; grid-template-columns:minmax(44px,1fr) minmax(0,max-content) minmax(44px,1fr); align-items:center; gap:0; margin-bottom:0; }
    .schedule-date-navigation > .icon-button { width:44px; justify-self:center; font-size:1.75rem; line-height:1; }
    .schedule-date-navigation .week-picker-wrap { grid-column:2; min-width:0; justify-self:center; }
    .schedule-date-navigation .week-range-button { display:flex; width:auto; align-items:center; justify-content:center; gap:.3rem; font-size:clamp(1.3rem, 4vw, 1.55rem); white-space:nowrap; }
    .schedule-toolbar { margin-bottom:.45rem; }
    .schedule-toolbar.is-mobile-empty { display:none; }
    .coverage-mobile-alert { margin-bottom:.45rem; }
    .route-open-shifts .stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .route-open-shifts .page-heading .desktop-only { display:none !important; }
    .open-shift-collapsed > span:nth-child(2) .badge { justify-self:start; }
    .request-section-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.4rem; margin-bottom:.75rem; padding:0; border:0; }
    .request-section-tabs a { min-width:0; min-height:46px; justify-content:center; padding:.45rem .5rem; border:1px solid var(--line); border-radius:9px; background:#fff; color:var(--ink-2); white-space:nowrap; font-size:.73rem; }
    .request-section-tabs a[aria-current="page"] { border-color:var(--blue); color:var(--blue-dark); background:var(--blue-soft); }
    .request-section-tabs [data-request-section="preferences"] .request-tab-full { display:none; }
    .request-section-tabs [data-request-section="preferences"] .request-tab-short { display:inline; }
    .preference-card-header { display:grid; min-height:0; gap:.55rem; }
    .preference-card-header h2 { white-space:nowrap; }
    .preference-month-nav { width:100%; max-width:none; grid-template-columns:minmax(44px,1fr) minmax(0,max-content) minmax(44px,1fr); }
    .preference-month-nav strong { min-width:0; }
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .open-shift { grid-template-columns: 1fr; }
    .open-shift-section + .open-shift-section { border-top: 1px solid var(--line); border-left: 0; }
    .chat-shell { min-height: calc(100vh - 160px); grid-template-columns: 230px minmax(0, 1fr); }
    .auth-page { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
}

@media (max-width: 640px) {
    .main { padding: .85rem .75rem calc(5.8rem + 10px + env(safe-area-inset-bottom)); }
    .page-heading { display: grid; }
    .schedule-page > .page-heading { gap:.45rem; margin-bottom:.45rem; }
    .page-heading .toolbar { margin: 0; }
    .schedule-heading-print { display:none; }
    .toolbar { align-items: stretch; }
    .toolbar-spacer { display: none; }
    .week-title { flex: 1; min-width: 0; font-size: .92rem; }
    .form-grid, .form-grid-3, .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .stat-grid { gap: .5rem; }
    .stat { padding: .7rem .75rem; }
    .stat-value { font-size: 1.15rem; }
    .period-summary-grid { grid-template-columns:1fr; }
    .setup-primary-tabs { overflow-x:auto; }
    .setup-primary-tabs a { flex:0 0 auto; white-space:nowrap; }
    .schedule-cycle-preview > div { grid-template-columns:1fr; }
    .period-deadline-form { position:fixed; top:50%; right:1rem; left:1rem; width:auto; transform:translateY(-50%); }
    .card { border-radius: 12px; box-shadow: none; }
    .card-body, .card-header { padding: .85rem; }
    .chat-shell { display: block; min-height: 0; }
    .conversation-pane { border-right: 0; }
    .conversation-pane.has-selection { display: none; }
    .message-pane:not(.has-selection) { display: none; }
    .messages { min-height: calc(100vh - 300px); max-height: calc(100vh - 270px); }
    .message { max-width: 87%; }
    .open-shift { padding: 0; }
    .mobile-day-list .shift-card.is-open { padding-right:4.2rem; }
    .open-shift-collapsed { min-height:84px; padding:.7rem .75rem .7rem 1rem; }
    .mobile-day { overflow:hidden; margin-bottom:.8rem; border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:var(--shadow); }
    .mobile-day-title { margin:0; border-top:0; background:#fff; }
    .mobile-day-list { padding:.55rem; }
    .home-brand-wordmark { width:205px; max-width:48vw; }
    .home-shift-card { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:.55rem; }
    .home-shift-card .coworker-button { grid-column:2; }
    .home-shift-card .request-item-main strong { white-space:nowrap; }
    .message-compose-row { grid-template-columns:minmax(0,1fr) 72px; }
    .bid-row { grid-template-columns: 1fr auto; }
    .bid-row > :nth-child(3) { grid-column: 1 / -1; }
    .auth-panel { padding: 1.25rem; }
    .login-brand-logo { width:min(100%, 360px); margin-bottom:2rem; }
    .login-policy-break { display:block; }
    .exchange-transaction { align-items:flex-start; }
    .exchange-actions { width:100%; }
    .exchange-actions .button { flex:1; }
    .pto-day-row { align-items:flex-start; flex-direction:column; }
    .pto-day-row .toolbar { width:100%; }
    .pto-day-row .toolbar .button { flex:1; }
    #absence-dialog, #assign-shift-dialog { width:calc(100vw - 1rem); height:calc(100vh - 1rem); max-height:calc(100vh - 1rem); }
    .assignment-modal-main { grid-template-columns:1fr; grid-template-rows:minmax(0,1fr) auto; }
    .assignment-action-rail { flex-direction:row; gap:.5rem; padding:.65rem .75rem; border-top:1px solid var(--line); border-left:0; }
    .assignment-action-rail > strong { display:none; }
    .assignment-action-rail form { flex:1; }
    .assignment-action-rail > .button { flex:1; }
    .assignment-action-rail > .button-danger { flex:1; margin-top:0; }
    .overlay-block-options { grid-template-columns:1fr; }
}

@media print {
    @page { size: landscape; margin: .35in; }
    body { background: #fff; color: #000; }
    .topbar, .sidebar, .bottom-nav, .mobile-nav-shell, .no-print, dialog, .toast-region { display: none !important; }
    .workspace { display: block; }
    .main { padding: 0; }
    .card, .schedule-board { overflow: visible; border-color: #aaa; box-shadow: none; }
    .mobile-schedule { display: none !important; }
    .desktop-schedule { display: block !important; }
    .coverage-grid, .people-board { width: 100%; min-width: 0; }
    .coverage-grid { grid-template-columns: repeat(var(--schedule-days, 7), minmax(0, 1fr)); }
    .people-row { grid-template-columns: 145px repeat(var(--schedule-days, 7), minmax(0, 1fr)); break-inside: avoid; }
    .day-column { min-height: 0; }
    .day-heading, .people-header, .person-cell { position: static; }
    .month-calendar { box-shadow:none; }
    .month-day { min-height:90px; padding:.25rem; }
    .month-item { padding:.18rem .25rem; }
    .month-item time { font-size:5.5pt; }
    .month-item strong { font-size:6.5pt; }
    .shift-card { padding: .25rem .3rem .25rem .4rem; break-inside: avoid; }
    .shift-time, .shift-name { font-size: 7pt; }
    .shift-meta { font-size: 6pt; }
    .page-heading { margin-bottom: .6rem; }
    .print-identity { display:block !important; border-bottom:1px solid #aaa; padding-bottom:.35rem; margin-bottom:.6rem; }
    .print-identity h1 { font-size:14pt; margin:0 0 .15rem; }
    .print-identity p { font-size:9pt; margin:0; }
    .print-break { break-before: page; }
    table { font-size: 10pt; }
}
.print-identity { display:none; }
[hidden] { display: none !important; }

/* Match the open-row emblem to the existing teammate avatar footprint. */
.avatar .open-shifts-avatar-icon { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

.reports-page .report-summary { grid-template-columns:repeat(var(--report-stat-count,4),minmax(0,1fr)); }
.reports-page .report-summary .stat { padding:.7rem .8rem; }
.pto-daily-hours { display:grid; grid-template-columns:repeat(auto-fit,minmax(135px,1fr)); gap:.65rem; }
.pto-daily-hours:empty { display:none; }
.pto-decision-actions input[name="pto_hours"] { max-width:110px; }
.schedule-date-method { min-width:0; padding:.85rem; border:1px solid var(--line); border-radius:10px; background:var(--page-bg,#f5f8fc); }
.schedule-date-method legend { padding:0 .35rem; font-size:.8rem; font-weight:750; }
.schedule-date-method [data-add-template-date] { margin-top:.65rem; }
.date-method-or { color:var(--muted); text-align:center; font-size:.7rem; font-weight:700; }
.home-shift-status.is-on-call, .shift-card .shift-on-call { color:#111 !important; }
.clock-change-label { display:block; font-size:.65rem; font-weight:600; line-height:1.3; color:#364152; }
.mobile-day-empty-note { color:var(--muted); font-size:.65rem; font-weight:500; margin-left:.35rem; }
.coverage-alarm[data-coverage-tip] { cursor:help; }
.coverage-hover-tooltip { position:fixed; z-index:2000; max-width:min(320px,calc(100vw - 16px)); padding:.65rem .8rem; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); box-shadow:0 8px 24px #10233f33; font-size:.78rem; line-height:1.45; pointer-events:none; }
.reports-heading-actions, .reports-week-controls { display:flex; align-items:center; gap:.5rem; }
.reports-heading-actions { flex-shrink:0; }
.reports-page .reports-heading { align-items:center; margin-bottom:.8rem; }
.report-print-menu { position:relative; }
.report-print-menu > summary { list-style:none; cursor:pointer; display:flex; align-items:center; gap:.5rem; }
.report-print-menu > summary::-webkit-details-marker { display:none; }
.report-print-panel { position:absolute; z-index:30; right:0; top:calc(100% + .4rem); width:340px; max-width:calc(100vw - 2rem); padding:1rem; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 12px 32px rgba(16,35,63,.18); }
.report-print-panel fieldset { border:0; padding:0; margin:0 0 .85rem; min-width:0; }
.report-print-panel legend { padding:0; margin-bottom:.65rem; font-weight:700; font-size:.85rem; }
.report-print-panel .check { display:flex; align-items:center; gap:.55rem; margin:.65rem 0; }
.report-print-panel .report-print-all { padding-bottom:.65rem; border-bottom:1px solid var(--line); }
.report-print-panel > button { width:100%; }
@media (max-width:700px) { .reports-heading-actions { flex-wrap:wrap; } }
@media print {
    .reports-page .report-print-excluded { display:none !important; }
    .reports-page .print-break { break-before:auto; }
    .reports-page .report-columns { display:block; margin-top:0 !important; }
    .reports-page [data-report-id] { margin-top:0 !important; }
    .reports-page .report-print-next { break-before:page; }
    .reports-page .audit-scroll, .reports-page .table-wrap { max-height:none; overflow:visible; }
}
@media (max-width:700px) { .reports-page .report-summary { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* Domain cutover: shown only on the original subdomain to help installed-PWA users migrate. */
.shiftapex-domain-move {
    position: sticky; top: 0; z-index: 1100;
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
    gap: .45rem .85rem; padding: .65rem 1rem;
    background: #e8f3ff; color: #153b62; border-bottom: 1px solid #b9d8f6;
    font-size: .88rem; line-height: 1.35; text-align: center;
    padding-top: max(.65rem, env(safe-area-inset-top));
}
.shiftapex-domain-move strong { font-weight: 700; }
.shiftapex-domain-move a { color: #064f98; font-weight: 700; text-decoration: underline; }
.shiftapex-domain-move button {
    background: transparent; color: #153b62; border: 0; border-radius: .3rem;
    cursor: pointer; font-size: 1.25rem; line-height: 1; padding: 0 .3rem;
}
.shiftapex-domain-move button:focus-visible, .shiftapex-domain-move a:focus-visible {
    outline: 2px solid #064f98; outline-offset: 3px;
}
