/* RM Connect Admin — design tokens e componentes
   Identidade derivada dos ativos oficiais da RM Connect:
   navy #15295a, ciano #42eaf5, superfície #f6f7fa. */

:root {
  --rc-ink: #15295a;
  --rc-ink-700: #1d3a7a;
  --rc-accent: #42eaf5;
  --rc-accent-ink: #0b3b57;
  --rc-surface: #f6f7fa;
  --rc-panel: #ffffff;
  --rc-border: #e3e8f0;
  --rc-border-strong: #cfd8e6;
  --rc-text: #1b2537;
  --rc-muted: #5b6b82;
  --rc-warn-bg: #fef3c7;
  --rc-warn-ink: #92400e;
  --rc-ok-bg: #d1fae5;
  --rc-ok-ink: #065f46;
  --rc-danger-bg: #fee2e2;
  --rc-danger-ink: #991b1b;
  --rc-radius: 14px;
  --rc-radius-sm: 9px;
  --rc-shadow: 0 1px 2px rgba(21, 41, 90, .06), 0 8px 24px rgba(21, 41, 90, .06);
  --rc-shadow-sm: 0 1px 2px rgba(21, 41, 90, .08);
  --rc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --rc-sidebar: 264px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--rc-font);
  color: var(--rc-text);
  background: var(--rc-surface);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.25; margin: 0; }
a { color: var(--rc-ink-700); }

:focus-visible {
  outline: 2px solid var(--rc-ink-700);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--rc-ink);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- layout ---------- */
.layout {
  display: grid;
  grid-template-columns: var(--rc-sidebar) 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--rc-ink);
  color: #e8eefc;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 16px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--rc-accent);
  color: var(--rc-accent-ink);
  font-weight: 800;
  letter-spacing: .5px;
  font-size: 14px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15px; letter-spacing: .2px; }
.brand-text small { font-size: 11px; text-transform: uppercase; letter-spacing: 1.4px; opacity: .7; }

.nav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--rc-radius-sm);
  color: #cdd8ef;
  text-decoration: none;
  font-size: 14px;
  transition: background .15s ease, color .15s ease;
}
.nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-link.is-active { background: rgba(66, 234, 245, .14); color: #fff; }
.nav-link.is-active .nav-dot { background: var(--rc-accent); }
.nav-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255, 255, 255, .28);
  flex: 0 0 auto;
}
.nav-label { flex: 1; }
.nav-soon {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #b9c6e2;
}

.sidebar-footer { margin-top: auto; padding: 6px; }
.version-badge {
  font-size: 11px;
  letter-spacing: .5px;
  color: #9fb0d2;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  padding: 4px 10px;
}

.content { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 26px;
  background: var(--rc-panel);
  border-bottom: 1px solid var(--rc-border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.page-heading { flex: 1; min-width: 0; }
.page-title { font-size: 19px; font-weight: 650; color: var(--rc-ink); }

.user-chip { display: flex; align-items: center; gap: 14px; }
.user-id { display: flex; flex-direction: column; line-height: 1.2; text-align: right; }
.user-id strong { font-size: 13px; }
.user-id span { font-size: 11px; color: var(--rc-muted); text-transform: uppercase; letter-spacing: .8px; }

.main { padding: 26px; max-width: 1180px; width: 100%; }
.main:focus { outline: none; }

/* ---------- componentes ---------- */
.card {
  background: var(--rc-panel);
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius);
  box-shadow: var(--rc-shadow-sm);
  padding: 22px;
}
.card + .card, .grid + .card, .card + .grid, .grid + .grid { margin-top: 18px; }
.card-title { font-size: 16px; font-weight: 650; color: var(--rc-ink); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }

.card-welcome { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.welcome-badge {
  width: 64px; height: 64px;
  border-radius: 20px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--rc-ink), var(--rc-ink-700));
  color: var(--rc-accent);
  font-weight: 800;
  letter-spacing: 1px;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--rc-muted);
  font-weight: 600;
}
.muted { color: var(--rc-muted); margin: 6px 0 0; }
.small { font-size: 13px; }

