/* Call Audit Matrix: manager product UI. Plain CSS, no framework, no build step.

   Follows the TMC Sub-App Foundation (TMC-SubApp-Foundation/, snapshot 2026-10-05): the brand tokens of its
   Appendix A, the component sizes of its section 4, the sign-in layout of section 5, the sidebar-only shell of
   section 8 and the page anatomy of section 9. Only the brand colours exist here: tests/ui/theme.test.ts fails
   if any other colour is added. Klavika is the only typeface.

   Deliberate app-specific choices (recorded in docs/planning/Foundation-Apply-Notes.md): a list-and-table view of
   calls, class pills for MC / GC / LVC, and a local test-identity picker (CAM_AUTH_PROVIDER=picker). The sign-in,
   People, Roles and Sign-in activity screens follow the foundation (docs/planning/Accounts-Spec.md). */

@font-face { font-family: "Klavika"; src: url("/assets/fonts/Klavika-Light.otf") format("opentype"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Klavika"; src: url("/assets/fonts/Klavika-Regular.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Klavika"; src: url("/assets/fonts/Klavika-Medium.otf") format("opentype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Klavika"; src: url("/assets/fonts/Klavika-Bold.otf") format("opentype"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --color-white: #FFFFFF;
  --color-deep: #014D67;
  --color-deepest: #003C4F;
  --color-blue: #3F87B0;
  --color-orange: #EA5B0C;
  --color-mist: #DFE5EE;
  --color-graphite: #221F1F;
  --color-steel: #6E7378;
  --color-fog: #B7BBBF;
  --color-line: #E6E8EB;
  --color-canvas: #F0F7FB;
  --color-row-hover: #D8ECF5;
  --color-success: #16A34A;
  --color-danger: #DC2626;
  --color-st-active-bg: #DCFCE7;   --color-st-active-fg: #15803D;
  --color-st-inactive-bg: #F0F4F6; --color-st-inactive-fg: #696969;
  --color-st-pending-bg: #FDE8D8;  --color-st-pending-fg: #B84300;
  --color-st-warning-bg: #FEF9C3;  --color-st-warning-fg: #854D0E;

  --font-sans: "Klavika", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;

  --shadow-card: 0 1px 2px rgba(14, 79, 102, 0.06), 0 1px 3px rgba(14, 79, 102, 0.04);
  --shadow-modal: 0 12px 32px rgba(14, 79, 102, 0.14), 0 4px 8px rgba(14, 79, 102, 0.08);

  --sidebar-w: 220px;
  --sidebar-w-collapsed: 52px;
  --content-max: 1240px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; overflow-x: hidden; } /* on html only: on body it would make body a scroll container and the sticky sidebar would scroll away */

body { margin: 0; background: var(--color-canvas); color: var(--color-graphite); font-family: var(--font-sans); font-size: 16px; line-height: 1.5; font-weight: 400; -webkit-font-smoothing: antialiased; }

button, select, input, textarea { font-family: inherit; font-size: 16px; color: inherit; } /* 16 px: iOS Safari zooms in below it and never zooms back out */

:focus-visible { outline: 3px solid var(--color-blue); outline-offset: 2px; border-radius: 4px; }
.on-deep :focus-visible { outline-color: var(--color-white); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

h1, h2, h3 { margin: 0; }
h2 { font-size: 18px; font-weight: 500; color: var(--color-deep); }
h3 { font-size: 16px; font-weight: 500; color: var(--color-deep); }
strong, b { font-weight: 500; }
a { color: var(--color-deep); }
code { font-family: inherit; background: var(--color-mist); border-radius: 4px; padding: 0 4px; }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.skip-link { position: fixed; top: 8px; left: 8px; z-index: 700; transform: translateY(-200%); background: var(--color-white); color: var(--color-deep); padding: 12px 16px; min-height: 44px; border-radius: 8px; font-weight: 500; text-decoration: underline; box-shadow: var(--shadow-modal); }
.skip-link:focus { transform: translateY(0); }

/* ---------------------------------------------------------------- app shell: sidebar only, no top header (foundation section 8) */

.app-shell { display: flex; min-height: 100dvh; }

.sidebar { background: var(--color-deep); color: var(--color-white); position: sticky; top: 0; height: 100dvh; width: var(--sidebar-w); flex: none; display: flex; flex-direction: column; overflow: hidden; z-index: 250; transition: width 250ms cubic-bezier(0.4, 0, 0.2, 1), transform 250ms cubic-bezier(0.4, 0, 0.2, 1); }
.sidebar--collapsed { width: var(--sidebar-w-collapsed); }

.sb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; padding: 12px 12px 0; }
.sb-brand { min-width: 0; }
.sb-logo { display: flex; align-items: center; min-height: 44px; padding: 0; background: none; border: 0; cursor: pointer; }
.sb-logo img { height: 36px; width: auto; display: block; }
.sb-name { margin: 4px 0 0; font-size: 18px; font-weight: 500; line-height: 1.25; color: var(--color-white); overflow-wrap: anywhere; }
.sb-collapse, .sb-close { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; background: none; border: 0; border-radius: 8px; color: var(--color-white); cursor: pointer; transition: background-color 150ms; }
.sb-collapse:hover, .sb-close:hover { background: rgba(255, 255, 255, 0.1); }
.sb-close { display: none; }

.sb-nav { margin-top: 16px; flex: 1; overflow-y: auto; }
.sb-link { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 14px; background: none; border: 0; text-align: left; text-decoration: none; cursor: pointer; font-size: 15px; font-weight: 500; white-space: nowrap; color: rgba(255, 255, 255, 0.8); transition: background-color 150ms, color 150ms; }
.sb-link:hover { background: rgba(255, 255, 255, 0.1); color: var(--color-white); }
.sb-link[aria-current="page"] { background: rgba(255, 255, 255, 0.2); color: var(--color-white); }
.count-badge { margin-left: auto; display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--color-orange); color: var(--color-white); font-size: 12px; font-weight: 400; line-height: 1; }

