:root {
  --ink: #1e3a4a;
  --muted: #4e738a;
  --body: #334155;
  --line: #e8eef2;
  --surface: #fff;
  --canvas: #f7fbfd;
  --navy: #2d5a74;
  --navy-deep: #132d3d;
  --accent: #ae6042;
  --accent-dark: #8a3f28;
  --accent-darker: #713321;
  --focus: #005fcc;
  --soft: #f0f6fa;
  --soft-warm: #fdf8f0;
  --review: #8a560f;
  --review-bg: #fff1e5;
  --success-bg: #e8f6ef;
  --success-ink: #275c43;
  --footer-ink: #d6edf5;
  --radius: 12px;
  font-family: Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.5;
}
img { max-width: 100%; height: auto; }

.visually-hidden, .sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  top: 0; left: 0;
  z-index: 9999;
  transform: translateY(-120%);
  padding: 8px 12px;
  background: #f5f5f5;
  color: #000;
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
}
.skip-link:focus, .skip-link:active {
  transform: translateY(0);
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) { outline: none; }

/* UTHealth institutional banner — matches medatlas-bench.ai */
.uth-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--accent);
  border-bottom: 1px solid rgba(55, 65, 81, .5);
}
.uth-banner-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 8px max(16px, calc((100vw - 1120px) / 2));
}
.uth-logo-link {
  display: inline-flex;
  border-radius: 4px;
}
.uth-logo-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.uth-logo { display: block; height: 38px; width: auto; }
.uth-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}
.uth-quick-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 4px;
  /* Full white, not .92 alpha: the faded value measured 4.17:1 on the banner. */
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
}
.uth-quick-links a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.uth-quick-links a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.app-bar {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.app-bar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px max(16px, calc((100vw - 1120px) / 2));
}
.brand {
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
}
.brand:hover { color: var(--accent-dark); }
.app-bar-meta {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 500;
}
.app-bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}
/* A class-level `display` outranks the UA rule for [hidden], which left the
   signed-out user bar — "Log out" and all — on screen. */
[hidden] { display: none !important; }
.user-chip {
  color: var(--navy);
  font-size: .9rem;
  font-weight: 600;
}
.text-button {
  color: var(--navy);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--soft);
}
.text-button:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}
.admin-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--soft-warm);
  color: var(--accent-darker);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.notice-banner {
  margin: 0 0 32px;
  padding: 18px 20px 16px;
  border: 1px solid #e8d3b8;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--review-bg);
}
.notice-kicker {
  margin: 0 0 4px;
  color: var(--accent-darker);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
}
.notice-heading,
.notice-dialog h2 {
  margin: 0 0 10px;
  color: var(--navy-deep);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
}
.notice-copy {
  display: grid;
  gap: 10px;
}
.notice-copy p {
  margin: 0;
  color: var(--body);
  font-size: .92rem;
  line-height: 1.5;
}

.notice-dialog {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 22px 22px 18px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 70px rgba(19, 45, 61, .28);
}
.notice-dialog::backdrop { background: rgba(19, 45, 61, .6); }
.notice-prompt {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--navy);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.45;
}
.notice-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.admin-page main.admin-main {
  max-width: 1100px;
}
.admin-summary {
  margin: 20px 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 8px;
}
@media (max-width: 720px) {
  .admin-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.admin-stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px 16px;
}
.admin-stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
}
.admin-stat-label {
  margin-top: 4px;
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .04em;
}
.admin-cost-note { margin: 0 0 8px; }
.admin-pill.anon {
  background: #eef2f6;
  color: var(--muted);
}
.admin-denied {
  background: var(--review-bg);
  border-color: #f0d2b0;
  color: var(--review);
}
.admin-denied code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
}
.admin-section-title {
  margin: 28px 0 10px;
  font-size: 1.05rem;
  color: var(--navy);
}
.admin-team-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.admin-team-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px 14px;
}
.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.admin-table-wrap:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.admin-table th {
  background: var(--soft);
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .04em;
}
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table .small { font-size: .82rem; margin-top: 2px; }
/* Money, counts and byte totals only read as columns when the digits line up. */
.admin-table th.numeric,
.admin-table td.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.admin-stat-value { font-variant-numeric: tabular-nums; }

main {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}
main:focus { outline: none; }