.metric { font-size: 34px; font-weight: 700; color: var(--rc-ink); margin: 6px 0 0; letter-spacing: -.5px; }
.metric-text { font-size: 24px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.roadmap { margin: 14px 0 0; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.roadmap li { display: flex; align-items: center; gap: 12px; color: var(--rc-text); font-size: 14px; }
.roadmap-code {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  color: var(--rc-ink);
  border-radius: 6px;
  padding: 2px 8px;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-neutral { background: var(--rc-surface); color: var(--rc-muted); border: 1px solid var(--rc-border); }
.badge-warn { background: var(--rc-warn-bg); color: var(--rc-warn-ink); }
.badge-ok { background: var(--rc-ok-bg); color: var(--rc-ok-ink); }
.badge-danger { background: var(--rc-danger-bg); color: var(--rc-danger-ink); }

.alert { border-radius: var(--rc-radius-sm); padding: 11px 14px; font-size: 14px; margin: 0 0 16px; }
.alert-error { background: var(--rc-danger-bg); color: var(--rc-danger-ink); }
.alert-warn { background: var(--rc-warn-bg); color: var(--rc-warn-ink); }
.alert-info { background: #e0f2fe; color: #075985; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: transform .06s ease, background .15s ease, box-shadow .15s ease;
}
.button:active { transform: translateY(1px); }
.button-primary { background: var(--rc-ink); color: #fff; }
.button-primary:hover { background: var(--rc-ink-700); }
.button-ghost { background: transparent; border-color: var(--rc-border-strong); color: var(--rc-ink); }
.button-ghost:hover { background: var(--rc-surface); }
.button-block { width: 100%; }
.button[disabled] { opacity: .55; cursor: not-allowed; }

.inline-form { display: inline; }

.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--rc-ink); }
.field input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--rc-border-strong);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--rc-text);
  background: var(--rc-panel);
}
.field input:focus { border-color: var(--rc-ink-700); box-shadow: 0 0 0 3px rgba(29, 58, 122, .12); outline: none; }
.stack { display: grid; gap: 14px; }

.icon-button {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--rc-border-strong);
  background: var(--rc-panel);
  color: var(--rc-ink);
  font-size: 18px;
  cursor: pointer;
}

.card-empty { display: grid; gap: 10px; justify-items: start; }

/* ---------- autenticação ---------- */
.auth-body {
  display: grid;
  place-items: center;
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(66, 234, 245, .18), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, rgba(29, 58, 122, .16), transparent 55%),
    var(--rc-surface);
  padding: 24px;
}
.auth-shell { width: 100%; max-width: 430px; display: grid; gap: 18px; }
.auth-card {
  background: var(--rc-panel);
  border: 1px solid var(--rc-border);
  border-radius: 20px;
  box-shadow: var(--rc-shadow);
  padding: 32px 28px 26px;
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth-brand .brand-text strong { color: var(--rc-ink); }
.auth-brand .brand-text small { color: var(--rc-muted); }
.auth-card h1 { font-size: 22px; color: var(--rc-ink); }
.auth-sub { color: var(--rc-muted); margin: 8px 0 20px; font-size: 14px; }
.auth-foot { margin: 20px 0 0; font-size: 12px; color: var(--rc-muted); line-height: 1.5; }
.auth-copy { text-align: center; font-size: 12px; color: var(--rc-muted); margin: 0; }

/* ---------- responsivo ---------- */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, var(--rc-sidebar));
    transform: translateX(-100%);
    transition: transform .2s ease;
    z-index: 60;
    height: 100vh;
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .nav-backdrop {
    position: fixed; inset: 0;
    background: rgba(11, 22, 44, .45);
    z-index: 50;
  }
  .icon-button { display: inline-grid; place-items: center; }
  .main { padding: 18px; }
  .topbar { padding: 14px 18px; }
  .user-id { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .card-welcome { flex-direction: column; align-items: flex-start; }
  .welcome-badge { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ============================================================
   I2 — identidade, listas, tabelas e formulários
   ============================================================ */

.brand { flex-direction: column; align-items: flex-start; gap: 6px; }
.brand-plate {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
}
.brand-plate img { display: block; }
.brand-caption {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: #9fb0d2;
  padding-left: 2px;
}
.brand-caption-light { color: var(--rc-muted); }
.auth-brand { gap: 12px; align-items: center; }
.auth-brand img { display: block; }

.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;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--rc-muted);
  margin-bottom: 14px;
}
.breadcrumb a { color: var(--rc-ink-700); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }

.page-actions {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1 1 auto;
}
.field-inline { min-width: 180px; }
.field-inline input, .field-inline select { min-width: 180px; }
.filters-actions { display: flex; gap: 8px; }

