/* Analyzen Heroism Portal — Design Token CSS */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Roboto+Condensed:ital,wght@0,300..700;1,300..700&display=swap');

/* ── Design Tokens ── */
:root {
  /* Brand colours */
  --navy:       #231F20;
  --blue-core:  #2E5898;
  --blue-mid:   #497CBB;
  --blue-light: #7DBDE3;
  --blue-tint:  #D6EEFA;

  /* Semantic colours */
  --green:    #1B8A4C;
  --amber:    #F08C00;
  --scarlet:  #E03E52;

  /* Neutral */
  --grey-100: #F2F2F2;
  --grey-200: #C9C9C9;
  --grey-400: #9E9E9E;
  --white:    #FFFFFF;

  /* Layout */
  --sidebar-width:    268px;
  --header-height:    60px;
  --content-max-w:    920px;

  /* Radius */
  --radius-none:  0px;
  --radius-card:  4px;
  --radius-pill:  999px;

  /* Typography */
  --font-ui:      'Roboto Condensed', Arial, sans-serif;
  --font-display: 'Bangers', cursive;

  /* Shadows */
  --shadow-card: 0 1px 3px rgba(0,0,0,0.10), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-modal: 0 4px 24px rgba(0,0,0,0.18);
}

/* ── Alpine.js ── */
[x-cloak] { display: none !important; }

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: var(--font-ui);
  font-size: 15px;
  background: var(--grey-100);
  color: var(--navy);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-ui); font-weight: 700; line-height: 1.2; }

.display-title {
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: 0.02em;
  color: var(--navy);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-none);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--blue-core);
  color: var(--white);
  border-color: var(--blue-core);
}
.btn-primary:hover { background: var(--blue-mid); border-color: var(--blue-mid); }

.btn-secondary {
  background: var(--white);
  color: var(--blue-core);
  border-color: var(--blue-core);
}
.btn-secondary:hover { background: var(--blue-tint); }

.btn-danger {
  background: var(--scarlet);
  color: var(--white);
  border-color: var(--scarlet);
}
.btn-danger:hover { background: #c42f42; border-color: #c42f42; }

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--grey-100); }

.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-lg { padding: 11px 24px; font-size: 16px; }

.btn-icon { background: transparent; border: none; color: var(--grey-400); padding: 4px; cursor: pointer; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.btn-icon:hover { background: var(--grey-100); color: var(--navy); }
.btn-icon.btn-icon-danger:hover { color: var(--scarlet); }

/* ── Form controls ── */
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 8px 12px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--navy);
  background: var(--white);
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius-none);
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--blue-core);
}
.form-input.is-error, .form-select.is-error, .form-textarea.is-error {
  border-color: var(--scarlet);
}
.form-textarea { resize: vertical; min-height: 80px; }

.form-error { font-size: 12px; color: var(--scarlet); margin-top: 3px; }
.form-hint  { font-size: 12px; color: var(--grey-400); margin-top: 3px; }

.form-group { margin-bottom: 16px; }

/* ── Cards ── */
.card {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--grey-200);
}
.card-title { font-size: 16px; font-weight: 700; }

/* ── Badges / Pills ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-pill);
}
.badge-blue    { background: var(--blue-tint); color: var(--blue-core); }
.badge-green   { background: #D1FAE5; color: var(--green); }
.badge-amber   { background: #FEF3C7; color: var(--amber); }
.badge-scarlet { background: #FEE2E2; color: var(--scarlet); }
.badge-grey    { background: var(--grey-200); color: var(--navy); }
.badge-navy    { background: var(--navy); color: var(--white); }

/* ── Tables ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--grey-400);
  padding: 10px 12px;
  border-bottom: 1.5px solid var(--grey-200);
  background: var(--grey-100);
}
.data-table td {
  padding: 12px;
  font-size: 14px;
  border-bottom: 1px solid var(--grey-200);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #FAFAFA; }

/* ── Admin Layout ── */
.ahz-admin {
  display: flex;
  min-height: 100vh;
}

.ahz-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand-name {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--white);
  letter-spacing: 0.03em;
  line-height: 1;
}
.sidebar-brand-sub {
  font-size: 11px;
  color: var(--blue-light);
  margin-top: 2px;
  font-weight: 400;
}