.intro { max-width: 720px; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
}
.intro h1 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 800;
}
.intro p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  font-weight: 500;
  max-width: 42rem;
}

/* Impact cards under the intro: the admin pulse cards, all-time mode, no money.
   Lifetime total, the share from the last 7 complete UTC days, and a sparkline
   of the 14 finished days ending yesterday (shaded side is the last 7). */
.impact-banner {
  --impact-navy: #002b49;
  --impact-steel: #4e7c99;
  --impact-rust: #c75b12;
  --impact-teal: #0f766e;
  --impact-muted: #5c6b7a;
  --impact-rule: #d9dfe6;
  --impact-wash: #f5f7f9;
  --impact-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 26px 0 0;
}
@media (max-width: 900px) { .impact-banner { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .impact-banner { grid-template-columns: minmax(0, 1fr); } }
.impact-card {
  position: relative;
  overflow: hidden;
  padding: 14px 16px 12px;
  border: 1px solid var(--impact-rule);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(10, 32, 50, .06);
}
.impact-label {
  margin: 0;
  color: var(--impact-muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.impact-value {
  margin: 4px 0 0;
  color: var(--impact-navy);
  font-family: var(--impact-mono);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.impact-delta {
  margin: 4px 0 0;
  color: var(--impact-muted);
  font-family: var(--impact-mono);
  font-size: .72rem;
  line-height: 1.4;
}
.impact-spark { margin: 8px -4px -4px; height: 38px; }
.impact-spark svg { display: block; width: 100%; height: 38px; }
.impact-spark-window { fill: var(--impact-wash); }
.impact-spark-area { fill: var(--impact-navy); fill-opacity: .08; }
.impact-spark-line { fill: none; stroke: var(--impact-navy); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.impact-spark-line.prior { stroke: var(--impact-steel); stroke-width: 1.3; }
.impact-spark-line.rust { stroke: var(--impact-rust); }
.impact-spark-line.teal { stroke: var(--impact-teal); }
.impact-spark-split { stroke: var(--impact-rule); stroke-width: 1; }
.impact-spark-ref { stroke: var(--impact-muted); stroke-width: 1; stroke-dasharray: 3 2; stroke-opacity: .65; }
.impact-spark-dot { fill: var(--impact-rust); }
.impact-note {
  grid-column: 1 / -1;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: .8rem;
}
.impact-note:empty { display: none; }

.upload-panel {
  display: grid;
  gap: 16px;
  justify-items: start;
  margin-top: 36px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.upload-limit {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin: 0;
  padding: 12px 16px;
  width: 100%;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  font-size: 1rem;
}
.upload-limit strong {
  color: var(--ink);
  font-size: 1.08rem;
}
.upload-limit code {
  font-family: inherit;
  font-weight: 700;
  color: var(--ink);
}
.dropzone {
  display: grid;
  width: 100%;
  min-height: 210px;
  place-content: center;
  gap: 10px;
  padding: 22px 16px;
  text-align: center;
  background: var(--soft-warm);
  border: 1.5px dashed #c49a86;
  border-radius: 10px;
  cursor: pointer;
}
.dropzone:hover, .dropzone:focus-within, .dropzone.is-dragover {
  background: #f8eee8;
  border-color: var(--accent);
}
.dropzone:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.dropzone.is-dragover {
  box-shadow: inset 0 0 0 2px rgba(174, 96, 66, .25);
}
.dropzone.is-ready {
  background: var(--success-bg);
  border-color: #7db992;
  border-style: solid;
}
.dropzone.is-ready:hover, .dropzone.is-ready:focus-within {
  background: #def3e8;
  border-color: #5e9a74;
}
.dropzone.is-error {
  background: var(--review-bg);
  border-color: var(--accent);
  border-style: solid;
}
.pptx-badge {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 96px;
  height: 108px;
  margin: 0 auto 2px;
  color: var(--accent-dark);
}
.pptx-badge svg {
  display: block;
  width: 96px;
  height: 108px;
}
.pptx-badge b {
  position: absolute;
  top: 56px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--accent-dark);
}
.dropzone.is-ready .pptx-badge,
.dropzone.is-ready .pptx-badge svg {
  width: 112px;
  height: 126px;
}
.dropzone.is-ready .pptx-badge b { top: 66px; font-size: 18px; }
.dropzone-idle,
.file-receipt {
  display: grid;
  gap: 6px;
  justify-items: center;
}
.dropzone-idle[hidden],
.file-receipt[hidden] { display: none; }
.dropzone strong { font-size: 1.12rem; color: var(--ink); }
.dropzone span { color: var(--muted); font-size: .95rem; }
.dropzone .size-pill {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #c49a86;
  color: var(--ink);
  font-size: .92rem;
  font-weight: 800;
}
.file-receipt-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--success-ink);
  max-width: 36rem;
  overflow-wrap: anywhere;
}
.file-receipt-meta {
  color: var(--success-ink);
  font-size: .95rem;
  font-weight: 600;
}
.file-receipt-hint {
  color: var(--navy);
  font-size: .88rem;
}
.dropzone .dropzone-restriction {
  color: var(--accent-darker);
  font-size: .83rem;
  font-weight: 600;
}
.upload-status {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.45;
}
.upload-status.is-ready {
  color: var(--success-ink);
  font-weight: 700;
}
.upload-status.is-error {
  color: var(--accent-darker);
  font-weight: 700;
}
.upload-restriction-note {
  margin: 10px 0 16px;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.45;
}
.upload-restriction-note strong {
  color: var(--accent-darker);
}

button, .link-button {
  min-height: 44px;
  padding: 11px 16px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.primary {
  color: #fff;
  background: var(--accent-dark);
}
.primary:hover { background: var(--accent-darker); }
.button-link {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
}
.secondary {
  color: var(--navy);
  background: var(--soft);
}
.secondary:hover { background: #e4eef4; }
button:disabled {
  cursor: not-allowed;
  opacity: .45;
}
.muted {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}

.deck-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 48px 0 20px;
}
.deck-name {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}
.label {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.status, .decision-status {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--navy);
  background: var(--soft);
  font-size: .8rem;
  font-weight: 750;
}

.flow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.flow-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 650;
  border-radius: 999px;
}
.flow-steps li + li::before {
  content: "";
  width: 18px;
  height: 1px;
  margin-right: 6px;
  background: var(--line);
}
.flow-step-num {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  font-size: .78rem;
  font-weight: 800;
}
.flow-steps li.is-done { color: var(--success-ink); }
.flow-steps li.is-done .flow-step-num { background: var(--success-ink); border-color: var(--success-ink); color: #fff; }
.flow-steps li.is-current { color: var(--navy-deep); background: var(--soft); }
.flow-steps li.is-current .flow-step-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.flow-steps li.is-busy .flow-step-num { animation: flow-pulse 1.2s ease-in-out infinite; }
@keyframes flow-pulse { 50% { opacity: .45; } }

.verify-banner { margin: 0 0 20px; border-left-color: var(--navy); }

.build-note {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-left: 4px solid var(--review);
  border-radius: 6px;
  background: var(--review-bg);
  color: var(--review);
  font-size: .92rem;
  line-height: 1.45;
}
.result-leftover {
  margin: 8px 0 4px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #badfcb;
}
.result-leftover p { margin: 0 0 6px; color: var(--ink); font-weight: 650; }
.result-leftover ul { margin: 0; padding-left: 20px; color: var(--body); line-height: 1.5; }

.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.summary article {
  padding: 17px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.summary strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
  font-size: 1.7rem;
}
.summary span {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.3;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 14px;
  padding: 12px 0;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: blur(8px);
}
.toolbar.is-sticky {
  position: sticky;
  top: 56px;
  z-index: 20;
  margin-left: -8px;
  margin-right: -8px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
}
.issue-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.issue-filters[hidden] { display: none; }
.filter-chip {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: .85rem;
  font-weight: 650;
  cursor: pointer;
}
.filter-chip:hover { border-color: var(--accent); background: var(--soft-warm); }
.filter-chip.is-active {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: #fff;
}
.chip-count {
  display: inline-block;
  min-width: 1.35em;
  margin-left: 2px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.filter-chip.is-active .chip-count {
  /* Solid darker fill keeps white count text above WCAG AA 4.5:1. */
  background: var(--accent-darker);
  color: #fff;
}
.issues-empty {
  margin: 18px 0 0;
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: center;
}
.issues-empty[hidden] { display: none; }
button.is-busy {
  position: relative;
  pointer-events: none;
}

.suggest-progress {
  margin: 0 0 18px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.suggest-progress[hidden] { display: none; }
.suggest-progress-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.suggest-progress-top strong { color: var(--ink); font-size: 1rem; }
#suggest-progress-percent {
  color: var(--accent-dark);
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}
.suggest-progress-track {
  height: 10px;
  overflow: hidden;
  background: #e8eef2;
  border-radius: 999px;
}
.suggest-progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  border-radius: inherit;
  transition: width .35s ease;
}
.suggest-progress.is-working .suggest-progress-fill {
  animation: suggest-shimmer 1.4s linear infinite;
}
@keyframes suggest-shimmer {
  from { filter: brightness(1); }
  50% { filter: brightness(1.12); }
  to { filter: brightness(1); }
}
@media (prefers-reduced-motion: reduce) {
  .suggest-progress-fill { transition: none; }
  .suggest-progress.is-working .suggest-progress-fill { animation: none; }
}
.suggest-progress-message {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.45;
  min-height: 1.4em;
}
.suggest-active {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 4px 16px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.suggest-active li {
  position: relative;
  padding-left: 16px;
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.suggest-active li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  animation: suggest-pulse 1.4s ease-in-out infinite;
}
/* Eight dots blinking out of phase is visual noise, not information. */
.suggest-active li:nth-child(even)::before { animation-delay: .7s; }
@keyframes suggest-pulse {
  0%, 100% { opacity: .28; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .suggest-active li::before { animation: none; opacity: .8; }
}
.suggest-tally {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
}
.suggest-stages {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.suggest-stages li {
  position: relative;
  padding: 8px 10px 8px 28px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 650;
  line-height: 1.3;
}
.suggest-stages li::before {
  content: "";
  position: absolute;
  left: 10px; top: 11px;
  width: 10px; height: 10px;
  border: 2px solid #c5d0d8;
  border-radius: 50%;
  background: #fff;
}
.suggest-stages li.is-done { color: var(--success-ink); background: var(--success-bg); }
.suggest-stages li.is-done::before {
  border-color: #2f9d63;
  background: #2f9d63;
  box-shadow: inset 0 0 0 2px #fff;
}
.suggest-stages li.is-active { color: var(--ink); background: #f8eee8; }
.suggest-stages li.is-active::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(174, 96, 66, .2);
}

.issues { margin-top: 36px; }
.issues-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}
.issues h3, .result h3 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  color: var(--navy);
}
.issues-head p { margin: 0; color: var(--muted); }
#issues-list { display: grid; gap: 12px; margin-top: 18px; }

.issue {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.issue-title {
  display: flex;
  align-items: start;
  gap: 12px;
}
.issue-title input {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  accent-color: var(--accent-dark);
}
.issue-heading {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  /* Shape names come straight from the deck and can be long unbroken tokens. */
  overflow-wrap: anywhere;
}
.issue-title .kind {
  color: var(--accent-dark);
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .06em;
}
.metadata, .reason {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .88rem;
}
.decision-status { margin-left: auto; white-space: nowrap; }
.issue.needs-review .decision-status {
  color: var(--review);
  background: var(--review-bg);
}
.issue-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
  margin-top: 12px;
}
.issue-body.has-side {
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
}
/* Pin the columns explicitly: a card may carry a thumbnail, a contrast swatch,
   or both, and auto-placement would otherwise push the editor onto its own row. */
.issue-body.has-side > .preview-trigger,
.issue-body.has-side > .contrast-preview { grid-column: 1; }
.issue-body.has-side > .issue-content { grid-column: 2; grid-row: 1; }
.issue-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-content: start;
}
.issue-content.no-edit .alt-editor { display: none; }
.issue-content .reason { margin-top: 0; }
.preview-trigger {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 44px;
  padding: 0;
  overflow: hidden;
  color: var(--accent-dark);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: .78rem;
}
.preview-trigger:hover {
  border-color: var(--accent);
  background: #f8eee8;
}
/* Reserve the frame with aspect-ratio rather than a fixed height: previews stream
   in lazily, so the box must hold its size before the blob lands, and a fixed
   124px height letterboxed a 16:9 slide down to a third of the column. */
.preview {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: var(--soft);
}
.preview-trigger span { padding: 0 8px 8px; }
.contrast-preview {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  color: var(--muted);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: .78rem;
  line-height: 1.35;
}
.contrast-pair {
  display: grid;
  gap: 8px;
}
.contrast-swatch {
  display: grid;
  gap: 4px;
}
.contrast-sample {
  display: grid;
  min-height: 52px;
  place-items: center;
  padding: 6px 10px;
  overflow-wrap: anywhere;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, .14);
  border-radius: 5px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}
.contrast-swatch-label {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .04em;
}
.contrast-swatch-label b { font-variant-numeric: tabular-nums; }
.contrast-before + .contrast-swatch-label b { color: var(--review); }
.contrast-after + .contrast-swatch-label b { color: var(--success-ink); }
.contrast-copy { color: #475569; }
.preview-trigger[hidden], .contrast-preview[hidden], .alt-text[hidden] { display: none; }
.alt-text-label {
  display: grid;
  gap: 6px;
}
.alt-text-label > span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.alt-text {
  width: 100%;
  min-height: 96px;
  margin-top: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  resize: vertical;
  font: inherit;
  line-height: 1.5;
  color: var(--ink);
  background: #fff;
}
.issue-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.alt-count {
  color: var(--muted);
  font-size: .8rem;
  font-variant-numeric: tabular-nums;
}
.alt-count.is-long,
.alt-count.is-short {
  color: var(--review);
  font-weight: 700;
}
.issue.is-dirty { border-color: var(--accent); }
.issue.is-dirty .alt-text { border-color: var(--accent); }
.issue.is-dirty .alt-count::after {
  content: " · unsaved";
  color: var(--review);
  font-weight: 700;
}

.preview-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 70px rgba(19, 45, 61, .28);
}
/* The image is fetched after showModal(), so hold the frame open or the dialog
   pops from a 75px sliver to full height when the blob lands. */
.preview-dialog-stage {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 112px);
  background: var(--soft);
}
.preview-dialog-stage.is-loading::after {
  content: "Loading preview…";
  color: var(--muted);
  font-size: .9rem;
}
.preview-dialog-stage.is-loading img { display: none; }
.preview-dialog::backdrop { background: rgba(19, 45, 61, .6); }
.preview-dialog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
}
.preview-dialog img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 112px);
  object-fit: contain;
  background: var(--soft);
}