.field select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--rc-border-strong);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--rc-text);
  background: var(--rc-panel);
}
.field select:focus { border-color: var(--rc-ink-700); box-shadow: 0 0 0 3px rgba(29, 58, 122, .12); outline: none; }
.field input:disabled, .field select:disabled { background: var(--rc-surface); color: var(--rc-muted); }
.field-hint { margin: 2px 0 0; font-size: 12px; color: var(--rc-muted); }

.button-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.button-sm[aria-disabled="true"], span.button-sm { opacity: .45; pointer-events: none; }

.alert-ok { background: var(--rc-ok-bg); color: var(--rc-ok-ink); }

.card-table { padding: 18px 0 0; }
.card-table .card-head { padding: 0 22px; }

.table-wrap { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .9px;
  color: var(--rc-muted);
  font-weight: 650;
  padding: 10px 22px;
  border-bottom: 1px solid var(--rc-border);
  background: #fbfcfe;
  white-space: nowrap;
}
.table tbody td {
  padding: 13px 22px;
  border-bottom: 1px solid var(--rc-border);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfe; }
.row-link { font-weight: 650; color: var(--rc-ink); text-decoration: none; }
.row-link:hover { text-decoration: underline; }
.cell-sub { display: block; font-size: 12px; color: var(--rc-muted); margin-top: 2px; }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; font-size: 13px; }
.col-actions { text-align: right; white-space: nowrap; }
.table .col-actions .button { text-decoration: none; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid var(--rc-border);
}
.pagination-info { font-size: 13px; color: var(--rc-muted); }

.empty-state {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 26px 22px 30px;
}
.empty-title { margin: 0; font-weight: 650; color: var(--rc-ink); }

.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.detail-meta { display: flex; gap: 8px; flex-wrap: wrap; }

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 18px 0 0;
  border-bottom: 1px solid var(--rc-border);
  padding-bottom: 2px;
}
.tab {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rc-muted);
  text-decoration: none;
  border-radius: 8px 8px 0 0;
}
.tab:hover { color: var(--rc-ink); background: #f2f5fa; }
.tab.is-active { color: var(--rc-ink); background: var(--rc-panel); border: 1px solid var(--rc-border); border-bottom-color: var(--rc-panel); margin-bottom: -3px; }
.tab-disabled { opacity: .5; cursor: not-allowed; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.form-subsection { margin-top: 22px; padding-top: 20px; border-top: 1px dashed var(--rc-border-strong); }
.form-title { font-size: 14px; font-weight: 650; color: var(--rc-ink); margin: 0; }

.inline-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.inline-row select {
  padding: 10px 13px;
  border: 1px solid var(--rc-border-strong);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--rc-panel);
  min-width: 180px;
}

@media (max-width: 960px) {
  .page-actions { flex-direction: column; align-items: stretch; }
  .filters { flex-direction: column; align-items: stretch; }
  .filters-actions { justify-content: flex-end; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-head { flex-direction: column; }
  .table thead th, .table tbody td { padding-left: 14px; padding-right: 14px; }
}

/* ============================================================
   I3 — módulos, usuários e ajustes mobile
   ============================================================ */

.card-list { display: none; list-style: none; margin: 0; padding: 0 14px 14px; }

.inst-card {
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius-sm);
  padding: 14px;
  margin-top: 10px;
  background: var(--rc-panel);
}
.inst-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.inst-card-line { margin: 6px 0 0; }
.inst-card-action { margin-top: 12px; width: 100%; }
.dot { margin: 0 6px; color: var(--rc-border-strong); }

.module-list { list-style: none; margin: 8px 0 0; padding: 0; }
.module-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rc-border);
}
.module-row:last-child { border-bottom: 0; }
.module-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.module-name { font-weight: 600; color: var(--rc-ink); }
.module-code { font-size: 11px; color: var(--rc-muted); }
.module-reason { font-size: 12px; color: var(--rc-muted); }
.module-state { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.module-locked { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--rc-muted); }

.checklist { display: grid; gap: 6px; margin-top: 4px; }
.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: var(--rc-text);
  cursor: pointer;
}
.check-row input { width: 16px; height: 16px; accent-color: var(--rc-ink); }

.invite-box { display: flex; gap: 8px; margin: 16px 0 6px; }
.invite-box input {
  flex: 1 1 auto;
  padding: 10px 12px;
  border: 1px solid var(--rc-border-strong);
  border-radius: 10px;
  background: var(--rc-surface);
  color: var(--rc-ink);
  font-size: 12px;
}