.sidebar-section-label {
  padding: 16px 20px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.70);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.sidebar-nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: var(--white);
}
.sidebar-nav-item.active {
  background: rgba(214,238,250,0.10);
  color: var(--white);
  border-left-color: var(--blue-light);
}
.sidebar-nav-item .ph { font-size: 18px; flex-shrink: 0; }

.sidebar-footer {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
  color: rgba(255,255,255,0.50);
}

.ahz-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ahz-topbar {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: var(--white);
  border-bottom: 1px solid var(--grey-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 50;
}

.topbar-title { font-size: 18px; font-weight: 700; color: var(--navy); }

.ahz-content {
  flex: 1;
  padding: 28px;
}

/* ── Employee Layout ── */
.ahz-employee { display: flex; flex-direction: column; min-height: 100vh; }

.ahz-employee-nav {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 100;
}

.emp-nav-brand {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--white);
  letter-spacing: 0.03em;
  text-decoration: none;
}

.emp-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.emp-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.70);
  text-decoration: none;
  border-radius: var(--radius-none);
  transition: background 0.12s, color 0.12s;
}
.emp-nav-link:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.emp-nav-link.active { background: rgba(214,238,250,0.15); color: var(--white); }

.ahz-employee-content {
  flex: 1;
  padding: 28px;
  width: 100%;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* ── Alerts ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-card);
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.alert-error   { background: #FEE2E2; color: #991B1B; border-left: 3px solid var(--scarlet); }
.alert-success { background: #D1FAE5; color: #065F46; border-left: 3px solid var(--green); }
.alert-warning { background: #FEF3C7; color: #92400E; border-left: 3px solid var(--amber); }
.alert-info    { background: var(--blue-tint); color: var(--blue-core); border-left: 3px solid var(--blue-core); }

/* ── Divider ── */
.divider { height: 1px; background: var(--grey-200); margin: 20px 0; }

/* ── Utility ── */
.text-muted  { color: var(--grey-400); }
.text-error  { color: var(--scarlet); }
.text-success { color: var(--green); }
.text-warning { color: var(--amber); }
.text-primary { color: var(--blue-core); }
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.d-flex { display: flex; } .align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.w-full { width: 100%; }

/* ── Page Header ── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.page-header-left { flex: 1; }
.page-header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.page-title { font-size: 24px; font-weight: 700; color: var(--navy); line-height: 1.2; }
.page-subtitle { font-size: 13px; color: var(--grey-400); margin-top: 2px; }

/* ── Filter Bar ── */
.filter-bar {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-card);
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.filter-bar .form-input,
.filter-bar .form-select {
  width: auto;
  min-width: 140px;
  flex: 1 1 140px;
  max-width: 240px;
  font-size: 13px;
  padding: 6px 10px;
}
.filter-bar .search-input { flex: 2 1 200px; max-width: 320px; }
.filter-bar-separator { width: 1px; height: 24px; background: var(--grey-200); }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-modal);
  width: 100%; max-width: 480px;
  display: flex; flex-direction: column;
  max-height: 90vh;
}
.modal-lg { max-width: 640px; }
.modal-header {
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--grey-200);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--grey-400); font-size: 20px; line-height: 1;
  padding: 2px; display: flex; align-items: center;
}
.modal-close:hover { color: var(--navy); }
.modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 14px 24px 18px;
  border-top: 1px solid var(--grey-200);
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--grey-400);
}
.empty-icon { font-size: 48px; color: var(--grey-200); margin-bottom: 12px; display: block; }
.empty-title { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.empty-desc { font-size: 13px; }

/* ── Form Grid ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 20px; }
.col-span-2 { grid-column: span 2; }

/* ── Toggle Switch ── */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle-input { display: none; }
.toggle-label {
  width: 40px; height: 22px;
  background: var(--grey-200);
  border-radius: 999px;
  position: relative; cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}
.toggle-label::after {
  content: '';
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: var(--white);
  border-radius: 50%;
  transition: left 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-input:checked + .toggle-label { background: var(--green); }
.toggle-input:checked + .toggle-label::after { left: 21px; }
.toggle-text { font-size: 14px; font-weight: 500; }

/* ── Current Status Pill ── */
.cur-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  font-size: 12px; font-weight: 600;
  border-radius: var(--radius-pill);
}
.cur-status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.cur-status-active  { background: #D1FAE5; color: var(--green); }
.cur-status-active .cur-status-dot  { background: var(--green); }
.cur-status-inactive { background: var(--grey-200); color: var(--grey-400); }
.cur-status-inactive .cur-status-dot { background: var(--grey-400); }
.cur-status-archived { background: #FEF3C7; color: var(--amber); }
.cur-status-archived .cur-status-dot { background: var(--amber); }

/* ── Tags ── */
.tag-group { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  font-size: 12px; font-weight: 500;
  background: var(--blue-tint);
  color: var(--blue-core);
  border-radius: var(--radius-pill);
}
.tag-grey { background: var(--grey-200); color: var(--navy); }
.tag-amber { background: #FEF3C7; color: var(--amber); }

/* ── Issue Item ── */
.issue-item {
  padding: 14px 16px;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-card);
  background: var(--white);
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 8px;
}
.issue-item.resolved { opacity: 0.55; }
.issue-icon { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.issue-icon-orphan  { color: var(--scarlet); }
.issue-icon-peer    { color: var(--amber); }
.issue-icon-default { color: var(--grey-400); }
.issue-body { flex: 1; min-width: 0; }
.issue-type { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--grey-400); }
.issue-title { font-size: 14px; font-weight: 600; color: var(--navy); margin: 1px 0 2px; }
.issue-meta { font-size: 12px; color: var(--grey-400); }
.issue-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ── Org Graph ── */
.org-graph-wrap {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-card);
  overflow: auto;
  position: relative;
}
.org-graph-canvas { display: block; min-width: 100%; }
.org-node { cursor: pointer; }
.org-node-rect { fill: var(--blue-tint); stroke: var(--blue-core); stroke-width: 1.5; rx: 4; }
.org-node-rect-orphan { fill: #FEE2E2; stroke: var(--scarlet); }
.org-node-name { font-family: var(--font-ui); font-size: 13px; font-weight: 600; fill: var(--navy); }
.org-node-char { font-family: var(--font-ui); font-size: 11px; fill: var(--grey-400); }
.org-edge { fill: none; stroke: var(--grey-200); stroke-width: 1.5; }
.org-node-orphan-label { font-family: var(--font-ui); font-size: 10px; fill: var(--scarlet); font-weight: 700; }

/* ── Breadcrumb ── */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 16px; flex-wrap: wrap; }
.breadcrumb a { color: var(--blue-core); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--grey-400); }
.breadcrumb-current { color: var(--grey-400); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }

/* ── Table row clickable ── */
.data-table tr.clickable { cursor: pointer; }
.data-table tr.clickable:hover td { background: var(--blue-tint); }

/* ── Section label (within card) ── */
.section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--grey-400);
  margin-bottom: 12px; margin-top: 4px;
}