.sb-foot { margin-top: auto; padding: 12px 12px 16px; border-top: 1px solid rgba(255, 255, 255, 0.15); }
.sb-id { background: var(--color-deepest); border-radius: 8px; padding: 12px 10px; min-width: 0; }
.sb-id__role { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255, 255, 255, 0.75); }
.sb-id__name { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-switch { margin-top: 8px; }
.sb-switch select { width: 100%; min-height: 44px; background: var(--color-white); color: var(--color-graphite); border: 0; border-radius: 8px; padding: 6px 8px; font-size: 14px; }
.sb-signout { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; margin-top: 8px; padding: 0 10px; background: none; border: 0; border-radius: 8px; text-decoration: none; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--color-row-hover); transition: background-color 150ms, color 150ms; }
.sb-signout:hover { background: rgba(255, 255, 255, 0.1); color: var(--color-white); }

.sidebar--collapsed .sb-brand,
.sidebar--collapsed .sb-label,
.sidebar--collapsed .sb-id,
.sidebar--collapsed .sb-switch { display: none; }
.sidebar--collapsed .sb-head { justify-content: center; padding-left: 4px; padding-right: 4px; }
.sidebar--collapsed .sb-foot { padding-left: 4px; padding-right: 4px; }
.sidebar--collapsed .sb-signout { justify-content: center; padding: 0; }
.sidebar--collapsed .count-badge { position: absolute; top: 6px; right: 4px; margin: 0; min-width: 18px; height: 18px; padding: 0 4px; font-size: 11px; }

.drawer-overlay { display: none; }
.menu-opener { display: none; }

.content-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.page-content { padding: 68px 16px 48px; flex: 1; min-width: 0; }
.page { max-width: var(--content-max); margin: 0 auto; }
.page-content:focus { outline: none; }

