:root {
  --primary: #00796b; --primary-hover: #00695c; --primary-light: #e0f2f1;
  --background: #f8fafc; --surface: #fff; --surface-alt: #f1f5f9; --table-row-alt: #f7f9fb; --border: #e2e8f0;
  --sidebar: #0d2b3a; --sidebar-border: #1e3d50; --sidebar-text: #aab7c6;
  --text: #191b22; --text-secondary: #434653; --text-muted: #596579;
  --success: #166534; --success-light: #dcfce7; --danger: #991b1b; --danger-light: #fee2e2;
  --warning: #68510a; --warning-light: #fff5bf; --info: #315d69; --info-light: #e8f0f2;
  --control-border: #cdd7e1; --card-border: #d6dfe8; --subtle-border: #dbe4ec;
  --control-rail: #edf2f7; --on-primary: #fff;
  --connector-blue: #0f617e; --connector-cyan: #11899a; --connector-slate: #667281;
  --connector-custom-border: #9dcfc8; --connector-custom-surface: #fbfefd;
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px;
  --shadow-card: 0 1px 3px rgb(15 23 42 / 6%), 0 1px 2px rgb(15 23 42 / 4%);
  color: var(--text); background: var(--background); color-scheme: light;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* Anonymous facility schedule */
.public-schedule-body { margin: 0; color: #191b22; background: #fff; font-family: Inter, "Segoe UI", system-ui, sans-serif; }
.public-schedule-page { width: min(100%, 1510px); margin: 0 auto; padding: 34px 36px 32px; }
.public-schedule-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 20px; border-bottom: 3px solid #008577; }
.public-schedule-identity { display: flex; min-width: 0; align-items: center; gap: 14px; }
.public-schedule-identity img { width: 52px; height: 52px; flex: none; border-radius: 12px; }
.public-schedule-identity h1 { margin: 0; color: #191b22; font: 800 32px/1.05 Manrope, "Segoe UI", system-ui, sans-serif; letter-spacing: -.025em; }
.public-schedule-identity p { margin: 4px 0 0; color: #596579; font-size: 15px; }
.public-schedule-actions { display: flex; flex: none; align-items: center; gap: 8px; }
.public-schedule-week-navigation { display: inline-flex; }
.public-schedule-week-navigation a, .public-schedule-print { display: inline-grid; min-width: 44px; min-height: 44px; place-items: center; border: 1px solid #cdd7e1; color: #434653; background: #fff; font: 700 12px/1 Inter, "Segoe UI", system-ui, sans-serif; text-decoration: none; }
.public-schedule-week-navigation a:first-child { border-radius: 6px 0 0 6px; }
.public-schedule-week-navigation a:nth-child(2) { padding: 0 12px; border-right: 0; border-left: 0; }
.public-schedule-week-navigation a:last-child { border-radius: 0 6px 6px 0; }
.public-schedule-print { display: inline-flex; justify-content: center; gap: 7px; padding: 0 13px; border-radius: 6px; cursor: pointer; }
.public-schedule-week-navigation a:hover, .public-schedule-print:hover { border-color: #008577; color: #006b60; background: #f0fdfa; }
.public-schedule-week-navigation a:focus-visible, .public-schedule-print:focus-visible { outline: 3px solid #99f6e4; outline-offset: 2px; }
.public-schedule-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; margin-top: 20px; align-items: start; }
.public-schedule-day-card { overflow: hidden; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; box-shadow: 0 1px 3px rgb(15 23 42 / 6%), 0 1px 2px rgb(15 23 42 / 4%); }
.public-schedule-day-card > header { padding: 12px 14px; background: #f1f5f9; }
.public-schedule-day-card.selected > header { color: #fff; background: #0d2b3a; }
.public-schedule-day-card h2 { margin: 0; color: inherit; font: 750 16px/1.2 Manrope, "Segoe UI", system-ui, sans-serif; }
.public-schedule-day-card > header time { display: block; margin-top: 3px; font-size: 12px; opacity: .8; }
.public-schedule-window { display: grid; gap: 3px; padding: 11px 14px; border-top: 1px solid #e2e8f0; }
.public-schedule-window time { color: #596579; font-size: 12px; font-weight: 700; }
.public-schedule-window strong { color: #191b22; font-size: 14px; line-height: 1.3; }
.public-schedule-window span { color: #596579; font-size: 12px; line-height: 1.35; }
.public-schedule-window.cancelled time, .public-schedule-window.cancelled strong { color: #596579; text-decoration: line-through; }
.public-schedule-window .public-schedule-cancelled { color: #991b1b; }
.public-schedule-empty { margin: 0; padding: 18px 14px; border-top: 1px solid #e2e8f0; color: #7a8595; font-size: 12px; }
.public-schedule-note { display: flex; align-items: center; gap: 14px; margin-top: 38px; padding: 14px 16px; border-radius: 10px; color: #596579; background: #f1f5f9; font-size: 12px; line-height: 1.5; }
.public-schedule-note i { flex: none; color: #008577; font-size: 18px; }
.public-schedule-note p { margin: 0; }
.schedule-publication-list { display: grid; margin-top: 14px; border: 1px solid var(--border); border-radius: var(--radius-md); }
.schedule-publication-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 15px; }
.schedule-publication-row + .schedule-publication-row { border-top: 1px solid var(--border); }
.schedule-publication-row > div { display: grid; gap: 2px; }
.schedule-publication-row small { color: var(--text-muted); }
.schedule-publication-row a { margin-top: 4px; color: var(--primary); font-weight: 700; }

@media (max-width: 991px) {
  .public-schedule-page { padding: 24px; }
  .public-schedule-header { align-items: flex-start; }
  .public-schedule-week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .public-schedule-note { margin-top: 24px; }
}

@media (max-width: 767px) {
  .public-schedule-page { padding: 18px 16px 24px; }
  .public-schedule-header { align-items: stretch; flex-direction: column; }
  .public-schedule-actions { justify-content: space-between; }
  .public-schedule-identity h1 { font-size: 25px; }
  .public-schedule-week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-publication-row { align-items: stretch; flex-direction: column; }
}

@media (max-width: 420px) {
  .public-schedule-actions { align-items: stretch; flex-direction: column; }
  .public-schedule-week-navigation { align-self: stretch; }
  .public-schedule-week-navigation a { flex: 1; }
  .public-schedule-week { grid-template-columns: 1fr; }
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; background: var(--background); font-size: 14px; line-height: 1.55; }
body.navigation-open { overflow: hidden; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
h1, h2, h3, .page-title, .sidebar-logo-name { font-family: Manrope, "Segoe UI", system-ui, sans-serif; }
h1, h2, p { margin-top: 0; }
.visually-hidden { 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: fixed; top: 8px; left: 8px; z-index: 1000; padding: 9px 12px; border-radius: 7px; color: white; background: var(--primary-hover); font-weight: 700; text-decoration: none; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

/* Application frame */
.app-shell { display: flex; min-height: 100vh; }
.main-content { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 100vh; margin-left: 240px; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 100; display: flex; flex-direction: column; width: 240px; overflow-y: auto; color: var(--sidebar-text); background: var(--sidebar); border-right: 1px solid var(--sidebar-border); }
.sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px; border-bottom: 1px solid var(--sidebar-border); text-decoration: none; }
.sidebar-logo-mark { width: 38px; height: 38px; flex: none; border-radius: 9px; object-fit: contain; }
.sidebar-logo-text-group { display: flex; flex-direction: column; min-width: 0; }
.sidebar-logo-name { color: white; font-size: 15px; font-weight: 750; line-height: 1; }
.sidebar-logo-sub { margin-top: 4px; color: #91a3b6; font-size: 8px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.sidebar-close { display: none; }
.sidebar-context-host .tenant-context { padding: 12px 16px; border-bottom: 1px solid var(--sidebar-border); background: rgb(255 255 255 / 2.5%); }
.tenant-context > div + div { margin-top: 10px; }
.tenant-context-label { display: block; color: #91a3b6; font-size: 9px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.tenant-context-client, .tenant-context-organization { display: block; color: white; font-size: 12px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.tenant-context-organization { margin-top: 2px; }
.tenant-context-role { display: block; margin-top: 6px; color: #91a3b6; font-size: 11px; line-height: 1.35; }
.tenant-context-switch { margin: 0; }
.tenant-context-switch-controls { display: flex; gap: 6px; margin-top: 4px; }
.tenant-context-select { flex: 1; min-width: 0; padding: 4px 6px; border: 1px solid var(--sidebar-border); border-radius: var(--radius-sm); color: white; background: rgb(255 255 255 / 6%); font-size: 12px; }
.tenant-context-select option { color: var(--text); background: white; }
.tenant-context-switch-button { padding: 4px 8px; border: 1px solid var(--primary); border-radius: var(--radius-sm); color: white; background: var(--primary); font-size: 11px; font-weight: 700; cursor: pointer; }
.tenant-context-select:focus-visible, .tenant-context-switch-button:focus-visible, .sidebar-nav-item:focus-visible, .sidebar-sign-out:focus-visible { outline: 2px solid white; outline-offset: 2px; }
.sidebar-navigation { flex: 1; padding: 12px 0; }
.sidebar-nav-group { margin: 0; padding: 14px 20px 4px; color: #91a3b6; font-size: 9px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.sidebar-nav-group:first-child { padding-top: 4px; }
.sidebar-nav-item { display: flex; align-items: center; gap: 12px; margin: 1px 8px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--sidebar-text); font-size: 13px; font-weight: 550; text-decoration: none; transition: color .15s, background .15s; }
a.sidebar-nav-item:hover { color: white; background: rgb(255 255 255 / 6%); }
.sidebar-nav-item.active { color: white; background: rgb(0 155 141 / 22%); font-weight: 650; }
.sidebar-nav-item.disabled { cursor: default; opacity: .62; }
.sidebar-nav-item.disabled small { margin-left: auto; padding: 1px 5px; border: 1px solid #607386; border-radius: 999px; font-size: 8px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.nav-icon { display: grid; width: 18px; height: 18px; flex: none; place-items: center; opacity: .82; }
.nav-icon svg { width: 18px; height: 18px; fill: currentColor; }
.nav-icon.outline svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-footer { padding: 12px 16px; border-top: 1px solid var(--sidebar-border); }
.sidebar-user-row { display: flex; align-items: center; gap: 10px; margin: 0 -6px 10px; padding: 6px; border-radius: var(--radius-sm); text-decoration: none; }
a.sidebar-user-row:hover { background: rgb(255 255 255 / 6%); }
a.sidebar-user-row:focus-visible { outline: 2px solid white; outline-offset: 2px; }
.account-page { max-width: 860px; }
/* A settings row that expands into its form only when the person chooses to change it. */
.setting-row { border-top: 1px solid var(--border); }
.setting-row:last-child { border-bottom: 1px solid var(--border); }
.setting-row > summary { display: flex; align-items: center; gap: 16px; min-height: 52px; list-style: none; cursor: pointer; }
.setting-row > summary::-webkit-details-marker { display: none; }
.setting-row-label { width: 140px; flex: none; color: var(--text-secondary); font-size: 12px; font-weight: 700; }
.setting-row-value { flex: 1; color: var(--text-muted); letter-spacing: .12em; }
.setting-row-action { color: var(--primary-hover); font-size: 13px; font-weight: 700; }
.setting-row > summary:hover .setting-row-action { text-decoration: underline; }
.setting-row > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius-sm); }
.setting-row .when-open, .setting-row[open] .when-closed { display: none; }
.setting-row[open] .when-open { display: inline; }
.setting-row-form { padding: 4px 0 18px; }
/* A single-line setting in its own compact panel (label, control, note). */
.setting-panel { margin-bottom: 14px; padding: 12px 22px; }
.setting-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-height: 40px; }
.setting-line .setting-row-label { width: auto; min-width: 140px; }
.setting-line-note { color: var(--text-muted); font-size: 11px; }
.reset-link-panel { margin-bottom: 14px; border-color: var(--primary); }
.reset-link-row { display: flex; gap: 8px; }
.reset-link-row input { min-width: 0; flex: 1; padding: 10px 11px; border: 1px solid var(--control-border); border-radius: 8px; font-family: "Cascadia Mono", Consolas, monospace; font-size: 12px; }
.sidebar-user-avatar { display: grid; width: 34px; height: 34px; flex: none; place-items: center; border-radius: 50%; color: white; background: var(--primary); font-weight: 750; }
.sidebar-user-info { display: flex; min-width: 0; flex-direction: column; }
.sidebar-user-name { overflow: hidden; color: white; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-org { overflow: hidden; color: #91a3b6; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-sign-out { width: 100%; padding: 7px 10px; border: 1px solid #52697a; border-radius: var(--radius-sm); color: #d9e1e8; background: transparent; font-size: 12px; cursor: pointer; }
.sidebar-sign-out:hover { color: white; background: rgb(255 255 255 / 6%); }
.topbar { position: sticky; top: 0; z-index: 50; display: flex; height: 64px; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--border); background: rgb(255 255 255 / 96%); backdrop-filter: blur(10px); }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.page-title { margin: 0; color: var(--text); font-size: 18px; font-weight: 750; line-height: 1.25; }
.topbar-titles { min-width: 0; }
.breadcrumb ol { display: flex; flex-wrap: wrap; margin: 0 0 1px; padding: 0; list-style: none; color: var(--text-muted); font-size: 11px; line-height: 1.3; }
.breadcrumb li:not(.visually-hidden) + li:not(.visually-hidden)::before { margin: 0 6px; color: #a3b0bd; content: "›"; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary-hover); text-decoration: underline; }
.topbar-back { display: grid; width: 32px; height: 32px; flex: none; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-secondary); background: var(--surface); text-decoration: none; }
.topbar-back:hover { border-color: var(--primary); color: var(--primary-hover); }
.topbar-actions { display: flex; flex: none; align-items: center; gap: 8px; }
.topbar-add-menu { position: relative; }
.topbar-add-menu > summary { list-style: none; }
.topbar-add-menu > summary::-webkit-details-marker { display: none; }
.topbar-add-caret { margin-left: 2px; font-size: 9px; }
.topbar-add-menu-items { position: absolute; top: calc(100% + 6px); right: 0; z-index: 55; min-width: 210px; padding: 5px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: 0 12px 30px rgb(14 38 51 / 15%); }
.topbar-add-menu-items a { display: block; padding: 9px 11px; border-radius: 5px; color: var(--text); font-size: 12px; font-weight: 650; text-decoration: none; }
.topbar-add-menu-items a:hover, .topbar-add-menu-items a:focus-visible { color: var(--primary-hover); background: var(--primary-light); }
.mobile-menu-button { display: none; width: 38px; height: 38px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; color: var(--text-secondary); background: white; cursor: pointer; }
.mobile-menu-button svg { width: 20px; height: 20px; fill: currentColor; }
.sidebar-backdrop { display: none; }
.responsive-tenant-context { display: none; color: var(--sidebar-text); background: var(--sidebar); border-bottom: 1px solid var(--sidebar-border); }
.page-body { width: 100%; max-width: 1440px; min-width: 0; flex: 1; align-self: center; padding: 24px; }

/* Public / authentication frame */
.public-body { min-height: 100vh; background: #F8FAFC; }
.public-content { min-height: calc(100vh - 114px); padding: 42px 20px; }
.public-footer { padding: 14px 20px; color: var(--text-muted); font-size: 12px; text-align: center; }

/* Page content */
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; margin-bottom: 24px; }
.page-heading h1 { margin-bottom: 7px; color: #102e3d; font-size: clamp(28px, 3.3vw, 42px); line-height: 1.08; letter-spacing: -.025em; }
.compact-heading { align-items: center; }
.compact-heading h1 { font-size: clamp(26px, 3vw, 36px); }
.eyebrow { margin-bottom: 5px; color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.lede, .utc-note, .empty-state { color: var(--text-muted); }
.lede { margin-bottom: 0; font-size: 15px; }
/* Small line under the top bar for facts the title and breadcrumb do not carry. */
.page-context { margin: -4px 0 16px; color: var(--text-muted); font-size: 13px; }
.page-context .status-pill { margin-right: 6px; }
.page-context-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px 0 16px; }
.page-context-row .page-context { margin: 0; }
.role-pill, .relationship, .decision, .status-pill, .primary-label { display: inline-flex; width: fit-content; align-items: center; border-radius: 999px; font-size: 11px; font-weight: 750; }
.role-pill { padding: 7px 11px; color: var(--primary-hover); background: var(--primary-light); }
.organization-switcher { display: flex; gap: 8px; margin: -12px 0 20px; padding: 4px; overflow-x: auto; }
.organization-switcher a { flex: none; padding: 7px 11px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-secondary); background: white; font-size: 12px; font-weight: 650; text-decoration: none; }
.organization-switcher a.selected { border-color: var(--primary); color: white; background: var(--primary); }
.section-nav { display: flex; gap: 5px; margin: -10px 0 20px; }
.section-nav a { padding: 7px 10px; border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 12px; font-weight: 650; text-decoration: none; }
.section-nav a.selected { color: var(--primary-hover); background: var(--primary-light); }
.dashboard-nav { margin-top: -10px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.metric-card, .panel { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.metric-card { position: relative; overflow: hidden; padding: 20px 22px; }
.metric-card::before { position: absolute; inset: 0 auto 0 0; width: 3px; content: ""; background: var(--primary); }
.metric-card span { display: block; margin-bottom: 6px; color: var(--text-muted); font-size: 12px; }
.metric-card strong { color: #102e3d; font-size: 30px; line-height: 1; }
.dashboard-grid { display: grid; grid-template-columns: minmax(240px, .9fr) minmax(0, 2fr); gap: 14px; }
.panel { min-width: 0; padding: 22px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-heading h2 { margin-bottom: 0; color: #173d48; font-size: 19px; }
.panel-heading-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 14px; color: var(--text-muted); font-size: 12px; }
.panel-heading-actions .primary-action, .panel-heading-actions .secondary-action { padding: 8px 14px; font-size: 13px; }
.facility-list, .people-list { margin: 0; padding: 0; list-style: none; }
.facility-list li, .people-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); }
.facility-list li:first-child, .people-list li:first-child { border-top: 0; }
.facility-list strong, .facility-list span { display: block; }
.facility-list div > span, .people-list small { margin-top: 3px; color: var(--text-muted); font-size: 11px; }
.relationship { flex: none; padding: 5px 8px; color: #315d69; background: #e8f0f2; }
.table-wrap { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; }
.station-list .table-wrap { position: relative; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-top: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { border-top: 0; color: var(--text-muted); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
td { font-size: 13px; }
.decision, .status-pill { padding: 5px 8px; }
.decision.allowed { color: var(--success); background: var(--success-light); }
.decision.denied { color: var(--danger); background: var(--danger-light); }
.decision.pending, .status-pill { color: #526970; background: #edf1f2; }
.contact-missing-pill { display: inline-flex; width: fit-content; margin-top: 4px; padding: 3px 7px; border-radius: 999px; color: white; background: var(--danger); font-size: 10px; font-weight: 750; line-height: 1.2; }
td small { display: block; margin-top: 3px; color: var(--text-muted); }
.table-link, .people-list a { color: #086576; font-weight: 700; }
.primary-label { margin-left: 6px; padding: 3px 6px; color: var(--success); background: var(--success-light); font-size: 9px; }
.stacked-panel { margin-top: 14px; }
.credential-value { font-family: "Cascadia Mono", Consolas, monospace; letter-spacing: .04em; }
.primary-action, .secondary-action { display: inline-flex; align-items: center; justify-content: center; padding: 10px 15px; border-radius: 8px; font-weight: 700; text-decoration: none; cursor: pointer; }
.primary-action { border: 1px solid var(--primary); color: white; background: var(--primary); }
.primary-action:hover { border-color: var(--primary-hover); background: var(--primary-hover); }
.secondary-action { border: 1px solid #bac6d1; color: var(--text-secondary); background: white; }
.secondary-action.danger-action { border-color: color-mix(in srgb, var(--danger) 38%, #bac6d1); color: var(--danger); }
.secondary-action.danger-action:hover { border-color: var(--danger); color: #8f1d1d; background: var(--danger-light); }
.editor-form { display: grid; min-width: 0; gap: 14px; }
.event-calendar-action { display: flex; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.event-calendar-action .secondary-action { width: auto; min-height: 44px; color: var(--danger); border-color: #d8aaaa; }
.event-calendar-action .secondary-action:hover { background: var(--danger-light); }
.station-pairing-form { max-width: 720px; margin-top: 16px; }
.form-section { padding: 24px; }
.chemistry-panel { margin-top: 16px; }
.chemistry-panel > .lede { margin-bottom: 16px; }
.report-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 1200px) { .report-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.report-card { display: flex; align-items: center; gap: 14px; min-height: 80px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text); background: var(--surface); box-shadow: var(--shadow-card); font-weight: 700; text-decoration: none; }
.report-card:hover, .report-card:focus-visible { border-color: var(--primary); color: var(--primary); }
.report-card-sub { display: block; margin-top: 2px; color: var(--text-muted); font-size: 12px; font-weight: 500; }
.report-card-icon { display: inline-grid; flex: none; width: 40px; height: 40px; place-items: center; border-radius: 9px; color: #086576; background: #d7f8fc; font-size: 20px; }
.chemistry-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chemistry-start-form { display: flex; align-items: center; gap: 8px; }
.chemistry-start-form select { width: min(320px, 100%); min-height: 40px; }
.chemistry-start-form .primary-action { min-height: 40px; white-space: nowrap; }
.chemistry-start-form .primary-action i { margin-right: 5px; }
.chemistry-report-form .field { min-width: 0; }
.chemistry-report-form .field input, .chemistry-report-form .field select { width: 100%; min-height: 42px; }
.chemistry-history-table { min-width: 880px; }
.chemistry-history-table th, .chemistry-history-table td { padding: 10px 8px; }
.chemistry-report-toolbar { margin-bottom: 12px; }
.chemistry-report-panel { margin-top: 12px; }
.chemistry-report-form { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(160px, .8fr) auto; align-items: end; gap: 12px; max-width: 860px; }
.chemistry-report-form .primary-action { min-height: 42px; white-space: nowrap; }
.chemistry-list { margin: 0; padding: 0; list-style: none; }
.chemistry-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.chemistry-list li:first-child { border-top: 0; }
.chemistry-list strong, .chemistry-list small { display: block; }
.chemistry-list small { margin-top: 3px; color: var(--text-muted); font-size: 11px; }
.chemical-band-list { display: grid; }
.chemical-band-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px 18px; padding: 18px 0; border-top: 1px solid var(--border); }
.chemical-band-row:first-child { padding-top: 0; border-top: 0; }
.chemical-band-heading { grid-row: 1 / span 2; }
.chemical-band-heading h3 { margin: 2px 0 0; color: var(--text); font-size: 14px; }
.chemical-band-heading span { display: block; margin-top: 4px; color: var(--text-muted); font-size: 11px; }
.limit-value-grid { display: grid; grid-template-columns: repeat(4, minmax(90px, 145px)); gap: 12px; }
.limit-value-grid .field input { width: 100%; min-height: 42px; }
.limit-band-editor { min-width: 0; padding: 15px 18px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-alt); }
.limit-band-editor[hidden] { display: none; }
.limit-band-prompt { margin: 0 0 12px; color: var(--text-muted); font-size: 12px; }
.limit-band-scale { display: flex; justify-content: space-between; margin-bottom: 4px; color: var(--text-muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.limit-band-track { position: relative; display: flex; height: 16px; margin: 25px 10px 31px; border-radius: 999px; background: #d9e2e9; box-shadow: inset 0 0 0 1px rgb(16 47 64 / 10%); }
.limit-band-track.is-disabled { opacity: .45; }
.limit-band-segment { position: absolute; top: 0; bottom: 0; }
.limit-band-segment:first-of-type { border-radius: 999px 0 0 999px; }
.limit-band-segment:nth-of-type(5) { border-radius: 0 999px 999px 0; }
.limit-band-segment.is-critical { background: #dc5454; }
.limit-band-segment.is-warning { background: #f4c84d; }
.limit-band-segment.is-normal { background: #51bb83; }
.limit-band-handle { position: absolute; top: -25px; z-index: 2; width: 28px; height: 28px; margin-left: -14px; padding: 0; border: 0; color: #12384a; background: transparent; cursor: ew-resize; touch-action: none; }
.limit-band-handle i { display: block; font-size: 24px; line-height: 1; filter: drop-shadow(0 1px 0 #fff); }
.limit-band-handle.handle-warning-low, .limit-band-handle.handle-warning-high { top: 13px; transform: rotate(180deg); }
.limit-band-handle:focus-visible { border-radius: 4px; outline: 3px solid rgb(0 121 107 / 28%); outline-offset: 1px; }
.limit-band-handle:disabled { cursor: default; }
.limit-band-hint { margin: 0; color: var(--text-muted); font-size: 11px; }
.chemistry-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0 0; }
.chemistry-values div { padding: 12px 14px; border-radius: 8px; background: var(--surface-alt); }
.chemistry-values dt { color: var(--text-muted); font-size: 11px; }
.chemistry-values dd { margin: 3px 0 0; color: var(--text); font-weight: 700; }
.chemistry-notes { margin-top: 18px; }
.chemistry-notes h3 { margin-bottom: 5px; font-size: 15px; }
.chemistry-notes p { white-space: pre-wrap; }
.team-management-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(310px, .9fr); gap: 18px; align-items: start; }
.team-roster-page { max-width: 980px; }
/* Standard list page: one filter bar, then a list panel with a heading row, data table, and pager. */
.filter-panel { margin-bottom: 14px; padding: 16px 18px; }
.filter-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.filter-form .field { flex: 1 1 150px; min-width: 0; }
.filter-form .field.filter-grow { flex: 2 1 240px; }
.filter-form .field input, .filter-form .field select { width: 100%; min-height: 40px; }
.filter-actions { display: flex; flex: none; gap: 8px; }
.filter-actions .primary-action, .filter-actions .secondary-action { min-height: 40px; padding: 8px 14px; }
.filter-note { margin: 8px 0 0; color: var(--text-muted); font-size: 11px; }
.list-panel { overflow: hidden; padding: 18px 22px; }
.list-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; min-height: 30px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.list-count { margin-left: auto; color: var(--text-muted); font-size: 12px; }
.list-panel > .empty-state, .list-panel > .validation-summary { margin: 14px 0 0; }
.list-tabs { display: flex; flex-wrap: wrap; gap: 3px; }
.list-tabs a, .list-tabs span { display: inline-grid; min-width: 30px; height: 30px; padding: 0 9px; place-items: center; border-radius: var(--radius-sm); font-size: 12px; font-weight: 700; text-decoration: none; }
.list-tabs a { color: var(--primary-hover); }
.list-tabs a:hover { background: var(--primary-light); }
.list-tabs a.selected { color: var(--on-primary); background: var(--primary); }
.list-tabs span, .list-tabs a.empty { color: #b3bec9; background: none; cursor: default; pointer-events: none; }
/* Segmented control: one choice among a few views or orders (Day/Week/Month, First/Last name, Active/Archived). */
.segmented { display: inline-flex; flex: none; padding: 3px; border-radius: 8px; background: var(--control-rail); }
.segmented > a, .segmented > button { display: inline-grid; min-height: 32px; padding: 0 13px; place-items: center; border: 0; border-radius: 6px; color: var(--text-muted); background: transparent; font-size: 12px; font-weight: 600; text-decoration: none; cursor: pointer; }
.segmented > a:hover, .segmented > button:hover:not(:disabled) { color: var(--text); }
.segmented > .selected { color: var(--text); background: var(--surface); box-shadow: var(--shadow-card); font-weight: 750; }
.segmented > button:disabled { cursor: not-allowed; opacity: .47; }
.segmented > a:focus-visible, .segmented > button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.data-table td { white-space: nowrap; }
.data-table tbody > tr:nth-child(even) > td { background: var(--table-row-alt); }
.data-table td:first-child, .data-table td.wrap { white-space: normal; }
.data-table td small + small { margin-top: 2px; }
.station-versions div + div { margin-top: 8px; }
.station-versions code { font-size: 10px; }
@media (max-width: 767px) {
  .station-list th, .station-list td { padding-inline: 7px; }
}
@media (max-width: 420px) {
  .station-settings-panel .panel-heading { align-items: flex-start; flex-direction: column; }
  .station-settings-panel .panel-heading-actions .secondary-action { white-space: nowrap; }
}
.member-table th:nth-child(1) { width: 22%; }
.member-table th:nth-child(2) { width: 15%; }
.member-table th:nth-child(3) { width: 51%; }
.member-table th:nth-child(4) { width: 12%; }
.member-table td { vertical-align: top; }
.member-table td:first-child small, .member-table td:nth-child(2) small { display: block; margin-top: 3px; }
.member-memberships, .member-profile-memberships { margin: 0; padding: 0; list-style: none; }
.member-memberships li + li { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--border); }
.member-memberships strong, .member-memberships small { display: block; }
.member-memberships strong { color: var(--text); font-size: 13px; }
.member-memberships small { margin-top: 2px; color: var(--text-muted); font-size: 11px; }
.member-badge-warning { color: var(--warning) !important; }
.member-editor-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, .75fr); gap: 14px; align-items: start; }
.member-editor-aside { min-width: 0; }
.member-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.member-fields:disabled { opacity: .72; }
.member-badge-card .empty-state { margin-bottom: 0; }
.member-badge-value { display: block; margin-top: 4px; color: #102e3d; font-size: 20px; }
.member-badge-actions { display: flex; align-items: center; gap: 8px; }
.member-badge-icon { display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 1px solid var(--control-border); border-radius: 50%; color: var(--text-secondary); background: white; cursor: pointer; }
.member-badge-icon:hover, .member-badge-icon:focus-visible { border-color: var(--primary); color: var(--primary); }
.member-badge-change { padding: 7px 11px; }
.member-badge-change-field { margin-top: 14px; }
.member-profile-memberships li { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); }
.member-profile-memberships li:first-child { border-top: 0; }
.member-profile-memberships small { display: block; margin-top: 3px; color: var(--text-muted); font-size: 11px; }
.member-profile-memberships .primary-label { margin-top: 7px; }
.list-pager { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.roster-category { display: flex; align-items: center; gap: 8px; }
.roster-category .team-category-form { margin-top: 0; }
.row-actions { text-align: right; }
.row-actions .team-category-save { text-decoration: none; }
.status-pill.warning { color: var(--warning); background: var(--warning-light); }
.muted-dash { color: var(--text-muted); }
.team-management-grid .stacked-panel { margin-top: 18px; }
.team-management-grid .panel-heading > span { color: var(--text-muted); font-size: 12px; }
.team-status { margin: 0 0 16px; padding: 11px 14px; border: 1px solid var(--success-light); border-radius: 8px; color: var(--success); background: var(--success-light); }
.team-confirm { display: flex; align-items: flex-start; gap: 8px; color: var(--text-secondary); font-size: 12px; }
.team-confirm input { margin-top: 2px; }
.team-category-form { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.team-category-form select { width: auto; min-width: 90px; padding: 5px 7px; border: 1px solid var(--border); border-radius: 6px; background: #fff; font-size: 12px; }
.team-category-save { padding: 5px 7px; border: 0; color: var(--primary); background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.team-duplicate-review { margin-top: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-alt); }
.team-duplicate-review > p { margin: 5px 0 10px; color: var(--text-secondary); font-size: 12px; }
.team-duplicate-review .team-confirm { margin-top: 10px; }
.team-search { display: grid; gap: 7px; margin-bottom: 12px; }
.team-search label { color: var(--text-secondary); font-size: 12px; font-weight: 700; }
.team-search > div { display: flex; gap: 8px; }
.team-search input { min-width: 0; flex: 1; padding: 10px 11px; border: 1px solid #bac6d1; border-radius: 8px; }
.team-person-list, .team-practice-list { margin: 0; padding: 0; list-style: none; }
.team-person-list li, .team-practice-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.team-person-list li:first-child, .team-practice-list li:first-child { border-top: 0; }
.team-person-list strong, .team-person-list small, .team-practice-list strong, .team-practice-list span, .team-practice-list small { display: block; }
.team-person-list small, .team-practice-list small { color: var(--text-muted); font-size: 11px; }
.team-person-list form.inline-form { display: flex; align-items: center; gap: 8px; }
.team-person-list form.inline-form select { width: auto; min-width: 112px; padding: 7px; border: 1px solid var(--control-border); border-radius: 6px; background: var(--surface); font-size: 12px; }
.staff-position-fieldset { border: 0; margin: 0; padding: 0; }
.staff-position-fieldset legend { margin-bottom: 8px; font-size: 12px; font-weight: 700; }
.staff-position-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.staff-position-choices label { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; margin: 0; padding: 7px 11px; border: 1px solid var(--control-border); border-radius: 8px; background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 600; }
.staff-position-choices input { width: auto; margin: 0; }
.staff-shift-weekdays { display: flex; flex-wrap: wrap; gap: 8px; }
.staff-shift-weekdays label { display: inline-flex; min-height: 38px; align-items: center; gap: 7px; margin: 0; padding: 7px 11px; border: 1px solid var(--control-border); border-radius: 8px; color: var(--text-secondary); background: var(--surface); cursor: pointer; font-size: 12px; font-weight: 650; }
.staff-shift-weekdays input { width: auto; margin: 0; }
.inline-cancel-form { display: grid; grid-template-columns: minmax(150px, 220px) auto; align-items: center; justify-content: end; gap: 6px; }
.inline-cancel-form input { width: 100%; min-width: 0; padding: 7px 9px; border: 1px solid var(--control-border); border-radius: 6px; background: var(--surface); font-size: 12px; }
.inline-cancel-form input:focus { border-color: var(--primary); outline: 3px solid rgb(0 121 107 / 14%); }
.muted-row { color: var(--text-muted); background: var(--surface-alt); }
.muted-row strong { color: var(--text-muted); }
.staff-existing-position-form { display: grid; gap: 10px; min-width: 260px; margin-top: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-alt); }
.staff-existing-position-form .secondary-action { justify-self: end; }
.staff-roster-note { margin-top: 12px; }
.team-practice-list span { margin: 3px 0; color: var(--text-secondary); font-size: 12px; }
.team-honest-note { margin: 14px 0 0; color: var(--text-muted); font-size: 11px; }
.inline-form { display: inline; }
.print-only { display: none; }
.text-action { padding: 5px 7px; border: 0; color: var(--danger); background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
/* Keep label, control, and hint at natural height; a taller neighbour must not stretch the control. */
.field { display: grid; align-content: start; gap: 6px; }
.full-field { grid-column: 1 / -1; }
.field label, .field-label { color: var(--text-secondary); font-size: 12px; font-weight: 700; }
.field input, .field select, .field textarea { min-width: 0; padding: 10px 11px; border: 1px solid #bac6d1; border-radius: 8px; color: var(--text); background: white; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); outline: 3px solid rgb(0 121 107 / 14%); }
.field input.contact-missing { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.field input.contact-missing:focus { border-color: var(--danger); outline-color: rgb(153 27 27 / 16%); }
.field small { color: var(--text-muted); font-size: 11px; }
.form-divider { margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--border); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.team-page-actions { flex: none; flex-wrap: wrap; }
.team-page-actions .primary-action, .team-page-actions .secondary-action { width: auto; white-space: nowrap; }
.membership-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.membership-summary .text-metric { font-size: 14px; line-height: 1.4; }
.membership-summary small { display: block; margin-top: 4px; color: var(--text-muted); }
.badge-form { max-width: 704px; }
.validation-summary, .field-error { color: var(--danger); font-size: 12px; }
.validation-summary:empty, .validation-summary-valid, .field-error:empty { display: none; }
.checkbox-field { display: flex; align-items: flex-start; gap: 8px; }
.field input[type="color"] { width: 84px; height: 44px; padding: 4px; cursor: pointer; }
.station-logo-current { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.station-logo-current img { max-width: 220px; max-height: 64px; }
.station-logo-remove { display: grid; justify-items: start; gap: 2px; }
.station-header-style-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.station-header-style-field legend { margin-bottom: 8px; font-weight: 700; }
.station-header-style-options { display: grid; grid-template-columns: repeat(5, minmax(112px, 1fr)); gap: 10px; }
.station-header-style-option { position: relative; display: grid; min-width: 0; min-height: 74px; gap: 7px; padding: 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; }
.station-header-style-option:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 2px rgb(0 121 107 / 24%); }
.station-header-style-option:has(input:checked)::after { content: "Selected"; position: absolute; top: 7px; right: 8px; font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.station-header-style-option:has(input:focus-visible) { outline: 3px solid rgb(0 121 107 / 24%); outline-offset: 2px; }
.station-header-style-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.station-header-style-name { min-height: 16px; padding-right: 46px; font-size: 12px; font-weight: 700; }
.station-header-swatch { position: relative; display: block; height: 32px; overflow: hidden; border-radius: 5px; background: var(--station-header-color); }
.station-heading-preview { position: relative; min-height: 86px; overflow: hidden; padding: 14px 18px; border-radius: 8px; background: #0b2c3b; }
.station-heading-preview-content { position: relative; z-index: 2; display: grid; min-height: 58px; align-content: center; gap: 5px; }
.station-heading-preview-label { color: #91a3b6; font-size: 9px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.station-heading-preview strong { overflow: hidden; color: white; font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
.station-header-decoration { position: absolute; z-index: 1; inset: 0; display: none; pointer-events: none; }
.station-header-decoration svg { display: block; width: 100%; height: 100%; }
[data-header-style="Waterline"] > .station-header-decoration-waterline,
[data-header-style="LaneRope"] > .station-header-decoration-lane-rope,
[data-header-style="PoolLight"] > .station-header-decoration-pool-light,
[data-header-style="SurfaceDepth"] > .station-header-decoration-surface-depth { display: block; }
.station-header-decoration-lane-rope { top: auto; bottom: 3px; height: 6px; background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.15) 0 14px, transparent 14px 20px); background-position: 3px 0; border-radius: 3px; }
.station-header-decoration-lane-rope::after { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 34px, transparent 34px 200px); }
.station-header-decoration-pool-light { left: 60%; mask-image: linear-gradient(90deg, transparent, #000); }
.station-header-decoration-surface-depth { overflow: visible; background: linear-gradient(to bottom, rgba(255,255,255,.1), transparent 45%, rgba(0,0,0,.14)); border-top: 1px solid rgba(255,255,255,.18); }
[data-header-style="SurfaceDepth"].station-header-swatch,
[data-header-style="SurfaceDepth"].station-heading-preview { box-shadow: 0 6px 6px -6px rgba(0,0,0,.36); }
.station-header-sheen { position: absolute; inset: 0; }
@media (max-width: 991px) { .station-header-style-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .station-header-style-options { grid-template-columns: 1fr; } .station-header-style-option { min-height: 68px; } }
.membership-qr-preview { display: flex; min-height: 176px; align-items: center; justify-content: center; margin-top: 6px; padding: 14px; border: 1px dashed var(--border); border-radius: 8px; color: var(--text-muted); background: var(--surface-alt); font-size: 11px; text-align: center; }
.membership-qr-preview img { width: 148px; height: 148px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: white; image-rendering: pixelated; }

/* Shared scheduling calendar */
.schedule-calendar-page, .practice-add-page { display: grid; gap: 14px; }
.schedule-page-heading { margin-bottom: 0; }
.schedule-toolbar { display: flex; min-height: 60px; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-card); }
.schedule-week-navigation { display: inline-flex; flex: none; }
.schedule-icon-button, .schedule-today-button, .schedule-compact-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; border: 1px solid var(--control-border); border-radius: var(--radius-sm); color: var(--text-secondary); background: var(--surface); font-size: 12px; font-weight: 700; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer; }
.schedule-icon-button { width: 44px; padding: 0; }
.schedule-week-navigation .schedule-icon-button:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.schedule-week-navigation .schedule-today-button { border-right: 0; border-left: 0; border-radius: 0; }
.schedule-week-navigation .schedule-icon-button:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.schedule-icon-button:hover, .schedule-today-button:hover, .schedule-compact-button:hover { border-color: var(--primary); color: var(--primary-hover); text-decoration: none; }
.schedule-compact-button.primary { border-color: var(--primary); color: var(--on-primary); background: var(--primary); }
.schedule-compact-button.primary:hover { border-color: var(--primary-hover); color: var(--on-primary); background: var(--primary-hover); }
.schedule-compact-button.danger { color: var(--danger); }
.schedule-compact-button:disabled { cursor: not-allowed; opacity: .47; }
.schedule-range-label { flex: none; color: var(--text); font-family: Manrope, "Segoe UI", system-ui, sans-serif; font-size: 17px; }
.schedule-facility-filter { display: inline-flex; min-width: 170px; flex-direction: column; gap: 2px; }
.schedule-facility-filter label { color: var(--text-muted); font-size: 9px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.schedule-facility-filter select { width: 100%; min-height: 44px; padding: 3px 28px 3px 8px; border-color: var(--control-border); border-radius: var(--radius-sm); color: var(--text-secondary); background-color: var(--surface); font-size: 11px; font-weight: 700; }
.schedule-legend { display: flex; flex-wrap: wrap; gap: 10px; color: var(--text-muted); font-size: 10px; }
.schedule-legend span { display: inline-flex; align-items: center; gap: 5px; }
.schedule-legend i { width: 7px; height: 7px; border-radius: 2px; background: var(--primary); }
.schedule-legend i.eventlink { background: #0f617e; }
.schedule-legend i.manual { background: var(--primary); }
.schedule-legend i.practice { background: #667281; }
.schedule-legend i.cancelled { background: #94a3b8; }
.schedule-toolbar-spacer { flex: 1; }
.schedule-toolbar .segmented > * { min-height: 44px; }
.schedule-view-switch a { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
.schedule-week-strip { display: grid; grid-template-columns: repeat(7, minmax(105px, 1fr)); gap: 8px; }
.schedule-day-card { display: grid; min-width: 0; min-height: 83px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 9px; color: var(--text); background: var(--surface); text-decoration: none; }
a.schedule-day-card:hover { border-color: var(--primary); color: var(--text); text-decoration: none; }
.schedule-day-card.selected { border-color: var(--primary); background: var(--primary-light); box-shadow: inset 0 -3px var(--primary); }
.schedule-day-card > span { display: flex; align-items: baseline; gap: 8px; }
.schedule-day-card small { color: var(--text-muted); font-size: 10px; font-weight: 750; }
.schedule-day-card strong { font-family: Manrope, "Segoe UI", system-ui, sans-serif; font-size: 16px; }
.schedule-day-state { width: 13px; height: 4px; margin: 7px 0 4px; border-radius: 3px; background: var(--primary); }
.schedule-day-state.cancelled { background: #94a3b8; }
.schedule-day-state.empty { background: var(--border); }
.schedule-day-card em { overflow: hidden; color: var(--text-muted); font-size: 10px; font-style: normal; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.schedule-agenda-card, .schedule-detail-card, .practice-form-card, .practice-summary-card, .schedule-empty-panel { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-card); }
.schedule-agenda-heading, .schedule-agenda-row { display: grid; align-items: center; }
.schedule-agenda-grid-standard { grid-template-columns: 130px minmax(190px, 1.15fr) minmax(180px, 1fr) minmax(240px, 1.05fr) 30px; }
.schedule-agenda-heading { min-height: 38px; padding: 0 16px; color: var(--text-muted); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.schedule-agenda-day > h2 { margin: 0; padding: 9px 16px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--text); background: var(--surface-alt); font-family: Inter, "Segoe UI", system-ui, sans-serif; font-size: 12px; }
.schedule-agenda-day > h2 small { margin-left: 7px; color: var(--text-muted); font-size: 10px; font-weight: 500; }
.schedule-agenda-row { position: relative; min-height: 59px; padding: 0 16px; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none; }
.schedule-agenda-row:hover { color: inherit; background: var(--surface-alt); text-decoration: none; }
.schedule-agenda-row.selected { background: var(--primary-light); box-shadow: inset 3px 0 var(--primary); }
.schedule-agenda-row.cancelled { color: var(--text-muted); }
.schedule-agenda-row > time { color: var(--text-secondary); font-size: 11px; font-weight: 700; }
.schedule-agenda-name-cell { display: flex; min-width: 0; align-items: center; gap: 9px; color: var(--text); text-decoration: none; }
.schedule-agenda-name-cell:hover { color: var(--primary-hover); text-decoration: none; }
.schedule-agenda-name-cell i { width: 3px; height: 24px; flex: none; border-radius: 3px; background: var(--primary); }
.schedule-agenda-row.cancelled .schedule-agenda-name-cell { color: var(--text-muted); text-decoration: line-through; }
.schedule-agenda-row.cancelled .schedule-agenda-name-cell i { background: #94a3b8; }
.schedule-agenda-name-cell > span { min-width: 0; }
.schedule-agenda-name-cell strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.schedule-agenda-context-mobile { display: none; overflow: hidden; color: var(--text-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.schedule-agenda-context-cell strong, .schedule-agenda-context-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-agenda-context-cell strong { color: var(--text-secondary); font-size: 11px; font-weight: 500; }
.schedule-agenda-context-cell small { color: var(--text-muted); font-size: 9px; }
.schedule-agenda-status-cell { display: flex; min-width: 0; align-items: center; gap: 11px; }
.practice-attendance-cell { color: var(--text-secondary); font-size: 10px; }
.practice-attendance-cell > a { color: var(--primary-hover); font-weight: 750; text-decoration: none; white-space: nowrap; }
.practice-attendance-cell > a:hover { text-decoration: underline; }
.schedule-state { display: inline-flex; width: fit-content; align-items: center; padding: 4px 8px; border-radius: 999px; color: #526970; background: #edf1f2; font-size: 9px; font-weight: 750; line-height: 1.2; white-space: nowrap; }
.schedule-state.success { color: var(--success); background: var(--success-light); }
.schedule-state.danger { color: var(--danger); background: var(--danger-light); }
.schedule-row-chevron { display: grid; width: 44px; height: 44px; place-items: center; color: var(--text-muted); text-decoration: none; }
.schedule-row-chevron:hover { color: var(--primary); }
.schedule-agenda-note, .schedule-detail-note { margin: 0; padding: 9px 16px; color: var(--text-muted); background: var(--surface); font-size: 9px; }
.schedule-detail-card > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 20px; border-bottom: 1px solid var(--border); }
.schedule-detail-title { display: flex; min-width: 0; align-items: stretch; gap: 11px; }
.schedule-detail-title > i { width: 3px; flex: none; border-radius: 3px; background: var(--primary); }
.schedule-detail-title h2 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text); font-size: 16px; }
.schedule-detail-title p { margin: 2px 0 0; color: var(--text-muted); font-size: 10px; }
.schedule-detail-top-actions { display: flex; flex: none; align-items: center; gap: 8px; }
.schedule-detail-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 15px 20px; }
.schedule-detail-facts > div { min-width: 0; padding-right: 20px; }
.schedule-detail-facts dt { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; color: var(--text-muted); font-size: 9px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.schedule-detail-facts dt i { color: var(--primary); font-size: 13px; }
.schedule-detail-facts dd { margin: 0; color: var(--text); font-size: 12px; font-weight: 700; }
.schedule-detail-facts dd small { display: block; margin-top: 2px; overflow: hidden; color: var(--text-muted); font-size: 9px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.schedule-detail-actions { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--border); }
.schedule-detail-actions > div { display: flex; min-height: 55px; align-items: center; gap: 9px; padding: 10px 20px; }
.schedule-detail-actions > div + div { border-left: 1px solid var(--border); }
.schedule-detail-actions strong { margin-right: auto; color: var(--text-muted); font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }
.schedule-detail-note { border-top: 1px solid var(--border); background: var(--surface-alt); }
.schedule-empty-panel { display: grid; min-height: 220px; place-items: center; align-content: center; gap: 8px; padding: 28px; text-align: center; }
.schedule-empty-panel > i { color: var(--primary); font-size: 26px; }
.schedule-empty-panel h1, .schedule-empty-panel h2 { margin: 0; color: var(--sidebar); font-size: 20px; }
.schedule-empty-panel p { max-width: 520px; margin: 0 0 5px; color: var(--text-muted); }

/* Staff week board and day agenda */
.schedule-legend i.position-tone-0 { background: #0f6d8a; }
.schedule-legend i.position-tone-1 { background: #7950b5; }
.schedule-legend i.position-tone-2 { background: #1193a5; }
.schedule-legend i.position-tone-3 { background: #b45f2a; }
.schedule-legend i.open-shift { border: 1px dashed #8a6500; background: #fff1b8; }
.schedule-day-state.open { background: #8a6500; }
.schedule-day-state.filled { background: var(--primary); }
.staff-position-filter { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: -4px; }
.staff-position-filter label { color: var(--text-muted); font-size: 9px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.staff-position-filter select { min-width: 170px; min-height: 40px; padding: 3px 28px 3px 9px; border: 1px solid var(--control-border); border-radius: var(--radius-sm); color: var(--text-secondary); background: var(--surface); font-size: 11px; font-weight: 700; }
.staff-week-board { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-card); }
.staff-week-board-heading, .staff-week-position-row { display: grid; min-width: 1080px; grid-template-columns: 116px repeat(7, minmax(132px, 1fr)); }
.staff-week-board-heading { min-height: 46px; border-bottom: 1px solid var(--border); }
.staff-week-board-heading > strong { display: flex; align-items: center; padding: 0 13px; color: var(--text-muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.staff-week-board-heading > a { display: grid; min-width: 0; place-items: center; align-content: center; border-left: 1px solid var(--border); color: var(--text-secondary); font-size: 9px; line-height: 1.2; text-decoration: none; }
.staff-week-board-heading > a:hover { color: var(--primary-hover); background: var(--surface-alt); }
.staff-week-board-heading > a.selected { color: var(--primary-hover); background: var(--primary-light); }
.staff-week-board-heading > a strong { color: var(--text); font-size: 10px; }
.staff-week-position-row { --staff-tone: #0f6d8a; --staff-chip-bg: color-mix(in srgb, var(--staff-tone) 14%, white); border-bottom: 1px solid var(--border); }
.staff-week-position-row.position-tone-1 { --staff-tone: #7950b5; --staff-chip-bg: #eee8f8; }
.staff-week-position-row.position-tone-2 { --staff-tone: #1193a5; --staff-chip-bg: #e0f3f5; }
.staff-week-position-row.position-tone-3 { --staff-tone: #b45f2a; --staff-chip-bg: #f6e9df; }
.staff-week-position-row > header { min-width: 0; padding: 13px 12px; }
.staff-week-position-row > header h2 { margin: 0 0 7px; padding-left: 8px; border-left: 3px solid var(--staff-tone); color: var(--text); font-size: 12px; line-height: 1.25; }
.staff-week-position-row > header span { display: block; color: var(--text-muted); font-size: 9px; line-height: 1.3; }
.staff-week-position-row > header em { display: inline-flex; margin-top: 7px; padding: 3px 7px; border-radius: 999px; color: #765800; background: #fff1b8; font-size: 8px; font-style: normal; font-weight: 750; }
.staff-week-position-row > header em.filled { color: var(--success); background: var(--success-light); }
.staff-week-cell { display: grid; min-width: 0; min-height: 162px; align-content: start; gap: 6px; padding: 8px; border-left: 1px solid var(--border); }
.staff-shift-chip { display: grid; min-width: 0; gap: 1px; padding: 6px 7px; border-left: 3px solid var(--staff-tone); border-radius: var(--radius-sm); color: var(--text); background: var(--staff-chip-bg); line-height: 1.2; text-decoration: none; }
.staff-shift-chip:hover { color: var(--text); text-decoration: none; filter: brightness(.98); }
.staff-shift-chip time { overflow: hidden; color: var(--text-secondary); font-size: 8px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.staff-shift-chip strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.staff-shift-chip small { overflow: hidden; color: var(--text-muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.staff-shift-chip.open { border: 1px dashed #8a6500; border-left-width: 3px; color: #5f4700; background: #fff1b8; }
.staff-week-more { color: var(--text-secondary); font-size: 9px; font-weight: 750; text-decoration: none; }
.staff-week-more:hover { color: var(--primary-hover); text-decoration: underline; }
.staff-week-empty { color: var(--subtle-border); font-size: 12px; }
.staff-week-board > .schedule-agenda-note { min-width: 1080px; border-top: 0; background: var(--surface-alt); }
.staff-position-group { --staff-tone: #0f6d8a; }
.staff-position-group.position-tone-1 { --staff-tone: #7950b5; }
.staff-position-group.position-tone-2 { --staff-tone: #1193a5; }
.staff-position-group.position-tone-3 { --staff-tone: #b45f2a; }
.staff-position-group > h2 { display: flex; align-items: center; gap: 7px; }
.staff-position-group > h2::before { width: 3px; height: 14px; border-radius: 2px; background: var(--staff-tone); content: ""; }
.staff-position-group > h2 small { margin-left: auto; }
.staff-position-group .schedule-agenda-name-cell i { background: var(--staff-tone); }
.schedule-agenda-row { --staff-tone: var(--primary); }
.schedule-agenda-row .schedule-agenda-name-cell i { background: var(--staff-tone); }
.staff-day-agenda .schedule-state.open { color: #765800; background: #fff1b8; }
.staff-day-agenda .schedule-agenda-row:has(.schedule-state.open) .schedule-agenda-name-cell i { width: 4px; border-left: 2px dashed #8a6500; background: transparent; }

/* Facility Day and Week schedule */
.schedule-source-health { display: flex; max-width: 560px; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.schedule-health-chip { display: inline-flex; min-height: 34px; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted); background: var(--surface); font-size: 9px; }
.schedule-health-chip > i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--success); }
.schedule-health-chip.degraded > i { background: #d97706; }
.schedule-health-chip.paused > i { background: #94a3b8; }
.schedule-health-chip strong { color: var(--text-secondary); font-size: 10px; }
.schedule-health-chip time { padding-left: 6px; border-left: 1px solid var(--border); }
.facility-day-summary { display: flex; min-height: 54px; align-items: center; gap: 24px; padding: 9px 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-card); }
.facility-day-summary > div { display: grid; margin-right: auto; }
.facility-day-summary strong { color: var(--text); font: 700 15px Manrope, "Segoe UI", system-ui, sans-serif; }
.facility-day-summary span { color: var(--text-muted); font-size: 10px; }
.facility-time-grid-card { position: relative; overflow-x: auto; overflow-y: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-card); }
.facility-all-day-row { display: grid; grid-template-columns: 58px minmax(0, 1fr); border-bottom: 1px solid var(--border); }
.facility-all-day-row > strong { display: grid; min-height: 42px; place-items: center; color: var(--text-muted); background: var(--surface-alt); font-size: 9px; text-transform: uppercase; }
.facility-all-day-row > div { display: flex; min-width: 0; flex-wrap: wrap; gap: 5px; padding: 6px; }
.schedule-all-day-window { display: inline-flex; min-height: 30px; align-items: center; padding: 3px 9px; border-left: 3px solid #0f617e; border-radius: var(--radius-sm); color: #0c4c63; background: #e4eef3; font-size: 10px; font-weight: 700; text-decoration: none; }
.schedule-all-day-window.manual { border-left-color: var(--primary); color: #0b5c53; background: #e0f2f1; }
.schedule-all-day-window.cancelled { border-left-style: dashed; border-left-color: #94a3b8; color: var(--text-muted); background: #f1f5f9; text-decoration: line-through; }
.schedule-time-grid { display: grid; grid-template-columns: 58px minmax(680px, 1fr); min-width: 738px; overflow-x: auto; }
.schedule-grid-corner { min-height: 58px; grid-column: 1; grid-row: 1; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-alt); }
.schedule-grid-day-heading { display: none; }
.schedule-time-grid::before { content: ""; grid-column: 2; grid-row: 1; min-height: 58px; border-bottom: 1px solid var(--border); background: var(--surface-alt); }
.schedule-time-grid.week::before { display: none; }
.schedule-time-grid.week { grid-template-columns: 58px repeat(7, minmax(115px, 1fr)); }
.schedule-time-grid.week .schedule-grid-day-heading { display: grid; grid-row: 1; min-width: 0; min-height: 58px; place-items: center; align-content: center; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); color: var(--text); background: var(--surface-alt); text-decoration: none; }
.schedule-grid-day-heading span { color: var(--text-muted); font-size: 8px; font-weight: 750; letter-spacing: .08em; }
.schedule-grid-day-heading strong { font-family: Manrope, "Segoe UI", system-ui, sans-serif; font-size: 16px; line-height: 1.15; }
.schedule-grid-day-heading small { color: var(--text-muted); font-size: 8px; }
.schedule-grid-day-heading.today { color: var(--primary-hover); background: var(--primary-light); }
.schedule-grid-hours { display: grid; grid-column: 1; grid-row: 2; grid-template-rows: repeat(var(--schedule-hours), 48px) 1px; }
.schedule-grid-hours time { display: block; padding: 0 8px; color: var(--text-muted); font-size: 9px; text-align: right; transform: translateY(-7px); }
.schedule-grid-canvas { position: relative; display: grid; grid-column: 2 / -1; grid-row: 2; grid-template-columns: repeat(var(--schedule-columns), minmax(115px, 1fr)); grid-template-rows: repeat(var(--schedule-hours), 48px); min-height: calc(var(--schedule-hours) * 48px); }
.schedule-grid-cell { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.schedule-window { position: absolute; z-index: 2; left: calc((100% / var(--schedule-columns)) * (var(--schedule-day) + (var(--schedule-overlap-column) / var(--schedule-overlap-columns))) + 3px); top: calc(var(--schedule-start) * .8px + 2px); width: calc((100% / var(--schedule-columns) / var(--schedule-overlap-columns)) - 6px); height: max(24px, calc(var(--schedule-duration) * .8px - 4px)); overflow: hidden; padding: 4px 7px; border-left: 3px solid #0f617e; border-radius: var(--radius-sm); color: #0c4c63; background: #e4eef3; text-decoration: none; }
.schedule-window.manual { border-left-color: var(--primary); color: #0b5c53; background: #e0f2f1; }
.schedule-window.cancelled { border-left: 3px dashed #94a3b8; color: var(--text-muted); background: #f1f5f9; }
.schedule-window.selected { box-shadow: 0 0 0 2px var(--primary); }
.schedule-window:hover { color: inherit; text-decoration: none; filter: brightness(.98); }
.schedule-window time, .schedule-window strong, .schedule-window small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-window time { font-size: 9px; opacity: .82; }
.schedule-window strong { font-size: 11px; line-height: 1.25; }
.schedule-window small { margin-top: 2px; font-size: 9px; opacity: .8; }
.schedule-window.cancelled strong { text-decoration: line-through; }
.schedule-window.overlap-2 time, .schedule-window.overlap-3 time, .schedule-window.overlap-4 time { display: none; }
.schedule-window.external, .schedule-all-day-window.external { border-left-color: #667281; color: #4d5765; background: #eef0f3; }
.facility-grid-empty { position: absolute; z-index: 3; top: 132px; left: calc(50% - 170px); display: grid; width: 340px; min-height: 130px; place-items: center; align-content: center; gap: 5px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-muted); background: rgb(255 255 255 / 94%); box-shadow: var(--shadow-card); text-align: center; }
.facility-grid-empty i { color: var(--primary); font-size: 23px; }
.facility-grid-empty strong { color: var(--text); font-family: Manrope, "Segoe UI", system-ui, sans-serif; }
.facility-grid-empty span { font-size: 11px; }
.schedule-state.eventlink { color: #0c4c63; background: #e4eef3; }
.schedule-state.manual { color: #0b5c53; background: #e0f2f1; }

/* Compact Add Practice screen */
.practice-add-page { position: relative; }
.practice-back-link { display: inline-flex; width: fit-content; min-height: 44px; align-items: center; gap: 7px; color: var(--primary-hover); font-size: 12px; font-weight: 700; text-decoration: none; }
.practice-back-link:hover { text-decoration: underline; }
.schedule-add-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.practice-form-card .validation-summary:not(:empty) { margin: 18px 24px 0; }
.practice-form-section { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; padding: 20px 24px; }
.practice-form-section + .practice-form-section { border-top: 1px solid var(--border); }
.practice-form-intro h2, .practice-summary-card h2 { margin: 0; color: var(--text); font-size: 14px; }
.practice-form-intro p, .practice-summary-card header p { margin: 4px 0 0; color: var(--text-muted); font-size: 11px; line-height: 1.45; }
.practice-form-fields { min-width: 0; }
.practice-form-fields.two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.practice-form-fields .field input, .practice-form-fields .field select { min-height: 40px; border-color: var(--control-border); border-radius: var(--radius-sm); }
.practice-local-time-note { display: flex; grid-column: 1 / -1; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--info); background: var(--info-light); font-size: 11px; line-height: 1.45; }
.practice-local-time-note i { flex: none; margin-top: 1px; }
.practice-summary-card > header { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.practice-summary-body { display: grid; gap: 14px; padding: 16px 18px; }
.practice-summary-name { display: flex; align-items: center; gap: 10px; }
.practice-summary-name > span { width: 3px; height: 31px; flex: none; border-radius: 3px; background: var(--primary); }
.practice-summary-name strong, .practice-summary-name small { display: block; }
.practice-summary-name strong { font-size: 13px; }
.practice-summary-name small { color: var(--text-muted); font-size: 10px; }
.practice-summary-body dl { display: grid; gap: 12px; margin: 0; }
.practice-summary-body dt { color: var(--text-muted); font-size: 9px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.practice-summary-body dd { margin: 2px 0 0; color: var(--text); font-size: 11px; font-weight: 700; }
.practice-admission-note { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text-muted); background: var(--surface-alt); font-size: 10px; line-height: 1.45; }

@media (max-width: 991px) {
  .chemical-band-row { grid-template-columns: 1fr; }
  .chemical-band-heading { grid-row: auto; }
  .schedule-toolbar { flex-wrap: wrap; }
  .schedule-toolbar-spacer { display: none; }
  .schedule-view-switch { margin-left: auto; }
  .schedule-agenda-grid-standard { grid-template-columns: 110px minmax(180px, 1.2fr) minmax(220px, 1fr) 30px; }
  .schedule-agenda-heading > span:nth-child(3), .schedule-agenda-context-cell { display: none; }
  .schedule-agenda-context-mobile { display: block; }
  .schedule-add-layout { grid-template-columns: minmax(0, 1fr) 290px; }
  .practice-form-section { grid-template-columns: 160px minmax(0, 1fr); gap: 20px; }
  .schedule-source-health { max-width: none; justify-content: flex-start; }
}
@media (max-width: 767px) {
  .limit-value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-toolbar { gap: 10px; }
  .schedule-range-label { order: -1; width: 100%; }
  .schedule-facility-filter { min-width: min(210px, 100%); }
  .schedule-legend { display: none; }
  .schedule-week-strip { padding-bottom: 4px; overflow-x: auto; }
  .schedule-day-card { min-width: 105px; }
  .schedule-agenda-heading { display: none; }
  .schedule-agenda-grid-standard { grid-template-columns: 92px minmax(150px, 1fr) minmax(185px, auto) 28px; }
  .schedule-agenda-row { padding: 0 12px; }
  .staff-day-agenda .schedule-agenda-row > time { font-size: 9px; white-space: nowrap; }
  .schedule-detail-facts { grid-template-columns: 1fr; gap: 14px; }
  .schedule-detail-actions { grid-template-columns: 1fr; }
  .schedule-detail-actions > div + div { border-top: 1px solid var(--border); border-left: 0; }
  .schedule-add-layout { grid-template-columns: 1fr; }
  .practice-summary-card { order: -1; }
  .practice-form-section { grid-template-columns: 1fr; gap: 14px; }
  .schedule-health-chip time { display: none; }
  .facility-day-summary { align-items: flex-start; flex-wrap: wrap; gap: 8px 18px; }
  .facility-day-summary > div { width: 100%; }
  .schedule-time-grid { min-width: 680px; }
}
@media (max-width: 560px) {
  .schedule-view-switch { margin-left: 0; }
  .schedule-toolbar .schedule-compact-button { margin-left: auto; }
  .schedule-agenda-grid-standard { grid-template-columns: minmax(0, 1fr) 44px; }
  .schedule-agenda-row { gap: 7px 8px; padding: 12px; }
  .schedule-agenda-row > time { grid-column: 1; grid-row: 1; }
  .schedule-agenda-name-cell { grid-column: 1; grid-row: 2; }
  .schedule-agenda-status-cell { grid-column: 1 / -1; grid-row: 3; flex-wrap: wrap; }
  .schedule-row-chevron { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .schedule-detail-card > header { align-items: flex-start; }
  .schedule-detail-title h2 { align-items: flex-start; flex-direction: column; }
  .schedule-detail-top-actions .schedule-compact-button { display: none; }
  .schedule-detail-actions > div { align-items: flex-start; flex-wrap: wrap; }
  .schedule-detail-actions strong { width: 100%; }
  .practice-form-fields.two-column { grid-template-columns: 1fr; }
  .practice-form-fields.two-column > [aria-hidden="true"] { display: none; }
}

/* Connector catalog preview */
.connector-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; margin-bottom: 20px; }
.connector-intro h1 { margin-bottom: 6px; color: var(--sidebar); font-size: clamp(26px, 3vw, 36px); line-height: 1.1; }
.connector-intro p:last-child { max-width: 760px; margin-bottom: 0; color: var(--text-muted); font-size: 15px; }
.preview-label { flex: none; padding: 6px 10px; border-radius: 999px; color: var(--warning); background: var(--warning-light); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.connector-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.connector-search { width: min(280px, 100%); }
.connector-search input { width: 100%; padding: 10px 12px; border: 1px solid var(--control-border); border-radius: 8px; color: var(--text-secondary); background: var(--surface); }
.connector-search input:disabled { opacity: 1; cursor: default; }
.connector-filters { display: flex; gap: 2px; max-width: 100%; padding: 3px; overflow-x: auto; border-radius: 9px; background: var(--control-rail); scrollbar-width: none; }
.connector-filters::-webkit-scrollbar { display: none; }
.connector-filters button { flex: none; padding: 7px 12px; border: 0; border-radius: 7px; color: var(--text-muted); background: transparent; }
.connector-filters button:disabled { opacity: 1; }
.connector-filters .selected { color: var(--text); background: var(--surface); box-shadow: var(--shadow-card); font-weight: 750; }
.connector-section > h2 { margin-bottom: 10px; color: var(--text-muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.connector-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.connector-card { position: relative; display: flex; min-width: 0; min-height: 228px; flex-direction: column; padding: 18px; border: 1px solid var(--card-border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-card); }
.connector-card-in-use .connector-card-heading { padding-right: 34px; }
.connector-in-use { position: absolute; top: 16px; right: 16px; display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgb(22 101 52 / 18%); border-radius: 50%; color: var(--success); background: var(--success-light); }
.connector-in-use i { font-size: 15px; line-height: 1; }
.connector-card-heading { display: flex; align-items: center; gap: 12px; }
.connector-card-heading h3 { margin: 0; color: var(--text); font-size: 15px; line-height: 1.25; }
.connector-card-heading p { margin: 2px 0 0; color: var(--text-muted); font-size: 11px; }
.connector-monogram { display: grid; width: 42px; height: 42px; flex: none; place-items: center; border-radius: 10px; color: var(--on-primary); background: var(--connector-blue); font-size: 13px; font-weight: 800; }
.connector-monogram.cyan { background: var(--connector-cyan); }
.connector-monogram.slate { background: var(--connector-slate); }
.connector-monogram.custom { color: var(--primary-hover); background: var(--primary-light); font-size: 22px; }
.connector-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 12px; }
.connector-badges span { padding: 4px 8px; border-radius: 999px; color: var(--info); background: var(--info-light); font-size: 10px; font-weight: 750; }
.connector-badges span:last-child { color: var(--warning); background: var(--warning-light); }
.connector-destination { margin: auto 0 14px; padding-top: 12px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 11px; }
.connector-action { width: 100%; padding: 8px 10px; border: 1px solid var(--control-border); border-radius: 7px; color: var(--text-muted); background: var(--surface); font-weight: 700; }
.connector-action:disabled { opacity: 1; cursor: default; }
.connector-review-link { display: block; text-align: center; text-decoration: none; }
.connector-review-link:hover { border-color: var(--primary); color: var(--primary-hover); }
.connector-review-summary { margin-bottom: 16px; }
.connector-review-summary .detail-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.connector-review-summary .detail-list > div { min-width: 0; padding: 12px; border-radius: 8px; background: var(--surface-alt); }
.connector-review-summary dt { color: var(--text-muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.connector-review-summary dd { margin: 4px 0 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 650; }
.connector-review-disclaimer { color: var(--text-muted); font-size: 12px; }
.connector-capture-inspector { margin: 16px 0; border: 1px solid var(--border); border-radius: 8px; }
.connector-capture-inspector summary { padding: 10px 12px; color: var(--text-secondary); background: var(--surface-alt); font-weight: 700; cursor: pointer; }
.connector-capture-inspector pre { max-height: 360px; margin: 0; padding: 12px; overflow: auto; font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }
.connector-review-consent { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 14px; color: var(--text-secondary); font-size: 12px; }
.connector-review-summary .primary-action:disabled { cursor: wait; opacity: .65; }
.connector-review-summary .notice { color: var(--warning); }
#analysis-status:not(:empty) { margin: 12px 0 0; color: var(--info); font-weight: 650; }
.eventlink-setup-intro { max-width: 900px; margin-bottom: 20px; }
.eventlink-setup-form { display: grid; gap: 18px; }
.eventlink-setup-fields { display: grid; width: min(900px, 100%); gap: 16px; }
.eventlink-setup-fields .field input, .eventlink-setup-fields .field select,
.eventlink-setup-fields .field textarea { width: 100%; min-height: 42px; }
.eventlink-url-input { min-height: 96px; max-height: 240px; field-sizing: content; overflow-wrap: anywhere; resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 14px; line-height: 1.45; }
.eventlink-setup-actions { justify-content: flex-start; }
.chemical-connector-panel { max-width: 1120px; }
.chemical-connector-panel .panel-heading { align-items: flex-start; }
.chemical-connector-panel .panel-heading p { margin: 4px 0 0; color: var(--text-muted); font-size: 11px; }
.chemical-connector-form { margin-top: 18px; }
.connector-code-input { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.connector-mapping-input { min-height: 154px; line-height: 1.5; resize: vertical; }
.chemical-connector-form code { overflow-wrap: anywhere; white-space: normal; }
.connector-form-subsection { margin-top: 4px; padding-top: 18px; border-top: 1px solid var(--border); }
.connector-form-subsection h3 { margin: 0; color: var(--text-secondary); font-size: 14px; }
.connector-form-subsection p { margin: 4px 0 0; color: var(--text-muted); font-size: 11px; }
.connector-location-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.connector-location-option { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-alt); }
.connector-location-option strong { grid-row: 1 / span 2; align-self: center; color: var(--primary-hover); }
.connector-location-option span { min-width: 0; overflow-wrap: anywhere; color: var(--text-secondary); font-size: 12px; font-weight: 700; }
.connector-location-option small { color: var(--text-muted); font-size: 11px; }
.connector-connected-section { margin-bottom: 24px; }
.eventlink-preview-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; }
.eventlink-preview-summary > div { min-width: 0; padding: 12px 14px; border-radius: 8px; background: var(--surface-alt); }
.eventlink-preview-summary dt { color: var(--text-muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.eventlink-preview-summary dd { margin: 4px 0 0; overflow-wrap: anywhere; font-weight: 700; }
.eventlink-preview-table { min-width: 680px; }
.connector-review-candidates { margin-bottom: 16px; }
.connector-review-list { display: grid; gap: 8px; padding: 0; list-style: none; }
.connector-review-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; min-width: 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-alt); }
.connector-review-list strong { min-width: 0; overflow-wrap: anywhere; }
.connector-review-list .capture-value { color: var(--primary-hover); font-weight: 750; overflow-wrap: anywhere; }
.connector-review-list small, .connector-review-list p { grid-column: 1 / -1; margin: 0; color: var(--text-muted); overflow-wrap: anywhere; }
.connector-proposal h3 { margin-bottom: 5px; color: var(--text-secondary); font-size: 13px; }
.connector-proposal > ul:not(.connector-review-list) { margin-top: 0; color: var(--text-muted); }
.connector-proposal-handoff { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.connector-proposal-handoff h3 { margin: 0 0 5px; }
.connector-proposal-handoff p { color: var(--text-muted); }
.custom-connector-card { border-style: dashed; border-color: var(--connector-custom-border); background: var(--connector-custom-surface); }
.custom-connector-flow { display: grid; grid-template-columns: 1fr; gap: 7px; margin: 12px 0; }
.custom-connector-flow > div { display: flex; gap: 8px; padding: 10px; border-radius: 8px; background: var(--surface); }
.custom-connector-flow span { display: grid; width: 20px; height: 20px; flex: none; place-items: center; border-radius: 50%; color: var(--on-primary); background: var(--primary); font-size: 10px; font-weight: 800; }
.custom-connector-flow p { margin: 0; color: var(--text-muted); font-size: 10px; }
.custom-connector-flow strong { display: block; color: var(--text-secondary); font-size: 11px; }
.custom-connector-card .connector-action { margin-top: auto; border-color: var(--primary); color: var(--on-primary); background: var(--primary); }
.future-flow { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); }
.future-flow-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.future-flow-heading h2 { margin: 0; color: var(--sidebar); font-size: 20px; }
.future-flow-heading > p { margin: 0; color: var(--text-muted); font-size: 11px; }
.mockup-preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mockup-preview-grid figure { margin: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-card); }
.mockup-preview-grid img { display: block; width: 100%; aspect-ratio: 1.6; object-fit: cover; object-position: top; border-bottom: 1px solid var(--border); }
.mockup-preview-grid figcaption { padding: 10px 12px; color: var(--text-secondary); font-size: 11px; font-weight: 700; }
.connector-principle { margin-top: 16px; padding: 13px 16px; border: 1px solid var(--subtle-border); border-radius: 10px; color: var(--text-muted); background: var(--surface-alt); font-size: 11px; }
.auth-shell { min-height: calc(100vh - 220px); display: grid; place-items: center; }
.auth-card { width: min(100%, 480px); padding: 40px; border: 1px solid var(--border); border-radius: 18px; background: white; box-shadow: 0 18px 54px rgb(13 43 58 / 11%); }
.auth-card h1 { margin-bottom: 7px; color: #102e3d; font-size: 34px; line-height: 1.1; }
.auth-card form { display: grid; gap: 7px; margin-top: 26px; }
.auth-card label:not(.remember-me) { margin-top: 8px; color: var(--text-secondary); font-size: 12px; font-weight: 700; }
.auth-card input[type="email"], .auth-card input[type="password"] { padding: 12px; border: 1px solid #bac6d1; border-radius: 8px; color: var(--text); }
.auth-card input:focus { border-color: var(--primary); outline: 3px solid rgb(0 121 107 / 14%); }
.remember-me { display: flex; align-items: center; gap: 8px; margin: 10px 0; color: var(--text-secondary); font-size: 12px; }
.auth-links { margin: 18px 0 0; font-size: 13px; }
.auth-links a { color: var(--primary-hover); font-weight: 650; }
.auth-card > form + form, .auth-card .primary-action { margin-top: 6px; }
.import-file-list { display: grid; min-width: 0; gap: 0; margin-top: 18px; border-top: 1px solid var(--border); }
.import-file-row { min-width: 0; padding: 20px 0; border-bottom: 1px solid var(--border); }
.import-file-heading, .import-file-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.import-file-heading > div { min-width: 0; }
.import-file-heading h3, .import-file-heading p { margin: 0; }
.import-file-heading p { margin-top: 3px; }
.import-file-controls { margin-top: 12px; }
.import-file-controls input[type="file"] { min-width: 0; flex: 1; }
.compact-action { min-height: 36px; padding: 8px 12px; }
.import-preview { width: 100%; max-width: 100%; min-width: 0; margin-top: 14px; padding: 14px; overflow: hidden; border: 1px solid var(--subtle-border); border-radius: 9px; background: var(--surface-alt); }
.import-preview p { margin: 0 0 10px; }
.import-preview .table-wrapper { width: 100%; max-width: 100%; min-width: 0; max-height: 260px; overflow: auto; overscroll-behavior-x: contain; }
.import-preview table { min-width: 720px; background: var(--surface); }
.import-column-note { color: var(--text-muted); font-size: 12px; }
.import-column-warning { padding: 9px 11px; border-radius: 7px; color: #6b4e00; background: #fff5cc; font-size: 12px; }

@media (max-width: 991px) {
  .team-management-grid { grid-template-columns: 1fr; }
  .sidebar { width: 56px; }
  .sidebar-logo-text-group, .sidebar-context-host, .sidebar-nav-item > span:not(.nav-icon), .sidebar-nav-item small, .sidebar-footer { display: none; }
  .sidebar-logo { justify-content: center; padding: 12px 8px; }
  .sidebar-logo-mark { width: 34px; height: 34px; }
  .sidebar-nav-group { height: 1px; margin: 8px 10px; padding: 0; overflow: hidden; border-top: 1px solid var(--sidebar-border); font-size: 0; }
  .sidebar-nav-item { justify-content: center; padding: 10px; }
  .main-content { margin-left: 56px; }
  .responsive-tenant-context { display: block; }
  .responsive-tenant-context .tenant-context { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; align-items: end; gap: 8px 18px; padding: 10px 24px; }
  .responsive-tenant-context .tenant-context > div + div { margin-top: 0; }
  .responsive-tenant-context .tenant-context-role { align-self: center; margin: 0; white-space: nowrap; }
  .connector-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .report-card-grid { grid-template-columns: 1fr; }
  .connector-review-summary .detail-list { grid-template-columns: 1fr; }
  .eventlink-preview-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar { width: min(280px, 86vw); visibility: hidden; transform: translateX(-100%); box-shadow: 18px 0 45px rgb(4 19 27 / 22%); transition: visibility 0s linear .2s, transform .2s ease; }
  .sidebar.open { visibility: visible; transform: translateX(0); transition-delay: 0s; }
  .sidebar.open .sidebar-logo-text-group, .sidebar.open .sidebar-nav-item > span:not(.nav-icon), .sidebar.open .sidebar-nav-item small, .sidebar.open .sidebar-footer { display: flex; }
  .sidebar.open .sidebar-context-host { display: block; }
  .sidebar.open .sidebar-logo { justify-content: flex-start; padding: 16px; }
  .sidebar.open .sidebar-nav-group { height: auto; margin: 0; padding: 14px 20px 4px; overflow: visible; border: 0; font-size: 9px; }
  .sidebar.open .sidebar-nav-item { justify-content: flex-start; padding: 9px 12px; }
  .sidebar.open .sidebar-footer { display: block; }
  .sidebar-close { position: absolute; top: 18px; right: 12px; display: grid; width: 32px; height: 32px; padding: 6px; place-items: center; border: 1px solid #52697a; border-radius: 7px; color: white; background: transparent; cursor: pointer; }
  .sidebar-close svg { width: 18px; height: 18px; fill: currentColor; }
  .main-content { margin-left: 0; }
  .mobile-menu-button { display: grid; place-items: center; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 90; border: 0; background: rgb(4 19 27 / 48%); }
  .sidebar-backdrop.visible { display: block; }
  .responsive-tenant-context .tenant-context { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); padding: 9px 16px; }
  .responsive-tenant-context .tenant-context-role { grid-column: 1 / -1; }
  .page-body { padding: 18px 16px 28px; }
  .metric-grid, .dashboard-grid, .form-grid, .membership-summary, .member-editor-layout { grid-template-columns: 1fr; }
  .form-grid > [aria-hidden="true"]:empty { display: none; }
  .filter-actions { flex: 1 1 100%; }
  .full-field { grid-column: auto; }
  .staff-shift-weekdays label { flex: 1 0 72px; justify-content: center; }
  .inline-cancel-form { grid-template-columns: minmax(155px, 1fr) auto; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .schedule-publication-row form,
  .schedule-publication-row button { width: 100%; }
  .utc-note { display: none; }
  .connector-toolbar, .connector-intro, .future-flow-heading { align-items: stretch; flex-direction: column; }
  .import-file-heading, .import-file-controls { align-items: stretch; flex-direction: column; }
  .preview-label { align-self: flex-start; }
  .connector-search { width: 100%; }
  .connector-location-list { grid-template-columns: 1fr; }
  .mockup-preview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .staff-existing-person-list li { align-items: stretch; flex-direction: column; }
  .staff-existing-person-list details { width: 100%; }
  .staff-existing-person-list details > summary { width: fit-content; margin-left: auto; }
  .staff-existing-position-form { min-width: 0; }
}
@media (max-width: 520px) {
  .limit-value-grid { grid-template-columns: 1fr; }
  .limit-band-editor { padding-right: 12px; padding-left: 12px; }
  .chemistry-report-form { grid-template-columns: 1fr; }
  .chemistry-start-form { align-items: stretch; flex-direction: column; }
  .chemistry-start-form select { width: 100%; }
  .chemistry-report-form .primary-action { width: 100%; }
  .team-person-list li, .team-practice-list li { align-items: flex-start; flex-direction: column; }
  .chemistry-list li { align-items: flex-start; flex-direction: column; }
  .chemistry-values { grid-template-columns: 1fr; }
  .topbar { padding: 0 14px; }
  .topbar-actions { gap: 5px; }
  .topbar-actions .schedule-compact-button { min-height: 44px; padding: 0 9px; font-size: 11px; }
  .topbar-actions .topbar-action-label { display: none; }
  .topbar-with-actions .breadcrumb { display: none; }
  .responsive-tenant-context .tenant-context { grid-template-columns: 1fr; gap: 5px; }
  .responsive-tenant-context .tenant-context > div + div { margin-top: 5px; }
  .responsive-tenant-context .tenant-context-role { grid-column: auto; }
  .panel, .form-section { padding: 18px; }
  .auth-card { padding: 28px 22px; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .danger-zone-inline { align-items: stretch; flex-direction: column; }
  .connector-grid, .custom-connector-flow { grid-template-columns: 1fr; }
}
.daily-log-entries { display: grid; gap: 12px; }
.daily-log-entry { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: white; }
.daily-log-entry-heading { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.daily-log-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 16px; }
.daily-log-entry p { margin: 8px 0 0; }
.daily-log-reference { font-size: 12px; color: var(--text-muted); }

@media (max-width: 700px) {
    .daily-log-entry-heading { display: block; }
    .daily-log-entry-heading time { display: block; }
    .daily-log-metrics { grid-template-columns: 1fr; }
}

@media print {
    .print-sheet-body .print-only { display: block; }
    .print-sheet-body .sidebar, .print-sheet-body .sidebar-backdrop,
    .print-sheet-body .topbar, .print-sheet-body .responsive-tenant-context,
    .print-sheet-body .daily-log-actions { display: none !important; }
    .print-sheet-body .app-shell, .print-sheet-body .main-content { display: block; min-height: 0; margin: 0; }
    .print-sheet-body .page-body { max-width: none; padding: 0; }
    .print-sheet-body .daily-log-sheet { border: 0; box-shadow: none; padding: 0; }
    .print-sheet-body .daily-log-entry { break-inside: avoid; }
    .print-sheet-body .daily-log-sheet tr { break-inside: avoid; }
    .print-sheet-body .daily-log-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .print-sheet-body .daily-log-reference a { display: none; }
}
.member-list-badge-actions { display: grid; grid-template-columns: 5.75rem auto; align-items: center; justify-content: start; gap: .65rem; }
.member-list-badge-actions form { margin: 0; }
.member-scan-button { border: 1px solid var(--primary, #087f73); border-radius: .45rem; background: transparent; color: var(--primary, #087f73); padding: .28rem .6rem; font-weight: 700; cursor: pointer; }
.member-scan-button:hover { background: #e8f7f4; }
/* Staff assignment workspace */
.staff-fill-heading {
    align-items: end;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.staff-fill-day-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    margin: 1.25rem 0;
    overflow: hidden;
    border: 1px solid var(--border-color, #d9e0e7);
    border-radius: .75rem;
    background: #fff;
}

.staff-fill-day-strip a {
    display: grid;
    justify-items: center;
    min-width: 0;
    padding: .7rem .35rem;
    color: #344054;
    text-decoration: none;
    border-right: 1px solid #e5e9ee;
}

.staff-fill-day-strip a:last-child { border-right: 0; }
.staff-fill-day-strip a:hover { background: #f6f9fb; }
.staff-fill-day-strip a.selected {
    color: #0d4f67;
    background: #eaf6f8;
    box-shadow: inset 0 -3px #1597a6;
}
.staff-fill-day-strip span { font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.staff-fill-day-strip strong { font-size: 1.25rem; }
.staff-fill-day-strip small { overflow: hidden; max-width: 100%; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }

.staff-fill-alert { margin-bottom: 1rem; }
.staff-fill-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(20rem, .75fr);
    align-items: start;
    gap: 1.25rem;
}

.staff-fill-slots,
.staff-roster-rail {
    overflow: hidden;
    border: 1px solid #d9e0e7;
    border-radius: .9rem;
    background: #fff;
    box-shadow: 0 4px 18px rgb(15 35 51 / 6%);
}

.staff-fill-slots > header,
.staff-roster-rail > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid #e5e9ee;
}

.staff-fill-slots h2,
.staff-roster-rail h2 { margin: 0; font-size: 1.25rem; }
.staff-fill-slots > header > span {
    padding: .28rem .6rem;
    color: #8a3e18;
    font-size: .78rem;
    font-weight: 700;
    border-radius: 999px;
    background: #fff0e7;
}

.staff-fill-position-group { --staff-tone: #0f6d8a; padding: 1rem 1.25rem 1.25rem; border-bottom: 1px solid #edf0f3; }
.staff-fill-position-group:last-child { border-bottom: 0; }
.staff-fill-position-group h3 { display: flex; align-items: center; gap: .45rem; margin: 0 0 .65rem; font-size: 1rem; }
.staff-fill-position-group h3::before { width: .28rem; height: 1.15rem; border-radius: 999px; background: var(--staff-tone); content: ""; }
.staff-fill-position-group h3 small { color: #667085; font-size: .75rem; font-weight: 500; }
.staff-fill-slot {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .8rem;
    margin-top: .55rem;
    padding: .8rem .9rem;
    color: #243746;
    text-decoration: none;
    border: 1px solid #dce3e8;
    border-left: 4px solid #7baeb8;
    border-radius: .65rem;
    background: #fff;
}
.staff-fill-slot:hover { border-color: #76aebb; background: #f7fbfc; }
.staff-fill-slot.selected { outline: 3px solid rgb(21 151 166 / 20%); border-color: #1597a6; }
.staff-fill-slot.open { border-left-color: #e38a45; }
.staff-fill-slot time { font-size: .82rem; font-weight: 700; }
.staff-fill-slot span { display: grid; }
.staff-fill-slot small { color: #667085; }
.staff-fill-slot em { color: #667085; font-size: .75rem; font-style: normal; font-weight: 700; }
.staff-fill-slot.open em { color: #9a4b17; }

.staff-roster-rail > header { display: block; background: #f5fafb; }
.staff-roster-rail > header p:last-child { margin: .2rem 0 0; color: #536572; }
.staff-roster-band { padding: 1rem 1.1rem; border-bottom: 1px solid #edf0f3; }
.staff-roster-band h3,
.staff-roster-band summary {
    display: flex;
    justify-content: space-between;
    margin: 0 0 .55rem;
    color: #344054;
    font-size: .79rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.staff-roster-band h3 span,
.staff-roster-band summary span { color: #667085; }
.staff-roster-band form { margin-top: .45rem; }
.staff-roster-person {
    display: grid;
    grid-template-columns: 2.15rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .65rem;
    width: 100%;
    padding: .65rem;
    color: #243746;
    text-align: left;
    border: 1px solid #dfe5e9;
    border-radius: .65rem;
    background: #fff;
}
button.staff-roster-person { cursor: pointer; }
button.staff-roster-person:hover { border-color: #1597a6; background: #f3fafb; }
button.staff-roster-person.dragging { opacity: .55; }
.staff-fill-slot.drop-ready {
    border-style: dashed;
    border-color: #1597a6;
    background: #f2fafb;
}
.staff-fill-slot.drag-over {
    outline: 4px solid rgb(21 151 166 / 24%);
    transform: translateY(-1px);
}
button.staff-roster-person:focus-visible,
.staff-fill-slot:focus-visible,
.staff-fill-day-strip a:focus-visible {
    outline: 3px solid #f5a623;
    outline-offset: 2px;
}
.staff-roster-person.muted { margin-top: .45rem; color: #5e6b75; background: #f7f8f9; }
.staff-avatar {
    display: grid;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
    color: #0d5d69;
    font-size: .75rem;
    font-weight: 800;
    border-radius: 50%;
    background: #dff2f4;
}
.staff-person-copy { display: grid; min-width: 0; }
.staff-position-marks {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    min-height: .3rem;
    margin: .15rem 0 .1rem;
}
.staff-position-marks i {
    display: block;
    width: 1rem;
    height: .18rem;
    border-radius: 999px;
    background: #1597a6;
}
.staff-position-marks .position-mark-tone-0 { background: #1597a6; }
.staff-position-marks .position-mark-tone-1 { background: #e38a45; }
.staff-position-marks .position-mark-tone-2 { background: #7357b4; }
.staff-position-marks .position-mark-tone-3 { background: #2e7d57; }
.staff-roster-person.override { border-color: #e3c89c; background: #fffbf3; }
.staff-roster-person.override:hover { border-color: #c9822b; background: #fff7e8; }
.staff-person-copy small { overflow: hidden; color: #667085; font-size: .73rem; text-overflow: ellipsis; white-space: nowrap; }
.staff-roster-person.muted .staff-person-copy small { white-space: normal; }
.staff-hours { color: #667085; font-size: .75rem; font-weight: 700; }
.staff-roster-assigned { display: grid; gap: .4rem; padding: 1.25rem; }
.staff-roster-assigned > span { color: #27734e; font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.staff-roster-assigned > strong { font-size: 1.1rem; }
.staff-roster-assigned form { margin-top: .4rem; }
.staff-roster-rail > footer { padding: 1rem 1.1rem; color: #667085; font-size: .72rem; background: #fafbfc; }
.staff-roster-rail > footer p { margin: 0 0 .35rem; }
.staff-roster-rail > footer p:last-child { margin-bottom: 0; }

@media (max-width: 991px) {
    .staff-fill-workspace { grid-template-columns: 1fr; }
    .staff-roster-rail { position: static; }
}

@media (max-width: 767px) {
    .staff-fill-heading { align-items: stretch; flex-direction: column; }
    .staff-fill-day-strip { grid-template-columns: repeat(7, 5rem); overflow-x: auto; }
    .staff-fill-slot { grid-template-columns: 1fr auto; }
    .staff-fill-slot time { grid-column: 1 / -1; }
}

/* Manual staff availability */
.staff-availability-link,
.position-color-pill { color: var(--position-ink); background: var(--position-color); }
.staff-availability-link { text-decoration: none; }
.staff-availability-link:hover { text-decoration: underline; }

.position-color-control { display: flex; align-items: center; gap: .75rem; }
.position-color-control input[type="color"] { width: 3.25rem; height: 2.5rem; padding: .15rem; border: 1px solid var(--border); border-radius: .45rem; background: #fff; cursor: pointer; }
.position-color-control output { color: var(--text-secondary); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 700; text-transform: uppercase; }
.position-color-name { display: inline-flex; align-items: center; gap: .55rem; }
.position-color-name i { width: .8rem; height: .8rem; flex: none; border-radius: 50%; box-shadow: 0 0 0 1px rgb(15 23 42 / 16%); }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 32%, var(--border)); }
.danger-zone > p { color: var(--text-secondary); }
.danger-zone-inline { display: flex; align-items: center; gap: .75rem; margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--border); }
.danger-zone-inline small { color: var(--text-muted); }
.staff-availability-kind { display: flex; flex-wrap: wrap; gap: .65rem 1.25rem; }
.staff-availability-kind legend { width: 100%; }
.staff-availability-kind label { display: inline-flex; align-items: center; gap: .4rem; }
.staff-availability-range { display: flex; align-items: center; gap: .7rem; }
.staff-availability-range a { font-size: .8rem; font-weight: 700; }
.staff-availability-list { display: grid; gap: .65rem; }
.staff-availability-entry {
    display: grid;
    grid-template-columns: minmax(8.75rem, .8fr) minmax(12rem, 1.4fr) auto auto;
    align-items: center;
    gap: .7rem 1rem;
    padding: .85rem 1rem;
    border: 1px solid var(--border);
    border-radius: .65rem;
    background: #fff;
}
.staff-availability-entry > time { font-weight: 750; }
.staff-availability-entry > div:nth-of-type(1) { display: grid; }
.staff-availability-entry > div:nth-of-type(1) span { color: var(--text-muted); font-size: .78rem; }
.staff-availability-entry > p { grid-column: 1 / -1; margin: 0; color: var(--text-secondary); font-size: .82rem; }
.staff-availability-actions { display: flex; align-items: center; justify-content: flex-end; gap: .45rem; }
.staff-availability-actions form { margin: 0; }

@media (max-width: 767px) {
    .staff-availability-entry { grid-template-columns: 1fr auto; }
    .staff-availability-entry > div:nth-of-type(1),
    .staff-availability-entry > p { grid-column: 1 / -1; }
    .staff-availability-actions { grid-column: 1 / -1; justify-content: flex-start; }
    .staff-availability-range { width: 100%; justify-content: flex-start; }
}

/* Website widget showroom */
.publication-shell { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); gap: 1rem; min-width: 0; }
.publication-rail,
.publication-workspace { min-width: 0; border: 1px solid var(--border); border-radius: .85rem; background: #fff; box-shadow: var(--shadow-card); }
.publication-rail { align-self: start; padding: .45rem; }
.publication-facility { display: grid; gap: .3rem; padding: .55rem; border-bottom: 1px solid var(--border); }
.publication-facility label,
.publication-controls legend,
.publication-controls > label { color: var(--text-muted); font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.publication-choice { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: .65rem; padding: .8rem; border: 1px solid transparent; border-radius: .65rem; color: var(--text); text-align: left; background: transparent; cursor: pointer; }
.publication-choice:hover { background: #f7fafb; }
.publication-choice.selected { border-color: #18aa9c; background: #ecfaf8; }
.publication-choice > span:first-child { display: grid; gap: .08rem; min-width: 0; }
.publication-choice strong { font-size: .86rem; }
.publication-choice small { color: var(--text-muted); font-size: .7rem; }
.publication-state { flex: none; padding: .2rem .45rem; border-radius: 999px; font-size: .66rem; font-weight: 800; }
.publication-state.live { color: #087443; background: #dcf8e8; }
.publication-state.draft { color: #596579; background: #eef1f5; }
.publication-rail-note { margin: .8rem; color: var(--text-muted); font-size: .72rem; line-height: 1.45; }
.publication-workspace { overflow: hidden; }
.publication-workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.15rem; border-bottom: 1px solid var(--border); }
.publication-workspace-heading h2 { margin: 0; font-size: 1.1rem; }
.publication-workspace-heading p { margin: .2rem 0 0; color: var(--text-muted); font-size: .75rem; }
.publication-live-pill { padding: .28rem .55rem; border-radius: 999px; color: #087443; background: #dcf8e8; font-size: .7rem; font-weight: 800; white-space: nowrap; }
.publication-controls { display: flex; align-items: end; flex-wrap: wrap; gap: .8rem 1.15rem; padding: .7rem 1.15rem; border-bottom: 1px solid var(--border); }
.publication-controls fieldset,
.publication-controls > label { display: grid; gap: .3rem; margin: 0; padding: 0; border: 0; }
.publication-controls select { min-width: 7.2rem; min-height: 2.1rem; padding: .35rem .55rem; border: 1px solid var(--border); border-radius: .45rem; background: #fff; }
.publication-controls .segmented { gap: 0; }
.publication-controls .segmented button { min-height: 2.1rem; padding: .35rem .65rem; border: 1px solid var(--border); color: var(--text-secondary); background: #fff; }
.publication-controls .segmented button:first-child { border-radius: .45rem 0 0 .45rem; }
.publication-controls .segmented button:last-child { border-radius: 0 .45rem .45rem 0; }
.publication-controls .segmented button.selected { border-color: #193044; color: #fff; background: #193044; }
.publication-accent { grid-template-columns: auto auto; align-items: center; }
.publication-accent legend { grid-column: 1 / -1; }
.publication-accent input[type="color"] { width: 2.4rem; height: 2.1rem; padding: .12rem; border: 1px solid var(--border); border-radius: .45rem; background: #fff; cursor: pointer; }
.publication-accent output { color: var(--text-secondary); font: 700 .72rem ui-monospace, monospace; }
.publication-preview-stage { display: grid; grid-template-columns: minmax(25rem, 1fr) 18.75rem; align-items: start; gap: 1.1rem; padding: 1.25rem; background: #f2f5f7; }
.publication-preview-column { display: grid; gap: .4rem; min-width: 0; }
.publication-preview-column > span { color: var(--text-muted); font-size: .68rem; font-weight: 700; }
.publication-preview { --publication-accent: #00897b; overflow: hidden; border: 1px solid #dce4ec; border-radius: .75rem; color: #132234; background: #fff; box-shadow: 0 2px 7px rgb(16 34 49 / 7%); }
.publication-preview.publication-theme-dark { border-color: #30424f; color: #f2f7f7; background: #142431; }
.publication-preview header,
.publication-preview footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .8rem 1rem; }
.publication-preview header { border-bottom: 1px solid #dce4ec; }
.publication-theme-dark header,
.publication-theme-dark footer { border-color: #30424f; }
.publication-preview h3 { margin: 0; font-size: 1em; }
.publication-preview a { color: var(--publication-accent); font-size: .75em; font-weight: 800; text-decoration: none; }
.publication-preview-row { display: grid; grid-template-columns: minmax(8.8rem, .75fr) minmax(0, 1.35fr); gap: .75rem; padding: .65rem 1rem; border-bottom: 1px solid #dce4ec; }
.publication-theme-dark .publication-preview-row { border-color: #30424f; }
.publication-preview-row.notice { background: color-mix(in srgb, var(--publication-accent) 10%, transparent); }
.publication-preview-row time { color: #586a7e; font-size: .78em; font-weight: 700; }
.publication-theme-dark .publication-preview-row time,
.publication-theme-dark .publication-preview-row small,
.publication-theme-dark footer { color: #aab8c4; }
.publication-preview-row span { display: grid; min-width: 0; }
.publication-preview-row strong { overflow-wrap: anywhere; font-size: .82em; }
.publication-preview-row small { color: #718096; font-size: .68em; }
.publication-preview-row.cancelled strong { color: #68788d; text-decoration: line-through; }
.publication-preview footer { border-top: 1px solid #dce4ec; color: #718096; font-size: .66em; }
.publication-preview footer strong { color: var(--publication-accent); }
.publication-preview-column.phone .publication-preview-row { grid-template-columns: 1fr; gap: .05rem; padding-block: .5rem; }
.publication-empty { margin: 0; padding: 1.1rem; color: #718096; font-size: .78em; }
.publication-code { padding: .9rem 1.15rem 1rem; border-top: 1px solid var(--border); }
.publication-code-tabs { display: flex; gap: .35rem; }
.publication-code-tabs button { padding: .35rem .65rem; border: 0; border-radius: .45rem; color: var(--text-secondary); font-weight: 750; background: transparent; cursor: pointer; }
.publication-code-tabs button.selected { color: #087d74; background: #e7f8f5; }
.publication-code > p { margin: .45rem 0; color: var(--text-muted); font-size: .72rem; }
.publication-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: .7rem; }
.publication-code pre { min-width: 0; margin: 0; padding: .8rem; overflow: auto; border-radius: .55rem; color: #d7e8ed; background: #102233; font-size: .72rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.publication-copy-status { min-height: 1em; color: #087443 !important; }
.publication-unavailable { display: flex; align-items: center; gap: .8rem; padding: 1.4rem; }
.publication-unavailable > i { color: var(--text-muted); font-size: 1.5rem; }
.publication-unavailable div { flex: 1; }
.publication-unavailable p { margin: .2rem 0 0; color: var(--text-muted); font-size: .82rem; }

@media (max-width: 991px) {
    .publication-shell { grid-template-columns: 1fr; }
    .publication-rail { display: flex; align-items: stretch; overflow-x: auto; }
    .publication-choice { min-width: 13rem; }
    .publication-rail-note { display: none; }
    .publication-facility { min-width: 12rem; border-right: 1px solid var(--border); border-bottom: 0; }
    .publication-preview-stage { grid-template-columns: minmax(22rem, 1fr) 18.75rem; overflow-x: auto; }
}

@media (max-width: 767px) {
    .publication-workspace-heading { align-items: flex-start; }
    .publication-controls { align-items: stretch; }
    .publication-controls > label { flex: 1 1 8rem; }
    .publication-preview-stage { display: flex; }
    .publication-preview-column.wide { min-width: 35rem; }
    .publication-preview-column.phone { min-width: 18.75rem; }
    .publication-code-row { grid-template-columns: 1fr; }
    .publication-code-row .button-link { justify-content: center; }
    .publication-copy-button { justify-content: center; }
    .publication-unavailable { align-items: flex-start; flex-wrap: wrap; }
}

@media (max-width: 500px) {
    .publication-preview-stage { display: block; overflow: visible; }
    .publication-preview-column.wide { display: none; }
    .publication-preview-column.phone { width: min(18.75rem, 100%); min-width: 0; margin-inline: auto; }
}