/* ── Multi-select list ── */
.multi-check-list {
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius-none);
  max-height: 180px; overflow-y: auto;
  background: var(--white);
}
.multi-check-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  font-size: 14px; cursor: pointer;
  border-bottom: 1px solid var(--grey-200);
  transition: background 0.1s;
}
.multi-check-item:last-child { border-bottom: none; }
.multi-check-item:hover { background: var(--grey-100); }
.multi-check-item input[type=checkbox] { accent-color: var(--blue-core); width: 14px; height: 14px; cursor: pointer; }

/* ── Phase 4: Severity badges ── */
.badge-severity-high   { background: #FEE2E2; color: var(--scarlet); }
.badge-severity-medium { background: #FEF3C7; color: var(--amber); }
.badge-severity-low    { background: var(--grey-200); color: #555; }
.badge-red    { background: #FEE2E2; color: var(--scarlet); }
.badge-orange { background: #FEF3C7; color: var(--amber); }

/* ── Phase 4: Table wrap (flush card tables) ── */
.table-wrap { overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap table th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--grey-400);
  padding: 10px 16px;
  border-bottom: 1.5px solid var(--grey-200);
  background: var(--grey-100);
  white-space: nowrap;
}
.table-wrap table td {
  padding: 11px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--grey-200);
  vertical-align: middle;
}
.table-wrap table tr:last-child td { border-bottom: none; }
.table-wrap table tr:hover td { background: #FAFAFA; }
.table-wrap table tr.row-removed td { opacity: 0.5; }

.td-name    { font-weight: 600; color: var(--navy); }
.td-meta    { font-size: 12px; color: var(--grey-400); }
.td-actions { text-align: right; white-space: nowrap; }

/* ── Phase 4: Card body flush (edge-to-edge content inside card) ── */
.card-body-flush { margin: -24px; overflow: hidden; border-radius: 0 0 var(--radius-card) var(--radius-card); }
.card-body-flush:first-child { border-radius: var(--radius-card); }

/* ── Phase 4: Margin utilities ── */
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

/* ── Phase 4: Search bar ── */
.search-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1.5px solid var(--grey-200);
  padding: 6px 12px;
}
.search-bar:focus-within { border-color: var(--blue-core); }
.search-bar svg { color: var(--grey-400); flex-shrink: 0; }
.search-bar input {
  border: none;
  outline: none;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--navy);
  background: transparent;
  width: 200px;
}

/* ── Phase 4: Page actions ── */
.page-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ── Phase 4: Searchable dropdown (Alpine.js) ── */
.searchable-dropdown { position: relative; }
.searchable-dropdown-list {
  position: absolute;
  z-index: 20;
  width: 100%;
  background: var(--white);
  border: 1.5px solid var(--blue-core);
  border-top: none;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
}
.searchable-dropdown-item {
  padding: 9px 12px;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--grey-200);
}
.searchable-dropdown-item:last-child { border-bottom: none; }
.searchable-dropdown-item:hover { background: var(--blue-tint); color: var(--blue-core); }

/* ── Phase 4: Activity log rows ── */
.log-row {
  display: grid;
  grid-template-columns: 130px 1fr 150px 1fr 150px;
  gap: 0 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--grey-200);
  align-items: start;
}
.log-row:last-child { border-bottom: none; }
.log-header {
  background: var(--grey-100);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey-400);
  padding: 8px 20px;
  border-bottom: 1.5px solid var(--grey-200);
}
.log-timestamp { font-size: 12px; color: var(--grey-400); line-height: 1.5; }
.log-actor     { font-size: 14px; font-weight: 600; color: var(--navy); }
.log-action    { font-size: 14px; font-weight: 500; color: var(--navy); line-height: 1.4; }
.log-detail    { font-size: 12px; color: var(--grey-400); margin-top: 3px; line-height: 1.5; }
.log-impact    {}