.notif-bar { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 16px 8px 68px; background: var(--color-st-pending-bg); color: var(--color-st-pending-fg); font-size: 15px; font-weight: 500; }
.notif-bar .icon { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- page anatomy (foundation section 9) */

.page-title { font-size: 32px; line-height: 1.1; font-weight: 700; color: var(--color-deep); overflow-wrap: anywhere; }
.page-title:focus { outline: none; }
.page-lead { margin: 8px 0 0; font-size: 16px; color: var(--color-steel); max-width: 60ch; overflow-wrap: anywhere; }
.page-head { margin-bottom: 24px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }

/* ---------------------------------------------------------------- components (foundation section 4) */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; background: var(--color-deep); color: var(--color-white); font-size: 15px; font-weight: 500; border: 1px solid var(--color-deep); border-radius: 8px; text-decoration: none; cursor: pointer; transition: background-color 150ms, color 150ms, border-color 150ms; }
.btn:hover:not(:disabled) { background: var(--color-deepest); border-color: var(--color-deepest); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn[aria-disabled="true"], .btn[aria-disabled="true"]:hover { opacity: 0.55; cursor: not-allowed; background: var(--color-deep); border-color: var(--color-deep); color: var(--color-white); }
.btn--secondary[aria-disabled="true"], .btn--secondary[aria-disabled="true"]:hover { background: var(--color-white); color: var(--color-deep); }
.btn--secondary { background: var(--color-white); color: var(--color-deep); border: 1px solid var(--color-deep); }
.btn--secondary:hover:not(:disabled) { background: var(--color-deep); color: var(--color-white); }
.btn--text { background: none; color: var(--color-deep); border-color: transparent; padding: 0 8px; }
.btn--text:hover:not(:disabled) { background: none; color: var(--color-deep); border-color: transparent; text-decoration: underline; }
.btn--danger { background: var(--color-danger); color: var(--color-white); border: 1px solid var(--color-danger); }
.btn--danger:hover:not(:disabled) { background: var(--color-danger); border-color: var(--color-danger); opacity: 0.9; }

.input { width: 100%; min-height: 44px; padding: 8px 12px; background: var(--color-white); color: var(--color-graphite); font-size: 16px; border: 1px solid var(--color-line); border-radius: 8px; }
.select { width: 100%; min-height: 44px; padding: 8px 12px; background: var(--color-white); color: var(--color-graphite); font-size: 16px; border: 1px solid var(--color-line); border-radius: 8px; }
.textarea { width: 100%; min-height: 44px; padding: 8px 12px; background: var(--color-white); color: var(--color-graphite); font-size: 16px; border: 1px solid var(--color-line); border-radius: 8px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--color-steel); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--color-blue); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--color-orange); }
.textarea { min-height: 96px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .field .label { font-size: 14px; font-weight: 500; color: var(--color-deep); }
.field .req { color: var(--color-orange); }
.field-hint { font-size: 12px; color: var(--color-steel); margin: 0; }
.field-error { display: flex; align-items: flex-start; gap: 6px; margin: 0; color: var(--color-orange); font-size: 14px; font-weight: 500; }
.field-error .icon { width: 16px; height: 16px; margin-top: 3px; }

.pill { display: inline-block; padding: 2px 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; border-radius: 999px; background: var(--color-st-inactive-bg); color: var(--color-st-inactive-fg); }
.pill--active { background: var(--color-st-active-bg); color: var(--color-st-active-fg); }
.pill--inactive { background: var(--color-st-inactive-bg); color: var(--color-st-inactive-fg); }
.pill--pending { background: var(--color-st-pending-bg); color: var(--color-st-pending-fg); }
.pill--warning { background: var(--color-st-warning-bg); color: var(--color-st-warning-fg); }
.pill--mc { background: var(--color-deep); color: var(--color-white); }
.pill--gc { background: var(--color-mist); color: var(--color-deep); box-shadow: inset 0 0 0 1px var(--color-deep); }
.pill--lvc { background: var(--color-st-inactive-bg); color: var(--color-st-inactive-fg); }
.pill--incomplete { background: var(--color-white); color: var(--color-steel); box-shadow: inset 0 0 0 1px var(--color-steel); }

.note { display: flex; gap: 12px; margin: 0 0 16px; background: var(--color-mist); color: var(--color-deep); border-radius: 8px; padding: 16px; font-size: 14px; }
.note .icon { margin-top: 1px; }
.note > div { min-width: 0; }
.note ul { margin: 6px 0 0; padding-left: 18px; }
.note--warning { background: var(--color-st-warning-bg); color: var(--color-st-warning-fg); }
.note--error { background: var(--color-st-pending-bg); color: var(--color-st-pending-fg); }
.note__title { margin: 0 0 4px; font-weight: 500; }
.note p { margin: 0 0 4px; }

.card { background: var(--color-white); border: 1px solid var(--color-line); border-radius: 8px; box-shadow: var(--shadow-card); padding: 16px; margin-bottom: 16px; }
.card.card--flush { padding: 0; overflow: hidden; }

.skeleton { background: var(--color-mist); height: 56px; border-radius: 8px; margin-bottom: 12px; }
.skeleton--title { height: 40px; width: 40%; }
.empty-state { background: var(--color-white); border: 1px solid var(--color-line); border-radius: 8px; box-shadow: var(--shadow-card); padding: 48px 24px; color: var(--color-steel); text-align: center; }
.is-refreshing { opacity: 0.6; }

.tabbar { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--color-line); }
.tab { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; background: var(--color-white); color: var(--color-deep); border: 1px solid var(--color-line); border-radius: 8px; font-size: 15px; font-weight: 500; cursor: pointer; transition: border-color 150ms, background-color 150ms, color 150ms; }
.tab:hover { border-color: var(--color-deep); }
.tab[aria-selected="true"] { background: var(--color-deep); color: var(--color-white); border-color: var(--color-deep); }

.pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 16px; }
.pager-btn { min-width: 44px; min-height: 44px; padding: 0 12px; background: var(--color-white); color: var(--color-deep); border: 1px solid var(--color-line); border-radius: 8px; font-size: 15px; font-weight: 500; cursor: pointer; }
.pager-btn:hover:not(:disabled) { border-color: var(--color-deep); }
.pager-btn:disabled { color: var(--color-fog); cursor: not-allowed; }
.pager-btn[aria-current="page"] { background: var(--color-deep); color: var(--color-white); border-color: var(--color-deep); }
.pager-size { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--color-steel); margin-left: 8px; }
.pager-size select { min-height: 44px; padding: 4px 8px; border: 1px solid var(--color-line); border-radius: 8px; background: var(--color-white); font-size: 14px; }

.two-step { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 16px; border: 1px solid var(--color-line); border-radius: 8px; background: var(--color-white); }
.two-step p { margin: 0; flex: 1 1 260px; font-size: 14px; }

.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 600; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 2rem); padding: 12px 20px; border-radius: 8px; box-shadow: var(--shadow-modal); color: var(--color-white); font-size: 14px; font-weight: 500; pointer-events: none; } /* never in the way of a button under it (a phone dialog's last button sits where a toast appears) */
.toast .icon { width: 18px; height: 18px; }
.toast--success { background: var(--color-success); }
.toast--error { background: var(--color-orange); }
.toast--info { background: var(--color-deep); }

/* ---------------------------------------------------------------- sign-in page (foundation section 5) */

.login-page { min-height: 100dvh; display: flex; flex-direction: column; background: var(--color-white); }
.login-left { position: relative; width: 100%; min-height: 280px; background: var(--color-deep); display: flex; flex-direction: column; padding: 32px 24px 40px; overflow: hidden; }
.login-left__globe { width: 185%; top: 42%; opacity: 0.2; position: absolute; left: 50%; transform: translateX(-50%); pointer-events: none; user-select: none; }
.login-left__logo { position: relative; z-index: 1; width: 160px; max-width: 100%; height: auto; flex-shrink: 0; }
.login-left__text { position: relative; z-index: 1; margin-top: 32px; }
.login-left__app { margin: 0 0 4px; color: rgba(255, 255, 255, 0.5); font-size: 1.4rem; font-weight: 700; line-height: 1.25; }
.login-left__headline { margin: 0; color: var(--color-white); font-size: 1.4rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.login-right { flex: 1; display: flex; align-items: center; justify-content: center; background: var(--color-white); padding: 32px 24px; }
.login-form-wrap { width: 100%; max-width: 420px; }
.login-welcome { margin: 0 0 8px; font-size: 1.8rem; font-weight: 700; text-transform: uppercase; color: var(--color-deep); letter-spacing: -0.01em; line-height: 1.1; }
.login-welcome:focus { outline: none; } /* focus moves here when the screen changes; a ring around the title looks like an error */
.login-welcome-sub { margin: 0 0 36px; font-size: 0.95rem; color: var(--color-steel); }
.picker-list { display: grid; gap: 12px; }
.picker-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 52px; width: 100%; padding: 13px 14px; background: var(--color-white); color: var(--color-deep); border: 1.5px solid var(--color-deep); border-radius: 8px; text-align: left; cursor: pointer; transition: background-color 150ms, color 150ms; }
.picker-card:hover { background: var(--color-deep); color: var(--color-white); }
.picker-card .name { font-weight: 500; font-size: 16px; }
.picker-card .role { font-size: 12px; opacity: 0.8; }
.login-note { margin: 24px 0 0; font-size: 12px; color: var(--color-steel); }

