/* ==========================================================================
   Rastro: folha de estilo do painel (escrita do zero, medidas em variáveis).
   Estrutura: 1 variáveis, 2 base, 3 casca, 4 componentes, 5 telas, 6 entrar.
   Mobile primeiro: o que está fora de @media vale de 375 px para cima; os três pontos de quebra
   (768, 992, 1200 px) só acrescentam. Barra lateral fixa a partir de 1200 px; abaixo vira gaveta.
   ========================================================================== */

/* ---------- 1. Variáveis ---------- */
@font-face{font-family:Inter;src:url('../fonts/inter-var.woff2') format('woff2');font-weight:100 900;font-display:swap}
@font-face{font-family:Inter;src:url('../fonts/inter-var-ext.woff2') format('woff2');font-weight:100 900;font-display:swap;unicode-range:U+0100-02AF,U+1E00-1EFF}

:root {
  --rt-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rt-unit: 7px;
  --rt-font-size: 14px;
  --rt-line-height: 1.45;
  --rt-accent: #005ae3;
  --rt-success: #20a369;
  --rt-danger: #ea5455;
  --rt-warning: #ff9f43;
  --rt-accent-soft: rgba(0,90,227,.12);
  --rt-success-soft: rgba(32,163,105,.12);
  --rt-danger-soft: rgba(234,84,85,.12);
  --rt-warning-soft: rgba(255,159,67,.12);
  --rt-radius-sm: 4px;
  --rt-radius-control: 5px;
  --rt-radius-card: 6px;
  --rt-radius-tab: 8px;
  --rt-radius-pill: 700px;
  --rt-backdrop: rgba(34,41,47,.5);
  --rt-shadow-bar: 0 4px 24px rgba(34,41,47,.1);
  --rt-shadow-pop: 0 5px 20px rgba(34,41,47,.1);
  --rt-shadow-side: 0 0 15px rgba(34,41,47,.05);
  --rt-glow: 0 0 10px 1px rgba(0,90,227,.7);
  --rt-sidebar-w: 260px;
  --rt-sidebar-w-min: 82px;
  --rt-nav-item-h: 42px;
  --rt-nav-icon: 20px;
  --rt-nav-font: 15.4px;
  --rt-topbar-top: 18px;
  --rt-topbar-h: 62px;
  --rt-content-top: 108.5px;
  --rt-content-pad: 28px;
  --rt-control-h: 38px;
  --rt-card-pad: 21px;
  --rt-kpi-h: 95px;
  --rt-grid-gap: 20px;
  --rt-th-h: 41.5px;
  --rt-total-h: 37.5px;
  --rt-cell-pad-y: 10px;
  --rt-cell-pad-x: 28px;
  --rt-tab-h: 47px;
  --rt-tab-h-active: 53px;
  --rt-overlay-dur: .3s;
  --rt-collapse-dur: .6s;
  --rt-sp-1: calc(var(--rt-unit) / 2);
  --rt-sp-2: var(--rt-unit);
  --rt-sp-3: calc(var(--rt-unit) * 1.5);
  --rt-sp-4: calc(var(--rt-unit) * 2);
  --rt-sp-5: calc(var(--rt-unit) * 2.5);
  --rt-sp-6: calc(var(--rt-unit) * 3);
  --rt-sp-8: calc(var(--rt-unit) * 4);
  --rt-sp-10: calc(var(--rt-unit) * 5);
  --rt-z-topbar: 1030;
  --rt-z-sidebar: 1031;
  --rt-z-pop: 1050;
  --rt-z-overlay: 1040;
  --rt-z-drawer: 1045;
  --rt-z-toast: 1080;
}

[data-bs-theme="dark"] {
  color-scheme: dark;
  --rt-bg: #161d31;
  --rt-surface: #283046;
  --rt-surface-head: #343d55;
  --rt-line: #3b4253;
  --rt-line-input: #404656;
  --rt-text: #b4b7bd;
  --rt-text-strong: #d0d2d6;
  --rt-text-muted: #6e6b7b;
  --rt-shadow-card: 0 4px 24px rgba(34,41,47,.24);
  --rt-input-text: #d0d2d6;
  --rt-placeholder: #676d7d;
  --rt-row-hover: rgba(255,255,255,.04); /* não medido na referência */
}

[data-bs-theme="light"] {
  color-scheme: light;
  --rt-bg: #f8f8f8;
  --rt-surface: #ffffff;
  --rt-surface-head: #f3f2f7; /* não medido na referência */
  --rt-line: #d8d6de;
  --rt-line-input: #d8d6de;
  --rt-text: #6e6b7b;
  --rt-text-strong: #5e5873;
  --rt-text-muted: #8a8797; /* não medido na referência */
  --rt-shadow-card: 0 4px 24px rgba(34,41,47,.1);
  --rt-input-text: #2d2d2d;
  --rt-placeholder: #b9b9c3; /* não medido na referência */
  --rt-row-hover: rgba(34,41,47,.03); /* não medido na referência */
}