/* ── Phase 4: req asterisk ── */
.req { color: var(--scarlet); margin-left: 2px; }

/* ── Phase 5: Stat cards ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  padding: 20px 20px 16px;
  border-radius: var(--radius-card);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--blue-core);
}
.stat-card.green::before { background: var(--green); }
.stat-card.orange::before { background: var(--amber); }
.stat-card.red::before { background: var(--scarlet); }
.stat-label {
  font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--grey-400);
  margin-bottom: 8px;
}
.stat-value {
  font-size: 36px; font-weight: 800; color: var(--navy); line-height: 1;
}
.stat-meta { font-size: 12px; color: var(--grey-400); margin-top: 4px; }

/* ── Phase 5: Timeline bar (mini, equal-width segments) ── */
.timeline-bar {
  display: flex;
  border: 1px solid var(--grey-200);
  overflow: hidden;
}
.tl-seg {
  flex: 1;
  padding: 8px 6px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.15);
  background: var(--grey-100);
  color: var(--grey-400);
}
.tl-seg:last-child { border-right: none; }
.tl-seg.upcoming { background: var(--white); color: var(--grey-400); border-right: 1px solid var(--grey-200); }
.tl-seg.active   { background: var(--blue-core); color: var(--white); }
.tl-seg.complete { background: var(--navy); color: rgba(255,255,255,0.75); }
.tl-seg .tl-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.tl-seg .tl-date  { font-size: 9px; font-weight: 400; margin-top: 2px; opacity: .7; }
.tl-seg .tl-dur   { font-size: 9px; font-weight: 600; margin-top: 2px; opacity: .8; }

