/* =============================================================
   tier2.css — RVSU Staff Portal design-system implementation.

   Loaded LAST in base.html so it overrides legacy .sidenav and
   shell rules from app.css / v3.css. Spec source of truth:
   /design-system/MASTER.md

   Scope (Phase 2 — shell only):
     - Topbar (branded shell: dark canvas + white pill backings)
     - Sidenav (per-item white pills + underlined section labels)
     - Sidenav logo card (bottom-anchored)
     - Hamburger + off-canvas mobile shell
     - Tier 2 spacing/typography tokens (subset)

   NOT in scope (Phase 3 will migrate):
     - Page content primitives (.kpi / .sh / .t / .btn / .field):
       still come from app.css for now
     - Individual page templates (admin_dashboard etc.)
   ============================================================= */

:root {
  /* Tier 2 token subset — matches MASTER.md exactly. The legacy
     vars in tokens.css (--ink, --paper, --sage, etc.) stay live
     for app.css consumers; these new vars are additive. */
  --t2-brand-navy:        #1F4E79;
  --t2-brand-navy-hover:  #1A4268;
  --t2-charcoal:          #1A1A1A;
  --t2-mid-gray:          #5A5A5A;
  --t2-subtle-gray:       rgba(0,0,0,0.22);
  --t2-warm-gray:         #F2F0EC;
  --t2-warm-gray-hover:   #EAE7E1;
  --t2-cream:             #F5F2EC;
  --t2-white:             #FFFFFF;
  --t2-dark-base:         #0A100E;
  --t2-radius-input:      4px;
  --t2-radius-mark:       1px;
  --t2-radius-pill:       99px;
  --t2-h-topbar:          56px;
  --t2-w-sidenav:         240px;
  --t2-font-stack:        "Plus Jakarta Sans", system-ui, -apple-system,
                          BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Phase 3 page-content tokens */
  --t2-h-input:           40px;
  --t2-h-button:          44px;
  --t2-h-button-sm:       36px;
  --t2-h-row:             40px;
  --t2-gap-section:       22px;
  --t2-gap-field:         14px;
  --t2-pad-main:          32px;
  --t2-shadow-elev:       0 12px 40px rgba(0,0,0,0.18), 0 2px 4px rgba(0,0,0,0.08);

  /* Status colors — semantic state spectrum from MASTER.md */
  --t2-status-green-ink:  #1F7A3A;
  --t2-status-green-bg:   #E5F1E8;
  --t2-status-amber-ink:  #8A6B1A;
  --t2-status-amber-bg:   #F4ECD4;
  --t2-status-red-ink:    #A4322F;
  --t2-status-red-bg:     #F4E2E0;
}