/* ---------------------------------------------------------------- calls list */

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.filters .select { width: auto; min-width: 0; max-width: min(260px, 100%); }
.search-wrap { position: relative; flex: 1 1 260px; max-width: 420px; }
.search-wrap .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--color-steel); pointer-events: none; }
.search-wrap .input { padding-left: 40px; }

.call-grid, .call-row { display: grid; grid-template-columns: minmax(150px, 1.5fr) minmax(0, 1.3fr) minmax(130px, 1.2fr) minmax(40px, 0.6fr) minmax(90px, 0.7fr) minmax(110px, 1fr) minmax(120px, 1.1fr); gap: 12px; align-items: center; padding: 12px 16px; }
.call-head { background: var(--color-mist); color: var(--color-deep); font-size: 14px; font-weight: 500; }
.call-row { min-height: 56px; border-top: 1px solid var(--color-line); color: inherit; text-decoration: none; font-size: 14px; }
.call-row:hover { background: var(--color-row-hover); }
.cell-name { font-size: 16px; font-weight: 500; color: var(--color-deep); overflow-wrap: anywhere; }
.cell-sub { display: block; font-size: 12px; font-weight: 400; color: var(--color-steel); overflow-wrap: anywhere; }
.call-row .c-name { min-width: 0; }
.call-row .c-name .cell-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-muted { color: var(--color-steel); font-size: 14px; }
.cell-total { font-weight: 500; font-variant-numeric: tabular-nums; }
.c-customer { min-width: 0; overflow-wrap: anywhere; }
.call-row:hover .cell-muted, .call-row:hover .cell-sub { color: var(--color-graphite); }

/* ---------------------------------------------------------------- call detail */

.detail-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; font-size: 14px; color: var(--color-steel); overflow-wrap: anywhere; }
.class-check { margin: 0 0 16px; padding: 16px; }
.class-check__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.class-check__box .pill { margin: 4px 0; }
.class-check__note { margin: 4px 0 0; font-size: 14px; }
.class-check__flag { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--color-st-pending-bg); color: var(--color-st-pending-fg); }
.transcript-mode { margin: 0 0 8px; }
@media (max-width: 720px) { .class-check__grid { grid-template-columns: 1fr; } }
.score-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 16px; }
.score-strip__total { font-size: 28px; font-weight: 500; color: var(--color-deep); font-variant-numeric: tabular-nums; }

.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.pillar-card { position: relative; background: var(--color-white); border: 1px solid var(--color-line); border-radius: 8px; box-shadow: var(--shadow-card); padding: 16px; }
.pillar-title { display: block; font-size: 18px; font-weight: 500; color: var(--color-deep); margin-bottom: 8px; }
.pillar-score { font-size: 28px; font-weight: 500; color: var(--color-deep); line-height: 1.2; font-variant-numeric: tabular-nums; }
.pillar-score--none { font-size: 16px; color: var(--color-orange); }
.pillar-level { font-size: 14px; margin-bottom: 8px; }
.pillar-rationale { font-size: 14px; margin: 8px 0; }
.confidence { font-size: 12px; color: var(--color-steel); text-transform: uppercase; letter-spacing: 0.06em; }
.corrected-chip { margin-left: 8px; vertical-align: middle; }
.evidence-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: 14px; }
.evidence-list li { padding: 8px 0; border-top: 1px solid var(--color-line); }
.evidence-list li:first-child { border-top: 0; }
.evidence-quote { font-style: italic; }
.evidence-speaker { font-weight: 500; color: var(--color-deep); }
.limitations { font-size: 12px; color: var(--color-steel); margin-top: 8px; }
.correction { margin-top: 8px; padding: 12px; border-radius: 8px; background: var(--color-mist); }
.correction__title { font-weight: 500; color: var(--color-deep); font-size: 14px; margin-bottom: 4px; }
.correction__reason { font-size: 14px; margin: 0 0 6px; }
.correction__meta { font-size: 12px; color: var(--color-graphite); }

.section-title { font-size: 18px; font-weight: 500; color: var(--color-deep); margin: 24px 0 8px; }
.section-title:first-child { margin-top: 0; }