/* ── Phase 5: 2-column grid ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ── Phase 5: Activity feed items ── */
.activity-item {
  display: flex; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--grey-200);
  font-size: 13px;
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 5px; flex-shrink: 0;
}

/* ── Phase 5: Issue rows (dashboard quick panel) ── */
.issue-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--grey-200);
  cursor: pointer;
  transition: background 120ms;
}
.issue-row:hover { background: var(--blue-tint); }
.issue-row:last-child { border-bottom: none; }
.issue-row .issue-icon {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.issue-row .issue-icon.red    { background: rgba(224,62,82,0.08); color: var(--scarlet); }
.issue-row .issue-icon.orange { background: rgba(240,140,0,0.10); color: var(--amber); }
.issue-row .issue-meta  { flex: 1; min-width: 0; }
.issue-row .issue-type  { font-size: 13px; font-weight: 600; color: var(--navy); }
.issue-row .issue-entity { font-size: 12px; color: var(--grey-400); }

/* ── Phase 5: Demerit strip pill ── */
.demerit-strip {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 600;
  padding: 3px 10px;
  background: rgba(224,62,82,0.08); color: var(--scarlet);
  border-radius: var(--radius-pill);
}
.demerit-strip.zero { background: var(--grey-100); color: var(--grey-400); }

/* ── Phase 5: Current status pill (Status Monitor) ── */
.cs-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.cs-grey  { background: var(--grey-100); color: var(--grey-400); }
.cs-grey  .cs-dot { background: var(--grey-400); }
.cs-red   { background: rgba(224,62,82,0.08); color: var(--scarlet); }
.cs-red   .cs-dot { background: var(--scarlet); }
.cs-amber { background: rgba(240,140,0,0.12); color: var(--amber); }
.cs-amber .cs-dot { background: var(--amber); }
.cs-green { background: rgba(27,138,76,0.10); color: var(--green); }
.cs-green .cs-dot { background: var(--green); }

/* ── Phase 5: Goal rows (A-11c) ── */
.goal-row {
  border: 1px solid var(--grey-200);
  padding: 16px 20px;
  margin-bottom: 12px;
  background: var(--white);
  border-radius: var(--radius-card);
}
.goal-row.editing { border-color: var(--blue-core); background: var(--blue-tint); }
.goal-row-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px;
}
.goal-dim-tag {
  display: inline-flex; padding: 2px 8px;
  font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  background: var(--blue-tint); color: var(--blue-core);
  border-radius: var(--radius-pill);
  flex-shrink: 0; margin-top: 2px;
}
.goal-title { font-size: 14px; font-weight: 600; color: var(--navy); line-height: 1.4; }
.goal-desc  { font-size: 13px; color: var(--grey-400); line-height: 1.5; margin-top: 3px; }
.goal-edit-fields {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--grey-200);
}

/* ── Phase 5: Section label (within-page heading) ── */
.section-label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--grey-400);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--grey-200);
}

/* ── Phase 5: Avatar initials circle ── */
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--blue-core);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--white);
  flex-shrink: 0;
  text-transform: uppercase;
}

/* ── Phase 5: mb-16 utility ── */
.mb-16 { margin-bottom: 16px; }

/* ── Phase 6: Sprint tab bar ── */
.sprint-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--grey-200);
  margin-bottom: 0;
  overflow-x: auto;
  overflow-y: hidden;
}
.sprint-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--grey-400);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.12s, box-shadow 0.12s;
  cursor: pointer;
}
.sprint-tab:hover { color: var(--navy); }
.sprint-tab.active {
  color: var(--blue-core);
  box-shadow: inset 0 -3px 0 var(--blue-core);
}
.sprint-tab.disabled {
  color: var(--grey-200);
  cursor: default;
  pointer-events: none;
}
.sprint-tab .tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  background: var(--amber);
  color: var(--white);
}
.sprint-tab .tab-badge.complete { background: var(--navy); }
.sprint-tab .tab-badge.green    { background: var(--green); }
.sprint-tab .tab-badge.overdue  { background: var(--amber); color: var(--white); }