/* ---------- 2. Base ---------- */
*,*::before,*::after { box-sizing: border-box; }
html { font-size: var(--rt-font-size); scrollbar-color: var(--rt-line-input) var(--rt-bg); }
body { margin: 0; font-family: var(--rt-font); font-size: var(--rt-font-size); line-height: var(--rt-line-height); background: var(--rt-bg); color: var(--rt-text); font-variant-numeric: tabular-nums; }
::selection { background: var(--rt-accent); color: #fff; }
a { color: inherit; text-decoration: none; text-underline-offset: 3px; }
a:hover { color: var(--rt-text-strong); }
button,input,select,textarea { font: inherit; }
button,a,input,select,textarea { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: wait; }
:focus-visible { outline: 2px solid var(--rt-accent); outline-offset: 2px; }
h1,h2,h3,p { margin: 0; }
h1,h2,h3 { color: var(--rt-text-strong); font-weight: 500; text-wrap: balance; }
h1 { font-size: 21px; line-height: 1.3; }
h2 { font-size: 17.99px; line-height: 1.2; }
h3 { font-size: 14.98px; line-height: 1.3; }
small { font-size: 12px; }
[hidden] { display: none !important; }
code,pre { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
code { font-size: 12px; word-break: break-word; }
.ti { font-size: var(--rt-nav-icon); line-height: 1; }
.rt-muted { color: var(--rt-text); }
.rt-positive { color: var(--rt-success); }
.rt-negative { color: var(--rt-danger); }
.rt-warning-text { color: var(--rt-warning); }
.rt-numeric { white-space: nowrap; text-align: right; }
.rt-skip { position: fixed; z-index: 2000; top: -100px; left: var(--rt-sp-4); padding: var(--rt-sp-3); background: var(--rt-accent); color: #fff; border-radius: var(--rt-radius-control); }
.rt-skip:focus { top: var(--rt-sp-4); }
/* Ocultar valores: theme-init.js põe a classe antes do primeiro desenho. */
.rt-values-hidden [data-money] { filter: blur(6px); user-select: none; }

/* ---------- 3. Casca ---------- */
/* Barra lateral. Abaixo de 1200 px é gaveta escondida à esquerda; abre por :target (sem JS) ou rt-nav-open. */
.rt-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--rt-sidebar-w); z-index: var(--rt-z-drawer); display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; background: var(--rt-surface); box-shadow: var(--rt-shadow-side); transform: translateX(-100%); visibility: hidden; transition: transform var(--rt-overlay-dur) ease-in-out, visibility 0s var(--rt-overlay-dur); }
.rt-nav-open .rt-sidebar,.rt-sidebar:target { transform: none; visibility: visible; transition: transform var(--rt-overlay-dur) ease-in-out, visibility 0s; }
.rt-sidebar-head { display: flex; align-items: center; height: var(--rt-topbar-h); padding: 4.9px 17.5px 4.2px; flex-shrink: 0; }
.rt-brand { display: flex; align-items: center; gap: 10px; color: var(--rt-text-strong); font-size: 22px; font-weight: 700; letter-spacing: -.03em; }
.rt-brand:hover { color: var(--rt-text-strong); }
.rt-brand-mark { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: var(--rt-radius-card); background: var(--rt-accent); color: #fff; }
.rt-brand-mark .ti { font-size: 22px; }
.rt-brand-dot { color: var(--rt-accent); }
.rt-collapse,.rt-nav-close { display: none; place-items: center; width: 28px; height: 28px; margin-left: auto; padding: 0; border: 1px solid var(--rt-line-input); border-radius: 50%; background: transparent; color: var(--rt-text); }
.rt-collapse:hover,.rt-nav-close:hover { color: var(--rt-text-strong); background: var(--rt-row-hover); }
.rt-collapse .ti,.rt-nav-close .ti { font-size: 16px; }
.rt-nav-close { display: grid; }
.rt-nav { padding: 28px 0 var(--rt-sp-4); }
.rt-nav-link { display: flex; align-items: center; height: auto; min-height: var(--rt-nav-item-h); margin: 0 15px; padding: 10px 15px; border-radius: var(--rt-radius-sm); color: var(--rt-text-strong); font-size: var(--rt-nav-font); font-weight: 400; line-height: 22.3px; }
.rt-nav-link .ti { flex-shrink: 0; margin-right: 15.4px; font-size: var(--rt-nav-icon); }
.rt-nav-link:hover { color: var(--rt-text-strong); }
.rt-nav-link.active,.rt-nav-link.active:hover { background: linear-gradient(118deg, var(--rt-accent), rgba(0,90,227,.7)); box-shadow: var(--rt-glow); color: #fff; }
.rt-nav-text { white-space: nowrap; }

.rt-overlay { position: fixed; inset: 0; z-index: var(--rt-z-overlay); border: 0; background: var(--rt-backdrop); opacity: 0; visibility: hidden; transition: opacity var(--rt-overlay-dur) linear, visibility 0s var(--rt-overlay-dur); }
.rt-nav-open .rt-overlay,.rt-sidebar:target ~ .rt-overlay { opacity: 1; visibility: visible; transition: opacity var(--rt-overlay-dur) linear, visibility 0s; }

/* Barra superior: abaixo de 1200 px fixa, colada no topo, 75 px. */
.rt-topbar { position: fixed; top: 0; left: 0; right: 0; z-index: var(--rt-z-topbar); display: flex; align-items: center; justify-content: space-between; gap: var(--rt-sp-2); height: 75px; padding: 0 var(--rt-sp-4); background: var(--rt-surface); box-shadow: var(--rt-shadow-bar); }
.rt-topbar-start,.rt-topbar-end { display: flex; align-items: center; gap: var(--rt-sp-2); min-width: 0; }
.rt-topbar-end { flex-shrink: 0; }
.rt-brand-compact .rt-brand-mark { width: 34px; height: 34px; }
.rt-workspace-name { display: none; margin-left: var(--rt-sp-4); color: var(--rt-text-strong); font-size: 16px; font-weight: 500; white-space: nowrap; }
.rt-local-label { color: var(--rt-warning); font-size: 12px; }
.rt-icon-button { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: var(--rt-radius-tab); background: transparent; color: var(--rt-text-strong); list-style: none; cursor: pointer; transition: background-color .15s; }
.rt-icon-button::-webkit-details-marker { display: none; }
.rt-icon-button:hover { background: var(--rt-row-hover); color: var(--rt-text-strong); }
.rt-icon-button .ti { font-size: 20px; }
.rt-menu-button { min-height: 34px; padding: 0 var(--rt-sp-3); gap: 0; }
.rt-menu-button .ti { font-size: 16px; }
.rt-pop-host { position: relative; }
.rt-pop { position: absolute; right: 0; top: calc(100% + var(--rt-sp-2)); z-index: var(--rt-z-pop); min-width: 200px; padding: var(--rt-sp-4); border-radius: var(--rt-radius-control); background: var(--rt-surface); box-shadow: var(--rt-shadow-pop); }
.rt-pop-title { margin-bottom: var(--rt-sp-3); color: var(--rt-text-strong); font-weight: 700; }
.rt-theme-options { display: flex; gap: var(--rt-sp-2); }
.rt-theme-option { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--rt-sp-2); width: 58px; height: 70px; padding: 0; border: 2px solid var(--rt-line); border-radius: var(--rt-radius-tab); background: transparent; color: var(--rt-text-strong); font-size: 12px; }
.rt-theme-option:hover { background: var(--rt-row-hover); }
[data-bs-theme="light"] .rt-theme-option[data-theme-set="light"],[data-bs-theme="dark"] .rt-theme-option[data-theme-set="dark"] { border-color: var(--rt-accent); }
.rt-user summary { display: flex; align-items: center; gap: var(--rt-sp-3); list-style: none; cursor: pointer; }
.rt-user summary::-webkit-details-marker { display: none; }
.rt-user-text { display: none; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.rt-user-text b { color: var(--rt-text-strong); font-size: 12px; font-weight: 500; }
.rt-user-text small { font-size: 11px; }
.rt-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--rt-accent); color: #fff; font-weight: 500; }
.rt-user-panel { width: 240px; overflow-wrap: anywhere; }
.rt-user-panel p { margin-bottom: var(--rt-sp-3); }
.rt-user-panel .rt-link { margin-bottom: var(--rt-sp-3); }

/* Conteúdo. */
.rt-main { padding: 97.3px 16.8px var(--rt-content-pad); /* celular: medido na referência */ }
.rt-content { min-width: 0; animation: rt-page-in .22s ease-out; }
/* Troca de página suave: o navegador cruza a página antiga com a nova; menu e barra superior ficam parados. */
@view-transition { navigation: auto; }
@keyframes rt-page-in { from { opacity: 0; } to { opacity: 1; } }
.rt-sidebar { view-transition-name: rt-sidebar; }
.rt-topbar { view-transition-name: rt-topbar; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; animation-timing-function: ease-out; }
.rt-footer { display: flex; flex-direction: column; gap: var(--rt-sp-2); margin-top: var(--rt-sp-8); padding-top: var(--rt-sp-4); border-top: 1px solid var(--rt-line); color: var(--rt-text); font-size: 12px; }
#change-password { scroll-margin-top: 88px; }

/* ---------- 4. Componentes ---------- */
/* Botões */
.rt-button { display: inline-flex; align-items: center; justify-content: center; gap: var(--rt-sp-2); min-height: var(--rt-control-h); padding: 0 var(--rt-card-pad); border: 1px solid var(--rt-line-input); border-radius: var(--rt-radius-control); background: transparent; color: var(--rt-text-strong); font-size: 14px; font-weight: 500; white-space: nowrap; }
.rt-button:hover { background: var(--rt-row-hover); color: var(--rt-text-strong); }
.rt-button .ti { font-size: 18px; }
.rt-button-primary { background: var(--rt-accent); border-color: var(--rt-accent); color: #fff; }
.rt-button-primary:hover { background: var(--rt-accent); color: #fff; filter: brightness(1.1); }
.rt-button-small { min-height: 30px; padding: 0 var(--rt-sp-4); font-size: 12px; }
.rt-button-danger { border-color: var(--rt-danger); color: var(--rt-danger); }
.rt-button-danger:hover { background: var(--rt-danger-soft); color: var(--rt-danger); }
.rt-button:disabled { opacity: .55; cursor: not-allowed; }
.rt-button.is-busy { opacity: .8; cursor: progress; }
.rt-button.is-busy::before { content: ""; width: 14px; height: 14px; flex-shrink: 0; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: rt-spin .7s linear infinite; }
@keyframes rt-spin { to { transform: rotate(360deg); } }
.rt-icon-button-danger { color: var(--rt-danger); }
.rt-icon-button-danger:hover { background: var(--rt-danger-soft); color: var(--rt-danger); }
.rt-link { display: inline-flex; align-items: center; gap: var(--rt-sp-2); color: var(--rt-text-strong); font-size: 12px; }
.rt-link:hover { text-decoration: underline; }
.rt-back-link { margin-bottom: var(--rt-sp-3); color: var(--rt-text); }
.rt-full { width: 100%; }
.rt-actions,.rt-header-actions { display: flex; align-items: center; gap: var(--rt-sp-2); flex-wrap: wrap; }
.rt-page-header { display: flex; align-items: flex-start; flex-wrap: wrap; justify-content: space-between; gap: var(--rt-sp-4); margin-bottom: var(--rt-sp-6); }
.rt-page-header p { margin-top: var(--rt-sp-1); font-size: 13px; }
.rt-header-actions { width: 100%; }

/* Cartões */
.rt-panel,.rt-card { overflow: hidden; border-radius: var(--rt-radius-card); background: var(--rt-surface); box-shadow: var(--rt-shadow-card); }
.rt-panel-header,.rt-card-header { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: var(--rt-sp-4); padding: var(--rt-card-pad); border-bottom: 1px solid var(--rt-line); }
.rt-panel-header p,.rt-card-header p { margin-top: var(--rt-sp-1); font-size: 12px; }
.rt-panel-header>.ti,.rt-card-header>.ti { flex-shrink: 0; color: var(--rt-text); }
.rt-panel-header h2,.rt-card-header h2 { line-height: 1.35; }
.rt-panel-body,.rt-card-body { padding: var(--rt-card-pad); }
.rt-stack { display: grid; gap: var(--rt-grid-gap); }
.rt-two-columns,.rt-even-columns { display: grid; grid-template-columns: minmax(0,1fr); gap: var(--rt-grid-gap); margin-bottom: var(--rt-grid-gap); }
.rt-kpis { display: grid; grid-template-columns: minmax(0,1fr); gap: var(--rt-grid-gap); margin-bottom: var(--rt-grid-gap); }
.rt-kpi { min-height: var(--rt-kpi-h); padding: var(--rt-card-pad) var(--rt-card-pad) var(--rt-sp-2); border-radius: var(--rt-radius-card); background: var(--rt-surface); box-shadow: var(--rt-shadow-card); }
.rt-kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--rt-sp-2); color: var(--rt-text-strong); font-size: 14px; font-weight: 500; line-height: 16.8px; }
.rt-kpi-top .ti { font-size: 18px; color: var(--rt-text); }
.rt-kpi-value { margin-bottom: var(--rt-sp-4); color: var(--rt-text-strong); font-size: 24px; font-weight: 600; line-height: 28.8px; }
.rt-kpi-value.rt-positive { color: var(--rt-success); }
.rt-kpi-value.rt-negative { color: var(--rt-danger); }
.rt-kpi-foot { margin: calc(var(--rt-sp-2) * -1) 0 var(--rt-sp-2); font-size: 12px; }
/* Entrega à Meta (Resumo): um card por situação; a cor da situação fica no ícone */
.rt-delivery { min-width: 0; }
.rt-delivery-head { margin: var(--rt-sp-2) 0 var(--rt-sp-3); }
.rt-delivery-head p { margin-top: var(--rt-sp-1); font-size: 12px; }
.rt-delivery-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--rt-grid-gap); }
.rt-delivery-card { --rt-tone: var(--rt-text); --rt-tone-soft: var(--rt-row-hover); display: flex; align-items: flex-start; gap: var(--rt-sp-3); min-width: 0; padding: var(--rt-card-pad); border-radius: var(--rt-radius-card); background: var(--rt-surface); box-shadow: var(--rt-shadow-card); transition: transform .18s cubic-bezier(.2,0,0,1), box-shadow .18s cubic-bezier(.2,0,0,1); }
.rt-delivery-card:hover { transform: translateY(-2px); }
.rt-delivery-card.is-accent { --rt-tone: var(--rt-accent); --rt-tone-soft: var(--rt-accent-soft); }
.rt-delivery-card.is-success { --rt-tone: var(--rt-success); --rt-tone-soft: var(--rt-success-soft); }
.rt-delivery-card.is-warning { --rt-tone: var(--rt-warning); --rt-tone-soft: var(--rt-warning-soft); }
.rt-delivery-card.is-danger { --rt-tone: var(--rt-danger); --rt-tone-soft: var(--rt-danger-soft); }
.rt-delivery-icon { display: grid; flex-shrink: 0; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--rt-tone-soft); color: var(--rt-tone); font-size: 20px; }
.rt-delivery-body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.rt-delivery-top { display: flex; align-items: center; justify-content: space-between; gap: var(--rt-sp-2); color: var(--rt-text); font-size: 13px; }
.rt-delivery-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-delivery-value { color: var(--rt-text-strong); font-size: 22px; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rt-delivery-caption { color: var(--rt-text); font-size: 12px; line-height: 1.4; }

/* Legenda do gráfico do Resumo (o gráfico em si é o pixel-chart.js, estilos em pixel-routing.css) */
.rt-chart-legend { display: flex; align-items: center; gap: var(--rt-sp-3); flex-wrap: wrap; font-size: 12px; }
.rt-chart-legend span { display: flex; align-items: center; gap: var(--rt-sp-2); }
.rt-legend-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rt-accent); }