.transcript { background: var(--color-mist); border-radius: 8px; padding: 16px; }
.transcript-line { margin: 0 0 8px; font-size: 14px; overflow-wrap: anywhere; }
.ts { color: var(--color-steel); font-size: 12px; font-variant-numeric: tabular-nums; margin-right: 8px; }
.transcript .ts { color: var(--color-deep); } /* steel on mist is 3.8:1 */
.speaker { font-weight: 500; color: var(--color-deep); margin-right: 6px; }

.obs-list { list-style: none; margin: 8px 0 0; padding: 0; }
.obs-list li { background: var(--color-white); border: 1px solid var(--color-line); border-radius: 8px; padding: 12px; margin-bottom: 8px; font-size: 14px; }
.obs-feature { font-weight: 500; color: var(--color-deep); text-transform: capitalize; }

.coaching-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.coaching-item { border-top: 1px solid var(--color-line); padding: 8px 0; font-size: 14px; }
.coaching-name { display: block; font-weight: 500; color: var(--color-deep); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 16px; }
.form-grid .field { margin-bottom: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }

.sim-result { border: 1px solid var(--color-blue); border-radius: 8px; padding: 16px; margin-top: 16px; background: var(--color-white); }
.compare { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 8px; }
.compare-item { text-align: center; }
.compare-label { font-size: 12px; color: var(--color-steel); text-transform: uppercase; letter-spacing: 0.06em; }
.compare-value { font-size: 28px; font-weight: 500; color: var(--color-deep); font-variant-numeric: tabular-nums; }

.history-item { border: 1px solid var(--color-line); border-radius: 8px; padding: 12px; margin-bottom: 8px; font-size: 14px; }
.history-item .who { font-weight: 500; color: var(--color-deep); }

.notes-rendered { background: var(--color-mist); border-radius: 8px; padding: 16px 20px; font-size: 14px; }
.note-heading { font-size: 14px; font-weight: 500; color: var(--color-deep); margin: 16px 0 4px; }
.note-heading:first-child { margin-top: 0; }
.note-list { margin: 0 0 4px; padding-left: 18px; }
.note-list li { margin-bottom: 2px; }
.notes-rendered p { margin: 0 0 8px; }
.diagnostics { margin-top: 12px; font-size: 14px; color: var(--color-steel); }
.diagnostics summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.diagnostics ul { margin: 8px 0 0; padding-left: 18px; }

/* ---------------------------------------------------------------- not found (foundation Appendix B) */

.notfound { max-width: 640px; padding-top: 24px; }
.notfound__label { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--color-deep); margin-bottom: 8px; }
.notfound p { margin: 12px 0 0; color: var(--color-steel); }
.notfound .btn { margin-top: 24px; }

/* ---------------------------------------------------------------- front door fields (foundation section 5.1) */

.auth-field { margin-bottom: 20px; }
.auth-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 20px; }
.auth-field .auth-label-row label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-graphite); }
.input-wrap { position: relative; }
.auth-input { min-height: 44px; padding: 13px 14px; line-height: 1.5; border: 1.5px solid var(--color-deep); border-radius: 8px; }
.auth-input.has-eye { padding-right: 52px; }
.auth-input:focus { border-color: var(--color-blue); }
.auth-input[aria-invalid="true"] { border-color: var(--color-orange); }
.eye { position: absolute; top: 50%; right: 2px; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background: none; border: 0; border-radius: 8px; color: var(--color-steel); cursor: pointer; }
.eye:hover { color: var(--color-deep); }
.auth-submit { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; margin-top: 8px; padding: 0 20px; background: var(--color-deep); color: var(--color-white); border: 0; border-radius: 8px; font-size: 0.95rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; cursor: pointer; transition: background-color 150ms; }
.auth-submit:hover { background: var(--color-deepest); }
.auth-submit[aria-disabled="true"], .auth-submit[aria-disabled="true"]:hover { opacity: 0.55; cursor: not-allowed; background: var(--color-deep); }
.auth-submit .icon { width: 18px; height: 18px; }
.auth-switch { margin: 24px 0 0; font-size: 14px; color: var(--color-steel); }
.link-btn { min-height: 44px; padding: 0 4px; background: none; border: 0; color: var(--color-deep); font-size: 14px; font-weight: 500; text-decoration: underline; cursor: pointer; }
.auth-label-row .link-btn { font-size: 13px; }