/* ── Phase 6: Action cards (dashboard) ── */
.action-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.action-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: var(--navy);
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-card);
}
.action-card:hover {
  border-color: var(--blue-core);
  box-shadow: 0 2px 8px rgba(46,88,152,0.12);
}
.action-card.disabled { opacity: 0.45; pointer-events: none; }
.action-card-icon { font-size: 26px; color: var(--blue-core); flex-shrink: 0; margin-top: 1px; }
.action-card-label { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.action-card-desc  { font-size: 12px; color: var(--grey-400); line-height: 1.4; }

/* ── Window status cards row (dashboard) ── */
.window-cards-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.window-card {
  flex: 1;
  min-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 16px 10px 14px;
  background: var(--white);
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: var(--navy);
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-card);
}
.window-card:hover { border-color: var(--blue-core); }
.window-card.active {
  border-color: var(--blue-core);
  border-width: 2px;
  background: #eef3fb;
  box-shadow: 0 4px 12px rgba(46,88,152,0.15);
}
.window-card.done   { opacity: 0.75; }
.window-card.overdue { border-color: var(--amber); }
.window-card.blocked { opacity: 0.42; }
.window-card-win  { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--grey-400); }
.window-card-icon { font-size: 30px; color: var(--blue-core); }
.window-card.done    .window-card-icon { color: var(--green); }
.window-card.overdue .window-card-icon { color: var(--amber); }
.window-card.blocked .window-card-icon { color: var(--grey-400); }
.window-card-name { font-size: 14px; font-weight: 700; line-height: 1.2; }
.window-card-status {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.window-card-status.done    { background: #e6f4ea; color: var(--green); }
.window-card-status.overdue { background: #fff3cd; color: var(--amber); }
.window-card-status.blocked { background: var(--grey-100); color: var(--grey-400); }

/* ── Phase 6: Win info bar (dashboard) ── */
.win-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-card);
  padding: 14px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.win-info-sprint { font-size: 15px; font-weight: 700; color: var(--navy); }
.win-info-label  { font-size: 13px; color: var(--grey-400); margin-top: 2px; }

/* ── Phase 6: Notification items ── */
.notif-list { display: flex; flex-direction: column; }
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--grey-200);
  background: var(--white);
  transition: background 0.1s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item.unread {
  background: var(--blue-tint);
  border-left: 3px solid var(--blue-core);
}
.notif-icon {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--grey-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--blue-core);
  flex-shrink: 0;
}
.notif-body   { flex: 1; min-width: 0; }
.notif-text   { font-size: 14px; color: var(--navy); line-height: 1.45; }
.notif-meta   { font-size: 12px; color: var(--grey-400); margin-top: 3px; display: flex; gap: 10px; }
.notif-type-tag {
  display: inline-flex;
  padding: 1px 7px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  background: var(--grey-100); color: var(--grey-400);
  border-radius: var(--radius-pill);
}

/* ── Phase 6: KPI row (employee W1) ── */
.kpi-row {
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-card);
  padding: 14px 18px;
  margin-bottom: 10px;
  background: var(--white);
}
.kpi-row.editing { border-color: var(--blue-core); }
.kpi-row-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 10px;
}
.kpi-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  background: var(--blue-tint); color: var(--blue-core);
  border-radius: 50%;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0; margin-top: 2px;
}
.kpi-title { font-size: 14px; font-weight: 600; color: var(--navy); flex: 1; }
.kpi-desc  { font-size: 13px; color: var(--grey-400); margin-top: 3px; }
.kpi-edit-form {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--grey-200);
}

/* ── Phase 6: Fixed growth row ── */
.growth-row {
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  margin-bottom: 14px;
  background: var(--white);
}
.growth-row-label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--blue-core); margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}

/* ── Phase 6: Progress row (W2) ── */
.progress-row {
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-card);
  background: var(--white);
  margin-bottom: 12px;
  overflow: hidden;
}
.progress-row-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--grey-200);
  background: var(--grey-100);
  display: flex; align-items: center; gap: 10px;
}
.progress-row-body { padding: 14px 18px; }