/* Tabelas */
.rt-table-wrap { max-width: 100%; overflow-x: auto; }
.rt-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; white-space: nowrap; }
.rt-table th { padding: var(--rt-cell-pad-y) var(--rt-cell-pad-x); border-bottom: 1px solid var(--rt-line); background: var(--rt-surface-head); color: var(--rt-text-strong); font-size: 12px; font-weight: 700; letter-spacing: .5px; line-height: 20.5px; text-align: left; text-transform: uppercase; }
.rt-table td { padding: var(--rt-cell-pad-y) var(--rt-cell-pad-x); border-bottom: 1px solid var(--rt-line); color: var(--rt-text); }
.rt-table tr:last-child td { border-bottom: 0; }
.rt-table tbody tr:hover td { background: var(--rt-row-hover); }
.rt-table th.rt-numeric,.rt-table td.rt-numeric { text-align: right; }
.rt-cell-primary { color: var(--rt-text-strong); font-weight: 500; }
.rt-cell-secondary { display: block; max-width: 220px; margin-top: var(--rt-sp-1); overflow: hidden; text-overflow: ellipsis; color: var(--rt-text); font-size: 12px; }
.rt-table td code,.rt-definition code { padding: 1px 6px; border-radius: var(--rt-radius-sm); background: var(--rt-surface-head); color: var(--rt-text-strong); font-size: 12px; }
.rt-table code.rt-cell-secondary { padding: 0; background: none; }
.rt-pagination { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: var(--rt-sp-4); padding: var(--rt-sp-4) var(--rt-cell-pad-x); border-top: 1px solid var(--rt-line); font-size: 12px; }
.rt-pagination>div { display: flex; gap: var(--rt-sp-2); }