/* Self-hosted Plus Jakarta Sans (HIPAA — no Google Fonts CDN per
   CLAUDE.md). Variable font, latin subset only — single 27KB woff2
   covers both weights this app uses (400 body, 500 labels/headings). */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/static/fonts/PlusJakartaSans-VariableFont_wght.woff2') format('woff2-variations'),
       url('/static/fonts/PlusJakartaSans-VariableFont_wght.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Global reset (replaces tokens.css base after legacy CSS pruning) */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* Body shell — ensure flex column for topbar + layout split */
body {
  font-family: var(--t2-font-stack);
  font-size: 14px;
  line-height: 1.5;
  color: var(--t2-charcoal);
  background: var(--t2-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- TOPBAR ---------- */
.topbar {
  position: relative;
  height: var(--t2-h-topbar);
  background: var(--t2-dark-base);
  border-bottom: 1px solid var(--t2-subtle-gray);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  overflow: hidden;
}
.topbar__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}
.topbar > *:not(.topbar__bg) { position: relative; z-index: 1; }

.topbar__left,
.topbar__right {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.topbar__brand,
.topbar__user-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--t2-white);
  padding: 6px 12px;
  border-radius: var(--t2-radius-input);
  color: var(--t2-charcoal);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.topbar__brand:hover { text-decoration: none; }
.topbar__mark {
  display: inline-block;
  width: 4px; height: 16px;
  background: var(--t2-brand-navy);
  border-radius: var(--t2-radius-mark);
}
.topbar__user-pill { padding: 6px 12px; font-size: 13px; font-weight: 400; }
.topbar__user { color: var(--t2-charcoal); font-weight: 500; }
.topbar__role { color: var(--t2-mid-gray); margin-left: 8px; }

.topbar__signout {
  background: var(--t2-white);
  border: 1px solid transparent;
  border-radius: var(--t2-radius-input);
  height: 36px;
  padding: 0 14px;
  color: var(--t2-charcoal);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 150ms ease;
}
.topbar__signout:hover { background: var(--t2-cream); }

.topbar__signout-form { margin: 0; }

/* Hamburger — visible only at narrow widths */
.hamburger {
  display: none;
  background: var(--t2-white);
  border: 1px solid transparent;
  border-radius: var(--t2-radius-input);
  height: 36px; width: 36px;
  color: var(--t2-charcoal);
  align-items: center; justify-content: center;
  padding: 0;
  cursor: pointer;
}
.hamburger svg { display: block; }

/* ---------- LAYOUT ---------- */
.t2-layout {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* ---------- SIDENAV (overrides legacy .sidenav rules) ---------- */
.sidenav {
  position: relative;
  width: var(--t2-w-sidenav);
  background: var(--t2-dark-base);
  border-right: 1px solid var(--t2-subtle-gray);
  padding: 14px 0 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Drop any legacy fixed-positioning the old .sidenav set */
  inset: auto;
}
.sidenav__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}
.sidenav > *:not(.sidenav__bg) { position: relative; z-index: 1; }

.sidenav__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 12px;
  overflow-y: auto;
}
.sidenav__section {
  align-self: flex-start;
  background: var(--t2-white);
  color: var(--t2-mid-gray);
  font-size: 13px; font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--t2-radius-input);
  margin: 12px 0 6px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.sidenav__section:first-child { margin-top: 0; }

.sidenav__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidenav__list li { margin-bottom: 4px; }
.sidenav__list li:last-child { margin-bottom: 0; }

.sidenav__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  padding: 0 12px;
  background: var(--t2-white);
  border-radius: var(--t2-radius-input);
  color: var(--t2-charcoal);
  font-size: 14px;
  font-weight: 400;          /* override any legacy weight */
  border-left: 3px solid transparent;
  text-decoration: none;
  transition: background-color 100ms ease;
}
.sidenav__item:hover {
  background: var(--t2-warm-gray);
  text-decoration: none;
  color: var(--t2-charcoal);
}
.sidenav__item.is-active {
  background: var(--t2-warm-gray);
  color: var(--t2-brand-navy);
  border-left-color: var(--t2-brand-navy);
  font-weight: 500;
}

.sidenav__badge {
  font-size: 12px;
  color: var(--t2-white);
  background: var(--t2-brand-navy);
  padding: 2px 7px;
  border-radius: var(--t2-radius-pill);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  /* Reset any legacy badge inheritance */
  border: 0;
  text-transform: none;
  letter-spacing: 0;
}

.sidenav__logo {
  margin: 12px;
  padding: 14px;
  background: var(--t2-white);
  border-radius: var(--t2-radius-input);
}
.sidenav__logo img {
  width: 100%;
  height: auto;
  display: block;
}

/* Hide the legacy decorative SVG ring + brand block at top of sidenav.
   New shell puts user identity in the topbar pill; sidenav is nav-only. */
.sidenav__brand { display: none; }

/* Sidenav backdrop (mobile slide-in overlay) */
.sidenav-backdrop {
  display: none;
  position: fixed;
  inset: var(--t2-h-topbar) 0 0 0;
  background: rgba(0,0,0,0.4);
  z-index: 99;
}
.sidenav-backdrop.is-open { display: block; }