.field textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--rc-border-strong);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  color: var(--rc-text);
  resize: vertical;
}
.field textarea:focus { border-color: var(--rc-ink-700); box-shadow: 0 0 0 3px rgba(29, 58, 122, .12); outline: none; }
.status-form { max-width: 560px; margin-top: 12px; }

@media (max-width: 960px) {
  .table-desktop { display: none; }
  .card-list { display: block; }
  .module-row { flex-direction: column; align-items: flex-start; }
  .module-state { width: 100%; justify-content: space-between; }
  .invite-box { flex-direction: column; }
}

/* ============================================================
   I4 — planos, faixas e contagens
   ============================================================ */

.input-compact {
  width: 100%;
  min-width: 90px;
  padding: 7px 9px;
  border: 1px solid var(--rc-border-strong);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  color: var(--rc-text);
  background: var(--rc-panel);
}
.input-compact:focus { border-color: var(--rc-ink-700); box-shadow: 0 0 0 3px rgba(29, 58, 122, .12); outline: none; }

.tier-table td, .tier-table th { padding-top: 9px; padding-bottom: 9px; }
.table.compact th, .table.compact td { padding: 7px 12px; font-size: 13px; }

.version-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 14px; }
.version-item {
  border: 1px solid var(--rc-border);
  border-radius: var(--rc-radius-sm);
  padding: 12px 14px;
  background: #fcfdff;
}
.version-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }

.verify-form { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.legend { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }

@media (max-width: 960px) {
  .verify-form { flex-direction: column; align-items: stretch; }
  .verify-form .button { width: 100%; }
}

/* ============================================================
   I5 — propostas, auditoria e painel
   ============================================================ */

.badge-info { background: #e8f0fe; color: #1b3f8f; }

.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.metric-sm { font-size: 17px; font-weight: 650; color: var(--rc-ink); margin: 2px 0 0; }

.metric-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.metric-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 0; border-bottom: 1px dashed var(--rc-border); font-size: 14px;
}
.metric-list li:last-child { border-bottom: 0; }

.compact-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.compact-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }

.shortcut-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.shortcut-row .button { text-decoration: none; }

.inline-check { align-self: flex-end; padding-bottom: 10px; }

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 14px 0 6px;
}
.snapshot-grid > div { border-left: 2px solid var(--rc-border); padding-left: 12px; }

.exception-box {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #f0d9a8;
  background: var(--rc-warn-bg);
  border-radius: var(--rc-radius-sm);
}
.exception-box h3 { margin: 0 0 6px; font-size: 14px; color: var(--rc-warn-ink); }

.timeline { list-style: none; margin: 10px 0 0; padding: 0 0 0 6px; display: grid; gap: 14px; }
.timeline li { display: flex; gap: 10px; align-items: flex-start; }
.timeline-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--rc-cyan); border: 2px solid var(--rc-ink);
  margin-top: 5px; flex: 0 0 auto;
}
.timeline-title { margin: 0; font-weight: 650; font-size: 13px; color: var(--rc-ink); }

.audit-filters { margin-bottom: 14px; }
.payload summary { cursor: pointer; font-size: 13px; color: var(--rc-ink-700); }
.payload-json {
  margin: 8px 0 4px;
  padding: 10px;
  background: var(--rc-surface);
  border-radius: 8px;
  font-size: 11.5px;
  line-height: 1.45;
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.alert-warn { background: var(--rc-warn-bg); color: var(--rc-warn-ink); }

@media (max-width: 960px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .snapshot-grid { grid-template-columns: 1fr 1fr; }
  .inline-check { padding-bottom: 0; }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  .snapshot-grid { grid-template-columns: 1fr; }
}

/* ---------- I6: polimento ---------- */
.metric-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 650;
  color: var(--rc-ink-700);
  text-decoration: none;
  border-bottom: 1px solid rgba(29, 58, 122, .28);
}
.metric-link:hover { border-bottom-color: var(--rc-ink-700); }

.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.head-actions .button { text-decoration: none; }

.exception-panel { border-left: 3px solid #d9a441; }
.exception-panel .snapshot-grid { padding-top: 6px; }

.alert:focus-visible { outline: 2px solid var(--rc-ink-700); outline-offset: 3px; }