/* ── Phase 6: Assist entries table ── */
.assist-table-wrap { border: 1px solid var(--grey-200); border-radius: var(--radius-card); overflow: hidden; }

/* ── Phase 6: Demerit points strip (employee dash) ── */
.emp-demerit-strip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(224,62,82,0.08);
  color: var(--scarlet);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 12px; font-weight: 600;
}
.emp-demerit-strip.zero { background: var(--grey-100); color: var(--grey-400); }

/* ─── Phase 7: W3 Score Self ────────────────────────────────── */
.w3-dim-section { margin-bottom: 24px; }

.score-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.score-btn {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--grey-200);
  background: #fff;
  border-radius: var(--radius-card);
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.score-btn.selected {
  background: var(--blue-core);
  color: #fff;
  border-color: var(--blue-core);
}

.score-btn:hover:not(.selected) {
  background: var(--blue-tint);
  border-color: var(--blue-core);
}

.dim-submitted-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #e8f5ee;
  border: 1px solid var(--green);
  border-radius: var(--radius-card);
  padding: 10px 16px;
  margin: 0 0 16px;
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
}

.w3-chevron {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--grey-400);
  font-size: 18px;
  padding: 2px 4px;
  display: flex;
  align-items: center;
  line-height: 1;
  transition: color 0.15s;
  flex-shrink: 0;
}
.w3-chevron:hover { color: var(--navy); }

/* ─── Phase 8: W4 Score Others ──────────────────────────────── */
.w4-dim-group { margin-bottom: 24px; }

.w4-person-list { display: flex; flex-direction: column; }

.w4-person-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--grey-200);
  gap: 12px;
}
.w4-person-card:last-child { border-bottom: none; }

.w4-score-context {
  background: var(--grey-100);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-card);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.w4-submitted-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #e8f5ee;
  border: 1px solid var(--green);
  border-radius: var(--radius-card);
  padding: 10px 16px;
  margin: 0 0 16px;
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
}

/* ─── Phase 8: My Mentees table ─────────────────────────────── */
.mentees-status-table {
  width: 100%;
  border-collapse: collapse;
}
.mentees-status-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--grey-400);
  background: var(--grey-100);
  border-bottom: 1px solid var(--grey-200);
  white-space: nowrap;
}
.mentees-status-table td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--grey-200);
  vertical-align: middle;
}
.mentees-status-table tbody tr:last-child td { border-bottom: none; }
.mentees-status-table tbody tr:hover { background: var(--grey-100); }

/* ─── Phase 9: My Results ────────────────────────────────────── */
.results-score-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.results-score-card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-card);
  padding: 20px 18px 16px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.results-score-card .score-value {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1;
  margin-bottom: 4px;
}
.results-score-card.d1 .score-value { color: var(--blue-core); }
.results-score-card.d2 .score-value { color: var(--green); }
.results-score-card.d3 .score-value { color: var(--amber); }
.results-score-card.d4 .score-value { color: var(--navy); }

.results-score-card .score-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--grey-400);
  margin-bottom: 8px;
}

.results-score-card .score-annual {
  font-size: 11px;
  color: var(--grey-400);
}

.results-chart-wrap {
  max-width: 480px;
  margin: 0 auto 24px;
  position: relative;
}

.results-chart-placeholder {
  background: var(--grey-100);
  border: 1px dashed var(--grey-200);
  border-radius: var(--radius-card);
  padding: 40px;
  text-align: center;
  color: var(--grey-400);
  font-size: 13px;
}

.results-breakdown-section {
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-card);
  margin-bottom: 12px;
  overflow: hidden;
}

.results-breakdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  background: var(--grey-100);
  user-select: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--navy);
}
.results-breakdown-toggle:hover { background: #e8e8e8; }

.results-breakdown-body {
  padding: 0;
}

.results-breakdown-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.results-breakdown-body th {
  text-align: left;
  padding: 9px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--grey-400);
  background: var(--grey-100);
  border-bottom: 1px solid var(--grey-200);
}
.results-breakdown-body td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--grey-200);
  vertical-align: middle;
}
.results-breakdown-body tr:last-child td { border-bottom: none; }

