/**
 * 4HR — DEMO PÚBLICO — folha de estilo compartilhada
 * Marca fictícia "Prisma RH" — visual inspirado em apple.com.
 * Tema Light (padrão) + Dark, seguindo os tokens de cor reais que a
 * Apple usa em cada modo (não é só "escurecer o light" — verde, azul
 * e laranja também mudam de tom entre os dois modos, como no
 * macOS/iOS de verdade).
 *
 * Como funciona a troca de tema:
 *   - <html data-theme="light"> ou <html data-theme="dark"> força o modo.
 *   - Sem o atributo, segue prefers-color-scheme do sistema do visitante.
 *   - A escolha do usuário fica em localStorage (ver assets/js/theme.js)
 *     e é aplicada antes do primeiro paint por um script inline no
 *     <head> de cada página (evita flash do tema errado).
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* ── Tokens neutros (iguais nos dois temas) ── */
  --font-display: -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', sans-serif;

  --radius:    14px;
  --radius-lg: 20px;

  --text-xs:   .74rem;
  --text-sm:   .82rem;
  --text-base: .88rem;
  --text-lg:   1rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.7rem;
  --text-3xl:  2.25rem;
}

/* ══════════════════════ TEMA LIGHT (padrão) ══════════════════════ */
:root, [data-theme="light"] {
  --bg-canvas:   #FFFFFF;
  --bg-section:  #F5F5F7;
  --bg-sidebar:  #F5F5F7;
  --bg-card:     #FFFFFF;
  --bg-hover:    #F5F5F7;
  --bg-input:    #FFFFFF;

  --text:         #1D1D1F;
  --text-strong:  #000000;
  --gray:         #6E6E73;
  --gray-dim:     #86868B;

  --accent:       #0071E3;
  --accent-dark:  #0077ED;
  --accent-glow:  rgba(0,113,227,.08);

  --teal:         #00A389;
  --teal-glow:    rgba(0,163,137,.10);
  --danger:       #D70015;
  --danger-glow:  rgba(215,0,21,.08);
  --warn:         #C77700;
  --warn-glow:    rgba(199,119,0,.10);
  --purple:       #8944AB;
  --purple-glow:  rgba(137,68,171,.08);

  --border:        rgba(0,0,0,.08);
  --border-light:  rgba(0,0,0,.07);
  --border-strong: rgba(0,0,0,.14);

  --shadow: 0 4px 24px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.04);
  --focus-ring: 0 0 0 4px rgba(0,113,227,.35);

  --skeleton-a: #F5F5F7;
  --skeleton-b: #ECECEE;

  color-scheme: light;
}

/* ══════════════════════ TEMA DARK ══════════════════════ */
/* Cores reais do modo escuro da Apple (macOS/iOS system colors) —
   não é o light escurecido, cada acento tem seu próprio tom no dark. */
[data-theme="dark"] {
  --bg-canvas:   #000000;
  --bg-section:  #1C1C1E;
  --bg-sidebar:  #1C1C1E;
  --bg-card:     #1C1C1E;
  --bg-hover:    rgba(255,255,255,.06);
  --bg-input:    #2C2C2E;

  --text:         #F5F5F7;
  --text-strong:  #FFFFFF;
  --gray:         #98989D;
  --gray-dim:     #68686D;

  --accent:       #0A84FF;
  --accent-dark:  #409CFF;
  --accent-glow:  rgba(10,132,255,.16);

  --teal:         #40C8E0;
  --teal-glow:    rgba(64,200,224,.16);
  --danger:       #FF453A;
  --danger-glow:  rgba(255,69,58,.16);
  --warn:         #FF9F0A;
  --warn-glow:    rgba(255,159,10,.16);
  --purple:       #BF5AF2;
  --purple-glow:  rgba(191,90,242,.16);

  --border:        rgba(255,255,255,.12);
  --border-light:  rgba(255,255,255,.10);
  --border-strong: rgba(255,255,255,.20);

  --shadow: 0 4px 24px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.06);
  --focus-ring: 0 0 0 4px rgba(10,132,255,.45);

  --skeleton-a: #1C1C1E;
  --skeleton-b: #2C2C2E;

  color-scheme: dark;
}

