/* Provider Scheduling – styles (V0.74 "calm calendar" look).
   A white menu on the left (a bar at the bottom on phones), white cards on a soft grey page, one indigo accent,
   few lines, people shown as name pills with initials, and light and dark themes from the same tokens.
   No libraries. Uses Inter when the computer has it, otherwise the system font (San Francisco, Segoe UI). */

/* ---------- Tokens ---------- */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #eef0f4;
  --border: #e6e8ec;
  --border-strong: #d2d6dd;
  --text: #111827;
  --text-2: #374151;
  --muted: #5b6372;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-text: #ffffff;
  --link: #4338ca;
  --accent-soft: #eef2ff;
  --accent-soft-2: #e0e7ff;
  --ring: rgba(79, 70, 229, .25);
  --danger: #c0262d;
  --danger-soft: #fdeeee;
  --danger-line: #f3c1c3;
  --warn: #92400e;
  --warn-soft: #fffbeb;
  --warn-line: #f6d38e;
  --warn-ring: #d97706;
  --ok: #166534;
  --ok-soft: #ecfdf3;
  --ok-line: #b7e4c7;
  --ok-dot: #16a34a;
  --weekend: #fafafb;
  --today: #f6f6ff;
  --grid-line: #f0f1f4;
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 12px 32px -8px rgba(16, 24, 40, .18), 0 2px 6px rgba(16, 24, 40, .05);
  --shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, .25);
  --side-w: 240px;
  --rail-w: 72px;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6372' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E");
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a21;
    --surface-2: #1c2029;
    --surface-3: #242935;
    --border: #2a303c;
    --border-strong: #3a4250;
    --text: #e8eaf0;
    --text-2: #c8ccd6;
    --muted: #9aa1ae;
    --accent: #4f46e5;
    --accent-hover: #5b54ec;
    --link: #a5b4fc;
    --accent-soft: #1d1f3d;
    --accent-soft-2: #2a2c58;
    --ring: rgba(165, 180, 252, .35);
    --danger: #ff9b95;
    --danger-soft: #3a1d20;
    --danger-line: #6b3035;
    --warn: #f3b866;
    --warn-soft: #33260f;
    --warn-line: #5e4517;
    --warn-ring: #d88a1f;
    --ok: #72d39e;
    --ok-soft: #12301f;
    --ok-line: #24553a;
    --ok-dot: #4ade80;
    --weekend: #14171e;
    --today: #1a1b33;
    --grid-line: #20242d;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-md: 0 12px 32px -8px rgba(0, 0, 0, .6);
    --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .6);
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa1ae' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", "Inter var", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "cv11", "ss03";
  font-size: .9375rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3 { color: var(--text); line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 1.05rem; font-weight: 650; }
h3 { font-size: .9rem; font-weight: 650; margin: 1.25rem 0 .5rem; }
p { margin: 0 0 .8rem; }
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
a:hover { text-decoration-color: currentColor; }
code { font: .85em ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--surface-3); padding: .1em .35em; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0; }
details > summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 1.15rem; height: 1.15rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.logo { width: 32px; height: 32px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: .5rem; z-index: 100; background: var(--surface); color: var(--link); padding: .5rem .9rem;
  border: 2px solid var(--accent); border-radius: 8px; font-weight: 600; }
.skip-link:focus { left: .5rem; }
.phone-only { display: none !important; }
.print-only { display: none; }

/* ---------- App frame: menu on the left ---------- */
body.signed-in { padding-left: var(--side-w); }
header.top { display: none; }
header.top .brand, .side-head .brand, .solo-top .brand {
  display: inline-flex; align-items: center; gap: .65rem; color: var(--text); text-decoration: none;
  font-weight: 700; font-size: .98rem; letter-spacing: -.01em; white-space: nowrap;
}
.solo-top { display: flex; align-items: center; padding: 1rem 1.5rem; }
.sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 30; width: var(--side-w);
  display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border);
}
.side-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 1.15rem .85rem .85rem 1.2rem; }
.nav-toggle, .icon-btn {
  display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; margin: 0; flex: none;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; box-shadow: none;
}
.nav-toggle:hover, .icon-btn:hover { background: var(--surface-3); color: var(--text); }
.nav-toggle .ic, .icon-btn .ic { width: 1.2rem; height: 1.2rem; }
#main-nav { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 0 .75rem .75rem; }
.nav-list { list-style: none; margin: 0; padding: .4rem 0; display: flex; flex-direction: column; gap: 2px; }
.nav-list + .nav-list { border-top: 1px solid var(--border); padding-top: .55rem; margin-top: .2rem; }
.nav-list.nav-end { margin-top: auto; }
.nav-list a {
  position: relative; display: flex; align-items: center; gap: .75rem; min-height: 2.4rem; padding: 0 .75rem;
  border-radius: 8px; color: var(--text-2); font-weight: 550; font-size: .9rem; text-decoration: none;
  transition: background-color .15s, color .15s;
}
.nav-list a .ic { width: 1.25rem; height: 1.25rem; color: var(--muted); transition: color .15s; }
.nav-list a:hover { background: var(--surface-2); color: var(--text); }
.nav-list a:hover .ic { color: var(--text-2); }
.nav-list a[aria-current="page"] { background: var(--accent-soft); color: var(--link); }
.nav-list a[aria-current="page"] .ic { color: var(--link); }
.nav-list .count { margin-left: auto; }
.nav-user { display: flex; align-items: center; gap: .65rem; margin-top: .5rem; padding: .8rem .35rem .2rem .5rem; border-top: 1px solid var(--border); }
.avatar {
  display: grid; place-items: center; width: 2.1rem; height: 2.1rem; flex: none; border-radius: 50%;
  background: var(--accent-soft-2); color: var(--link); font-size: .75rem; font-weight: 700; letter-spacing: .02em;
}
.nav-user .who { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.who-name { font-size: .84rem; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-mail { font-size: .74rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout { margin: 0; }
.logout-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.count {
  display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding: 0 .35rem; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; line-height: 1; font-style: normal;
}

/* Narrow menu: icons only (the toggle at the top of the menu; always on tablets) */
html.nav-mini body.signed-in { padding-left: var(--rail-w); }
html.nav-mini .sidebar { width: var(--rail-w); }
html.nav-mini .sidebar .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.nav-mini .side-head { flex-direction: column; gap: .6rem; padding: 1rem .5rem .6rem; }
html.nav-mini #main-nav { padding: 0 .6rem .75rem; }
html.nav-mini .nav-list a { justify-content: center; padding: 0; min-height: 2.6rem; }
html.nav-mini .nav-list .count { position: absolute; top: .1rem; right: .1rem; min-width: 1.05rem; height: 1.05rem; font-size: .62rem; }
html.nav-mini .nav-user { flex-direction: column; padding: .75rem 0 .2rem; }
@media (min-width: 760px) and (max-width: 1099px) {
  body.signed-in { padding-left: var(--rail-w); }
  .sidebar { width: var(--rail-w); }
  .sidebar .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .side-head { flex-direction: column; gap: .6rem; padding: 1rem .5rem .6rem; }
  .nav-toggle { display: none; }
  #main-nav { padding: 0 .6rem .75rem; }
  .nav-list a { justify-content: center; padding: 0; min-height: 2.6rem; }
  .nav-list .count { position: absolute; top: .1rem; right: .1rem; min-width: 1.05rem; height: 1.05rem; font-size: .62rem; }
  .nav-user { flex-direction: column; padding: .75rem 0 .2rem; }
}

.page { display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }
main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 2rem 2.25rem 3rem; }
body.wide main { max-width: none; padding: 1.5rem 1.5rem 2rem; }
.page.solo { min-height: calc(100vh - 4.5rem); }
footer.app { text-align: center; color: var(--muted); font-size: .75rem; padding: 1rem 1rem 1.5rem; }

/* ---------- Page headings and sections ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1.5rem; margin: 0 0 1.5rem; }
.page-head h1 { margin: 0; }
.page-head .lede { margin: .4rem 0 0; color: var(--muted); font-size: .95rem; max-width: 46rem; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.page-head .meta { color: var(--muted); font-size: .9rem; }
.eyebrow { margin: 0 0 .3rem; font-size: .75rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem; margin: 0 0 1.25rem; box-shadow: var(--shadow-sm);
}
.card > h2:first-child, .card-head { margin-top: 0; }
.card h2 { margin: 0 0 1rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .6rem; }
.card h2 .muted { font-size: .82rem; font-weight: 500; letter-spacing: 0; }
.card > :last-child { margin-bottom: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.card-head h2 { margin: 0; }
.card.highlight { border-color: var(--accent-soft-2); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-sm); }
.card-foot { margin: 1rem 0 0; padding-top: .85rem; border-top: 1px solid var(--border); font-size: .875rem; }
.section { margin: 0 0 1.75rem; }
.section > h2 { margin: 0 0 .85rem; }
.narrow { max-width: 440px; margin: 0 auto; }
.narrow-wide { max-width: 680px; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 1.25rem; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 1.25rem; align-items: start; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4rem; padding: 1.5rem 1rem; color: var(--muted); }
.empty .ic { width: 1.8rem; height: 1.8rem; color: var(--border-strong); }
.empty p { margin: 0; }

/* ---------- Buttons ---------- */
button { font: inherit; color: inherit; }
.btn, .button, button:not([class]) {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; height: 2.3rem; padding: 0 .95rem; margin: 0;
  border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text-2);
  font: inherit; font-size: .875rem; font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none;
  cursor: pointer; box-shadow: var(--shadow-xs); transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); text-decoration: none; }