.result {
  margin-top: 34px;
  padding: 24px;
  background: var(--success-bg);
  border: 1px solid #badfcb;
  border-radius: var(--radius);
}
.result p { color: var(--success-ink); }
.result-review {
  margin: 12px 0 16px;
  font-weight: 600;
  line-height: 1.5;
}
.result .privacy-note {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid #badfcb;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.45;
}

.login-panel {
  display: grid;
  gap: 18px;
  max-width: 28rem;
  margin-top: 36px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.login-sso {
  justify-content: center;
  width: 100%;
  margin-top: 0;
  text-decoration: none;
  text-align: center;
}
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .06em;
}
.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}
.login-form {
  display: grid;
  gap: 14px;
}
.login-form h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
}
.login-form label {
  display: grid;
  gap: 6px;
  color: var(--navy);
  font-size: .9rem;
  font-weight: 700;
}
.login-form input[type="text"],
.login-form input[type="password"] {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
}
.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--focus);
}
.login-form button {
  width: 100%;
}
.login-notice {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--review-bg);
  color: var(--review);
  font-size: .92rem;
  font-weight: 600;
}
.login-notice-success {
  background: var(--success-bg);
  color: var(--success-ink);
}
.link-button {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  text-decoration: none;
}

/* Footer — institutional required links */
.site-footer { margin-top: auto; }
.footer-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #7aaec4, var(--ink));
}
.footer-main { background: var(--navy-deep); color: var(--footer-ink); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr);
  gap: 40px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px;
}
.footer-kicker {
  margin: 0 0 4px;
  font-size: .875rem;
  font-weight: 600;
}
.footer-title {
  margin: 0;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
}
.footer-copy {
  margin: 12px 0 20px;
  max-width: 28rem;
  font-size: .9rem;
  line-height: 1.65;
}
.footer-logo {
  display: block;
  height: 56px;
  width: auto;
}
.footer-main h3 {
  margin: 0 0 14px;
  color: var(--footer-ink);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
}
.footer-main ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.footer-main a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--footer-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: .95rem;
}
.footer-main a:hover { color: #fff; }
.footer-main a:focus-visible {
  outline: 2px solid var(--footer-ink);
  outline-offset: 2px;
  border-radius: 4px;
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  border-top: 1px solid #2d5068;
  background: var(--navy-deep);
  max-width: none;
  padding: 14px max(16px, calc((100vw - 1120px) / 2));
}
.footer-legal p {
  margin: 0;
  color: var(--footer-ink);
  font-size: .85rem;
}

@media (max-width: 720px) {
  main { padding: 32px 16px 48px; }
  .uth-banner-inner, .app-bar-inner { padding-left: 16px; padding-right: 16px; }
  .uth-logo { height: 30px; }
  .footer-logo { height: 44px; }
  .deck-head { align-items: start; flex-direction: column; }
  .toolbar button, .toolbar .link-button { width: 100%; }
  .issue-body, .issue-body.has-side { grid-template-columns: 1fr; }
  .issue-body.has-side > .preview-trigger,
  .issue-body.has-side > .contrast-preview,
  .issue-body.has-side > .issue-content { grid-column: 1; grid-row: auto; }
  .suggest-stages { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding: 32px 16px; }
  .footer-legal { flex-direction: column; }
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* Top-Level Navigation Tabs                                                   */
/* ─────────────────────────────────────────────────────────────────────────── */
.main-tabs-nav {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(30, 58, 74, 0.04);
}
.main-tabs-inner {
  display: flex;
  gap: 8px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}
.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}
.nav-tab:hover {
  color: var(--ink);
  background: var(--soft);
}
.nav-tab.is-active {
  color: var(--accent-dark);
  border-bottom-color: var(--accent);
  font-weight: 700;
}
.tab-icon {
  flex-shrink: 0;
}

/* Resume banner: shown on the landing page when the browser remembers a review */
.resume-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-top: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: var(--soft);
}
.resume-text { display: grid; gap: 2px; color: var(--body); }
.resume-text strong { color: var(--ink); }
.resume-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Your recent decks: one row per deck, button on the right. */
.recent-decks { flex-direction: column; align-items: stretch; }
.recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.recent-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
  padding: 8px 0 0;
  border-top: 1px solid var(--line);
}
.recent-text { display: grid; gap: 2px; min-width: 0; }
.recent-text b { color: var(--ink); overflow-wrap: anywhere; }
.recent-meta { color: var(--muted); font-size: 0.92rem; }