.results-demerit-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-card);
  margin-bottom: 24px;
  background: #fff5f6;
  border: 1px solid var(--scarlet);
  color: var(--scarlet);
  font-weight: 600;
  font-size: 13px;
}
.results-demerit-strip.zero {
  background: var(--grey-100);
  border-color: var(--grey-200);
  color: var(--grey-400);
}

/* ─── Phase 9: Admin Export ──────────────────────────────────── */
.export-preview-table {
  width: 100%;
  border-collapse: collapse;
}
.export-preview-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--grey-400);
  background: var(--grey-100);
  border-bottom: 1px solid var(--grey-200);
  white-space: nowrap;
}
.export-preview-table td {
  padding: 11px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--grey-200);
  vertical-align: middle;
}
.export-preview-table tbody tr:last-child td { border-bottom: none; }
.export-preview-table tbody tr:hover { background: var(--grey-100); }

.rank-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
}

/* ─── Mobile Nav ─────────────────────────────────────────────────────────── */
.emp-nav-hamburger {
  display: none;
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.85); font-size: 22px;
  align-items: center; justify-content: center;
  padding: 4px 6px;
  flex-shrink: 0;
}
.emp-nav-hamburger:hover { color: var(--white); }

.emp-nav-mobile-menu {
  position: fixed;
  top: var(--header-height); left: 0; right: 0;
  background: var(--navy);
  z-index: 98;
  display: flex;
  flex-direction: column;
  padding: 6px 0 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}
.emp-nav-mobile-menu .emp-nav-link {
  padding: 12px 20px;
  border-radius: 0;
  font-size: 15px;
  font-weight: 600;
}

/* ─── Mobile Responsive Overrides ───────────────────────────────────────── */

/* Desktop: lock out mobile-only elements */
@media (min-width: 641px) {
  .emp-nav-hamburger    { display: none !important; }
  .emp-nav-mobile-menu  { display: none !important; }
}

/* Mobile: swap nav, reduce spacing, collapse grids */
@media (max-width: 640px) {
  /* Nav */
  .emp-nav-links        { display: none !important; }
  .emp-nav-hamburger    { display: flex !important; }

  /* Layout */
  .ahz-employee-content { padding: 16px; }

  /* Typography */
  .display-title        { font-size: 26px; }

  /* Grid utilities */
  .grid-2               { grid-template-columns: 1fr; gap: 12px; }
  .form-grid            { grid-template-columns: 1fr; }
  .form-grid-3          { grid-template-columns: 1fr; }
  .results-score-cards  { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-grid            { grid-template-columns: repeat(2, 1fr); }

  /* Page header */
  .page-header          { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-header-actions  { width: 100%; }

  /* Modal — slide-up from bottom */
  .modal-overlay        { padding: 0; align-items: flex-end; }
  .modal                {
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    max-height: 92vh;
    width: 100%;
  }

  /* Filter bar */
  .filter-bar           { flex-direction: column; align-items: stretch; }
  .filter-bar .form-input,
  .filter-bar .form-select { max-width: none; flex: none; width: 100%; }
  .filter-bar-separator { display: none; }

  /* Stat grid — 2 cols on mobile */
  .stat-card .stat-value { font-size: 28px; }

  /* Log row — stack columns vertically */
  .log-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 16px;
  }
  .log-header { display: none; }

  /* W4 person cards */
  .w4-person-card { flex-wrap: wrap; gap: 10px 0; }
  .w4-person-card-actions { width: 100%; justify-content: flex-start; padding-top: 4px; }

  /* W4 form actions */
  .w4-form-actions { flex-direction: column-reverse; gap: 8px; }
  .w4-form-actions .btn { width: 100%; justify-content: center; }
  .w4-form-submit { justify-content: stretch; }
  .w4-form-submit .btn { width: 100%; justify-content: center; }
}

/* Very small phones — score button grids */
@media (max-width: 400px) {
  .results-score-cards  { grid-template-columns: 1fr; }
  .score-btn            { width: 32px; height: 32px; font-size: 13px; }
}