/* Sem escolha explícita salva → segue o sistema do visitante */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-canvas:   #000000;
    --bg-section:  #1C1C1E;
    --bg-sidebar:  #1C1C1E;
    --bg-card:     #1C1C1E;
    --bg-hover:    rgba(255,255,255,.06);
    --bg-input:    #2C2C2E;

    --text:         #F5F5F7;
    --text-strong:  #FFFFFF;
    --gray:         #98989D;
    --gray-dim:     #68686D;

    --accent:       #0A84FF;
    --accent-dark:  #409CFF;
    --accent-glow:  rgba(10,132,255,.16);

    --teal:         #40C8E0;
    --teal-glow:    rgba(64,200,224,.16);
    --danger:       #FF453A;
    --danger-glow:  rgba(255,69,58,.16);
    --warn:         #FF9F0A;
    --warn-glow:    rgba(255,159,10,.16);
    --purple:       #BF5AF2;
    --purple-glow:  rgba(191,90,242,.16);

    --border:        rgba(255,255,255,.12);
    --border-light:  rgba(255,255,255,.10);
    --border-strong: rgba(255,255,255,.20);

    --shadow: 0 4px 24px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.06);
    --focus-ring: 0 0 0 4px rgba(10,132,255,.45);

    --skeleton-a: #1C1C1E;
    --skeleton-b: #2C2C2E;

    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-canvas);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  letter-spacing: -.006em;
  transition: background 200ms ease, color 200ms ease;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img, svg { max-width: 100%; display: block; }
input, select, textarea { font-family: inherit; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Faixa de aviso de demo ── */
.demo-banner {
  background: var(--bg-section); color: var(--gray);
  text-align: center; font-size: .78rem; font-weight: 500;
  padding: .6rem 1rem; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
}
.demo-banner strong { color: var(--text); font-weight: 600; }

/* ── Botões ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .68rem 1.35rem; border-radius: 980px;
  font-weight: 500; font-size: .87rem; transition: all 200ms cubic-bezier(.4,0,.2,1);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
/* Blindagem: qualquer SVG solto (fora de .btn/.nav-icon) precisa desta
   classe — sem ela, um <svg viewBox="0 0 20 20"> sem width/height cai
   no tamanho intrínseco padrão do navegador (300x150) e "explode". */
.icon-wrap { display: inline-flex; flex-shrink: 0; }
.icon-wrap svg { width: 100%; height: 100%; display: block; }
.modal-close svg { width: 18px; height: 18px; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-dark { background: var(--bg-section); color: var(--text); border: 1px solid transparent; }
.btn-dark:hover { background: var(--bg-hover); }
.btn-outline { border: 1px solid var(--border-strong); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--text); }
.btn-danger-outline { border: 1px solid var(--danger); color: var(--danger); background: transparent; }
.btn-danger-outline:hover { background: var(--danger-glow); }
.btn-sm { padding: .45rem 1rem; font-size: .8rem; }
.btn-xs { padding: .32rem .8rem; font-size: .74rem; border-radius: 980px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-icon { padding: .55rem; width: 36px; height: 36px; border-radius: 10px; }

/* ── CTA fixo flutuante (páginas públicas) ── */
.cta-float {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 500;
  background: var(--accent); color: #fff; padding: .9rem 1.4rem; border-radius: 999px;
  font-weight: 600; font-size: .85rem; box-shadow: 0 10px 32px rgba(0,113,227,.35);
  display: flex; align-items: center; gap: .5rem; transition: transform 200ms ease, box-shadow 200ms ease;
}
.cta-float:hover { transform: translateY(-3px); background: var(--accent-dark); }

/* ── Topbar público ── */
.pub-topbar {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg-canvas) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.pub-topbar .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }

/* ── Shell do painel ── */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px; flex-shrink: 0; background: var(--bg-sidebar);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-logo { display: flex; align-items: center; gap: .7rem; padding: 1.5rem 1.35rem 1.1rem; }
.sidebar-logo-icon {
  width: 32px; height: 32px; border-radius: 9px; background: var(--text-strong);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; color: var(--bg-canvas); font-size: .9rem; flex-shrink: 0;
}
.sidebar-logo-text { font-weight: 700; font-size: .95rem; letter-spacing: -.01em; }
.sidebar-logo-sub { display: block; font-size: .7rem; color: var(--gray); margin-top: 1px; }

.sidebar-section { padding: .5rem .85rem; }
.sidebar-label { font-size: .68rem; font-weight: 600; letter-spacing: .02em; color: var(--gray-dim); padding: .5rem .65rem .4rem; display: block; }
.nav-item {
  display: flex; align-items: center; gap: .75rem; padding: .58rem .7rem; border-radius: 10px;
  font-size: .87rem; font-weight: 450; color: var(--gray);
  transition: background 150ms ease, color 150ms ease; margin-bottom: 1px;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active { background: var(--bg-card); color: var(--accent); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
[data-theme="dark"] .nav-item.active { box-shadow: none; background: var(--accent-glow); }
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.nav-icon svg { width: 18px; height: 18px; }

.sidebar-user { margin-top: auto; padding: 1rem; border-top: 1px solid var(--border); display: flex; align-items: center; gap: .65rem; }
.sidebar-user-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; background: var(--text-strong); color: var(--bg-canvas);
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: .74rem;
}
.sidebar-user-nome { font-size: .82rem; font-weight: 500; }
.sidebar-user-role { font-size: .7rem; color: var(--gray); }

.main-area { flex: 1; min-width: 0; background: var(--bg-canvas); }
.topbar {
  height: 68px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg-canvas) 85%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.topbar-title { font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em; }
.topbar-actions { display: flex; align-items: center; gap: .6rem; }
.page-body { padding: 2rem 2.25rem 3rem; }

/* ── Toggle de tema ── */
.tema-toggle { position: relative; }
.tema-toggle svg { width: 18px; height: 18px; }
.tema-toggle .icon-moon { display: none; }
[data-theme="dark"] .tema-toggle .icon-sun { display: none; }
[data-theme="dark"] .tema-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tema-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .tema-toggle .icon-moon { display: block; }
}

/* ── Cards ── */
.card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius); padding: 1.5rem; }
.card-title { font-weight: 700; font-size: 1rem; margin-bottom: 1.1rem; letter-spacing: -.01em; }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 600; padding: .3rem .7rem; border-radius: 980px; white-space: nowrap; }
.badge svg { width: 12px; height: 12px; }
.badge-publicada  { background: var(--teal-glow); color: var(--teal); }
.badge-pausada    { background: var(--warn-glow); color: var(--warn); }
.badge-encerrada  { background: var(--bg-hover); color: var(--gray); }
.badge-arquivada  { background: var(--bg-hover); color: var(--gray-dim); }
.badge-rascunho   { background: var(--bg-hover); color: var(--gray); }
.badge-aprovado   { background: var(--teal-glow); color: var(--teal); }
.badge-reprovado  { background: var(--danger-glow); color: var(--danger); }
.badge-ativo      { background: var(--accent-glow); color: var(--accent); }
.badge-desistiu   { background: var(--bg-hover); color: var(--gray); }
.badge-talento    { background: var(--warn-glow); color: var(--warn); }
.badge-restrito   { background: var(--danger-glow); color: var(--danger); }
.badge-neutro     { background: var(--bg-hover); color: var(--gray); }
.badge-cliente    { background: var(--purple-glow); color: var(--purple); }