/* Everything approved: the one remaining step gets its own panel. */
.build-now { border-left-color: var(--success-ink); background: var(--success-bg); margin-bottom: 16px; }

/* ─────────────────────────────────────────────────────────────────────────── */
/* What We've Fixed Tab Panel                                                  */
/* ─────────────────────────────────────────────────────────────────────────── */
.fixed-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
}
.fixed-status {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
}
.fixed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.fixed-item {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 14px 18px;
  background: #fff;
}
.fixed-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.fixed-kind {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--navy-deep);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.fixed-kind.kind-remediation_quality, .fixed-kind.kind-bug, .fixed-kind.kind-issue { background: var(--accent-dark); }
.fixed-kind.kind-feature_request { background: #0f766e; }
.fixed-dates {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.82rem;
}
.fixed-problem {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
}
.fixed-resolution {
  margin: 6px 0 0;
  color: var(--body);
  line-height: 1.55;
}
@media (max-width: 640px) {
  .fixed-dates { margin-left: 0; }
  .fixed-panel { padding: 16px; }
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* Comments & Feedback Tab Panel                                               */
/* ─────────────────────────────────────────────────────────────────────────── */
.feedback-intro {
  margin-bottom: 24px;
}
.feedback-intro h1 {
  font-size: 2rem;
  margin: 8px 0;
  color: var(--navy-deep);
}
.feedback-intro p {
  color: var(--body);
  max-width: 800px;
  line-height: 1.6;
}

.feedback-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 2px 8px rgba(30, 58, 74, 0.05);
}

.feedback-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) {
  .feedback-grid { grid-template-columns: 1fr; }
}