/* ---------- MAIN ---------- */
.t2-main {
  flex: 1;
  padding: 32px;
  background: var(--t2-white);
  min-width: 0;
}
.t2-main__flash {
  padding: 0 0 12px;
}

/* ---------- MOBILE ---------- */
@media (max-width: 820px) {
  .topbar { padding: 0 12px; gap: 10px; }
  .topbar__user-pill { display: none; }
  /* Hide hamburger + sidenav entirely on mobile — bottom nav takes
     over. The off-canvas slide-in pattern is retired. */
  .hamburger { display: none; }
  .sidenav, .sidenav-backdrop { display: none; }
  .t2-main { padding: 20px 16px 88px; }  /* extra bottom for nav clearance */
}

/* ---------- BOTTOM NAV (mobile shell variant) ----------
   Spec: MASTER.md § Tier 2 mobile shell — bottom nav variant.
   Fixed at viewport bottom on small screens. Each tab is either
   a direct link or a "group" tab that opens a slide-up sheet of
   sub-items. Active tab gets a brand-navy top accent line +
   brand-navy text.
   ============================================================= */
.t2-bottomnav {
  display: none;             /* desktop: hidden */
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  background: var(--t2-white);
  border-top: 1px solid var(--t2-subtle-gray);
  /* Safe-area inset for notched phones (iPhone X+). */
  padding-bottom: env(safe-area-inset-bottom);
}
.t2-bottomnav__row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  height: 56px;
}
.t2-bottom-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px 4px;
  background: transparent;
  border: 0;
  border-top: 2px solid transparent;
  color: var(--t2-mid-gray);
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: color 100ms ease, border-color 100ms ease;
  font-family: inherit;
}
.t2-bottom-tab:hover { color: var(--t2-charcoal); text-decoration: none; }
.t2-bottom-tab.is-active {
  color: var(--t2-brand-navy);
  border-top-color: var(--t2-brand-navy);
}
.t2-bottom-tab__icon {
  display: block;
  width: 22px; height: 22px;
}
.t2-bottom-tab__label {
  font-size: 11px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* ---------- BOTTOM SHEET (sub-menu surface) ---------- */
.t2-sheet-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 110;
}
.t2-sheet-backdrop.is-open { display: block; }
.t2-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 120;
  background: var(--t2-white);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
  transform: translateY(100%);
  transition: transform 200ms ease;
  max-height: 80vh;
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom);
}
.t2-sheet.is-open { transform: translateY(0); }
.t2-sheet__handle {
  display: block;
  width: 40px; height: 4px;
  border-radius: 2px;
  background: var(--t2-subtle-gray);
  margin: 10px auto 6px;
}
.t2-sheet__title {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--t2-mid-gray);
  margin: 0 0 8px;
}
.t2-sheet__list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--t2-subtle-gray);
}
.t2-sheet__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  font-size: 14px;
  color: var(--t2-charcoal);
  text-decoration: none;
  border-bottom: 1px solid var(--t2-subtle-gray);
  background: var(--t2-white);
  min-height: 52px;
}
.t2-sheet__item:hover {
  background: var(--t2-warm-gray);
  text-decoration: none;
}
.t2-sheet__item:active { background: var(--t2-warm-gray-hover); }
.t2-sheet__item.is-active {
  color: var(--t2-brand-navy);
  font-weight: 500;
  background: var(--t2-warm-gray);
}
.t2-sheet__item-badge {
  margin-left: auto;
  font-size: 12px;
  background: var(--t2-brand-navy);
  color: var(--t2-white);
  border-radius: var(--t2-radius-pill);
  padding: 2px 7px;
  font-variant-numeric: tabular-nums;
}