/* Badges (pílula, cor sólida, texto branco) */
.rt-badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--rt-radius-pill); background: var(--rt-surface-head); color: var(--rt-text-strong); font-size: 12px; font-weight: 500; white-space: nowrap; }
.rt-badge-success { background: var(--rt-success); color: #fff; }
.rt-badge-warning { background: var(--rt-warning); color: #fff; }
.rt-badge-danger { background: var(--rt-danger); color: #fff; }
.rt-badge-info { background: var(--rt-accent); color: #fff; }
.rt-status-dot { display: block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* Avisos: fundo da cor a 12%, texto na cor cheia */
.rt-alert { display: flex; align-items: flex-start; gap: var(--rt-sp-3); margin-bottom: var(--rt-sp-4); padding: 10px var(--rt-sp-4); border-radius: var(--rt-radius-control); background: var(--rt-accent-soft); color: var(--rt-text-strong); font-size: 14px; font-weight: 500; }
.rt-alert>.ti { flex-shrink: 0; margin-top: 1px; }
.rt-alert>p,.rt-alert>div { min-width: 0; flex: 1; }
.rt-alert p+p { margin-top: var(--rt-sp-2); }
.rt-alert a { text-decoration: underline; }
.rt-alert-info { background: var(--rt-accent-soft); color: var(--rt-text-strong); } /* não medido na referência */
.rt-alert-info>.ti { color: var(--rt-accent); }
.rt-alert-success { background: var(--rt-success-soft); color: var(--rt-success); }
.rt-alert-danger { background: var(--rt-danger-soft); color: var(--rt-danger); }
.rt-alert-warning { background: var(--rt-warning-soft); color: var(--rt-warning); }
.rt-alert-close { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 auto; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; }
.rt-alert-close .ti { font-size: 16px; }
.rt-flash { animation: rt-flash-in var(--rt-overlay-dur) ease-out both; }
@keyframes rt-flash-in { from { transform: translateY(-6px); } to { transform: none; } }
.rt-toast { position: fixed; top: 90px; right: var(--rt-content-pad); z-index: var(--rt-z-toast); display: flex; align-items: center; gap: var(--rt-sp-2); max-width: min(340px, calc(100vw - 56px)); padding: var(--rt-sp-3) var(--rt-sp-4); border-radius: var(--rt-radius-control); background: var(--rt-surface-head); box-shadow: var(--rt-shadow-pop); color: var(--rt-text-strong); }
.rt-setup-banner { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: var(--rt-sp-4); margin-bottom: var(--rt-grid-gap); padding: var(--rt-card-pad); border-radius: var(--rt-radius-card); background: var(--rt-surface); box-shadow: var(--rt-shadow-card); }
.rt-setup-banner h2 { margin-bottom: var(--rt-sp-2); }
.rt-setup-banner p { max-width: 65ch; font-size: 13px; }
.rt-secret { margin-bottom: var(--rt-grid-gap); padding: var(--rt-card-pad); border-radius: var(--rt-radius-card); background: var(--rt-warning-soft); }
.rt-secret h2 { margin-bottom: var(--rt-sp-2); color: var(--rt-warning); }
.rt-secret p { margin-bottom: var(--rt-sp-4); font-size: 13px; }
.rt-secret-value { display: flex; flex-direction: column; align-items: flex-start; gap: var(--rt-sp-3); }
.rt-secret-value code { flex: 1; overflow-wrap: anywhere; font-size: 13px; }

/* Formulários e filtros */
.rt-form { display: grid; gap: var(--rt-sp-5); }
.rt-form-row,.rt-form-row-3 { display: grid; grid-template-columns: minmax(0,1fr); gap: var(--rt-sp-4); }
.rt-form-section { padding-top: var(--rt-sp-5); border-top: 1px solid var(--rt-line); }
.rt-form-section h3 { margin-bottom: var(--rt-sp-3); }
.rt-form-section p { margin-bottom: var(--rt-sp-4); font-size: 12px; }
.rt-field { display: flex; flex-direction: column; gap: 4px; }
.rt-field label { color: var(--rt-text); font-size: 12px; line-height: 17.4px; }
.rt-field label .rt-muted { font-weight: 400; }
.rt-field small { color: var(--rt-text); line-height: 1.6; }
.rt-field input:not([type=checkbox]):not([type=radio]),.rt-field select,.rt-field textarea { width: 100%; min-height: var(--rt-control-h); padding: 8px 14px; border: 1px solid var(--rt-line-input); border-radius: var(--rt-radius-control); background: var(--rt-surface); color: var(--rt-input-text); caret-color: var(--rt-accent); }
.rt-field input::placeholder,.rt-field textarea::placeholder { color: var(--rt-placeholder); }
.rt-field input:not([type=checkbox]):not([type=radio]):focus-visible,.rt-field select:focus-visible,.rt-field textarea:focus-visible { outline: none; border-color: var(--rt-accent); }
.rt-field input[readonly] { color: var(--rt-text); cursor: default; }
.rt-field input:disabled,.rt-field select:disabled,.rt-field textarea:disabled { color: var(--rt-text-muted); cursor: not-allowed; }
.rt-field textarea { min-height: 86px; resize: vertical; }
.rt-token-row { display: flex; align-items: center; gap: var(--rt-sp-2); }
.rt-token-value { flex: 1; min-width: 0; padding: var(--rt-sp-1) var(--rt-sp-2); border: 1px solid var(--rt-line-input); border-radius: var(--rt-radius-control); overflow-wrap: anywhere; user-select: all; }
.rt-field select { appearance: none; -webkit-appearance: none; padding-right: 36px; border-color: var(--rt-line); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8797' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; text-overflow: ellipsis; }
.rt-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: end; gap: var(--rt-sp-3); margin-bottom: var(--rt-grid-gap); padding: var(--rt-card-pad); border-radius: var(--rt-radius-card); background: var(--rt-surface); box-shadow: var(--rt-shadow-card); }
.rt-filters>.rt-button { width: 100%; }
.rt-date-fields { display: flex; grid-column: 1 / -1; gap: var(--rt-sp-3); }
.rt-date-fields>.rt-field { flex: 1; min-width: 0; }
.rt-search-field { grid-column: 1 / -1; }
.rt-password-wrap { position: relative; }
.rt-password-wrap input { padding-right: 44px !important; }
.rt-password-wrap button { position: absolute; right: 4px; top: 4px; width: 30px; height: 30px; border: 0; background: transparent; color: var(--rt-text); }
.rt-page-note { max-width: 85ch; margin-block: var(--rt-sp-4); font-size: 12px; line-height: 1.6; }
.rt-llm-text { max-height: 70vh; margin: 0; overflow: auto; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 12.5px; line-height: 1.6; }

/* Cartão avulso (galeria e telas novas): vão de 20 px até o próximo bloco. */
.rt-card { margin-bottom: var(--rt-grid-gap); }
.rt-card-body>*+* { margin-top: var(--rt-sp-4); }

/* Grade de 12 colunas, vão de 20 px. Celular: 1 coluna; 768: 2 colunas (col-7 a 12 ocupam a linha); 992: colunas reais. */
.rt-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: var(--rt-grid-gap); margin-bottom: var(--rt-grid-gap); }
.rt-grid>* { min-width: 0; }
.rt-grid>.rt-card,.rt-grid>.rt-panel { margin-bottom: 0; }

/* Dica de ajuda: botão "i" de 13 px; o texto abre no hover e no foco, só por CSS. */
.rt-help { position: relative; display: inline-flex; flex-shrink: 0; }
.rt-help-btn { display: grid; place-items: center; width: 13px; height: 13px; padding: 0; border: 1px solid currentColor; border-radius: 50%; background: transparent; color: var(--rt-text); font-size: 9px; font-style: italic; font-weight: 700; line-height: 1; }
.rt-help-btn:hover { color: var(--rt-text-strong); }
.rt-help-text { position: absolute; right: -8px; bottom: calc(100% + 9px); z-index: var(--rt-z-pop); width: max-content; max-width: min(612.5px, calc(100vw - 56px)); padding: 11px; border-radius: var(--rt-radius-sm); background: rgba(0,0,0,.9); color: #fff; font-size: 13.16px; font-style: normal; font-weight: 400; line-height: 1.4; white-space: normal; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s linear, visibility 0s .15s; }
.rt-help:hover .rt-help-text,.rt-help:focus-within .rt-help-text { opacity: 1; visibility: visible; transition: opacity .15s linear, visibility 0s; }

/* Abas: 47 px; a ativa 53 px com borda inferior de 2 px no destaque; no celular só ícones. */
.rt-tabs { display: flex; align-items: flex-end; gap: var(--rt-card-pad); margin-bottom: var(--rt-grid-gap); }
.rt-tab { position: relative; display: flex; align-items: center; justify-content: center; flex: 1 1 0; gap: var(--rt-sp-2); min-width: 0; height: var(--rt-tab-h); border-bottom: 2px solid transparent; border-radius: var(--rt-radius-tab) var(--rt-radius-tab) 0 0; background: var(--rt-surface); color: var(--rt-text); font-size: 16.8px; font-weight: 500; }
.rt-tab:hover { color: var(--rt-text-strong); }
.rt-tab.is-active,.rt-tab.is-active:hover { height: var(--rt-tab-h-active); border-bottom-color: var(--rt-accent); color: var(--rt-accent); }
.rt-tab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Chave (switch) 42 x 24; desligada no tom da referência. */
.rt-switch { position: relative; display: inline-flex; align-items: center; gap: var(--rt-sp-2); cursor: pointer; }
.rt-switch input { position: absolute; width: 42px; height: 24px; margin: 0; opacity: 0; cursor: pointer; }
.rt-switch-track { position: relative; flex-shrink: 0; width: 42px; height: 24px; border-radius: 42px; background: #545a6a; transition: background-color .15s; }
.rt-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.rt-switch input:checked+.rt-switch-track { background: var(--rt-accent); }
.rt-switch input:checked+.rt-switch-track::after { transform: translateX(18px); }
.rt-switch input:focus-visible+.rt-switch-track { outline: 2px solid var(--rt-accent); outline-offset: 2px; }

/* Barra de ferramentas acima da tabela. */
.rt-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--rt-sp-4); }
.rt-toolbar .rt-icon-button { width: 47px; height: 36px; border: 1px solid var(--rt-line-input); border-radius: var(--rt-radius-control); }

/* Colunas fixas à esquerda (cabeçalho, total e dados): 80 / 127 / 153 px, a 0 / 80 / 207 px. */
.rt-sticky-1,.rt-sticky-2,.rt-sticky-3 { position: sticky; z-index: 1; background: var(--rt-surface); }
.rt-table th.rt-sticky-1,.rt-table th.rt-sticky-2,.rt-table th.rt-sticky-3 { background: var(--rt-surface-head); }
.rt-sticky-1 { left: 0; width: 80px; min-width: 80px; max-width: 80px; }
.rt-sticky-2 { left: 80px; width: 127px; min-width: 127px; max-width: 127px; }
.rt-sticky-3 { left: 207px; width: 153px; min-width: 153px; max-width: 153px; }
.rt-table tbody tr:hover td.rt-sticky-1,.rt-table tbody tr:hover td.rt-sticky-2,.rt-table tbody tr:hover td.rt-sticky-3 { background: var(--rt-surface); }
/* Linha de total: segunda linha do thead, 37,5 px (mesmo fundo do cabeçalho). */
.rt-table-total th { line-height: 16.5px; }

/* Painel lateral e modal: abertos pelo servidor (funcionam sem JS). Fundo e X são links de fechar. */
.rt-layer { position: fixed; inset: 0; z-index: var(--rt-z-drawer); }
html:has(.rt-layer) { overflow: hidden; }
.rt-backdrop { position: absolute; inset: 0; background: var(--rt-backdrop); animation: rt-fade-in .15s linear both; }
.rt-drawer,.rt-modal { display: flex; flex-direction: column; background: var(--rt-surface); color: var(--rt-text); }
.rt-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 90%; box-shadow: var(--rt-shadow-pop); animation: rt-drawer-in var(--rt-overlay-dur) ease-in-out both; }
.rt-layer-modal { display: grid; place-items: center; overflow-y: auto; }
.rt-modal { position: relative; width: 95vw; max-height: calc(100vh - 28px); padding: 14px 0; border-radius: var(--rt-radius-control); box-shadow: var(--rt-shadow-pop); animation: rt-modal-in var(--rt-overlay-dur) ease-out both; }
.rt-overlay-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--rt-sp-4); flex-shrink: 0; min-height: 53px; padding: 11.2px 19.6px; }
.rt-overlay-head p { margin-top: var(--rt-sp-1); font-size: 13px; }
.rt-drawer .rt-overlay-head h3 { font-size: 21px; font-weight: 500; line-height: 1.3; }
.rt-modal .rt-overlay-head h3 { font-size: 16.8px; font-weight: 700; }
.rt-overlay-close { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: var(--rt-radius-tab); color: var(--rt-text-strong); }
.rt-overlay-close:hover { background: var(--rt-row-hover); color: var(--rt-text-strong); }
.rt-overlay-body { flex: 1; min-height: 0; padding: 11.2px 19.6px; overflow-y: auto; }
.rt-overlay-actions { justify-content: flex-end; margin-top: var(--rt-sp-4); }
/* Formulário dentro do painel: campos sempre em uma coluna (o painel é estreito), seções separadas por espaço. */
.rt-overlay-body .rt-form-row,.rt-overlay-body .rt-form-row-3 { grid-template-columns: minmax(0,1fr); }
.rt-overlay-body .rt-form-section { margin-top: var(--rt-sp-5); }
.rt-overlay-body .rt-secret { margin-top: 0; }
@keyframes rt-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rt-drawer-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes rt-modal-in { from { transform: translateY(-50px); } to { transform: none; } }

/* Listas, definições, código, passos */
.rt-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 260px; padding: var(--rt-sp-10) var(--rt-card-pad); text-align: center; }
.rt-empty>.ti { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: var(--rt-sp-4); border-radius: 50%; background: var(--rt-surface-head); color: var(--rt-text); font-size: 26px; }
.rt-empty h3 { margin-bottom: var(--rt-sp-2); }
.rt-empty p { max-width: 45ch; font-size: 13px; }
.rt-empty .rt-button { margin-top: var(--rt-sp-5); }
.rt-list-row { display: flex; align-items: center; justify-content: space-between; gap: var(--rt-sp-3); padding: var(--rt-sp-4) 0; border-bottom: 1px solid var(--rt-line); font-size: 13px; }
.rt-list-row:last-child { border: 0; }
.rt-list-row>div { min-width: 0; }
.rt-list-row strong { color: var(--rt-text-strong); font-weight: 500; overflow-wrap: anywhere; }
.rt-list-row small { display: block; margin-top: var(--rt-sp-1); color: var(--rt-text); }
.rt-list-left { display: flex; align-items: center; gap: var(--rt-sp-3); }
.rt-site-icon { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: var(--rt-radius-tab); background: var(--rt-surface-head); color: var(--rt-text); }
.rt-definition { display: grid; grid-template-columns: minmax(100px,1fr) minmax(0,1.4fr); margin: 0; }
.rt-definition dt,.rt-definition dd { margin: 0; padding: var(--rt-sp-3) 0; border-bottom: 1px solid var(--rt-line); font-size: 13px; overflow-wrap: anywhere; }
.rt-definition dt { color: var(--rt-text); }
.rt-definition dd { color: var(--rt-text-strong); }
.rt-definition dd small { display: block; margin-top: var(--rt-sp-1); color: var(--rt-text); }
.rt-definition dt:last-of-type,.rt-definition dd:last-of-type { border: 0; }
.rt-main .rt-definition+.rt-actions { margin-top: var(--rt-sp-6); }
.rt-code { max-height: 480px; margin: 0; padding: var(--rt-sp-5); overflow: auto; background: var(--rt-bg); color: var(--rt-text); font-size: 12px; line-height: 1.8; white-space: pre; tab-size: 2; }
.rt-totp-key { display: inline-block; padding: var(--rt-sp-3) var(--rt-sp-4); border-radius: var(--rt-radius-control); background: var(--rt-surface-head); color: var(--rt-text-strong); font-size: 16px; letter-spacing: .08em; overflow-wrap: anywhere; user-select: all; }
.rt-backup-codes { display: grid; grid-template-columns: repeat(auto-fill,minmax(130px,1fr)); gap: var(--rt-sp-2); margin: var(--rt-sp-3) 0; padding: 0; list-style: none; }
.rt-backup-code { display: block; padding: var(--rt-sp-2) var(--rt-sp-3); border-radius: var(--rt-radius-control); background: var(--rt-surface-head); color: var(--rt-text-strong); font-size: 14px; letter-spacing: .06em; text-align: center; user-select: all; }
.rt-qr { width: 192px; max-width: 100%; margin: var(--rt-sp-4) 0; }
.rt-qr:empty { display: none; }
.rt-qr svg,.rt-qr-svg { display: block; width: 100%; height: auto; border-radius: var(--rt-radius-control); }
#two-factor .rt-form { margin-top: var(--rt-sp-4); }
.rt-code-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--rt-sp-3); margin-bottom: var(--rt-sp-3); }
.rt-utm-builder { margin-bottom: var(--rt-grid-gap); }
.rt-utm-result .rt-code { min-height: 56px; border-radius: var(--rt-radius-control); color: var(--rt-text-strong); overflow-wrap: anywhere; white-space: pre-wrap; }
.rt-prose { max-width: 75ch; line-height: 1.8; }
.rt-prose p,.rt-prose ol,.rt-prose ul { margin: 0 0 var(--rt-sp-4); }
.rt-prose li+li { margin-top: var(--rt-sp-2); }
.rt-prose h3 { margin: var(--rt-sp-6) 0 var(--rt-sp-3); }
.rt-prose a { text-decoration: underline; }
.rt-steps { counter-reset: step; display: grid; gap: var(--rt-sp-6); }
.rt-steps+.rt-actions { margin-top: var(--rt-sp-6); }
.rt-step { display: grid; grid-template-columns: 28px minmax(0,1fr); gap: var(--rt-sp-4); }
.rt-step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--rt-accent-soft); color: var(--rt-accent); font-size: 12px; font-weight: 700; }
.rt-step h3 { margin-bottom: var(--rt-sp-2); padding-top: 3px; }
.rt-step p { font-size: 13px; }
.rt-main .rt-check-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.rt-main .rt-site-card .rt-actions { flex-direction: row; flex-wrap: nowrap; align-items: center; gap: var(--rt-sp-2); }
.rt-main .rt-site-card .rt-actions>.rt-button { flex: 1; min-width: 0; }
.rt-main .rt-site-delete { margin-left: 0; flex-shrink: 0; }
.rt-main .rt-site-add { color: var(--rt-text); }
.rt-main .rt-site-add:hover { color: var(--rt-text-strong); border-color: var(--rt-accent); }
.rt-main .rt-site-card .rt-muted { font-size: 13px; }
.rt-main .rt-analytics-metrics dd { font-size: 22px; font-weight: 600; line-height: 1.2; }
.rt-main .rt-analytics-metrics dt .ti { color: var(--rt-text); font-size: 18px; }