.btn .ic { width: 1.05rem; height: 1.05rem; }
.btn.primary, .button, button:not([class]) { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover, .button:hover, button:not([class]):hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-text); }
.btn.danger { color: var(--danger); border-color: var(--danger-line); }
.btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.small { height: 1.85rem; padding: 0 .6rem; font-size: .78rem; border-radius: 7px; }
.btn[disabled], button[disabled] { opacity: .5; cursor: not-allowed; }
button.link { display: inline; height: auto; padding: 0; margin: 0; border: 0; background: none; box-shadow: none; color: var(--link);
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.shortcuts, .actions, .actions-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.actions-row { margin: 1rem 0 .25rem; }

/* Segmented control (view switch, folders, request type) */
.tabs, .kind-switch {
  display: inline-flex; gap: 2px; padding: 3px; margin: 0; background: var(--surface-3); border-radius: 10px; max-width: 100%; overflow-x: auto;
}
.tab {
  display: inline-flex; align-items: center; height: 2rem; padding: 0 .85rem; border-radius: 8px; color: var(--muted);
  font-size: .85rem; font-weight: 600; white-space: nowrap; text-decoration: none; transition: background-color .15s, color .15s;
}
.tab:hover { color: var(--text); }
.tab.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.kind-switch { margin-bottom: 1.25rem; }

/* ---------- Forms ---------- */
label { display: block; margin: 1rem 0 .4rem; font-size: .85rem; font-weight: 600; color: var(--text-2); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=month], input[type=tel],
input[type=number], input[type=search], input[type=url], select, textarea {
  height: 2.5rem; padding: 0 .75rem; font: inherit; font-size: .9rem; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: var(--shadow-xs); max-width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: .6rem .75rem; line-height: 1.5; resize: vertical; }
select[multiple] { height: auto; padding: .35rem; }
select:not([multiple]) { -webkit-appearance: none; appearance: none; padding-right: 2.1rem;
  background-image: var(--select-arrow); background-repeat: no-repeat; background-position: right .6rem center; background-size: 1rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[readonly] { background: var(--surface-2); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; margin: 0; flex: none; }
.narrow input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .narrow select, .narrow textarea,
.narrow-wide input:not([type=checkbox]):not([type=radio]):not([type=hidden]), .narrow-wide select, .narrow-wide textarea { width: 100%; }
label.check { display: flex; align-items: flex-start; gap: .6rem; margin: .85rem 0; font-weight: 500; font-size: .9rem; color: var(--text); }
label.check input { margin-top: .15rem; }
.check { margin: .75rem 0; }
.date-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.date-row > div { flex: 1 1 10rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1.4rem; }
.hint { font-size: .8rem; color: var(--muted); margin: .4rem 0 0; }
.errorlist { list-style: none; color: var(--danger); padding: 0; margin: .4rem 0; font-size: .85rem; font-weight: 600; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); margin: 1rem 0; padding: .5rem 1rem .75rem; }
legend { font-size: .85rem; font-weight: 650; padding: 0 .35rem; color: var(--text-2); }
fieldset.recipients label.check { margin: .5rem 0; }

/* Filter bars */
.filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem 1rem; margin: 0 0 1.25rem; padding: .9rem 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs);
}
.filters label { display: flex; flex-direction: column; gap: .35rem; margin: 0; font-size: .75rem; font-weight: 600; color: var(--muted); }
.filters select, .filters input[type=date], .filters input[type=month], .filters input[type=text] { height: 2.25rem; font-size: .875rem; max-width: 14rem; }
.filters label.check { flex-direction: row; align-items: center; height: 2.25rem; font-size: .85rem; color: var(--text-2); }
.filters .btn { height: 2.25rem; }
.card .filters { box-shadow: none; background: var(--surface-2); }

/* Drop-down panel (schedule filters) */
details.dropdown { position: relative; }
details.dropdown > summary { list-style: none; }
details.dropdown > summary::-webkit-details-marker { display: none; }
details.dropdown > summary .dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); }
details.dropdown[open] > summary { background: var(--surface-3); color: var(--text); }
details.dropdown > .panel {
  position: absolute; z-index: 40; top: calc(100% + 6px); right: 0; width: min(46rem, calc(100vw - 2rem));
  margin: 0; box-shadow: var(--shadow-md);
}
details.dropdown > .panel.filters { background: var(--surface); }