/* Show bottom nav only on mobile widths. */
@media (max-width: 820px) {
  .t2-bottomnav { display: block; }
  /* PWA install banner sits above the bottom nav so it doesn't get
     hidden behind it. The banner's inline style positions it via
     bottom: 12px; bump it past the 56px nav + safe-area. */
  #installBanner { bottom: calc(76px + env(safe-area-inset-bottom)) !important; }
}

/* ---------- ACCESSIBILITY ---------- */
:is(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--t2-brand-navy);
  outline-offset: 2px;
}
.t2-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;
}
@media (prefers-reduced-motion: reduce) {
  .sidenav, .topbar__signout, .sidenav__item, .hamburger { transition: none !important; }
}

/* =============================================================
   PHASE 3 — page content primitives.

   All rules scoped under .t2 so they ONLY apply inside templates
   that opt in (typically via {% block content %} containing
   <div class="t2">...). Unmigrated templates get zero impact;
   they continue to use app.css/v3.css/main.css definitions.
   ============================================================= */

.t2 {
  color: var(--t2-charcoal);
  font-size: 14px;
  line-height: 1.5;
}
.t2 a { color: var(--t2-brand-navy); text-decoration: none; }
.t2 a:hover { text-decoration: underline; }
.t2 button { font: inherit; cursor: pointer; }
.t2 *, .t2 *::before, .t2 *::after { box-sizing: border-box; }

/* ---------- PAGE HEADER ---------- */
.t2 .page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: var(--t2-gap-section);
  flex-wrap: wrap;
}
.t2 .page-header__eyebrow { font-size: 12px; color: var(--t2-mid-gray); margin-bottom: 4px; }
.t2 .page-header__title {
  font-size: 22px; line-height: 1.25; letter-spacing: -0.015em;
  font-weight: 500; margin: 0 0 4px; color: var(--t2-charcoal);
}
.t2 .page-header__meta { font-size: 13px; color: var(--t2-mid-gray); }
.t2 .page-header__meta .sep { margin: 0 6px; color: var(--t2-subtle-gray); }
.t2 .page-header__actions { display: inline-flex; gap: 10px; flex-wrap: wrap; }

/* ---------- BUTTONS (.t2 scoped to avoid colliding with legacy .btn) ---------- */
.t2 .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--t2-h-button);
  padding: 0 16px;
  font-size: 14px; font-weight: 500;
  border-radius: var(--t2-radius-input);
  border: 1px solid transparent;
  background: transparent;
  color: var(--t2-charcoal);
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease;
  font-family: inherit;
}
.t2 a.btn:hover { text-decoration: none; }
.t2 .btn--primary { background: var(--t2-brand-navy); color: var(--t2-white); }
.t2 .btn--primary:hover { background: var(--t2-brand-navy-hover); }
.t2 .btn--secondary { background: var(--t2-warm-gray); color: var(--t2-charcoal); }
.t2 .btn--secondary:hover { background: var(--t2-warm-gray-hover); }
.t2 .btn--danger { background: var(--t2-status-red-ink); color: var(--t2-white); }
.t2 .btn--danger:hover { background: #8C2A28; }
.t2 .btn--sm { height: var(--t2-h-button-sm); padding: 0 12px; font-size: 13px; }
.t2 .btn--block { width: 100%; }
.t2 .btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- SECTION HEADER ---------- */
.t2 .sh {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-top: var(--t2-gap-section); margin-bottom: 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--t2-subtle-gray);
}
.t2 .sh__title {
  font-size: 16px; line-height: 1.3; font-weight: 500;
  margin: 0; color: var(--t2-charcoal);
}
.t2 .sh__meta { font-size: 13px; color: var(--t2-mid-gray); }
.t2 a.sh__meta:hover { text-decoration: underline; }