.field-group {
  margin-bottom: 20px;
}
.field-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--ink);
}
.field-optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.82rem;
}
.field-required {
  color: #c0392b;
}

.field-group input[type="text"],
.field-group input[type="email"],
.field-group select,
.field-group textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid #c2d4df;
  border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field-group input:focus-visible,
.field-group select:focus-visible,
.field-group textarea:focus-visible {
  border-color: var(--focus);
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
.field-group textarea {
  resize: vertical;
  min-height: 110px;
}

/* Dropzone for Feedback Attachments */
.fb-dropzone {
  border: 2px dashed #b8cdd9;
  border-radius: 10px;
  background: #f7fafc;
  padding: 22px 18px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.fb-dropzone:hover,
.fb-dropzone:focus-visible {
  border-color: var(--accent);
  background: #fffdfb;
}
.fb-dropzone.is-dragover {
  border-color: var(--accent);
  background: #fff6ee;
}
.fb-dropzone-icon {
  color: var(--navy);
  margin-bottom: 6px;
}
.fb-dropzone-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
}
.fb-dropzone-title .browse-link {
  color: var(--accent-dark);
  text-decoration: underline;
}
.fb-dropzone-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 8px;
}
.fb-paste-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff8ef;
  border: 1px solid #f6deb5;
  color: #8a560f;
  border-radius: 20px;
  font-size: 0.8rem;
  padding: 4px 12px;
}