/* ── Tabelas ── */
.table-wrap { overflow-x: auto; }
table.rs-table { width: 100%; border-collapse: collapse; font-size: .87rem; }
table.rs-table th { text-align: left; font-size: .72rem; font-weight: 600; color: var(--gray-dim); padding: .7rem .9rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.rs-table td { padding: .85rem .9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.rs-table tbody tr { transition: background 150ms ease; }
table.rs-table tbody tr:hover { background: var(--bg-hover); }
table.rs-table tbody tr:last-child td { border-bottom: none; }

.avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: .72rem; color: #fff; }
.person-cell { display: flex; align-items: center; gap: .65rem; }
.person-name { font-weight: 550; font-size: .88rem; }
.person-sub { font-size: .76rem; color: var(--gray); margin-top: 1px; }

/* ── Formulários ── */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .78rem; font-weight: 500; color: var(--gray); margin-bottom: .4rem; }
.rs-input, .rs-select, .rs-textarea {
  width: 100%; background: var(--bg-input); border: 1px solid var(--border-strong); color: var(--text);
  padding: .7rem .9rem; border-radius: 10px; font-size: .88rem; outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.rs-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236E6E73' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px;
}
.rs-input:focus, .rs-select:focus, .rs-textarea:focus { border-color: var(--accent); box-shadow: var(--focus-ring); }
.rs-textarea { resize: vertical; min-height: 90px; }
.field-hint { font-size: .74rem; color: var(--gray-dim); margin-top: .35rem; }
.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.toggle-row { display: flex; align-items: flex-start; gap: .8rem; padding: .55rem 0; cursor: pointer; }
.toggle-row input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.toggle-title { font-weight: 550; font-size: .88rem; }
.toggle-desc { font-size: .8rem; color: var(--gray); margin-top: 2px; }

/* ── Modal ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 600; display: none; align-items: flex-start; justify-content: center; padding: 3vh 1.5rem; overflow-y: auto; }
[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,.7); }
.modal-overlay.show { display: flex; }
.modal-box { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 18px; max-width: 560px; width: 100%; padding: 1.75rem; box-shadow: var(--shadow); margin-bottom: 3vh; }
.modal-box.modal-lg { max-width: 760px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1.25rem; }
.modal-title { font-weight: 700; font-size: 1.1rem; letter-spacing: -.01em; }
.modal-close { font-size: 1.2rem; color: var(--gray); flex-shrink: 0; }
.modal-close:hover { color: var(--text); }
.modal-actions { display: flex; gap: .6rem; margin-top: 1.5rem; justify-content: flex-end; }

/* ── Drawer lateral ── */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 550; opacity: 0; pointer-events: none; transition: opacity 220ms ease; }
[data-theme="dark"] .drawer-overlay { background: rgba(0,0,0,.6); }
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 460px; max-width: 92vw;
  background: var(--bg-card); border-left: 1px solid var(--border);
  transform: translateX(100%); transition: transform 260ms cubic-bezier(.16,1,.3,1);
  z-index: 560; display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.drawer-content { flex: 1; overflow-y: auto; padding: 1.5rem; }