/* ---------- STATUS PILLS ---------- */
.t2 .pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  font-size: 11px; font-weight: 500;
  border-radius: var(--t2-radius-pill);
  background: var(--t2-cream);
  color: var(--t2-brand-navy);
  white-space: nowrap;
  letter-spacing: 0;
  text-transform: none;
}
.t2 .pill--green { background: var(--t2-status-green-bg); color: var(--t2-status-green-ink); }
.t2 .pill--amber { background: var(--t2-status-amber-bg); color: var(--t2-status-amber-ink); }
.t2 .pill--red   { background: var(--t2-status-red-bg);   color: var(--t2-status-red-ink); }

/* ---------- KPI TILES ---------- */
.t2 .kpi-row { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.t2 .kpi-row--4 { grid-template-columns: repeat(4, 1fr); }
.t2 .kpi-row--5 { grid-template-columns: repeat(5, 1fr); }
.t2 .kpi-row--6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1100px) {
  .t2 .kpi-row--5, .t2 .kpi-row--6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .t2 .kpi-row, .t2 .kpi-row--4, .t2 .kpi-row--5, .t2 .kpi-row--6 { grid-template-columns: repeat(2, 1fr); }
}
.t2 .kpi {
  background: var(--t2-white);
  border: 1px solid var(--t2-subtle-gray);
  border-radius: var(--t2-radius-input);
  padding: 16px;
  color: var(--t2-charcoal);
  transition: background-color 100ms ease, border-color 100ms ease;
}
.t2 a.kpi:hover {
  background: var(--t2-warm-gray);
  border-color: var(--t2-mid-gray);
  text-decoration: none;
}
.t2 .kpi__label { font-size: 12px; color: var(--t2-mid-gray); margin-bottom: 6px; }
.t2 .kpi__value-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.t2 .kpi__value {
  font-size: 22px; font-weight: 500; color: var(--t2-charcoal);
  line-height: 1.1; font-variant-numeric: tabular-nums;
}
.t2 .kpi__sub { font-size: 12px; color: var(--t2-mid-gray); margin-top: 4px; }
.t2 .kpi__bar {
  margin-top: 10px; height: 3px;
  background: var(--t2-subtle-gray);
  position: relative; border-radius: 99px; overflow: hidden;
}
.t2 .kpi__bar-fill {
  position: absolute; inset: 0 auto 0 0;
  background: var(--t2-brand-navy);
}
.t2 .kpi__bar-fill--green { background: var(--t2-status-green-ink); }

/* ---------- TABLE ---------- */
.t2 .table-wrap { overflow-x: auto; }
.t2 .t {
  width: 100%; border-collapse: collapse; font-size: 13px;
  background: var(--t2-white);
}
.t2 .t th, .t2 .t td {
  text-align: left; padding: 0 12px; height: var(--t2-h-row);
  border-bottom: 1px solid var(--t2-subtle-gray);
}
.t2 .t thead th {
  font-size: 13px; font-weight: 500; color: var(--t2-charcoal);
  background: var(--t2-white);
  text-transform: none; letter-spacing: 0;
}
.t2 .t tbody tr:hover { background: var(--t2-warm-gray); }
.t2 .t .num { text-align: right; font-variant-numeric: tabular-nums; }