/* Attached Files List */
.fb-attachments-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.fb-attachment-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #d4e2eb;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.85rem;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.fb-attachment-thumb {
  width: 42px;
  height: 42px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #e1ebf0;
}
.fb-attachment-icon {
  width: 42px;
  height: 42px;
  border-radius: 4px;
  background: #edf3f7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.fb-attachment-info {
  flex-grow: 1;
  min-width: 0;
}
.fb-attachment-name {
  display: block;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}
.fb-attachment-size {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}
.fb-attachment-remove {
  background: transparent;
  border: none;
  color: #888;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
}
.fb-attachment-remove:hover {
  background: #fee;
  color: #c0392b;
}

/* Actions & Messages */
.fb-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}
.fb-actions button[type="submit"] {
  min-width: 160px;
}
#fb-status.is-success {
  color: var(--success-ink);
  font-weight: 500;
}
#fb-status.is-error {
  color: #c0392b;
  font-weight: 500;
}

.fb-success-box {
  display: flex;
  gap: 16px;
  background: var(--success-bg);
  border: 1px solid #b7dfc8;
  border-radius: 8px;
  padding: 20px;
  margin-top: 16px;
  color: var(--success-ink);
}
.fb-success-icon {
  font-size: 1.8rem;
  font-weight: bold;
}
.fb-success-box h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}
.fb-success-box p {
  margin: 0 0 12px;
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Digest Controls Panel */
.fb-digest-controls {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.fb-digest-info {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  color: var(--body);
}
.fb-digest-info strong {
  color: var(--navy);
  font-size: 0.9rem;
}
.fb-digest-info code {
  background: #eef3f6;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.8rem;
}
.fb-digest-buttons {
  display: flex;
  gap: 8px;
}
.fb-btn-sm {
  padding: 6px 12px !important;
  font-size: 0.85rem !important;
}

/* -------------------------------------------------------------------------- */
/* Executive Usage & Cost Dashboard Styles                                     */
/* -------------------------------------------------------------------------- */
.intro-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.admin-export-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.report-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.report-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}
.btn-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

/* Tabs */
.admin-tabs {
  display: flex;
  gap: 4px;
  margin: 20px 0 20px;
  border-bottom: 2px solid var(--line);
  overflow-x: auto;
}
.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.admin-tab:hover, .admin-tab:focus-visible {
  color: var(--navy);
}
.admin-tab.active {
  color: var(--navy);
  border-bottom-color: var(--orange);
}
.tab-icon {
  width: 16px;
  height: 16px;
}
.admin-tab-panel {
  outline: none;
}

/* Enhanced KPI Stats */
.highlight-stat {
  border-color: #fbd38d !important;
  background: #fffdfa !important;
}
.admin-stat-subtext {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 5px;
  font-weight: 500;
}

/* Visualizations Grid */
.admin-viz-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 12px 0 24px;
}
@media (max-width: 900px) {
  .admin-viz-grid {
    grid-template-columns: 1fr;
  }
}
.viz-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
}
.viz-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 3px;
}
.viz-card-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 14px;
}
.viz-chart-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