.drawer-section { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.drawer-section:last-child { border-bottom: none; }
.drawer-section h4 { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--gray); margin-bottom: .8rem; }

/* ── Kanban (Pipeline) ── */
.kanban-board { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; align-items: flex-start; }
.kanban-col { flex: 0 0 270px; background: var(--bg-section); border: 1px solid var(--border-light); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 220px); }
.kanban-col-head { padding: .9rem 1rem; border-top: 3px solid var(--gray); border-radius: var(--radius) var(--radius) 0 0; display: flex; align-items: center; justify-content: space-between; }
.kanban-col-title { font-weight: 700; font-size: .84rem; }
.kanban-col-count { font-size: .74rem; font-weight: 700; color: var(--gray); background: var(--bg-hover); padding: .1rem .5rem; border-radius: 999px; }
.kanban-cards { flex: 1; overflow-y: auto; padding: .6rem; display: flex; flex-direction: column; gap: .6rem; min-height: 60px; }
.kanban-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 12px; padding: .8rem; cursor: grab; transition: border-color 150ms ease, box-shadow 150ms ease; }
.kanban-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.kanban-card.dragging { opacity: .4; }
.kanban-cards.drag-over { background: var(--accent-glow); border-radius: 8px; }
.kanban-card-urgente { border-left: 3px solid var(--danger); }
.card-header { display: flex; align-items: center; gap: .55rem; margin-bottom: .5rem; }
.card-nome { font-weight: 600; font-size: .82rem; }
.card-cidade { font-size: .72rem; color: var(--gray); }
.card-meta { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.card-score { font-size: .7rem; font-weight: 700; color: var(--warn); display: inline-flex; align-items: center; gap: .25rem; }
.card-dias { font-size: .68rem; color: var(--gray-dim); margin-left: auto; }

/* ── Utilitários de layout ── */
.page-head { margin-bottom: 1.75rem; }
.page-head h1 { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700; letter-spacing: -.03em; }
.page-head p { color: var(--gray); font-size: .9rem; margin-top: .35rem; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.75rem; }
.kpi-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius); padding: 1.4rem; }
.kpi-label { font-size: .76rem; font-weight: 500; color: var(--gray); }
.kpi-value { font-size: 1.9rem; font-weight: 700; margin-top: .4rem; letter-spacing: -.03em; }
.kpi-sub { font-size: .78rem; color: var(--teal); margin-top: .35rem; font-weight: 500; }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--gray); }
.empty-state .icon { width: 40px; height: 40px; margin: 0 auto .75rem; opacity: .5; }
.empty-state .icon svg { width: 40px; height: 40px; }

.toolbar { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.toolbar .rs-input, .toolbar .rs-select { width: auto; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; flex-wrap: wrap; }
.tab-item { padding: .7rem 1rem; font-size: .84rem; font-weight: 500; color: var(--gray); border-bottom: 2px solid transparent; }
.tab-item.active { color: var(--accent); border-color: var(--accent); font-weight: 600; }
.tab-item:hover { color: var(--text); }

.star-row { display: flex; gap: 2px; }
.star { font-size: 1.1rem; color: var(--border-strong); cursor: pointer; }
.star.on { color: var(--warn); }

/* ── Toast ── */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 20px);
  background: var(--text-strong); color: var(--bg-canvas); padding: .8rem 1.3rem; border-radius: 12px;
  font-size: .85rem; font-weight: 500; opacity: 0; pointer-events: none;
  transition: all 220ms ease; z-index: 999; box-shadow: var(--shadow); max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); color: #fff; }

/* ── Foco de teclado ── */
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 8px; }
.btn:focus-visible, .nav-item:focus-visible, .rs-input:focus-visible,
.rs-select:focus-visible, .rs-textarea:focus-visible, .tab-item:focus-visible,
a:focus-visible, button:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.rs-input:focus-visible, .rs-select:focus-visible, .rs-textarea:focus-visible { border-color: var(--accent); }

/* ── Skeleton de carregamento ── */
.skeleton {
  background: linear-gradient(90deg, var(--skeleton-a) 25%, var(--skeleton-b) 37%, var(--skeleton-a) 63%);
  background-size: 400% 100%; animation: skeleton-shine 1.4s ease infinite; border-radius: 8px;
}
@keyframes skeleton-shine { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; background: var(--bg-section); } }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }

@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 300; transform: translateX(-100%); transition: transform 220ms ease; }
  .sidebar.open { transform: translateX(0); }
  .grid-2col { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