/* In-table clinic dot label */
.t2 .clinic { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--t2-charcoal); }
.t2 .clinic__dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: var(--t2-brand-navy); flex-shrink: 0;
}
.t2 .clinic__dot--purple { background: #6B4E8A; }
.t2 .clinic__dot--green  { background: #2F7A4A; }
.t2 .clinic__dot--amber  { background: #B58A1F; }
.t2 .clinic__dot--rural  { background: #6B6B6B; }

/* ---------- FORMS ---------- */
.t2 .field { display: flex; flex-direction: column; gap: 6px; min-width: 140px; margin-bottom: var(--t2-gap-field); }
.t2 .field--inline { margin-bottom: 0; }
.t2 .field__label { font-size: 13px; font-weight: 500; color: var(--t2-charcoal); }
.t2 .field__input,
.t2 .field__select,
.t2 .field__textarea {
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  color: var(--t2-charcoal);
  background: var(--t2-white);
  border: 1px solid var(--t2-subtle-gray);
  border-radius: var(--t2-radius-input);
  transition: border-color 150ms ease;
  font-family: inherit;
}
.t2 .field__input,
.t2 .field__select { height: var(--t2-h-input); }
.t2 .field__textarea { padding: 8px 10px; font-size: 13px; resize: vertical; }
.t2 .field__input:hover,
.t2 .field__select:hover,
.t2 .field__textarea:hover { border-color: var(--t2-mid-gray); }
.t2 .field__input:focus,
.t2 .field__select:focus,
.t2 .field__textarea:focus { border-color: var(--t2-brand-navy); }
.t2 .field__select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%235A5A5A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}
.t2 .inline-form { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }

/* ---------- ROW LIST (PTO, calendar, generic stacked rows) ---------- */
.t2 .row-list { list-style: none; padding: 0; margin: 0; }
.t2 .row-list > li {
  display: grid; grid-template-columns: 90px 1fr auto;
  gap: 16px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--t2-subtle-gray);
}
.t2 .row-list > li:last-child { border-bottom: 0; }
.t2 .row-list__when { font-size: 13px; color: var(--t2-mid-gray); font-variant-numeric: tabular-nums; }
.t2 .row-list__title { font-size: 14px; font-weight: 500; color: var(--t2-charcoal); margin: 0 0 2px; }
.t2 .row-list__sub { font-size: 13px; color: var(--t2-mid-gray); margin: 0; }

/* ---------- ANNOUNCEMENT LIST (3-col: pill, body, date) ---------- */
.t2 .ann-list { list-style: none; padding: 0; margin: 0; }
.t2 .ann-list__item {
  display: grid; grid-template-columns: 80px 1fr auto;
  column-gap: 16px; align-items: start;
  padding: 14px 0; border-bottom: 1px solid var(--t2-subtle-gray);
}
.t2 .ann-list__item:last-child { border-bottom: 0; }
.t2 .ann-list__title { font-size: 14px; font-weight: 500; color: var(--t2-charcoal); margin: 0 0 2px; }
.t2 .ann-list__msg { font-size: 13px; color: var(--t2-mid-gray); margin: 0; }
.t2 .ann-list__date { font-size: 12px; color: var(--t2-mid-gray); font-variant-numeric: tabular-nums; }

/* ---------- APPROVAL ROW (pending PTO/swap admin actions) ---------- */
.t2 .approval-list { list-style: none; padding: 0; margin: 0; }
.t2 .approval-row {
  display: grid; grid-template-columns: 80px 1fr auto;
  gap: 16px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--t2-subtle-gray);
}
.t2 .approval-row:last-child { border-bottom: 0; }
.t2 .approval-row__ma {
  font-size: 13px; font-weight: 500; color: var(--t2-charcoal);
  font-variant-numeric: tabular-nums;
}
.t2 .approval-row__title { font-size: 14px; font-weight: 500; color: var(--t2-charcoal); margin: 0 0 2px; }
.t2 .approval-row__sub { font-size: 13px; color: var(--t2-mid-gray); margin: 0; }
.t2 .approval-row__actions { display: inline-flex; gap: 8px; }

/* ---------- PUNCH STRIP (MA/billing/reception dashboards) ---------- */
.t2 .punch-strip {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 16px;
  background: var(--t2-white); border: 1px solid var(--t2-subtle-gray);
  border-radius: var(--t2-radius-input); flex-wrap: wrap;
}
.t2 .punch-strip__time-block { display: inline-flex; align-items: baseline; gap: 12px; }
.t2 .punch-strip__time { font-size: 22px; font-weight: 500; color: var(--t2-charcoal); line-height: 1; font-variant-numeric: tabular-nums; }
.t2 .punch-strip__date { font-size: 12px; color: var(--t2-mid-gray); }
.t2 .punch-strip__center { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.t2 .punch-strip__since { font-size: 13px; color: var(--t2-mid-gray); }
.t2 .punch-strip__action { display: inline-flex; align-items: center; gap: 12px; }
.t2 .punch-strip__feedback { font-size: 12px; color: var(--t2-mid-gray); }

/* ---------- WEEK STRIP (billing/reception 7-day fixed schedule) ---------- */
.t2 .week-strip {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border: 1px solid var(--t2-subtle-gray); border-radius: var(--t2-radius-input);
  overflow: hidden;
}
.t2 .week-strip__day { padding: 12px 8px; text-align: center; border-right: 1px solid var(--t2-subtle-gray); }
.t2 .week-strip__day:last-child { border-right: 0; }
.t2 .week-strip__day--today { background: var(--t2-cream); }
.t2 .week-strip__dow { font-size: 11px; color: var(--t2-mid-gray); font-weight: 500; }
.t2 .week-strip__date { font-size: 12px; color: var(--t2-charcoal); margin-top: 2px; font-variant-numeric: tabular-nums; }
.t2 .week-strip__shift { margin-top: 8px; font-size: 13px; color: var(--t2-charcoal); font-variant-numeric: tabular-nums; }
.t2 .week-strip__shift--end { font-size: 11px; color: var(--t2-mid-gray); }
.t2 .week-strip__off { margin-top: 8px; font-size: 12px; color: var(--t2-mid-gray); }

/* ---------- CALL PANEL (on-call queue) ---------- */
.t2 .call-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.t2 .call {
  background: var(--t2-white); border: 1px solid var(--t2-subtle-gray);
  border-radius: var(--t2-radius-input); padding: 14px 16px;
}
.t2 .call--flagged { border-left: 3px solid var(--t2-status-red-ink); }
.t2 .call__head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.t2 .call__caller { font-size: 14px; font-weight: 500; color: var(--t2-charcoal); }
.t2 .call__time { font-size: 12px; color: var(--t2-mid-gray); margin-left: auto; font-variant-numeric: tabular-nums; }
.t2 .call__summary { font-size: 13px; color: var(--t2-mid-gray); margin: 4px 0 8px; line-height: 1.5; }
.t2 .call__transcript {
  background: var(--t2-cream); padding: 10px 12px;
  border-radius: var(--t2-radius-input);
  font-size: 13px; color: var(--t2-charcoal); line-height: 1.5;
  margin: 6px 0;
}
.t2 .call__note {
  background: var(--t2-status-amber-bg); padding: 8px 12px;
  border-left: 3px solid var(--t2-status-amber-ink);
  font-size: 13px; color: var(--t2-charcoal);
  border-radius: 0 var(--t2-radius-input) var(--t2-radius-input) 0;
  margin: 6px 0;
}
.t2 .call__resolved { font-size: 12px; color: var(--t2-mid-gray); margin-top: 6px; }
.t2 .call__actions { display: flex; gap: 8px; margin-top: 10px; }
.t2 .call__activity {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--t2-subtle-gray);
}
.t2 .call__activity summary {
  cursor: pointer; font-size: 13px; color: var(--t2-brand-navy); font-weight: 500;
  list-style: none;
}
.t2 .call__activity summary::-webkit-details-marker { display: none; }
.t2 .call__activity summary::before { content: "▸ "; color: var(--t2-mid-gray); }
.t2 .call__activity[open] summary::before { content: "▾ "; }

/* ---------- NOTICE / ALERT PANEL ---------- */
.t2 .notice {
  margin-top: 12px; padding: 12px;
  border: 1px solid var(--t2-status-amber-ink);
  background: var(--t2-status-amber-bg);
  border-radius: var(--t2-radius-input);
}
.t2 .notice__title { font-size: 12px; font-weight: 500; color: var(--t2-status-amber-ink); margin-bottom: 6px; }
.t2 .notice__body { font-size: 13px; color: var(--t2-charcoal); margin: 0 0 8px; line-height: 1.4; }

/* ---------- JUMP-TO GRID ---------- */
.t2 .jumpto {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0; margin: 0; padding: 0; list-style: none;
}
.t2 .jumpto > li {
  display: grid; grid-template-columns: 1fr auto;
  align-items: center; padding: 12px 0;
  border-bottom: 1px solid var(--t2-subtle-gray);
}
.t2 .jumpto__title { font-size: 14px; font-weight: 500; color: var(--t2-charcoal); margin: 0; }
.t2 .jumpto__title a { color: inherit; }
.t2 .jumpto__sub { font-size: 12px; color: var(--t2-mid-gray); }
.t2 .jumpto__arrow { color: var(--t2-mid-gray); }

/* ---------- EMPTY STATE ---------- */
.t2 .empty { color: var(--t2-mid-gray); font-size: 13px; padding: 14px 0; }
.t2 .empty--centered { text-align: center; padding: 18px 12px; }

/* ---------- FORGOT / CHECKBOX (form sub-bits) ---------- */
.t2 .checkbox {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--t2-mid-gray); cursor: pointer;
  padding: 8px 4px; margin: -8px -4px;
}
.t2 .checkbox input { accent-color: var(--t2-brand-navy); }

