:root {
  --bg: #f5f5f4;
  --ink: #1a1a1a;
  --muted: #6b6b67;
  --card: #ffffff;
  --line: #e7e5e4;
  --accent: #1a1a1a;
  --accent-2: #44403c;
  --ok: #166534;
  --ok-bg: #f0fdf4;
  --warn: #9a3412;
  --warn-bg: #fff7ed;
  --nav: #f5f5f4;
  --nav-ink: #1a1a1a;
  --radius: 10px;
  --shadow: none;
  font-family: "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; min-height: 100%; background: var(--bg); color: var(--ink);
  overflow-x: clip; max-width: 100%;
  -webkit-text-size-adjust: 100%;
  font-size: 15px;
  line-height: 1.45;
}
a { color: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.86em; overflow-wrap: anywhere; }
img, svg, video { max-width: 100%; height: auto; }

.shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 100%;
}
.topbar, .nav-backdrop, .nav-close { display: none; }
.nav-toggle-input { display: none; }
.nav {
  background: var(--nav);
  color: var(--nav-ink);
  padding: 1.25rem 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  border-right: 1px solid var(--line);
}
.brand { display: flex; gap: 0.7rem; align-items: center; margin: 0.15rem 0.45rem 1.35rem; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--ink); color: white;
  display: grid; place-items: center; font-weight: 600; font-size: 0.72rem;
  letter-spacing: -0.03em;
}
.brand strong { font-weight: 600; font-size: 0.95rem; letter-spacing: -0.02em; }
.brand small { display: block; color: var(--muted); font-size: 0.75rem; font-weight: 400; }
.nav-label { display: none; }
.nav-link {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 0.48rem 0.7rem;
  border-radius: 8px;
  font-size: 0.92rem;
  color: #3f3f3a;
}
.nav-link:hover { background: rgba(0,0,0,0.04); color: var(--ink); }
.nav-link.is-active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.nav-footer { margin-top: auto; padding: 1rem 0.55rem 0.2rem; border-top: 1px solid var(--line); }
.who { font-size: 0.88rem; }
.who small { display: block; color: var(--muted); font-size: 0.75rem; margin-top: 0.1rem; }
.linkish {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  padding: 0.55rem 0 0; font: inherit; font-size: 0.85rem;
}
.linkish:hover { color: var(--ink); }
.nav-build {
  margin: 0.55rem 0 0;
  font-size: 0.7rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
}