/* ---------------------------------------------------------------- People, Roles, Sign-in activity (foundation section 10) */

.tab { text-decoration: none; }
.tab[aria-current="page"], .tab[aria-pressed="true"] { background: var(--color-deep); color: var(--color-white); border-color: var(--color-deep); }
.tabs-inline { display: flex; flex-wrap: wrap; gap: 8px; }
.toolbar--people { justify-content: space-between; }
.chip { margin-left: 8px; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--color-mist); color: var(--color-deep); font-size: 12px; line-height: 20px; text-align: center; }
.tab[aria-pressed="true"] .chip, .tab[aria-selected="true"] .chip { background: rgba(255, 255, 255, 0.2); color: var(--color-white); }
.toolbar__label { font-size: 14px; font-weight: 500; color: var(--color-deep); }
.select--auto { width: auto; max-width: 100%; }

.person-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.person.card, .role-card.card { margin-bottom: 0; }
.person__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.person__who { min-width: 0; flex: 1; }
.person__side { display: flex; align-items: center; gap: 8px; flex: none; }
.person__name { margin: 0; font-size: 16px; font-weight: 500; color: var(--color-deep); overflow-wrap: anywhere; }
.person__you { font-weight: 400; color: var(--color-steel); }
.person__meta { margin: 2px 0 0; font-size: 14px; color: var(--color-steel); }
.person__email { overflow-wrap: anywhere; }
.person__role { overflow-wrap: break-word; color: var(--color-graphite); }
.person__seen { margin: 8px 0 0; font-size: 12px; color: var(--color-steel); }
.person__note { margin: 8px 0 0; font-size: 12px; color: var(--color-steel); }
.person__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.person__controls .person__note { margin: 0; }
.role-select { width: auto; min-width: 160px; max-width: 100%; }
.btn--edit { padding: 0 12px; }

.role-card__name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 18px; }
.pill--with-icon { display: inline-flex; align-items: center; gap: 4px; }
.pill--with-icon .icon { width: 12px; height: 12px; }
.role-count { font-size: 14px; color: var(--color-steel); white-space: nowrap; }
.role-can { margin: 12px 0 0; display: grid; grid-template-columns: 1fr; gap: 4px 24px; font-size: 14px; }
.role-can > div { display: flex; flex-wrap: wrap; gap: 6px; }
.role-can dt { color: var(--color-steel); }
.role-can dd { margin: 0; color: var(--color-graphite); }
.role-can--none { color: var(--color-steel); }
.role-reach { margin: 8px 0 0; font-size: 12px; color: var(--color-steel); }

.role-form { max-width: 740px; }
.module-box { margin: 0 0 12px; padding: 12px 16px; background: var(--color-white); border: 1px solid var(--color-line); border-radius: 8px; }
.module-box legend { padding: 0 6px; font-weight: 500; color: var(--color-deep); }
.tick { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 8px 0; font-size: 15px; cursor: pointer; }
.tick input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--color-deep); }
.field .label { margin: 0; }

.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 16px; border-top: 1px solid var(--color-line); }
.activity-row:first-child { border-top: 0; }
.activity-who { min-width: 0; }
.activity-what { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

.profile-card { max-width: 560px; }
.profile-facts { display: grid; gap: 8px; margin: 0 0 20px; }
.profile-facts > div { display: flex; gap: 12px; }
.profile-facts dt { flex: none; width: 72px; font-size: 14px; color: var(--color-steel); }
.profile-facts dd { margin: 0; overflow-wrap: anywhere; }
.sb-id--link { display: block; color: inherit; text-decoration: none; transition: box-shadow 150ms; }
.sb-id--link:hover, .sb-id--link[aria-current="page"] { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45); }
.sb-id__icon { display: none; }
.sidebar--collapsed .sb-id--link { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0; }
.sidebar--collapsed .sb-id--link .sb-id__icon { display: block; }
.sidebar--collapsed .sb-id--link .sb-id__role, .sidebar--collapsed .sb-id--link .sb-id__name { display: none; }

/* ---------------------------------------------------------------- dialog (foundation section 4.8) */