/* ---------- 5. Telas (acréscimos por ponto de quebra) ---------- */
@media (min-width: 768px) {
  .rt-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .rt-grid>.rt-col-7,.rt-grid>.rt-col-8,.rt-grid>.rt-col-9,.rt-grid>.rt-col-10,.rt-grid>.rt-col-11,.rt-grid>.rt-col-12 { grid-column: 1 / -1; }
  .rt-tab { font-size: 14px; }
  .rt-tab-label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .rt-drawer { width: 60%; }
  .rt-modal { width: 75vw; }
  /* Tablet: indicadores em 2 colunas, conteúdo a 108,5 px do topo. */
  .rt-main { padding: var(--rt-content-top) var(--rt-content-pad) var(--rt-content-pad); }
  .rt-topbar { padding: 0 var(--rt-sp-4); }
  .rt-workspace-name { display: block; }
  .rt-user-text { display: flex; }
  .rt-header-actions { width: auto; }
  .rt-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .rt-even-columns { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .rt-delivery-cards { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .rt-form-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .rt-form-row-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .rt-filters { display: flex; flex-wrap: wrap; }
  .rt-filters>.rt-field { flex: 1; min-width: 150px; }
  .rt-filters>.rt-button { width: auto; }
  .rt-date-fields { grid-column: auto; }
  .rt-search-field { min-width: 200px; grid-column: auto; }
  .rt-setup-banner { flex-direction: row; align-items: center; }
  .rt-secret-value { flex-direction: row; align-items: center; }
  .rt-footer { flex-direction: row; justify-content: space-between; }
  .rt-main .rt-analytics-metrics dd { font-size: 24px; }
}
@media (min-width: 992px) {
  .rt-grid { grid-template-columns: repeat(12,minmax(0,1fr)); }
  .rt-grid>.rt-col-2 { grid-column: span 2; }
  .rt-grid>.rt-col-3 { grid-column: span 3; }
  .rt-grid>.rt-col-4 { grid-column: span 4; }
  .rt-grid>.rt-col-5 { grid-column: span 5; }
  .rt-grid>.rt-col-6 { grid-column: span 6; }
  .rt-grid>.rt-col-7 { grid-column: span 7; }
  .rt-grid>.rt-col-8 { grid-column: span 8; }
  .rt-grid>.rt-col-9 { grid-column: span 9; }
  .rt-grid>.rt-col-10 { grid-column: span 10; }
  .rt-grid>.rt-col-11 { grid-column: span 11; }
  .rt-grid>.rt-col-12 { grid-column: 1 / -1; }
  .rt-drawer { width: 30%; }
  .rt-modal { width: 50vw; }
  .rt-two-columns { grid-template-columns: minmax(0,1.8fr) minmax(280px,1fr); }
  .rt-kpis { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .rt-delivery-cards { grid-template-columns: repeat(5,minmax(0,1fr)); }
}
@media (min-width: 1200px) {
  /* Barra lateral fixa; barra superior flutuante; conteúdo começa em x=288 (113 recolhida). */
  .rt-sidebar { z-index: var(--rt-z-sidebar); transform: none; visibility: visible; transition: width var(--rt-collapse-dur); }
  .rt-collapse { display: grid; }
  .rt-nav-close { display: none; }
  .rt-overlay { display: none; }
  .rt-menu-button,.rt-brand-compact { display: none; }
  .rt-main::before { content: ""; position: fixed; top: 0; left: 0; right: 0; z-index: calc(var(--rt-z-topbar) - 1); height: 102px; background: linear-gradient(var(--rt-bg) 44%, transparent); pointer-events: none; }
  .rt-topbar { top: var(--rt-topbar-top); left: calc(var(--rt-sidebar-w) + var(--rt-content-pad)); right: var(--rt-content-pad); height: var(--rt-topbar-h); padding: 0 var(--rt-unit); border-radius: var(--rt-radius-card); transition: left var(--rt-collapse-dur); }
  .rt-main { margin-left: calc(var(--rt-sidebar-w) + var(--rt-content-pad)); padding: var(--rt-content-top) var(--rt-content-pad) var(--rt-content-pad) 0; transition: margin-left var(--rt-collapse-dur); }
  /* Recolhida: 82 px só com ícones; com mouse ou foco dentro, abre para 260 px por cima do conteúdo. */
  /* Foco de clique não segura o menu aberto (só foco de teclado, :focus-visible); logo após recolher (rt-sidebar-settling) o mouse em cima também não, até sair do menu. */
  .rt-sidebar-collapsed .rt-main { margin-left: calc(var(--rt-sidebar-w-min) + 31px); /* 113 px, medido */ }
  .rt-sidebar-collapsed .rt-topbar { left: calc(var(--rt-sidebar-w-min) + 31px); }
  .rt-sidebar-collapsed .rt-sidebar:not(:hover):not(:has(:focus-visible)),
  .rt-sidebar-collapsed.rt-sidebar-settling .rt-sidebar { width: var(--rt-sidebar-w-min); }
  .rt-sidebar-collapsed .rt-sidebar:not(:hover):not(:has(:focus-visible)) .rt-nav-text,
  .rt-sidebar-collapsed.rt-sidebar-settling .rt-sidebar .rt-nav-text,
  .rt-sidebar-collapsed .rt-sidebar:not(:hover):not(:has(:focus-visible)) .rt-collapse,
  .rt-sidebar-collapsed.rt-sidebar-settling .rt-sidebar .rt-collapse { display: none; }
  .rt-sidebar-collapsed .rt-sidebar:not(:hover):not(:has(:focus-visible)) .rt-sidebar-head,
  .rt-sidebar-collapsed.rt-sidebar-settling .rt-sidebar .rt-sidebar-head { padding-left: 24px; }
  .rt-sidebar-collapsed .rt-sidebar:not(:hover):not(:has(:focus-visible)) .rt-nav-link .ti,
  .rt-sidebar-collapsed.rt-sidebar-settling .rt-sidebar .rt-nav-link .ti { margin-right: 0; }
}

/* ---------- 6. Entrar, recuperar senha, indisponível ---------- */
.rt-login { display: grid; grid-template-columns: minmax(0,1fr); min-height: 100vh; }
.rt-login-story { display: none; flex-direction: column; justify-content: space-between; padding: var(--rt-sp-10); background: var(--rt-surface); }
.rt-login-story .rt-brand { padding: 0; }
.rt-login-story h1 { max-width: 15ch; margin-bottom: var(--rt-sp-5); font-size: 28px; line-height: 1.25; }
.rt-login-story p { max-width: 45ch; }
.rt-flow { display: grid; gap: var(--rt-sp-4); max-width: 400px; margin-top: var(--rt-sp-8); }
.rt-flow-row { display: flex; align-items: center; gap: var(--rt-sp-4); padding: var(--rt-sp-4); border-radius: var(--rt-radius-card); background: var(--rt-surface-head); }
.rt-flow-row .ti { color: var(--rt-text); }
.rt-flow-row strong { display: block; color: var(--rt-text-strong); font-size: 13px; font-weight: 500; }
.rt-login-form-wrap { position: relative; display: grid; place-items: center; min-height: 100vh; padding: var(--rt-sp-6); }
.rt-login-form { width: 100%; max-width: 365px; }
.rt-login-form h2 { margin-bottom: var(--rt-sp-2); font-size: 24px; }
.rt-login-form>p { margin-bottom: var(--rt-sp-8); font-size: 13px; }
.rt-login-help { max-width: 45ch; margin-top: var(--rt-sp-6); font-size: 12px; text-align: center; }
.rt-login-theme { position: absolute; top: var(--rt-sp-6); right: var(--rt-sp-6); border: 1px solid var(--rt-line); }
@media (min-width: 768px) {
  .rt-login { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .rt-login-story { display: flex; }
  .rt-login-form-wrap { padding: var(--rt-sp-10); }
}

/* Reduzir movimento: nenhuma animação nem transição. */
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
}