.main {
  padding: 2rem 2.4rem 3.5rem;
  min-width: 0;
  max-width: 1180px;
  overflow-x: clip;
}
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 2rem; }
.auth-card { width: min(440px, 100%); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: none;
}
.card.success { border-color: #bbf7d0; background: var(--ok-bg); }
.page-head { margin-bottom: 1.25rem; }
.page-head h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.page-head p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.92rem; }
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
.eyebrow {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 0.35rem;
  font-weight: 500;
}
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; }
.lede { color: var(--muted); line-height: 1.45; }
.stack { display: grid; gap: 0.75rem; }
label { display: grid; gap: 0.3rem; font-size: 0.8rem; color: var(--muted); font-weight: 500; }
input[type="email"], input[type="password"], input[type="text"], input[type="search"] {
  font: inherit; color: var(--ink); padding: 0.55rem 0.7rem; border-radius: 8px;
  border: 1px solid var(--line); background: white;
  max-width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid #d6d3d1;
  outline-offset: 1px;
  border-color: #a8a29e;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: white; border: 1px solid var(--ink);
  border-radius: 8px; padding: 0.5rem 0.85rem; font: inherit; font-size: 0.88rem; font-weight: 550;
  cursor: pointer; text-decoration: none; line-height: 1.2;
}
.btn:hover { background: #333; }
.hint { color: var(--muted); font-size: 0.85rem; }
.banner { padding: 0.7rem 0.85rem; border-radius: 8px; background: #fff; border: 1px solid var(--line); overflow-wrap: anywhere; margin: 0 0 1rem; }
.banner-warn { background: var(--warn-bg); color: var(--warn); border-color: #fed7aa; }
.meta { display: grid; gap: 0.85rem 1.25rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 0; }
.meta dt { font-size: 0.75rem; color: var(--muted); font-weight: 500; }
.meta dd { margin: 0.15rem 0 0; }
.grid { margin-top: 1.2rem; display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.link-card { text-decoration: none; color: inherit; display: grid; gap: 0.3rem; }
.link-card h3 { margin: 0; }
.link-card p { margin: 0; color: var(--muted); }
.steps { padding-left: 1.2rem; color: var(--muted); }
.detail { overflow: auto; font-size: 0.8rem; background: #1c1917; color: #f5f5f4; padding: 0.8rem; border-radius: 8px; max-width: 100%; }

.nav { overflow-y: auto; }
.nav-drawer-head { display: contents; }
.topbar, .nav-backdrop, .nav-close { display: none; }
.nav-toggle {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 8px;
  cursor: pointer;
  color: inherit;
}
.nav-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.nav-toggle-bars {
  display: block;
  width: 16px; height: 1.5px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}
.nav-close {
  font: 500 0.85rem "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  color: var(--muted);
  cursor: pointer;
  padding: 0.4rem 0.2rem;
}
.topbar {
  display: none;
  align-items: center;
  gap: 0.65rem;
  background: #fff;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 0.45rem 0.75rem;
  padding-top: max(0.45rem, env(safe-area-inset-top));
  position: sticky;
  top: 0;
  z-index: 30;
  min-width: 0;
}
.topbar .brand { margin-bottom: 0; min-width: 0; flex: 1; }
.topbar-who {
  margin-left: auto;
  max-width: 38%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  color: var(--muted);
}
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  z-index: 35;
  cursor: pointer;
}
.hint { overflow-wrap: anywhere; }
.page-head p { overflow-wrap: anywhere; }
.card { min-width: 0; max-width: 100%; }
.kpi-value { overflow-wrap: anywhere; }
.who span { overflow-wrap: anywhere; }
.section-title { font-size: 0.95rem; margin: 0 0 0.7rem; }
.subhead { font-size: 0.85rem; color: var(--muted); margin: 0.9rem 0 0.4rem; font-weight: 550; }
.block { margin: 1.6rem 0; }
.kpi-grid { display: grid; gap: 0.65rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 1.1rem; }
.kpi { padding: 0.9rem 1rem; }
.kpi-value { margin: 0; font-size: 1.45rem; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tabs {
  display: flex; flex-wrap: wrap; gap: 0.2rem;
  margin: 0 0 1.15rem;
  padding: 0.2rem;
  width: fit-content;
  max-width: 100%;
  background: #eeedeb;
  border-radius: 10px;
  border: 0;
}
.tabs a, .tabs button {
  text-decoration: none;
  color: var(--muted);
  padding: 0.38rem 0.75rem;
  border-radius: 8px;
  font: inherit;
  font-size: 0.86rem;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.tabs a.is-active, .tabs button.is-active {
  color: var(--ink);
  background: #fff;
  border: 0;
  margin: 0;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
th.sortable {
  cursor: pointer;
  user-select: none;
}
th.sortable:hover { color: var(--ink); }
th.sortable.is-asc::after { content: " ↑"; }
th.sortable.is-desc::after { content: " ↓"; }
[hidden] { display: none !important; }
.filters, .toolbar {
  display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: end;
  margin: 0 0 0.9rem;
}
.filters label, .toolbar label { min-width: 160px; }
.toolbar label.grow { flex: 1 1 220px; }
.type-filter { min-width: 220px; display: grid; gap: 0.3rem; }
.type-filter-caption { font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.type-picker { position: relative; }
.type-picker-summary {
  list-style: none; cursor: pointer;
  font: inherit; color: var(--ink); padding: 0.55rem 0.7rem; border-radius: 8px;
  border: 1px solid var(--line); background: white;
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  min-height: 2.5rem;
}
.type-picker-summary::-webkit-details-marker { display: none; }
.type-picker-summary::after { content: "▾"; color: var(--muted); font-size: 0.75rem; }
.type-picker[open] .type-picker-summary::after { content: "▴"; }
.type-picker-panel {
  position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; right: 0;
  min-width: 16rem; background: white; border: 1px solid var(--line);
  border-radius: 8px; padding: 0.65rem 0.75rem; display: grid; gap: 0.35rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.type-mode { display: flex; gap: 0.85rem; padding-bottom: 0.45rem; margin-bottom: 0.2rem; border-bottom: 1px solid var(--line); }
select, input[type="search"] {
  font: inherit; color: var(--ink); padding: 0.55rem 0.7rem; border-radius: 8px;
  border: 1px solid var(--line); background: white;
}
.table-wrap {
  overflow: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th, table.data td {
  text-align: left; padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--line); vertical-align: middle;
}
table.data th {
  font-size: 0.75rem; font-weight: 550;
  color: var(--muted); background: #fafaf9;
}
table.data td { font-variant-numeric: tabular-nums; }
table.data th, table.data td { white-space: nowrap; }
table.data td.clip {
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: #fafaf9; }
.who { display: inline-flex; align-items: center; gap: 0.4rem; }
table.data a { text-decoration: none; font-weight: 550; }
table.data a:hover { text-decoration: underline; }
.pill {
  display: inline-block; padding: 0.1rem 0.45rem; border-radius: 999px;
  background: #f5f5f4; color: #44403c; font-size: 0.75rem; font-weight: 550;
  border: 1px solid var(--line);
}
.pill-ok { background: var(--ok-bg); color: var(--ok); border-color: #bbf7d0; }
.pill-inferred {
  font-weight: 500; color: var(--muted); background: #fafaf9; text-decoration: none;
  cursor: help;
}
.cell-stack { display: inline-flex; align-items: center; gap: 0.35rem; }
.pager { display: flex; gap: 1rem; align-items: center; margin: 0.9rem 0 0; font-size: 0.86rem; color: var(--muted); }
.pager a { color: var(--ink); font-weight: 550; }
.pager-numbers { flex-wrap: wrap; gap: 0.6rem; }
.pager-numbers strong { color: var(--ink); border-bottom: 2px solid var(--ink); }
.muted { color: var(--muted); }
.empty { color: var(--muted); text-align: center; padding: 2rem 1rem; }
.crumb { margin: 0 0 0.45rem; font-size: 0.82rem; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--ink); }
.split { display: grid; gap: 1rem; grid-template-columns: 1.4fr 0.8fr; align-items: start; }
.plain { margin: 0; padding-left: 1.1rem; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  display: grid; gap: 0.1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.btn-danger { background: #fff; color: #9a3412; border-color: #fdba74; }
.btn-danger:hover { background: var(--warn-bg); }
.danger-box { border-color: #fed7aa; background: #fffdfb; }
.check-col { width: 2.2rem; text-align: center; }
.check-col input[type="checkbox"] { width: auto; max-width: none; margin: 0; }
input[type="checkbox"] { width: auto; max-width: none; accent-color: var(--ink); }
.email-list { margin: 0.4rem 0 1rem; }
.email-list li { overflow-wrap: anywhere; }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: #fafaf9; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.row-actions form { display: flex; gap: 0.45rem; align-items: center; margin: 0; }
textarea, input[type="datetime-local"], input[type="number"], input[type="date"], select {
  font: inherit; color: var(--ink); padding: 0.55rem 0.7rem; border-radius: 8px;
  border: 1px solid var(--line); background: white; width: 100%;
  max-width: 100%; min-width: 0;
}
textarea { min-height: 7rem; font-family: inherit; font-size: 0.92rem; }
.check { display: flex; gap: 0.4rem; align-items: center; font-size: 0.82rem; color: var(--muted); font-weight: 400; }
.freeze-banner {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: var(--warn-bg);
  color: var(--warn);
  border: 1px solid #fed7aa;
  overflow-wrap: anywhere;
}
.freeze-pill {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 0.72rem;
  white-space: nowrap;
}
.pill-warn { background: var(--warn-bg); color: var(--warn); border-color: #fed7aa; }

.group-picks {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  display: grid;
  gap: 0.35rem;
}
.group-picks legend {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
  padding: 0 0.25rem;
}
.rollout { display: grid; gap: 0.45rem; }
.rollout input[type="range"] { width: 100%; accent-color: var(--ink); }
.rollout-steps { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.rollout-steps .btn { padding: 0.35rem 0.6rem; min-height: 0; }
.kill-box {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.diff-list { margin: 0; padding-left: 1.1rem; font-size: 0.82rem; }
.diff-list li { overflow-wrap: anywhere; white-space: normal; }
.chart-wrap { margin: 1rem 0; }
.flag-chart { width: 100%; height: auto; max-width: 40rem; display: block; }
.chart-key { display: inline-flex; align-items: center; gap: 0.35rem; margin-right: 0.8rem; font-size: 0.8rem; }
.chart-key::before { content: ""; width: 0.7rem; height: 2px; background: currentColor; }
.chart-key-eval { color: var(--ink); }
.chart-key-on { color: var(--ok); }
.title-row .btn { margin-left: auto; }

.blank-login {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: grid;
  place-items: center;
  background: #fff;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.blank-form { display: grid; gap: 0.75rem; justify-items: center; }
.login-btn, .google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  background: #fff;
  color: #1f1f1f;
  border: 1px solid #747775;
  border-radius: 4px;
  padding: 0.65rem 1.15rem;
  font: 500 14px/1.2 ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
  text-decoration: none;
}
.login-btn:hover, .google-btn:hover { box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.login-error {
  margin: 0;
  color: #b91c1c;
  font: 500 13px/1.3 ui-sans-serif, system-ui, sans-serif;
  max-width: 16rem;
  text-align: center;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.blank-form input[type="text"] {
  font: 500 1.1rem ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.3em;
  text-align: center;
  width: 10rem;
  padding: 0.65rem 0.5rem;
  border: 1px solid #747775;
  border-radius: 4px;
}

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .shell {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    min-height: 100dvh;
  }
  .topbar { display: flex; }
  .nav-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }
  .nav-drawer-head .brand { margin-bottom: 0; }
  .nav-close { display: inline-flex; }
  .nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(18rem, 88vw);
    z-index: 40;
    transform: translateX(-105%);
    transition: transform 0.18s ease;
    overflow-y: auto;
    padding: max(0.9rem, env(safe-area-inset-top)) 0.85rem max(1rem, env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: 8px 0 30px rgba(0, 0, 0, 0.08);
  }
  .nav-toggle-input:checked ~ .nav { transform: translateX(0); }
  .nav-toggle-input:checked ~ .nav-backdrop { display: block; }
  body:has(.nav-toggle-input:checked) { overflow: hidden; }

  .main {
    padding: 1.1rem 1rem calc(2.2rem + env(safe-area-inset-bottom, 0px));
    width: 100%;
  }
  .page-head h1 { font-size: 1.3rem; }
  .split, .kpi-grid, .grid, .meta { grid-template-columns: 1fr; }
  .filters, .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .filters label, .toolbar label { min-width: 0; width: 100%; }
  .filters .btn, .toolbar .btn, .stack .btn, .card > form .btn { width: 100%; }
  .row-actions { flex-direction: column; align-items: stretch; }
  .row-actions form { display: grid; width: 100%; }
  input, select, textarea { width: 100%; max-width: 100%; }
  input[type="checkbox"] { width: auto; max-width: none; }
  table.data { min-width: 36rem; }
  table.data th, table.data td { white-space: nowrap; }
  table.data td.empty { white-space: normal; }
  .pager { flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; }
  .btn { min-height: 40px; }
  .tabs { width: 100%; }
}

/* === Provas em Destaque UI Refresh === */
.section-card {
  margin-bottom: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  padding: 1.25rem;
}
.card-header {
  margin-bottom: 1rem;
}
.card-header .section-title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}
.search-bar-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
}
.search-input-wrap {
  flex: 1;
}
.search-bar-row input[type="search"] {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.88rem;
}

/* Catalog Table & Main Data Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}
.data-table th {
  padding: 0.75rem 0.85rem;
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.data-table td {
  padding: 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.015);
}
.exam-title-cell strong {
  color: var(--ink);
  font-size: 0.92rem;
}
.muted-code {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* Order Badge & Controls */
.order-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.badge-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.8rem;
}
.btn-icon {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 0.65rem;
  color: var(--ink);
  line-height: 1;
}
.btn-icon:hover {
  background: var(--border);
}

/* Status Pills */
.status-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.status-active {
  background: #dcfce7;
  color: #15803d;
}
.status-inactive {
  background: #f1f5f9;
  color: #64748b;
}

/* Small Buttons & Action Row */
.action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.btn-xs {
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  border-radius: 5px;
  font-weight: 500;
}
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--ink);
}
.btn-outline:hover {
  background: #f8fafc;
}
.btn-success {
  background: #10b981;
  color: #fff;
}
.btn-success:hover {
  background: #059669;
}
.btn-primary {
  background: #2563eb;
  color: #fff;
}
.btn-primary:hover {
  background: #1d4ed8;
}
.btn-danger {
  background: #ef4444;
  color: #fff;
}
.btn-danger:hover {
  background: #dc2626;
}
.btn-secondary {
  background: #f1f5f9;
  border-color: var(--border);
  color: var(--ink);
}

/* Help Exclamation Button */
.help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  margin-left: 2px;
  margin-right: 6px;
  transition: all 0.15s ease;
  vertical-align: middle;
}
.help-btn:hover {
  background: #2563eb;
  color: #ffffff;
  transform: scale(1.15);
}

/* Sidepanel Help Drawer */
.help-drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.25s ease;
}
.help-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}
.help-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.help-drawer.is-open .help-drawer-backdrop {
  opacity: 1;
}
.help-drawer-content {
  position: relative;
  width: 100%;
  max-width: 380px;
  height: 100%;
  background: #ffffff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 1.5rem;
  box-sizing: border-box;
}
.help-drawer.is-open .help-drawer-content {
  transform: translateX(0);
}
.help-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}
.help-drawer-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.help-drawer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #2563eb;
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.75rem;
}
.help-drawer-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}
.help-drawer-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0 0.25rem;
}
.help-drawer-close:hover {
  color: var(--ink);
}
.help-drawer-body {
  flex: 1;
  overflow-y: auto;
}
.help-desc-text {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #334155;
  margin-bottom: 1.5rem;
}
.help-callout {
  background: #f8fafc;
  border-left: 3px solid #2563eb;
  padding: 0.85rem 1rem;
  border-radius: 0 6px 6px 0;
  font-size: 0.85rem;
  color: #475569;
}
.help-callout strong {
  color: var(--ink);
  display: block;
  margin-bottom: 0.25rem;
}
.help-callout p {
  margin: 0;
}

/* Pagination Refresh */
.pager-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.pager-numbers {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.pager-pages {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.pager-btn {
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--ink);
  background: #ffffff;
}
.pager-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.pager-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 0.35rem;
  border-radius: 4px;
  font-size: 0.82rem;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid transparent;
}
.pager-num.active {
  background: #2563eb;
  color: #ffffff;
  font-weight: 600;
}
.pager-gap {
  padding: 0 0.2rem;
  color: var(--muted);
}