/* ---------- T2 main wrap padding (for migrated pages) ---------- */
.t2 {
  padding: 0;  /* main already has padding */
}
.t2 + .t2,
.t2 > section + section { margin-top: var(--t2-gap-section); }

/* ---------- TABS (in-page section switcher) ---------- */
.t2 .ah-tabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--t2-subtle-gray);
}
.t2 .ah-tab {
  height: 36px; padding: 0 14px;
  background: transparent; border: 0;
  font: inherit; font-size: 13px; font-weight: 500;
  color: var(--t2-mid-gray);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
  text-decoration: none;
  display: inline-flex; align-items: center;
  transition: color 100ms ease, border-color 100ms ease;
}
.t2 .ah-tab:hover { color: var(--t2-charcoal); text-decoration: none; }
.t2 .ah-tab.is-active {
  color: var(--t2-brand-navy);
  border-bottom-color: var(--t2-brand-navy);
}

/* ---------- DATE-CHIP PICKER (PTO date selection) ---------- */
.t2 .date-picker {
  display: flex; flex-wrap: wrap; gap: 6px;
  max-height: 260px; overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--t2-subtle-gray);
  border-radius: var(--t2-radius-input);
  background: var(--t2-white);
}
.t2 .date-chip { cursor: pointer; user-select: none; position: relative; }
.t2 .date-chip input {
  position: absolute; opacity: 0; pointer-events: none;
  width: 1px; height: 1px; margin: 0;
}
.t2 .date-chip > span {
  display: inline-block;
  padding: 6px 10px;
  border-radius: var(--t2-radius-input);
  font-size: 13px; font-weight: 500;
  background: var(--t2-warm-gray);
  color: var(--t2-mid-gray);
  font-variant-numeric: tabular-nums;
  transition: background-color 100ms ease, color 100ms ease;
}
.t2 .date-chip:hover > span { background: var(--t2-warm-gray-hover); }
.t2 .date-chip input:checked + span {
  background: var(--t2-brand-navy);
  color: var(--t2-white);
}
.t2 .date-chip input:focus-visible + span {
  outline: 2px solid var(--t2-brand-navy);
  outline-offset: 2px;
}
.t2 .field__hint {
  font-size: 12px; color: var(--t2-mid-gray);
  margin: 0 0 8px; line-height: 1.4;
}

/* Phase 3 mobile tweaks for migrated pages */
@media (max-width: 820px) {
  .t2 .page-header__actions { width: 100%; }
  .t2 .page-header__actions .btn { flex: 1; }
}