/* Laptop widths: Print and Excel become icon buttons so the toolbar stays on one line */
@media (max-width: 1359px) {
  .toolbar .btn.compact { width: 2.3rem; padding: 0; }
  .toolbar .btn.compact .bl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
details.favs > summary .bl { max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Favorites (saved filters) */
details.favs > summary.on { border-color: var(--accent-soft-2); background: var(--accent-soft); color: var(--link); }
details.favs > .panel { width: min(26rem, calc(100vw - 2rem)); padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.fav-title { margin: 0 0 .5rem; font-size: .72rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.fav-list { list-style: none; margin: 0 0 .75rem; padding: 0; }
.fav-list li { display: flex; align-items: center; gap: .4rem; padding: .25rem .25rem .25rem .5rem; border-radius: 8px; }
.fav-list li:hover, .fav-list li.on { background: var(--surface-2); }
.fav-list li > a { display: inline-flex; align-items: center; gap: .45rem; flex: 1; min-width: 0; color: var(--text); font-weight: 600; text-decoration: none; }
.fav-list li > a span:not(.badge) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-list li > a:hover { color: var(--link); }
.fav-list li.on > a { color: var(--link); }
.ic.fav-star { color: var(--warn-ring); fill: var(--warn-ring); }
.fav-list .icon-btn { width: 1.9rem; height: 1.9rem; }
.fav-save { padding-top: .75rem; border-top: 1px solid var(--border); }
.fav-save label { margin-top: 0; }
.fav-save label.check { margin: .6rem 0 0; font-size: .85rem; }
.fav-row { display: flex; gap: .5rem; }
.fav-row input { flex: 1; min-width: 0; height: 2.3rem; }

/* Filters that take several choices: a list of tick boxes under each label */
.ms { position: relative; display: flex; flex-direction: column; gap: .35rem; }
.ms-label { font-size: .75rem; font-weight: 600; color: var(--muted); }
.ms-box > summary { list-style: none; }
.ms-box > summary::-webkit-details-marker { display: none; }
.ms-sum {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: 11.5rem; height: 2.25rem; padding: 0 .55rem 0 .75rem;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: var(--shadow-xs);
  font-size: .875rem; color: var(--text); cursor: pointer;
}
.ms-sum .ic { width: 1rem; height: 1rem; color: var(--muted); }
.ms-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-box[open] > .ms-sum { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.ms.chosen .ms-sum { border-color: var(--accent); color: var(--link); font-weight: 600; }
.ms-panel {
  position: absolute; z-index: 60; top: calc(100% + 4px); left: 0; width: max-content; min-width: 100%; max-width: min(20rem, calc(100vw - 3rem));
  padding: .5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-md);
}
.ms-search { width: 100%; height: 2.1rem !important; margin: 0 0 .35rem; font-size: .85rem !important; }
.ms-opts { max-height: 15rem; overflow-y: auto; }
.ms-opt { display: flex; align-items: center; gap: .55rem; margin: 0; padding: .35rem .45rem; border-radius: 6px; font-size: .875rem; font-weight: 500; color: var(--text); cursor: pointer; }
.ms-opt:hover { background: var(--surface-2); }
.filters .ms-opt { flex-direction: row; align-items: center; gap: .55rem; margin: 0; font-size: .875rem; font-weight: 500; color: var(--text); white-space: nowrap; }
.ms-opt[hidden] { display: none; }
.ms-clear { margin-top: .35rem; width: 100%; justify-content: flex-start; }
.filter-actions { display: flex; gap: .5rem; align-items: flex-end; }

/* ---------- Messages, banners, notices ---------- */
.banner, .messages li, .notice {
  display: flex; align-items: flex-start; gap: .65rem; padding: .75rem 1rem; margin: 0 0 1rem; border-radius: var(--radius);
  font-size: .9rem; background: var(--accent-soft); border: 1px solid var(--accent-soft-2); color: var(--text);
}
.banner > .ic, .messages li > .ic { width: 1.15rem; height: 1.15rem; margin-top: .12rem; color: var(--link); }
.banner.warning, .banner.warn, .notice { background: var(--warn-soft); border-color: var(--warn-line); }
.banner.warning > .ic, .banner.warn > .ic { color: var(--warn); }
.banner.error, .banner.danger, .notice.error, .messages li.error { background: var(--danger-soft); border-color: var(--danger-line); }
.banner.error > .ic, .messages li.error > .ic { color: var(--danger); }
.messages { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.messages li { margin-bottom: .5rem; }
.messages li.success { background: var(--ok-soft); border-color: var(--ok-line); }
.messages li.success > .ic { color: var(--ok); }
.messages li.warning { background: var(--warn-soft); border-color: var(--warn-line); }
.messages li.warning > .ic { color: var(--warn); }
.notice { display: block; }
p.notice { display: block; }
.warn { display: flex; gap: .4rem; align-items: flex-start; color: var(--danger); font-size: .85rem; font-weight: 600; margin: .3rem 0; }
.warn.soft { color: var(--text); font-weight: 500; background: var(--warn-soft); border: 1px solid var(--warn-line); padding: .45rem .7rem; border-radius: 8px; }
.rule-warn { color: var(--warn); font-size: .85rem; margin-top: .2rem; }
.ok { color: var(--ok); font-weight: 600; }
p.error { color: var(--danger); font-weight: 600; }

/* Badges and statuses */
.badge {
  display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem; border-radius: 999px; border: 1px solid transparent;
  background: var(--surface-3); color: var(--text-2); font-size: .72rem; font-weight: 650; line-height: 1.4; white-space: nowrap;
}
.badge.draft { background: transparent; border: 1px dashed var(--border-strong); }
.badge.published { background: var(--ok-soft); color: var(--ok); }
.status {
  display: inline-flex; align-items: center; gap: .35rem; padding: .12rem .6rem .12rem .5rem; border-radius: 999px;
  background: var(--surface-3); color: var(--text-2); font-size: .74rem; font-weight: 650; line-height: 1.4; white-space: nowrap;
}
.status::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.status.approved { background: var(--ok-soft); color: var(--ok); }
.status.denied, .status.declined { background: var(--danger-soft); color: var(--danger); }
.status.pending, .status.awaiting { background: var(--warn-soft); color: var(--warn); }

/* ---------- Lists ---------- */
.req-list, .note-list, .report-list, .link-list, .agenda, .oncall-list { list-style: none; padding: 0; margin: 0; }
.req-list > li {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1rem;
  padding: .85rem 0; border-bottom: 1px solid var(--border);
}
.req-list > li:first-child { padding-top: .25rem; }
.req-list > li:last-child { border-bottom: 0; padding-bottom: 0; }
.req-list .req-main { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.req-list .req-title { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; }
.note-list > li { position: relative; padding: .85rem 0 .85rem 1.1rem; border-bottom: 1px solid var(--border); }
.note-list > li:last-child { border-bottom: 0; }
.note-list > li::before { content: ""; position: absolute; left: .1rem; top: 1.3rem; width: .5rem; height: .5rem; border-radius: 50%; background: transparent; }
.note-list > li.unread::before { background: var(--accent); }
.note-list a { color: var(--text); text-decoration: none; }
.note-list a:hover { color: var(--link); text-decoration: underline; }
.note-list li:not(.unread) a strong { font-weight: 550; }
form.inline, div.inline { display: inline-flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0; }
.steps { list-style: none; counter-reset: step; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; padding: 0; margin: 0 0 1.4rem; }
.steps li { counter-increment: step; display: flex; align-items: center; gap: .55rem; color: var(--muted); font-size: .85rem; font-weight: 550; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; flex: none;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); font-size: .75rem; font-weight: 700;
}
.steps li.current { color: var(--text); font-weight: 650; }
.steps li.current::before { background: var(--accent); border-color: var(--accent); color: #fff; }
.link-list > li + li { margin-top: 2px; }
.link-list a {
  display: flex; align-items: center; gap: .8rem; padding: .55rem .6rem; border-radius: 10px; color: var(--text);
  font-weight: 550; text-decoration: none; transition: background-color .15s;
}
.link-list a:hover { background: var(--surface-2); }
.link-list .li-ic { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 9px; background: var(--accent-soft); color: var(--link); flex: none; }
.link-list .chev { margin-left: auto; color: var(--muted); }
.facts { margin: 0; }
.facts > div { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid var(--border); }
.facts > div:first-child { padding-top: 0; }
.facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { color: var(--muted); font-size: .85rem; }
.facts dd { margin: 0; font-weight: 600; font-size: .875rem; text-align: right; }

/* ---------- Tables ---------- */
.table-wrap { overflow: auto; }
main > .table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
table.simple { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .875rem; margin: .25rem 0; }
table.simple th {
  text-align: left; padding: .6rem .75rem; background: var(--surface-2); color: var(--muted); border-bottom: 1px solid var(--border);
  font-size: .72rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; vertical-align: bottom;
}
table.simple td { padding: .65rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
table.simple tbody tr:last-child td { border-bottom: 0; }
table.simple tbody tr:hover td { background: var(--surface-2); }
table.simple thead th:first-child { border-top-left-radius: 8px; }
table.simple thead th:last-child { border-top-right-radius: 8px; }
.table-wrap table.simple thead th { position: sticky; top: 0; z-index: 1; }
table.simple caption { text-align: left; font-weight: 650; font-size: .8rem; color: var(--text-2); padding: 0 0 .4rem; }
table.sums { width: auto; margin: .2rem 0 .9rem; font-size: .8rem; border: 1px solid var(--border); border-radius: 8px; }
table.sums th, table.sums td { text-align: center; padding: .3rem .65rem; min-width: 3.4rem; }
table.sums th { text-transform: none; letter-spacing: 0; font-size: .74rem; border-radius: 0 !important; }
table.sums tr:first-child th:first-child { border-top-left-radius: 8px !important; }
table.sums tr:first-child th:last-child { border-top-right-radius: 8px !important; }
table.sums td { font-weight: 600; font-variant-numeric: tabular-nums; }
table.sums tbody th { text-align: left; background: var(--surface); color: var(--text-2); font-size: .78rem; font-weight: 600; white-space: nowrap; }
table.sums tbody tr:last-child > * { border-bottom: 0; }
.sums-wrap { max-width: 100%; margin: .25rem 0 .5rem; }
.sums-wrap table.sums { margin: 0; }
table.sums tbody tr:hover td { background: none; }
table.sums td.over, table.report td.over { background: var(--danger-soft); color: var(--danger); font-weight: 700; }
table.report td.int, table.report td.num, table.report td.money, table.report th.int, table.report th.num, table.report th.money { text-align: right; font-variant-numeric: tabular-nums; }
table.report td.list { font-size: .8rem; max-width: 22rem; }
table.report tfoot th, table.report tfoot td { border-top: 1px solid var(--border-strong); font-weight: 700; padding: .65rem .75rem; background: var(--surface-2); text-transform: none; letter-spacing: 0; font-size: .875rem; color: var(--text); }
table.prefs th:not(:first-child), table.prefs td:not(:first-child) { text-align: center; }
.fair td.high { background: var(--danger-soft); color: var(--danger); font-weight: 650; }
.fair td.low { background: var(--accent-soft); color: var(--link); font-weight: 650; }
.fair .high, .fair .low { border-radius: 4px; }
span.fair .high { background: var(--danger-soft); color: var(--danger); font-weight: 650; }
span.fair .low { background: var(--accent-soft); color: var(--link); font-weight: 650; }

/* ---------- Chips: soft color + a colored bar (colors from {{ color|chip }}) ---------- */
.chip {
  display: block; position: relative; margin: 2px 0; padding: .16rem .5rem .16rem .62rem; border: 1px solid transparent; border-radius: 6px;
  background: var(--t, var(--surface-3)); color: var(--k, var(--text)); box-shadow: inset 3px 0 0 var(--c, var(--border-strong));
  font-size: .75rem; font-weight: 600; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (prefers-color-scheme: dark) { .chip { background: var(--td, var(--surface-3)); color: var(--kd, var(--text)); } }
.chip.inline, .chip.sample { display: inline-block; vertical-align: middle; }
.chip.draft { background: var(--surface); border: 1px dashed var(--c, var(--border-strong)); }
.chip.sample { background: var(--surface-3); color: var(--text-2); box-shadow: inset 3px 0 0 var(--border-strong); }
.chip.sample.draft { background: var(--surface); border-color: var(--border-strong); }
.chip.broken { box-shadow: inset 3px 0 0 var(--c, var(--border-strong)), 0 0 0 1.5px var(--warn-ring); }
.chip.big { font-size: .85rem; padding: .25rem .65rem .25rem .75rem; }

/* ---------- Schedule (V0.74 look) ---------- */
.sched-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.25rem; margin: 0 0 1rem; }
.sched-title { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.1rem; }
.sched-title h1 { margin: 0; font-size: 1.6rem; font-weight: 650; letter-spacing: -.02em; }
.sched-head .actions .count { margin-left: .1rem; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0 0 .75rem; }
.toolbar .spacer { flex: 1; }
.toolbar .tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-left: auto; }
.dates { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.dates .btn.square { width: 2.3rem; padding: 0; }
.dates .range { margin-left: .45rem; font-size: 1.05rem; font-weight: 650; letter-spacing: -.01em; color: var(--text); white-space: nowrap; }
.days-pick { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-size: .8rem; font-weight: 600; color: var(--muted); }
.days-pick select { height: 2.3rem; font-size: .85rem; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1.1rem; margin: 0 0 .75rem; font-size: .78rem; color: var(--muted); }
.legend .lg { display: inline-flex; align-items: center; gap: .4rem; }
.legend .chip { margin: 0; }
.pill-sample { display: inline-block; width: 1.7rem; height: 1rem; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); vertical-align: middle; }
.pill-sample.hl { background: var(--accent); border-color: var(--accent); }
.pill-sample.draft { border-style: dashed; background: transparent; }
.flag-sample { color: var(--warn); font-weight: 700; }

/* "Highlight me" switch (providers) and the Highlight picker (schedulers and admins) */
.hl-form { display: inline-flex; align-items: center; gap: .45rem; margin: 0; }
.btn.switch { gap: .55rem; padding: 0 .85rem 0 .55rem; }
.switch .track { position: relative; display: inline-block; flex: none; width: 2rem; height: 1.15rem; border-radius: 999px; background: #7c8494; transition: background-color .15s; }
.switch .knob { position: absolute; top: .15rem; left: .15rem; width: .85rem; height: .85rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch[aria-checked="true"] .track { background: var(--accent); }
.switch[aria-checked="true"] .knob { transform: translateX(.85rem); }
.hl-pick label { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-size: .8rem; font-weight: 600; color: var(--muted); }
.hl-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--accent); }
.hl-pick select { height: 2.3rem; font-size: .85rem; max-width: 13rem; }

/* Filters in use, as chips you can remove */
.fchips { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: 0 0 .75rem; }
.fchip { display: inline-flex; align-items: center; gap: .35rem; height: 2rem; padding: 0 .2rem 0 .8rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: .8rem; color: var(--muted); }
.fchip strong { max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 600; }
.fchip-x { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; color: var(--muted); }
.fchip-x:hover { background: var(--surface-3); color: var(--text); }
.fchip-x .ic { width: .85rem; height: .85rem; }
.fchip-clear { margin-left: .2rem; font-size: .8rem; font-weight: 600; }

/* The grids */
.grid-wrap, .cal-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
body.wide .table-wrap.grid-wrap, body.wide .table-wrap.cal-wrap { max-height: calc(100vh - 13rem); }
table.grid, table.calendar { border-collapse: separate; border-spacing: 0; font-size: .8rem; }
table.grid { table-layout: fixed; width: max(100%, calc(12.5rem + var(--days, 7) * 6.9rem)); }
table.grid thead tr.days > .rowhead { width: 12.5rem; }
table.grid th, table.grid td { border-right: 1px solid var(--grid-line); border-bottom: 1px solid var(--grid-line); padding: .35rem .3rem; vertical-align: top; background-clip: padding-box; }
table.grid tr > :last-child { border-right: 0; }
table.grid thead th, table.grid thead td { position: sticky; top: 0; z-index: 3; background: var(--surface); }
table.grid thead tr:nth-child(2) > * { top: 4.6rem; }
table.grid thead tr:nth-child(3) > * { top: 6.5rem; }
table.grid thead tr:nth-child(4) > * { top: 8.4rem; }
table.grid thead tr:nth-child(5) > * { top: 10.3rem; }
table.grid thead tr:nth-child(6) > * { top: 12.2rem; }
table.grid thead tr.days > * { padding: .55rem .35rem .5rem; text-align: center; vertical-align: bottom; }
table.grid thead tr.days > .rowhead { color: var(--muted); font-size: .74rem; font-weight: 600; text-align: left; }
table.grid thead tr:last-child > * { border-bottom: 1px solid var(--border); }
th.day .dow { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
th.day .dnum { display: inline-grid; grid-auto-flow: column; align-items: baseline; justify-content: center; min-width: 1.9rem; height: 1.9rem; margin: .1rem 0 0; padding: .3rem .4rem 0; border-radius: 999px; font-size: .95rem; font-weight: 650; line-height: 1.3; color: var(--text); }
th.day .dmon { font-size: .72rem; font-weight: 600; color: var(--muted); white-space: pre; }
th.day.today .dnum { background: var(--accent); color: #fff; }
th.day.today .dnum .dmon { color: #e0e7ff; }
th.day.today .dow { color: var(--link); }
table.grid thead th.day.weekend { background: var(--weekend); }
.cov { display: flex; align-items: center; gap: .35rem; max-width: 6.2rem; margin: .35rem auto 0; font-size: .68rem; font-weight: 650; color: var(--ok); }
.cov-bar { flex: 1; height: 4px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.cov-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--ok-dot); }
.cov.short { color: var(--warn); }
.cov.short .cov-bar > span { background: var(--warn-ring); }
.cov-n { white-space: nowrap; }
.rules-n { display: inline-block; margin-top: .3rem; padding: 0 .45rem; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: .68rem; font-weight: 700; }
.hol { display: block; max-width: 7rem; margin: .25rem auto 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .66rem; font-weight: 650; color: var(--danger); }

/* Daily sums (staff only): people off / the limit; a click shows who */
table.grid tr.sum > * { height: 1.9rem; padding: .2rem .3rem; background: var(--surface-2); color: var(--text-2); font-size: .76rem; font-weight: 600; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; vertical-align: middle; }
table.grid tr.sum > .rowhead { padding-left: .9rem; text-align: left; color: var(--muted); }
table.grid tr.sum td.over { background: var(--danger-soft); color: var(--danger); font-weight: 700; }
.sum-btn { display: inline-flex; align-items: baseline; padding: .05rem .45rem; border: 1px solid transparent; border-radius: 6px; background: none; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.sum-btn:hover, .sum-btn[aria-expanded="true"] { border-color: var(--border-strong); background: var(--surface); }
.names-pop { position: fixed; z-index: 90; min-width: 12rem; max-width: 20rem; padding: .7rem .85rem; border-radius: 10px; background: #111827; color: #f9fafb; font-size: .8rem; line-height: 1.45; box-shadow: var(--shadow-md); }
.names-pop strong { display: block; margin-bottom: .3rem; font-weight: 650; }
.names-pop ul { margin: 0; padding: 0 0 0 1rem; }
.names-pop:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Row headings */
table.grid .rowhead { position: sticky; left: 0; z-index: 2; padding: .55rem .9rem; overflow: hidden; text-overflow: ellipsis; text-align: left; white-space: nowrap; background: var(--surface); border-right: 1px solid var(--border); }
table.grid thead .rowhead { z-index: 4; }
.th-task { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.tdot { width: .62rem; height: .62rem; flex: none; border-radius: 3px; background: var(--c, var(--border-strong)); }
.tname { overflow: hidden; text-overflow: ellipsis; font-size: .84rem; font-weight: 650; color: var(--text); }
.tsub { display: block; margin: .05rem 0 0 1.12rem; font-size: .72rem; font-weight: 500; color: var(--muted); }
.person-head a { display: flex; align-items: center; gap: .5rem; color: var(--text); font-weight: 600; text-decoration: none; }
.person-head a .nm { overflow: hidden; text-overflow: ellipsis; }
.person-head a:hover .nm { text-decoration: underline; }
table.grid tr.hl-row > * { background: var(--accent-soft); }
table.grid tr.hl-row .person-head .nm { color: var(--link); }

/* Sections of Grid by task: on call, shifts, clinics, ... */
tbody.sec tr.section > th { position: static; padding: .85rem .9rem .35rem; background: var(--surface); border-right: 0; text-align: left; font-size: .78rem; font-weight: 650; color: var(--text-2); }
.section-label { position: sticky; left: .9rem; }
tbody.sec + tbody.sec tr.section > th { border-top: 1px solid var(--border); }

/* Cells */
td.cell { overflow: hidden; }
td.weekend { background: var(--weekend); }
td.today { background: var(--today); }
td.editable { cursor: pointer; transition: background-color .12s, box-shadow .12s; }
td.editable:hover { background-color: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
td.editable:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); border-radius: 0; }
td.none { padding: 1.25rem; text-align: center; }
td.over { background: var(--danger-soft); color: var(--danger); font-weight: 700; }
td.warnday { background: var(--warn-soft) !important; color: var(--warn); font-weight: 700; }

/* People as name pills: initials + name. Highlighted = indigo; draft = dashed; rule warning = amber ring. */
.pill {
  display: flex; align-items: center; gap: .4rem; width: 100%; max-width: 100%; margin: 0 0 3px; padding: .15rem .55rem .15rem .17rem;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text);
  font: inherit; font-size: .76rem; font-weight: 550; line-height: 1.3; text-align: left; white-space: nowrap;
}
button.pill { cursor: pointer; }
button.pill:hover { border-color: var(--border-strong); background: var(--surface-2); }
.av {
  display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; flex: none; border-radius: 50%;
  background: var(--t, var(--surface-3)); color: var(--k, var(--text-2)); font-size: .58rem; font-weight: 700; letter-spacing: .02em;
}
@media (prefers-color-scheme: dark) { .av { background: var(--td, var(--surface-3)); color: var(--kd, var(--text)); } }
.av.lg { width: 2.5rem; height: 2.5rem; font-size: .82rem; }
.pill .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pill .flag { margin-right: .2rem; color: var(--warn); font-weight: 700; }
.pill .lk { margin-left: auto; color: var(--muted); }
.pill.hl { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill.hl .av { background: #fff; color: var(--accent); }
.pill.hl .lk, .pill.hl .flag { color: #fff; }
button.pill.hl:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.pill.draft { border-style: dashed; border-color: var(--border-strong); background: transparent; }
.pill.draft .nm { font-style: italic; }
.pill.hl.draft { background: var(--accent-soft); border-color: var(--accent); color: var(--link); }
.pill.hl.draft .av { background: var(--accent); color: #fff; }
.pill.broken { border-color: var(--warn-ring); }
.open-slot { display: inline-block; margin: 0 0 3px; padding: .1rem .55rem; border: 1px dashed var(--warn-ring); border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: .72rem; font-weight: 650; }
.open-slot.sample { margin: 0; }
button.chip { width: 100%; font: inherit; font-size: .75rem; font-weight: 600; text-align: left; cursor: pointer; }
button.chip:hover { filter: brightness(.97); }

/* Time off drawn as bars across the days (for people who can't edit it) */
tr.lane > td { padding-top: .2rem; padding-bottom: .2rem; }
td.bar-cell { padding: .2rem .25rem; }
.bar {
  display: flex; align-items: center; gap: .45rem; width: 100%; padding: .2rem .6rem .2rem .2rem; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface-3); color: var(--text-2); font: inherit; font-size: .76rem; font-weight: 550;
  text-align: left; white-space: nowrap; cursor: pointer;
}
.bar:hover { border-color: var(--border-strong); }
.bar .nm { overflow: hidden; text-overflow: ellipsis; }
.bar-days { margin-left: auto; padding-left: .5rem; font-size: .7rem; font-weight: 500; color: var(--muted); }
.bar .lk { display: none; }
/* 14 days or more: no initials, so names have room */
table.grid.dense .pill .av, table.grid.dense .bar .av { display: none; }
table.grid.dense .pill { padding-left: .55rem; }
table.grid.dense .bar { padding-left: .55rem; }
.bar.hl { background: var(--accent); border-color: var(--accent); color: #fff; }
.bar.hl .av { background: #fff; color: var(--accent); }
.bar.hl .bar-days, .bar.hl .lk { color: #e0e7ff; }
.bar.draft { border-style: dashed; background: transparent; }
.bar.broken { border-color: var(--warn-ring); }

/* Selecting several shifts (schedulers) */
body.selecting td.editable { cursor: default; }
body.selecting td.editable:hover { background-color: transparent; box-shadow: none; }
body.selecting table.grid [data-a] { cursor: pointer; }
body.selecting table.grid [data-a]:hover { border-color: var(--accent); }
table.grid .pill[data-a].selected { background: var(--accent-soft); border-color: var(--accent); color: var(--link); box-shadow: 0 0 0 1.5px var(--accent); }
table.grid .chip[data-a].selected { box-shadow: inset 3px 0 0 var(--c, var(--border-strong)), 0 0 0 2px var(--accent); }
.bulk-bar {
  position: fixed; left: 50%; bottom: 1.25rem; z-index: 50; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; gap: .45rem;
  width: max-content; max-width: calc(100vw - 2rem); padding: .55rem .6rem .55rem 1rem; border-radius: 14px; background: #111827; color: #f9fafb; box-shadow: var(--shadow-lg);
}
.bulk-bar[hidden] { display: none !important; }
.bulk-count { margin-right: .25rem; font-size: .85rem; font-weight: 650; }
.bulk-bar select { height: 2rem; padding-right: 1.8rem; font-size: .8rem; background-color: #1f2937; color: #f9fafb; border-color: #4b5563; box-shadow: none; }
.bulk-bar .btn { background: #1f2937; border-color: #4b5563; color: #f9fafb; box-shadow: none; }
.bulk-bar .btn:hover { background: #374151; color: #fff; }
.bulk-bar .btn.danger { color: #fca5a5; border-color: #7f1d1d; }
.bulk-bar .btn.danger:hover { background: #7f1d1d; color: #fff; }
.bulk-bar .btn.ghost { background: transparent; border-color: transparent; }
body.signed-in.selecting { padding-bottom: 5rem; }

/* Calendar (a month) */
table.calendar { width: 100%; table-layout: fixed; font-size: .78rem; }
table.calendar th { position: sticky; top: 0; z-index: 2; padding: .6rem .6rem; background: var(--surface); border-bottom: 1px solid var(--border); font-size: .74rem; font-weight: 600; color: var(--muted); text-align: left; }
table.calendar td { height: 7.5rem; padding: .4rem; vertical-align: top; border-right: 1px solid var(--grid-line); border-bottom: 1px solid var(--grid-line); }
table.calendar tr > :last-child { border-right: 0; }
table.calendar tbody tr:last-child > td { border-bottom: 0; }
table.calendar td.other-month { background: var(--surface-2); }
table.calendar td.other-month .daynum .n { color: var(--muted); font-weight: 500; }
.daynum { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin: 0 0 .35rem; }
.daynum .n { display: inline-grid; place-items: center; min-width: 1.7rem; height: 1.7rem; padding: 0 .3rem; border-radius: 999px; font-size: .82rem; font-weight: 650; }
td.today .daynum .n { background: var(--accent); color: #fff; }
.holiday { font-size: .68rem; font-weight: 650; color: var(--danger); }
.calrow {
  display: flex; align-items: baseline; gap: .35rem; width: 100%; min-width: 0; margin: 0 0 2px; padding: .12rem .35rem .12rem .5rem;
  border: 0; border-radius: 6px; background: transparent; box-shadow: inset 3px 0 0 var(--c, var(--border-strong)); color: var(--text);
  font: inherit; font-size: .72rem; line-height: 1.35; text-align: left; cursor: pointer;
}
.calrow:hover { background: var(--surface-2); }
.calrow .code { flex: 0 1 auto; max-width: 62%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; color: var(--text); }
.calrow .who { position: relative; flex: 1 1 auto; min-width: 0; padding-left: .7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.calrow .who::before { content: ""; position: absolute; left: .1rem; top: 50%; width: .42rem; height: .42rem; margin-top: -.21rem; border-radius: 50%; background: var(--c, var(--border-strong)); }
.calrow .when { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.calrow .flag { color: var(--warn); font-weight: 700; }
.calrow.broken { background: var(--warn-soft); }
.calrow.draft { box-shadow: inset 0 0 0 1px var(--border-strong); background: var(--surface); }
.calrow.draft .code, .calrow.draft .who { font-style: italic; }
.calrow.hl { background: var(--accent); box-shadow: none; }
.calrow.hl .code, .calrow.hl .who, .calrow.hl .when, .calrow.hl .flag, .calrow.hl .lk { color: #fff; }
.calrow.hl .who::before { background: #fff; }

/* Side panel: shift details and the Requests panel (V0.74) */
dialog.drawer {
  position: fixed; inset: 0 0 0 auto; width: min(27rem, 100vw); max-width: 100vw; height: 100%; max-height: 100vh; margin: 0 0 0 auto; padding: 0;
  border: 0; border-left: 1px solid var(--border); border-radius: 18px 0 0 18px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
}
dialog.drawer::backdrop { background: rgba(15, 23, 42, .3); }
#side-body { padding: 1.1rem 1.35rem 1.75rem; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 .75rem; }
.drawer-head h2 { margin: 0; font-size: 1.1rem; }
.drawer-head .eyebrow { margin: 0; }
.drawer-loading { padding: 1rem 0; }
.drawer-foot { margin: 1rem 0 0; padding-top: .85rem; border-top: 1px solid var(--border); font-size: .875rem; }
.sd-top { display: flex; flex-direction: column; gap: .45rem; margin-bottom: .9rem; }
.sd-top .th-task { align-self: flex-start; padding: .2rem .65rem .2rem .5rem; border-radius: 999px; background: var(--t, var(--surface-3)); }
.sd-top .th-task .tname { color: var(--k, var(--text)); }
@media (prefers-color-scheme: dark) { .sd-top .th-task { background: var(--td, var(--surface-3)); } .sd-top .th-task .tname { color: var(--kd, var(--text)); } }
.sd-title { margin: 0; font-size: 1.25rem; font-weight: 650; letter-spacing: -.01em; }
.sd-facts { margin: 0 0 1rem; }
.sd-facts dd { text-align: right; }
.sd-person { display: flex; align-items: center; gap: .75rem; margin: 0 0 1rem; padding: .75rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.sd-person.mine { border-color: var(--accent-soft-2); background: var(--accent-soft); }
.sd-who { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.badge.you { background: var(--accent); color: #fff; }
.sd-actions { display: flex; flex-direction: column; gap: .5rem; margin: 0 0 1.25rem; }
.sd-actions .btn { width: 100%; height: 2.6rem; }
.sd-actions form { margin: 0; }
.sd-actions p { display: flex; align-items: center; gap: .4rem; margin: 0; }
#side-body h3 { margin: 1.1rem 0 .5rem; font-size: .82rem; color: var(--text-2); }
.sd-others, .sd-history { list-style: none; margin: 0; padding: 0; }
.sd-others li { display: flex; align-items: center; gap: .6rem; padding: .3rem 0; font-size: .85rem; }
.sd-history li { padding: .2rem 0; font-size: .8rem; color: var(--muted); }
.rq { padding: .9rem 0; border-top: 1px solid var(--border); }
.rq-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .55rem; margin-bottom: .45rem; }
.rq-head strong { font-size: .9rem; }
.rq-effects { list-style: none; margin: 0 0 .6rem; padding: 0; }
.rq-effects li { display: flex; align-items: flex-start; gap: .45rem; margin: 0 0 .3rem; padding: .4rem .55rem; border-radius: 8px; background: var(--warn-soft); color: var(--text); font-size: .8rem; }
.rq-effects li .ic { width: .95rem; height: .95rem; margin-top: .1rem; color: var(--warn); }
.rq-effects li.muted { padding: 0; background: none; color: var(--muted); }
.rq-ok { display: flex; align-items: center; gap: .45rem; margin: 0 0 .6rem; color: var(--ok); font-size: .82rem; font-weight: 600; }
.rq-form { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: 0; }
.rq-form label.check { width: 100%; margin: 0 0 .2rem; font-size: .82rem; }
.quote.small { font-size: .82rem; }

/* Cell editor */
dialog#cell-dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 16px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
}
dialog::backdrop { background: rgba(15, 23, 42, .45); }
#cell-body { padding: 1.35rem 1.5rem 1.5rem; }
.editor-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.editor-head h2 { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin: .2rem 0 0; font-size: 1.05rem; }
.editor-head .chip { display: inline-block; margin: 0; font-size: .8rem; }
.cell-list { list-style: none; padding: 0; margin: 0 0 1rem; border: 1px solid var(--border); border-radius: var(--radius); }
.cell-list > li { padding: .8rem .9rem; border-bottom: 1px solid var(--border); }
.cell-list > li:last-child { border-bottom: 0; }
.cell-list .who { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.cell-list .chip { display: inline-block; margin: 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .55rem; }
.row-actions form { margin: 0; }
.add-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; margin: .5rem 0; }
.add-form label { width: 100%; margin: 0 0 .1rem; }
.add-form select { flex: 1; min-width: 12rem; }
.add-form input[type=text] { flex: 1 1 12rem; }
.history { margin: 1rem 0 .75rem; font-size: .85rem; }
.history summary { color: var(--link); font-weight: 600; }
.history ul { padding-left: 1.1rem; margin: .5rem 0 0; color: var(--text-2); }

/* ---------- Home ---------- */
.greeting h1 { font-size: 1.75rem; }
.attention {
  display: flex; align-items: center; gap: .9rem; margin: 0 0 1.25rem; padding: 1rem 1.25rem; border-radius: var(--radius-lg);
  background: var(--accent-soft); border: 1px solid var(--accent-soft-2); color: var(--text); text-decoration: none;
}
.attention:hover { border-color: var(--accent); }
.attention .att-ic { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; flex: none; border-radius: 50%; background: var(--accent); color: #fff; }
.attention .att-text { flex: 1; }
.attention .chev { color: var(--link); }
.quick { display: grid; grid-template-columns: repeat(11, minmax(4.4rem, 1fr)); gap: .5rem; overflow-x: auto; padding-bottom: .2rem; }
.quick .day { min-height: 5.6rem; padding: .5rem .3rem .4rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.quick .day.weekend { background: var(--surface-2); }
.quick .day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--today); }
.quick .date { display: flex; justify-content: space-between; align-items: baseline; gap: .25rem; margin: 0 .15rem .4rem; font-size: .7rem; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.quick .date b { font-size: .95rem; letter-spacing: 0; color: var(--text); }
.quick .day.today .date, .quick .day.today .date b { color: var(--link); }
.quick .chip { font-size: .68rem; padding: .1rem .3rem .1rem .48rem; }
.agenda > li { display: flex; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--border); }
.agenda > li:first-child { padding-top: .1rem; }
.agenda > li:last-child { border-bottom: 0; }
.date-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; width: 3.4rem; height: 3.6rem; flex: none;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); line-height: 1.1;
}
.date-tile .m { font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.date-tile .d { font-size: 1.3rem; font-weight: 700; color: var(--text); }
.today-row .date-tile { background: var(--accent); border-color: var(--accent); }
.today-row .date-tile .m, .today-row .date-tile .d { color: #fff; }
.agenda-body { flex: 1; min-width: 0; }
.agenda-day { margin: 0 0 .35rem; font-size: .8rem; font-weight: 650; color: var(--muted); }
.today-row .agenda-day { color: var(--link); }
.agenda-items { list-style: none; margin: 0; padding: 0; }
.agenda-item { display: flex; gap: .7rem; align-items: flex-start; padding: .3rem 0; }
.agenda-item .chip { display: inline-block; flex: 0 0 auto; min-width: 6rem; margin: .1rem 0 0; }
.agenda-text { display: flex; flex-direction: column; min-width: 0; }
.agenda-text .name { font-weight: 600; }
.on-now { display: inline-flex; align-items: center; gap: .3rem; color: var(--ok); font-weight: 700; }
.on-now::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.agenda-item.now { margin: 0 -.6rem; padding: .45rem .6rem; border-radius: 10px; background: var(--ok-soft); }

/* ---------- Home: "Today" (V0.74) ---------- */
.today-top { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 1.25rem; align-items: stretch; margin: 0 0 1.25rem; }
.today-top > .card { margin: 0; }
.hero { display: flex; flex-direction: column; gap: 1rem; }
.hero > h2 { margin: 0; }
.hero-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.hero-main { display: flex; align-items: center; gap: 1rem; }
.hero-ic { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; flex: none; border-radius: 14px; background: var(--t, var(--accent-soft)); color: var(--k, var(--link)); }
@media (prefers-color-scheme: dark) { .hero-ic { background: var(--td, var(--accent-soft)); color: var(--kd, var(--link)); } }
.hero-ic .ic { width: 1.5rem; height: 1.5rem; }
.hero-text { min-width: 0; }
.hero-text h2 { margin: 0; font-size: 1.45rem; font-weight: 650; letter-spacing: -.02em; }
.hero-text p { margin: .15rem 0 0; color: var(--muted); }
.progress { height: 8px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.progress > span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.hero-left { margin: -.55rem 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; }
.card-head > a { font-size: .85rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.card-head > a:hover { text-decoration: underline; }
.oc-list { list-style: none; margin: 0; padding: 0; }
.oc-list li { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-top: 1px solid var(--border); }
.oc-list li:first-child { padding-top: 0; border-top: 0; }
.oc-who { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.oc-who strong { font-size: .9rem; font-weight: 600; }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .6rem; }
.wday { display: flex; flex-direction: column; gap: .4rem; min-height: 7rem; padding: .7rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.wday.weekend { background: var(--surface-2); }
.wday.today { border-color: var(--accent-soft-2); background: var(--today); box-shadow: inset 0 0 0 1px var(--accent-soft-2); }
.wd { font-size: .74rem; font-weight: 650; color: var(--muted); }
.wday.today .wd { color: var(--link); }
.wshift { display: flex; flex-direction: column; gap: .1rem; width: 100%; padding: .45rem .55rem; border: 0; border-radius: 10px; background: var(--t, var(--surface-3)); color: var(--k, var(--text)); font: inherit; text-align: left; cursor: pointer; }
@media (prefers-color-scheme: dark) { .wshift { background: var(--td, var(--surface-3)); color: var(--kd, var(--text)); } }
.wshift:hover { filter: brightness(.97); }
.wshift .code { overflow-wrap: anywhere; font-size: .8rem; font-weight: 650; }
.wshift .t { font-size: .72rem; }
.woff { font-size: .78rem; color: var(--muted); }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem 0; border-top: 1px solid var(--border); }
.mini-list li:first-child { padding-top: 0; border-top: 0; }
.mini-main { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.mini-main a { color: var(--text); font-weight: 600; text-decoration: none; }
.mini-main a:hover { color: var(--link); text-decoration: underline; }
.mini-list form { flex: none; margin: 0; }
.mini-list .status { flex: none; }
.updates li.unread .mini-main a, .updates li.unread .mini-main strong { color: var(--link); }
.agenda-item > .btn.small.ghost { flex: none; margin-left: auto; }
@media (max-width: 1099px) { .today-top { grid-template-columns: 1fr; } }

/* ---------- On call now ---------- */
.live { display: inline-flex; align-items: center; gap: .45rem; font-size: .85rem; color: var(--muted); }
.live .pulse { width: .55rem; height: .55rem; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.live.paused .pulse { background: var(--muted); box-shadow: 0 0 0 3px var(--surface-3); }
.oncall-region { margin: 0 0 1.75rem; }
.oncall-region > h2 { display: flex; align-items: center; gap: .5rem; margin: 0 0 .85rem; font-size: 1.1rem; }
.oncall-region > h2 .ic { color: var(--muted); }
.loc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 1rem; }
.loc-card { margin: 0; padding: 1.1rem 1.2rem; }
.loc-card h3 { margin: 0 0 .6rem; font-size: .95rem; }
.oncall-list > li { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; padding: .7rem 0; border-top: 1px solid var(--border); }
.oncall-list > li:first-child { border-top: 0; padding-top: .2rem; }
.oncall-list .chip { display: inline-block; margin: 0; }
.oncall-list .person { display: flex; flex-direction: column; min-width: 0; flex: 1 1 9rem; }
.oncall-list .person .muted { font-size: .8rem; }
a.phone {
  display: inline-flex; align-items: center; gap: .4rem; height: 2.2rem; padding: 0 .8rem; border-radius: 999px;
  background: var(--ok-soft); color: var(--ok); font-weight: 700; font-size: .9rem; text-decoration: none; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
a.phone:hover { background: var(--ok-line); }
.until { margin-left: auto; font-size: .8rem; }

/* ---------- Requests, approvals ---------- */
.approval-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin-bottom: .6rem; }
.approval-head strong { font-size: 1rem; }
.approval-head .when { margin-left: auto; font-size: .8rem; }
.quote { margin: 0 0 .75rem; padding: .1rem 0 .1rem .85rem; border-left: 3px solid var(--border-strong); color: var(--text-2); font-style: italic; }
.sums-row { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
form.decide { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--border); }
form.decide input[type=text] { flex: 1 1 16rem; }
form.decide label.check { margin: 0; }

/* ---------- Request form: calendar and live checks (V0.74) ---------- */
.back-link { display: inline-flex; align-items: center; gap: .2rem; margin: 0 0 .45rem; font-size: .85rem; font-weight: 600; text-decoration: none; }
.back-link .ic { width: 1rem; height: 1rem; }
.req-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 1.25rem; align-items: start; }
.req-layout > .card { margin: 0; }
.req-main select, .req-main input[type=text], .req-main .date-row input { width: 100%; }
.req-main .date-row > div { flex: 1 1 12rem; }
.req-side { position: sticky; top: 1.25rem; }
.req-side h2 { margin: 0 0 .75rem; }
.req-side h3 { margin: 1.25rem 0 .6rem; }
.req-when { margin: .5rem 0 0; font-size: 1.1rem; font-weight: 650; letter-spacing: -.01em; }
.lc { display: flex; align-items: flex-start; gap: .55rem; margin: 0 0 .55rem; padding: .55rem .7rem; border-radius: 10px; font-size: .86rem; }
.lc .ic { margin-top: .1rem; }
.lc-ok { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.lc-warn { background: var(--warn-soft); color: var(--text); }
.lc-warn .ic { color: var(--warn); }
.lc-bad { background: var(--danger-soft); color: var(--text); }
.lc-bad .ic { color: var(--danger); }
.req-cal-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem 1rem; margin: 1.1rem 0 .45rem; }
.req-cal-head[hidden] { display: none; }
.req-cal-title { font-size: .85rem; font-weight: 600; color: var(--text-2); }
.req-legend { display: inline-flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .75rem; color: var(--muted); }
.req-legend > span { display: inline-flex; align-items: center; gap: .35rem; }
.sw { display: inline-block; width: .8rem; height: .8rem; border-radius: 4px; }
.sw.chosen { background: var(--accent); }
.sw.last, .sw.full { width: .55rem; height: .55rem; border-radius: 50%; }
.sw.last { background: #d97706; }
.sw.full { background: #c2410c; }
.req-cal { padding: .75rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.rc-top { display: flex; align-items: center; justify-content: space-between; margin: 0 0 .5rem; }
.rc-month { font-weight: 650; }
.rc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.rc-dow { padding: .2rem 0; text-align: center; font-size: .72rem; font-weight: 600; color: var(--muted); }
.rc-day { position: relative; display: grid; place-items: center; height: 2.75rem; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.rc-day:not(.in):not(.end):hover:not([disabled]) { background: var(--surface-3); }
.rc-day.end:hover { background: var(--accent-hover); }
.rc-day.other { color: var(--muted); font-weight: 400; }
.rc-day[disabled] { color: var(--border-strong); cursor: default; }
.rc-day.today > span { text-decoration: underline; text-underline-offset: 3px; }
.rc-day.in { border-radius: 0; background: var(--accent-soft); color: var(--link); }
.rc-day.end { border-radius: 10px; background: var(--accent); color: #fff; }
.rc-day.full { box-shadow: inset 0 0 0 1.5px #fdba74; }
.rc-day > i { position: absolute; bottom: .35rem; left: 50%; width: .4rem; height: .4rem; margin-left: -.2rem; border-radius: 50%; }
.rc-day.last > i { background: #d97706; }
.rc-day.full > i { background: #c2410c; }
.rc-day.end > i { background: #fff; }
@media (max-width: 1099px) { .req-layout { grid-template-columns: 1fr; } .req-side { position: static; } }

/* ---------- Scheduler tools, reports ---------- */
.task-picks { display: flex; flex-wrap: wrap; gap: .5rem .9rem; padding: .75rem 1rem 1rem; margin: 1.1rem 0; }
.task-picks legend { display: flex; align-items: center; gap: .4rem; }
.task-picks .pick { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-weight: 500; }
.task-picks .chip { margin: 0; }
.stat-line { font-size: 1rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; margin: 0 0 1rem; }
.stat { padding: .85rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.stat .v { display: block; font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.stat .k { font-size: .78rem; color: var(--muted); font-weight: 600; }
.stat.warn-stat .v { color: var(--warn); }
.report-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: .85rem; }
.report-list > li { position: relative; display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.1rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); transition: border-color .15s, box-shadow .15s; }
.report-list > li:hover { border-color: var(--accent-soft-2); box-shadow: var(--shadow-md); }
.report-list > li a { font-weight: 650; color: var(--text); text-decoration: none; }
.report-list > li a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.report-list > li a:hover { color: var(--link); }
.report-list .muted { font-size: .82rem; }

/* ---------- One person's schedule, as a calendar (Grid by staff filtered to one person) ---------- */
.person-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .9rem; margin: 0 0 1rem; padding: .85rem 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs);
}
.person-bar .avatar { width: 2.6rem; height: 2.6rem; font-size: .85rem; }
.person-text { display: flex; flex-direction: column; gap: .1rem; flex: 1 1 16rem; min-width: 0; }
.person-text strong { font-size: 1rem; }
.person-text strong .muted { font-weight: 500; }
.pcal-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
table.pcal { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
table.pcal th { padding: .65rem .75rem; background: var(--surface); border-bottom: 1px solid var(--border); text-align: left;
  font-size: .7rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
table.pcal td { height: 7.25rem; padding: .5rem .55rem .6rem; vertical-align: top; border-right: 1px solid var(--grid-line); border-bottom: 1px solid var(--grid-line); }
table.pcal tr > td:last-child { border-right: 0; }
table.pcal tbody tr:last-child > td { border-bottom: 0; }
td.pday.weekend { background: var(--weekend); }
td.pday.out { background: var(--surface-2); }
td.pday.out .n { color: var(--muted); font-weight: 500; }
td.pday.today { background: var(--today); box-shadow: inset 0 0 0 2px var(--accent); }
.pday-head { display: flex; align-items: center; justify-content: space-between; gap: .3rem; margin: 0 0 .45rem; }
.pday-head .n { font-size: .85rem; font-weight: 700; color: var(--text-2); }
td.pday.today .pday-head .n { color: var(--link); }
.today-tag { padding: .1rem .45rem; border-radius: 999px; background: var(--accent); color: #fff; font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
td.pday .holiday { margin: -.2rem 0 .35rem; font-size: .68rem; }
.pshift {
  display: flex; flex-direction: column; gap: .05rem; margin: 0 0 .3rem; padding: .35rem .5rem .35rem .7rem; border: 1px solid transparent; border-radius: 8px;
  background: var(--t, var(--surface-3)); color: var(--k, var(--text)); box-shadow: inset 3px 0 0 var(--c, var(--border-strong));
}
@media (prefers-color-scheme: dark) { .pshift { background: var(--td, var(--surface-3)); color: var(--kd, var(--text)); } }
button.pshift { width: 100%; font: inherit; text-align: left; cursor: pointer; }
.pshift-code { overflow-wrap: anywhere; font-size: .8rem; font-weight: 650; line-height: 1.3; }
.pshift-time { font-size: .72rem; line-height: 1.3; }
.pshift.draft { background: var(--surface); border: 1px dashed var(--c, var(--border-strong)); }
.pshift.broken { box-shadow: inset 3px 0 0 var(--c, var(--border-strong)), 0 0 0 1.5px var(--warn-ring); }
td.pday.editable { cursor: pointer; }
td.pday.editable:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
td.pday.editable:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); border-radius: 0; }
.pagenda { display: none; }
.agenda-row { display: flex; gap: 1rem; flex: 1; min-width: 0; }
.agenda-row.editable { cursor: pointer; border-radius: 10px; }
.agenda-row.editable:focus-visible { outline-offset: 4px; }
.ic.lk { width: .85em; height: .85em; vertical-align: -.08em; }
.lim { color: var(--muted); font-weight: 500; }
td.over .lim { color: inherit; }
.sum-sample { display: inline-block; padding: .05rem .4rem; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface-2);
  color: var(--text-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.rowhead a.chip { text-decoration: none; }
.rowhead a.chip:hover { text-decoration: underline; }
.calrow .when { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }

/* ---------- Sign-in pages ---------- */
body.auth { min-height: 100vh; background: radial-gradient(1100px 520px at 50% -12%, var(--accent-soft-2), transparent 70%) no-repeat, var(--bg); }
body.auth.signed-in { padding-left: 0; padding-bottom: 0; }
body.auth .sidebar, body.auth header.top, body.auth .tabbar { display: none !important; }
body.auth main { max-width: 470px; padding: 7vh 1.25rem 2rem; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin: 0 0 1.5rem; text-align: center; }
.auth-brand .logo { width: 52px; height: 52px; filter: drop-shadow(0 6px 14px rgba(36, 89, 214, .3)); }
.auth-brand .name { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.auth-brand .tag { color: var(--muted); font-size: .9rem; margin: 0; }
.card.narrow { max-width: none; padding: 2rem 2rem 1.75rem; box-shadow: var(--shadow-md); }
.card.narrow h1 { font-size: 1.35rem; margin: 0 0 .5rem; }
.card.narrow form button:not([class]), .card.narrow .button { width: 100%; height: 2.75rem; margin-top: 1.4rem; font-size: .95rem; }
.card.narrow .below { margin: 1.25rem 0 0; text-align: center; font-size: .875rem; }
.qr { display: inline-block; max-width: 100%; margin: .6rem 0; padding: .6rem; border-radius: 10px; background: #fff; border: 1px solid var(--border); }
.qr svg { display: block; width: min(200px, 55vw); height: auto; }
code.secret { font-size: 1rem; letter-spacing: .05em; }
ol.codes { columns: 2; padding: 1rem 1rem 1rem 2.5rem; margin: 1rem 0; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.05rem; }
pre.mail { white-space: pre-wrap; word-break: break-word; font-family: inherit; margin: 0; }
.message-body { margin: 1rem 0 1.25rem; line-height: 1.6; }

/* ---------- Phones: bar at the bottom, "More" opens the menu as a sheet ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: none; padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--border);
}
.tabbar a, .tabbar button {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; height: 3.3rem; padding: 0; margin: 0;
  line-height: 1.2;
  border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--muted); font-size: .7rem; font-weight: 600; text-decoration: none; cursor: pointer;
}
.tab-ic { position: relative; display: grid; place-items: center; width: 3.6rem; height: 1.95rem; border-radius: 999px; transition: background-color .15s; }
.tab-ic .ic { width: 1.4rem; height: 1.4rem; }
.tab-ic .count { position: absolute; top: -.25rem; right: .55rem; }
.tabbar [aria-current="page"], .tabbar button[aria-expanded="true"] { color: var(--link); }
.tabbar [aria-current="page"] .tab-ic, .tabbar button[aria-expanded="true"] .tab-ic { background: var(--accent-soft); }

@media (max-width: 759px) {
  .phone-only { display: initial !important; }
  li.phone-only { display: list-item !important; }
  .tabbar.phone-only { display: flex !important; }
  .desktop-only { display: none !important; }
  body.signed-in { padding-left: 0; padding-bottom: calc(4.1rem + env(safe-area-inset-bottom)); }
  html.nav-mini body.signed-in { padding-left: 0; }
  header.top {
    position: sticky; top: 0; z-index: 25; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: calc(.55rem + env(safe-area-inset-top)) 16px .55rem; background: var(--surface); border-bottom: 1px solid var(--border);
  }
  header.top .logo { width: 28px; height: 28px; }
  header.top .bell { position: relative; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; color: var(--text-2); text-decoration: none; }
  header.top .bell .ic { width: 1.4rem; height: 1.4rem; }
  header.top .bell .count { position: absolute; top: .1rem; right: .05rem; }
  .sidebar { display: none; }
  html:not(.js) .sidebar { display: flex; position: static; width: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .js body.menu-open .sidebar {
    display: flex; position: fixed; top: auto; left: 0; right: 0; bottom: calc(3.85rem + env(safe-area-inset-bottom)); width: auto; max-height: 76vh;
    border: 1px solid var(--border); border-bottom: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -16px 40px rgba(15, 23, 42, .2); z-index: 29;
  }
  .js body.menu-open::after { content: ""; position: fixed; inset: 0; z-index: 28; background: rgba(15, 23, 42, .35); }
  .sidebar .side-head { display: none; }
  .sidebar .label { position: static !important; width: auto !important; height: auto !important; overflow: visible !important; clip: auto !important; }
  #main-nav { padding: .75rem 16px .5rem; }
  .nav-list a { justify-content: flex-start !important; padding: 0 .75rem !important; min-height: 3rem; font-size: 1rem; }
  .nav-list .count { position: static !important; margin-left: auto; }
  .nav-user { flex-direction: row !important; padding: .85rem .5rem .4rem; }
  .logout .icon-btn { display: inline-flex; align-items: center; width: auto; padding: 0 .75rem; gap: .4rem; color: var(--text-2); }
  .toolbar .bl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .toolbar .btn { padding: 0 .75rem; }
  .sched-head .actions .btn { height: 2.4rem; padding: 0 .7rem; font-size: .8rem; }
  .legend { font-size: .74rem; gap: .25rem .8rem; }
  .logout-text { position: static; width: auto; height: auto; overflow: visible; clip: auto; font-weight: 600; font-size: .9rem; }
  main, body.wide main { padding: 1.1rem 16px 2rem; }
  h1, .page-head h1 { font-size: 1.4rem; }
  .greeting h1 { font-size: 1.45rem; }
  .page-head { margin-bottom: 1.1rem; }
  .card { padding: 1.1rem 1rem; border-radius: 12px; }
  .grid-2 { grid-template-columns: 1fr; }
  input, select, textarea { font-size: 16px !important; }
  .btn, button:not([class]), .button { height: 2.75rem; }
  .btn.small { height: 2.2rem; }
  .filters { padding: .8rem; }
  .filters label { flex: 1 1 45%; }
  .filters select, .filters input[type=date], .filters input[type=month], .filters input[type=text] { max-width: none; width: 100%; height: 2.6rem; }
  .toolbar { position: relative; }
  details.dropdown { position: static; }
  details.dropdown > .panel { position: absolute; left: 0; right: 0; top: 100%; width: auto; margin-top: .4rem; }
  .toolbar .spacer { display: none; }
  .toolbar .tools { margin-left: 0; }
  .ms { flex: 1 1 45%; }
  .ms.is-open { flex-basis: 100%; }
  .ms-sum { width: 100%; height: 2.6rem; }
  .ms-panel { position: static; width: auto; max-width: none; margin-top: .3rem; box-shadow: none; }
  details.favs > .panel { position: absolute; left: 0; right: 0; width: auto; }
  .tabs { width: 100%; }
  .tab { flex: 1 1 auto; justify-content: center; }
  body.wide .table-wrap { max-height: calc(100vh - 11rem); }
  .pcal-wrap { display: none; }
  .pagenda { display: block; }
  .agenda-item { flex-direction: column; gap: .3rem; }
  .agenda-item .chip { min-width: 0; }
  .date-tile { width: 3rem; height: 3.3rem; }
  .until { margin-left: 0; }
  .hero-text h2 { font-size: 1.25rem; }
  .hero-actions .btn { flex: 1 1 auto; }
  .agenda-item > .btn.small.ghost { margin-left: 0; align-self: flex-start; }
  .approval-head .when { margin-left: 0; width: 100%; }
  .card.narrow { padding: 1.5rem 1.25rem; }
  footer.app { padding-bottom: 1.5rem; }
  dialog.drawer { inset: auto 0 0 0; width: 100vw; height: auto; max-height: 88vh; margin: auto 0 0; border-left: 0; border-top: 1px solid var(--border); border-radius: 18px 18px 0 0; }
  #side-body { padding: 1rem 16px calc(1.5rem + env(safe-area-inset-bottom)); }
  .bulk-bar { bottom: calc(4.6rem + env(safe-area-inset-bottom)); left: 8px; right: 8px; width: auto; transform: none; }
  .dates .range { flex-basis: 100%; margin: .2rem 0 0; }
  .sched-title { width: 100%; }
  .hl-pick select { max-width: 10rem; }
  .fchip strong { max-width: 12rem; }
  table.grid { width: max(100%, calc(8.75rem + var(--days, 7) * 6.4rem)); }
  table.grid thead tr.days > .rowhead { width: 8.75rem; }
  table.grid .rowhead { padding: .45rem .55rem; }
  .tsub { margin-left: 0; }
  .th-task .tdot { display: none; }
  table.grid .pill .av { display: none; }
  table.grid .pill { padding-left: .5rem; }
  .legend .lg:nth-child(n+3) { display: none; }
}

/* ---------- Printing ---------- */
@media print {
  .no-print, dialog, .sidebar, header.top, .tabbar, .skip-link, .page-head .actions, .filters, details.dropdown, .legend { display: none !important; }
  .print-only { display: block; font-size: 14pt; margin: 0 0 6pt; }
  body, body.signed-in { background: #fff; color: #000; padding: 0 !important; }
  main, body.wide main { max-width: none; padding: 0; }
  .card, main > .table-wrap { box-shadow: none; border-color: #ccc; }
  .table-wrap, body.wide .table-wrap { overflow: visible !important; max-height: none !important; border: 0 !important; }
  table.grid thead th, table.grid thead td, table.grid .rowhead, table.calendar th, .table-wrap table.simple thead th { position: static !important; }
  table.grid, table.calendar { font-size: 7.5pt; }
  table.grid { width: 100%; table-layout: fixed; }
  table.grid thead tr:first-child > * { min-width: 0; height: auto; }
  table.grid thead tr:first-child > .rowhead { width: 9.5rem; }
  table.grid tr.sum > .rowhead { white-space: normal; line-height: 1.2; }
  .dd { white-space: nowrap; font-size: 7pt; padding: 0 .2rem; }
  .dow { font-size: 6pt; }
  table.grid .rowhead, td.cell { min-width: 0; max-width: none; }
  table.grid .rowhead { padding: .2rem .35rem; }
  table.grid .rowhead .chip { max-width: 100%; }
  table.grid th, table.grid td { padding: .15rem; }
  .chip { font-size: 6.5pt; padding: .05rem .25rem .05rem .4rem; }
  .chip, .calrow .who, td.over, td.short, td.today, td.weekend, th.today .dd { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  dialog, .bulk-bar, .fchips, .names-pop { display: none !important; }
  .grid-wrap, .cal-wrap { border: 0 !important; }
  table.grid thead tr.days > * { min-width: 0; padding: .15rem; }
  th.day .dnum { height: auto; min-width: 0; padding: 0; background: none !important; color: #000 !important; font-size: 8pt; }
  .cov, .rules-n { display: none !important; }
  .pill, .bar { padding: 0 .2rem; border-color: #bbb; font-size: 6.5pt; }
  .av { display: none; }
  .pill.hl, .bar.hl, .calrow.hl { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  tbody.sec tr.section > th { padding: .3rem .2rem .1rem; font-size: 8pt; }
  @page { size: landscape; margin: 10mm; }
}