/* Donut Chart */
#chart-cost-donut-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-around;
  gap: 16px;
}
.donut-svg {
  transform: rotate(-90deg);
  border-radius: 50%;
}
.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.85rem;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}
.legend-label {
  font-weight: 500;
  color: var(--dark, #1e293b);
}
.legend-val {
  font-weight: 700;
  margin-left: auto;
  padding-left: 12px;
}

/* Timeline Chart */
.timeline-container {
  width: 100%;
  height: 170px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-top: 10px;
  border-bottom: 1px solid var(--line);
}
.timeline-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}
.timeline-bar {
  width: 100%;
  max-width: 32px;
  background: var(--navy);
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
  position: relative;
}
.timeline-bar:hover {
  background: var(--orange);
}
.timeline-bar-val {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.timeline-label {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 6px;
  white-space: nowrap;
}

/* Categorization Progress Bars */
.bucket-bars {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bucket-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.bucket-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark, #1e293b);
}
.bucket-track {
  width: 100%;
  height: 10px;
  background: #edf2f7;
  border-radius: 5px;
  overflow: hidden;
}
.bucket-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy) 0%, var(--orange) 100%);
  border-radius: 5px;
  transition: width 0.4s ease;
}

/* User Rank List */
.user-rank-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.user-rank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.84rem;
  padding: 6px 8px;
  border-radius: 6px;
  background: #f8fafc;
}
.user-rank-name {
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.user-rank-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--muted);
}
.user-rank-badge {
  font-weight: 700;
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 12px;
  color: var(--navy);
}