body.dialog-open { overflow: hidden; }
.dialog-overlay { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.45); }
.dialog { width: 440px; max-width: 100%; max-height: 90dvh; overflow: auto; background: var(--color-white); border: 1px solid var(--color-line); border-radius: 8px; box-shadow: var(--shadow-modal); }
.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 20px; border-bottom: 1px solid var(--color-line); }
.dialog__head h2 { font-size: 18px; font-weight: 500; color: var(--color-deep); }
.dialog__body { padding: 20px; }
.dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 8px; }
.dialog .auth-field { margin-bottom: 16px; }
.dialog .auth-field .auth-label-row label { font-size: 14px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--color-deep); }
.dialog .auth-input { padding: 8px 12px; border: 1px solid var(--color-line); }
.dialog .auth-input:focus { border-color: var(--color-blue); }
.dialog .auth-input[aria-invalid="true"] { border-color: var(--color-orange); }
.dialog .field > label, .dialog .field .auth-label-row label { font-size: 14px; font-weight: 500; color: var(--color-deep); }
.icon-btn { display: flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; padding: 0; background: none; border: 0; border-radius: 8px; color: var(--color-deep); cursor: pointer; }
.icon-btn:hover { background: var(--color-mist); }
.icon-btn--bordered { border: 1px solid var(--color-line); }
.temp-box { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--color-mist); border-radius: 8px; }
.temp-password { flex: 1; min-width: 0; padding: 0; background: none; font-size: 20px; font-weight: 500; letter-spacing: 0.06em; color: var(--color-deep); overflow-wrap: anywhere; user-select: all; }
.temp-once { margin: 12px 0 0; font-size: 14px; font-weight: 500; color: var(--color-orange); }

/* ---------------------------------------------------------------- responsive */

@media (min-width: 640px) {
  .role-can { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 768px) {
  .page-title { font-size: 40px; }
  .page-content { padding: 40px 32px 48px; }
  .notif-bar { padding-left: 32px; padding-right: 32px; }
  .card { padding: 24px; }
  .login-page { flex-direction: row; }
  .login-left { width: 45%; min-height: 100dvh; padding: 48px 48px 64px; }
  .login-left__logo { width: 340px; }
  .login-left__text { margin-top: 10%; }
  .login-left__app, .login-left__headline { font-size: 2.1rem; }
  .login-right { padding: 48px 40px; }
  .login-welcome { font-size: 2.4rem; }
}

/* The seven-column table needs about 700 px of content: below 1024 px (sidebar open) the calls stack as cards. */
@media (max-width: 1023px) {
  .call-head { display: none; }
  .call-row { grid-template-columns: 1fr auto; grid-template-areas: "name total" "customer customer" "when when" "class state" "attention attention"; row-gap: 6px; padding: 14px 16px; }
  .call-row .c-name { grid-area: name; }
  .call-row .c-customer { grid-area: customer; }
  .call-row .c-when { grid-area: when; }
  .call-row .c-total { grid-area: total; justify-self: end; font-size: 16px; }
  .call-row .c-class { grid-area: class; }
  .call-row .c-state { grid-area: state; justify-self: end; }
  .call-row .c-attention { grid-area: attention; }
}

@media (max-width: 767px) {
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; transform: translateX(-100%); width: var(--sidebar-w); }
  .sidebar--open { transform: translateX(0); }
  .sidebar--collapsed { width: var(--sidebar-w); }
  .sb-collapse { display: none; }
  .sb-close { display: flex; }
  .drawer-overlay { position: fixed; inset: 0; z-index: 240; background: rgba(0, 0, 0, 0.45); }
  .drawer-overlay--open { display: block; }
  .menu-opener { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background: var(--color-deep); color: var(--color-white); position: fixed; top: 12px; left: 12px; z-index: 300; border: 0; border-radius: 8px; box-shadow: var(--shadow-card); cursor: pointer; }
  .menu-opener .icon { width: 22px; height: 22px; }
  .menu-opener[hidden] { display: none; }

  .edit-label { display: none; }
  .dialog-overlay { align-items: flex-end; }
  .filters .select { flex: 1 1 150px; max-width: none; }
  .pager-size { width: 100%; justify-content: center; margin: 4px 0 0; }
  .toast { padding: 12px 16px; }
}

/* The sign-in page is full-bleed: no sidebar, no opener, no padding. */
.app-shell.no-chrome .sidebar,
.app-shell.no-chrome .menu-opener,
.app-shell.no-chrome .drawer-overlay { display: none; }
.app-shell.no-chrome .page-content { padding: 0; }