/* Executive Summary Card */
.executive-summary-card {
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  padding: 22px 24px;
  margin-top: 24px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}
.exec-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.exec-card-header h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--navy);
}
.exec-icon {
  width: 22px;
  height: 22px;
  color: var(--orange);
}
.exec-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 760px) {
  .exec-card-grid { grid-template-columns: 1fr; }
}
.exec-highlight-col {
  border-left: 3px solid var(--orange);
  padding-left: 14px;
}
.exec-kpi {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
}
.exec-kpi-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--orange);
  margin-top: 4px;
}
.exec-kpi-desc {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 4px 0 0;
  line-height: 1.35;
}

/* History Controls & Search */
.history-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.table-search-wrap {
  min-width: 260px;
}
.admin-search-input {
  width: 100%;
  padding: 8px 14px;
  font-size: 0.88rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition: border-color 0.15s ease;
}
.admin-search-input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 2px rgba(0,43,73,0.15);
}

/* -------------------------------------------------------------------------- */
/* Print Styles for Executive PDF Export                                      */
/* -------------------------------------------------------------------------- */
@media print {
  @page {
    size: landscape;
    margin: 1.2cm;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 10pt !important;
  }
  .no-print, .uth-banner, .site-footer, .skip-link, .app-bar-actions, .notice-banner {
    display: none !important;
  }
  .app-bar {
    border-bottom: 2px solid #002b49 !important;
    padding: 6px 0 !important;
    margin-bottom: 12px !important;
  }
  .brand {
    font-size: 16pt !important;
  }
  .admin-main {
    padding: 0 !important;
    max-width: 100% !important;
  }
  .admin-tab-panel {
    display: block !important;
  }
  #panel-history, #panel-accounts, #panel-digest {
    display: none !important;
  }
  #panel-dashboard {
    display: block !important;
  }
  .admin-stat-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
  }
  .admin-stat {
    padding: 8px 10px !important;
    border: 1px solid #cbd5e1 !important;
    break-inside: avoid;
  }
  .admin-stat-value {
    font-size: 14pt !important;
  }
  .admin-viz-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    break-inside: avoid;
  }
  .viz-card {
    padding: 12px !important;
    border: 1px solid #cbd5e1 !important;
    break-inside: avoid;
  }
  .executive-summary-card {
    break-inside: avoid;
    padding: 12px 16px !important;
    margin-top: 12px !important;
  }
}

