/* ═══════════════════════════════════════════════════════════
   Design System — JM Diversões · Dark Precision
   Tipografia: Space Grotesk · Tema: Dark/Light via data-theme
   ═══════════════════════════════════════════════════════════ */

/* ── Fonte principal ─────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

body, * { font-family: 'Space Grotesk', system-ui, sans-serif; }

/* ── Variáveis — tema escuro (padrão) ────────────────────── */
:root {
  --bg-base:        #080d18;
  --bg-surface:     #0d1526;
  --bg-elevated:    #111d35;
  --bg-hover:       rgba(255,255,255,0.04);
  --bg-hover-strong:rgba(255,255,255,0.07);
  --border:         rgba(255,255,255,0.07);
  --border-hover:   rgba(255,255,255,0.15);
  --border-accent:  rgba(99,102,241,0.4);
  --text-primary:   #eef2ff;
  --text-secondary: rgba(238,242,255,0.55);
  --text-muted:     rgba(238,242,255,0.28);
  --text-label:     rgba(238,242,255,0.4);
  --accent:         #6366f1;
  --accent-glow:    rgba(99,102,241,0.25);
  --accent-light:   #818cf8;
  --sidebar-w:      16rem;
  --sidebar-mini:   3.5rem;
  --topbar-bg:      rgba(8,13,24,0.88);
  --scrollbar:      rgba(255,255,255,0.1);
  --input-bg:       rgba(255,255,255,0.05);
  --input-border:   rgba(255,255,255,0.1);
  --skeleton-bg:    rgba(255,255,255,0.06);
  --shadow-card:    0 4px 24px rgba(0,0,0,0.5), 0 1px 4px rgba(0,0,0,0.3);
  --shadow-glow:    0 0 0 1px var(--border-accent), 0 4px 24px var(--accent-glow);
  --radius-card:    1rem;
  --radius-btn:     0.75rem;
}

/* ── Variáveis — tema claro ──────────────────────────────── */
[data-theme="light"] {
  --bg-base:        #f0f4ff;
  --bg-surface:     #ffffff;
  --bg-elevated:    #f8faff;
  --bg-hover:       rgba(99,102,241,0.05);
  --bg-hover-strong:rgba(99,102,241,0.1);
  --border:         rgba(99,102,241,0.12);
  --border-hover:   rgba(99,102,241,0.25);
  --border-accent:  rgba(99,102,241,0.35);
  --text-primary:   #0f172a;
  --text-secondary: rgba(15,23,42,0.65);
  --text-muted:     rgba(15,23,42,0.4);
  --text-label:     rgba(15,23,42,0.55);
  --accent-glow:    rgba(99,102,241,0.15);
  --topbar-bg:      rgba(248,250,255,0.92);
  --scrollbar:      rgba(99,102,241,0.2);
  --input-bg:       rgba(99,102,241,0.05);
  --input-border:   rgba(99,102,241,0.15);
  --skeleton-bg:    rgba(99,102,241,0.08);
  --shadow-card:    0 2px 16px rgba(99,102,241,0.08), 0 1px 3px rgba(0,0,0,0.05);
  --shadow-glow:    0 0 0 1px var(--border-accent), 0 4px 20px var(--accent-glow);
}

/* ══════════════════════════════════════════════════════════
   BASE
   ══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

body {
  background: var(--bg-base) !important;
  color: var(--text-primary);
  transition: background 0.3s, color 0.3s;
  min-height: 100vh;
}

/* Textura de ruído sutil sobre o body */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* Glow ambiente no topo esquerdo */
body::after {
  content: '';
  position: fixed;
  top: -200px;
  left: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ══════════════════════════════════════════════════════════
   ANIMAÇÕES DE ENTRADA
   ══════════════════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.anim-fade-up  { animation: fadeUp 0.4s ease both; }
.anim-fade-in  { animation: fadeIn 0.3s ease both; }

/* Delays escalonados para cards em grid */
.anim-stagger > *:nth-child(1) { animation: fadeUp 0.4s 0.05s ease both; }
.anim-stagger > *:nth-child(2) { animation: fadeUp 0.4s 0.1s  ease both; }
.anim-stagger > *:nth-child(3) { animation: fadeUp 0.4s 0.15s ease both; }
.anim-stagger > *:nth-child(4) { animation: fadeUp 0.4s 0.2s  ease both; }
.anim-stagger > *:nth-child(5) { animation: fadeUp 0.4s 0.25s ease both; }
.anim-stagger > *:nth-child(6) { animation: fadeUp 0.4s 0.3s  ease both; }

/* ══════════════════════════════════════════════════════════
   PAINEL / CARD
   ══════════════════════════════════════════════════════════ */
.painel {
  background: var(--bg-surface) !important;
  border-radius: var(--radius-card);
  border: 1px solid var(--border) !important;
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.3s;
}

/* Linha de acento no topo dos painéis */
.painel::before {
  content: '';
  position: absolute;
  top: 0; left: 1.5rem; right: 1.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,0.4), transparent);
  border-radius: 99px;
}

.painel-hover {
  background: var(--bg-surface) !important;
  border-radius: var(--radius-card);
  border: 1px solid var(--border) !important;
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  position: relative;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s, background 0.3s;
  cursor: pointer;
}
.painel-hover::before {
  content: '';
  position: absolute;
  top: 0; left: 1.5rem; right: 1.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,0.4), transparent);
  border-radius: 99px;
}
.painel-hover:hover {
  border-color: var(--border-accent) !important;
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

/* ── Metric cards ────────────────────────────────────────── */
.metric-card {
  background: var(--bg-surface) !important;
  border-radius: var(--radius-card);
  border: 1px solid var(--border) !important;
  padding: 1rem;
  box-shadow: var(--shadow-card);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s, background 0.3s;
  position: relative;
  overflow: hidden;
}
.metric-card:hover {
  border-color: var(--border-accent) !important;
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}
.metric-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 99px 99px 0 0;
  opacity: 0.6;
}
.metric-card.azul    { background: rgba(59,130,246,0.07) !important; border-color: rgba(59,130,246,0.15) !important; }
.metric-card.azul::after    { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.metric-card.amarelo { background: rgba(234,179,8,0.07)  !important; border-color: rgba(234,179,8,0.15)  !important; }
.metric-card.amarelo::after { background: linear-gradient(90deg, #eab308, #fbbf24); }
.metric-card.roxo    { background: rgba(139,92,246,0.07) !important; border-color: rgba(139,92,246,0.15) !important; }
.metric-card.roxo::after    { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.metric-card.verde   { background: rgba(16,185,129,0.07) !important; border-color: rgba(16,185,129,0.15) !important; }
.metric-card.verde::after   { background: linear-gradient(90deg, #10b981, #34d399); }
.metric-card.vermelho{ background: rgba(239,68,68,0.07)  !important; border-color: rgba(239,68,68,0.15)  !important; }
.metric-card.vermelho::after{ background: linear-gradient(90deg, #ef4444, #f87171); }
.metric-card.laranja { background: rgba(249,115,22,0.07) !important; border-color: rgba(249,115,22,0.15) !important; }
.metric-card.laranja::after { background: linear-gradient(90deg, #f97316, #fb923c); }

.metric-card-item {
  background: var(--bg-surface) !important;
  border-radius: var(--radius-card);
  border: 1px solid var(--border) !important;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s, background 0.3s;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.metric-card-item::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border-radius: 99px 99px 0 0;
  opacity: 0;
  transition: opacity 0.25s;
}
.metric-card-item:hover { border-color: var(--border-accent) !important; box-shadow: var(--shadow-glow); transform: translateY(-2px); }
.metric-card-item:hover::after { opacity: 0.7; }

.metric-card-item .titulo {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.metric-card-item .valor {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.03em;
  animation: countUp 0.5s ease both;
}

/* ══════════════════════════════════════════════════════════
   SKELETON com shimmer
   ══════════════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--skeleton-bg) 25%,
    rgba(255,255,255,0.1) 50%,
    var(--skeleton-bg) 75%
  ) !important;
  background-size: 800px 100% !important;
  animation: shimmer 1.6s ease-in-out infinite !important;
  border-radius: 0.75rem;
}
[data-theme="light"] .skeleton {
  background: linear-gradient(
    90deg,
    var(--skeleton-bg) 25%,
    rgba(99,102,241,0.12) 50%,
    var(--skeleton-bg) 75%
  ) !important;
}

/* ══════════════════════════════════════════════════════════
   CAMPOS DE FORMULÁRIO
   ══════════════════════════════════════════════════════════ */
.campo {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-btn);
  background: var(--input-bg) !important;
  border: 1px solid var(--input-border) !important;
  color: var(--text-primary) !important;
  font-size: 0.875rem;
  transition: all 0.2s;
  outline: none;
  font-family: inherit;
  letter-spacing: 0.01em;
}
.campo::placeholder { color: var(--text-muted) !important; }
.campo:focus {
  border-color: rgba(99,102,241,0.6) !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12), 0 0 0 1px rgba(99,102,241,0.3);
  background: rgba(99,102,241,0.06) !important;
}
.campo:disabled { opacity: 0.45; cursor: not-allowed; }
.campo option { background: var(--bg-elevated); color: var(--text-primary); }

.label-campo {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-label) !important;
  margin-bottom: 0.375rem;
}

/* ══════════════════════════════════════════════════════════
   BOTÕES
   ══════════════════════════════════════════════════════════ */
.btn-primario {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius-btn);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-family: inherit;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 12px var(--accent-glow), 0 1px 3px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
}
.btn-primario::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  border-radius: inherit;
  pointer-events: none;
}
.btn-primario:hover {
  background: #5254cc;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow), 0 2px 6px rgba(0,0,0,0.2);
}
.btn-primario:active { transform: scale(0.96); }
.btn-primario:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-sair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-btn);
  background: rgba(239,68,68,0.07);
  border: 1px solid rgba(239,68,68,0.18);
  color: #f87171;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  font-family: inherit;
}
.btn-sair:hover {
  background: rgba(239,68,68,0.14);
  border-color: rgba(239,68,68,0.3);
  box-shadow: 0 0 12px rgba(239,68,68,0.15);
}

/* ══════════════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════════════ */
#sidebar, .sidebar {
  background: var(--bg-surface) !important;
  border-color: var(--border) !important;
  transition: background 0.3s, border-color 0.3s, width 0.25s ease;
}
/* Garante scroll no nav para todos os itens aparecerem */
#sidebar nav, .sidebar nav {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}
#sidebarFooter {
  flex-shrink: 0 !important;
}

/* Glow ambiental na sidebar */
#sidebar::before, .sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 200px;
  background: radial-gradient(ellipse at top center, rgba(99,102,241,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.sidebar-secao {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted) !important;
  padding: 0.5rem 0.75rem;
  margin-top: 0.25rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-btn);
  color: var(--text-secondary) !important;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  transition: all 0.18s;
  width: 100%;
  text-align: left;
  font-family: inherit;
  letter-spacing: 0.01em;
  position: relative;
}
.sidebar-link:hover {
  background: var(--bg-hover-strong) !important;
  color: var(--text-primary) !important;
}
/* Shimmer de hover */
.sidebar-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.04) 50%, transparent 100%);
  opacity: 0;
  transform: translateX(-100%);
  transition: none;
}
.sidebar-link:hover::after {
  opacity: 1;
  transform: translateX(100%);
  transition: transform 0.5s ease, opacity 0.1s;
}

.sidebar-link .icone {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: var(--bg-hover) !important;
  flex-shrink: 0;
  font-size: 0.8rem;
  transition: background 0.18s, transform 0.18s;
}
.sidebar-link:hover .icone {
  background: var(--bg-hover-strong) !important;
  transform: scale(1.08);
}

.sidebar-link.ativo {
  background: rgba(99,102,241,0.12) !important;
  color: var(--accent-light) !important;
  border-left: 2px solid var(--accent);
  padding-left: calc(0.75rem - 2px);
  box-shadow: inset 0 0 0 1px rgba(99,102,241,0.08);
}
.sidebar-link.ativo .icone {
  background: rgba(99,102,241,0.18) !important;
  color: var(--accent-light);
}

/* ══════════════════════════════════════════════════════════
   TOPBAR
   ══════════════════════════════════════════════════════════ */
header#header, header.topbar, .topbar {
  background: var(--topbar-bg) !important;
  border-color: var(--border) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background 0.3s;
}

/* ══════════════════════════════════════════════════════════
   TABELA
   ══════════════════════════════════════════════════════════ */
.tabela-chamados { width: 100%; }
.tabela-chamados table { width: 100%; min-width: 600px; border-collapse: collapse; }
.tabela-chamados thead tr { border-bottom: 1px solid var(--border); }
.tabela-chamados th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.tabela-chamados td {
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.tabela-chamados tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  cursor: pointer;
}
.tabela-chamados tbody tr:hover { background: var(--bg-hover) !important; }
.tabela-chamados tbody tr:last-child { border-bottom: none; }

/* ══════════════════════════════════════════════════════════
   BADGES DE STATUS
   ══════════════════════════════════════════════════════════ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.status-pendente  { background: rgba(245,158,11,0.12); color: #fbbf24; box-shadow: inset 0 0 0 1px rgba(245,158,11,0.2); }
.status-agendado  { background: rgba(14,165,233,0.12);  color: #38bdf8; box-shadow: inset 0 0 0 1px rgba(14,165,233,0.2); }
.status-andamento { background: rgba(139,92,246,0.12);  color: #c4b5fd; box-shadow: inset 0 0 0 1px rgba(139,92,246,0.2); }
.status-concluida { background: rgba(16,185,129,0.12);  color: #6ee7b7; box-shadow: inset 0 0 0 1px rgba(16,185,129,0.2); }
.status-cancelada { background: rgba(239,68,68,0.12);   color: #fca5a5; box-shadow: inset 0 0 0 1px rgba(239,68,68,0.2); }

/* ── Badges de prioridade ─────────────────────────────── */
.badge-prior {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.18rem 0.5rem; border-radius: 99px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.02em;
}
.badge-normal  { background: rgba(34,197,94,0.1);   color: #86efac; box-shadow: inset 0 0 0 1px rgba(34,197,94,0.2); }
.badge-alerta  { background: rgba(245,158,11,0.12);  color: #fde68a; box-shadow: inset 0 0 0 1px rgba(245,158,11,0.2); }
.badge-critico { background: rgba(249,115,22,0.12);  color: #fdba74; box-shadow: inset 0 0 0 1px rgba(249,115,22,0.2); }
.badge-urgente { background: rgba(239,68,68,0.12);   color: #fca5a5; box-shadow: inset 0 0 0 1px rgba(239,68,68,0.2); }

/* ══════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 999;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
  overflow: hidden;
}
@media (min-width: 640px) { .modal-overlay { align-items: center; } }
.modal-overlay.aberto { opacity: 1; pointer-events: auto; }

.modal-box {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 1.25rem 1.25rem 0 0;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(99,102,241,0.1);
  width: 100% !important; max-width: 100% !important; max-height: 85vh; max-height: 85dvh; overflow-y: auto; overflow-x: hidden;
  padding: 1.25rem;
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 16px));
  overscroll-behavior: contain;
  transform: translateY(2rem); opacity: 0;
  transition: all 0.3s cubic-bezier(0.34,1.3,0.64,1);
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
@media (min-width: 640px) {
  .modal-box { border-radius: 1.25rem; max-width: 32rem !important; max-height: 85vh; max-height: 85dvh; }
}
.modal-overlay.aberto .modal-box { transform: translateY(0); opacity: 1; }

/* ══════════════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════════════ */
.toast-global {
  position: fixed; bottom: 1.5rem; right: 1rem;
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.875rem 1.25rem; border-radius: 1rem;
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
  max-width: 22rem; opacity: 0; transform: translateY(1rem) scale(0.97);
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.34,1.3,0.64,1);
  z-index: 1000; font-size: 0.875rem; color: var(--text-primary) !important;
}
@media (min-width: 640px) { .toast-global { right: 1.5rem; } }
.toast-global.visivel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.toast-global.sucesso { border-color: rgba(16,185,129,0.3) !important; }
.toast-global.erro    { border-color: rgba(239,68,68,0.3) !important; }

/* ══════════════════════════════════════════════════════════
   CARDS DE TÉCNICO / EQUIPE
   ══════════════════════════════════════════════════════════ */
.tecnico-card {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem; border-radius: var(--radius-btn);
  background: var(--bg-hover) !important;
  border: 1px solid var(--border) !important;
  transition: all 0.2s;
}
.tecnico-card:hover {
  background: var(--bg-hover-strong) !important;
  border-color: var(--border-accent) !important;
  transform: translateX(2px);
}

.avatar-tecnico {
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem; font-weight: 700; color: #fff; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ══════════════════════════════════════════════════════════
   PROGRESS BAR
   ══════════════════════════════════════════════════════════ */
.progress-bar {
  width: 100%; height: 5px;
  background: var(--bg-hover) !important;
  border-radius: 99px; overflow: hidden;
}
.progress-bar-fill {
  height: 100%; border-radius: 99px;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 6px currentColor;
}

/* ══════════════════════════════════════════════════════════
   TOPBAR GLASS
   ══════════════════════════════════════════════════════════ */
.topbar-glass {
  background: var(--topbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ══════════════════════════════════════════════════════════
   SCROLLBAR THIN
   ══════════════════════════════════════════════════════════ */
.scrollbar-thin { scrollbar-width: thin; scrollbar-color: var(--scrollbar) transparent; }

/* ══════════════════════════════════════════════════════════
   MOBILE
   ══════════════════════════════════════════════════════════ */
/* Sidebar aberta — fora da media query para funcionar em qualquer viewport */
#sidebar.aberta, .sidebar.aberta { transform: translateX(0) !important; }

@media (max-width: 767px) {
  .painel { padding: 1rem; }
  .metric-card-item { padding: 0.9rem 1rem; }
  .metric-card-item .valor { font-size: 1.6rem; }
  #sidebar, .sidebar { position: fixed; z-index: 200 !important; width: 260px !important; transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important; }
  .main-content { margin-left: 0 !important; width: 100% !important; }
}
@media (min-width: 768px) { #sidebarOverlay { display: none !important; } .btn-hamburger { display: none !important; } }

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 99; backdrop-filter: blur(3px); }
.sidebar-overlay.visivel,
#sidebarOverlay.visivel { display: block; }

.sidebar { transition: transform 0.3s ease, width 0.25s ease; }

@media (max-width: 768px) {
  .main-content, .conteudo-principal { margin-left: 0 !important; width: 100% !important; }
  .btn-hamburger { display: flex !important; }
  .tabela-wrapper, .overflow-x-auto { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .overflow-x-auto table, .tabela-wrapper table { min-width: 540px; }
  .topbar-titulo { display: none; }
  .topbar { padding: 10px 14px !important; gap: 8px; }
  .topbar h1 { font-size: 0.95rem !important; line-height: 1.2; }
  .topbar .topbar-sub { display: none; }
  .topbar .btn-texto { display: none; }
  .p-6 { padding: 1rem !important; }
  .space-y-6 > * + * { margin-top: 1rem !important; }
  
  /* Ajuste específico para Rota do Dia */
  .rota-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .agenda-grid {
    grid-template-columns: 1fr !important;
  }

  /* ── Grids de conteúdo: 1 coluna em mobile (textos longos nao quebram) ── */
  /* Grids com 2+ colunas dentro de .card ou .painel colapsam para 1 coluna  */
  /* Excecao: .grid-kpi mantem 2 colunas (metricas numericas curtas)          */
  .card .grid:not(.grid-kpi),
  .painel .grid:not(.grid-kpi) {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)) !important;
  }

  /* ── Flex rows com muitas metricas: wrapping global ── */
  /* Qualquer flex dentro de linha-clicavel pode quebrar linha */
  .linha-clicavel .flex { flex-wrap: wrap !important; }
  /* Nenhum filho de flex dentro de card/painel pode travar o shrink */
  .card .flex > *, .painel .flex > * { flex-shrink: 1 !important; min-width: 0; }
  /* Rows justify-between permitem wrap nos filhos */
  .card .flex.justify-between, .painel .flex.justify-between { flex-wrap: wrap !important; gap: 0.5rem !important; }

  /* ── Evitar overflow horizontal em qualquer elemento ── */
  .card, .painel, main { overflow-x: hidden; }
}

select.campo { color-scheme: dark; }
select option, .campo option { background-color: var(--bg-elevated); color: var(--text-primary); }
[data-theme="light"] select.campo { color-scheme: light; }
[data-theme="light"] select option, [data-theme="light"] .campo option { background: #fff; color: #0f172a; }

/* ══════════════════════════════════════════════════════════
   OVERRIDES TAILWIND — TEMA CLARO
   ══════════════════════════════════════════════════════════ */
[data-theme="light"] body { color: var(--text-primary); background: var(--bg-base) !important; }
/* Todos os fundos escuros hardcoded → bg-base no tema claro */
/* Todos os fundos escuros hardcoded → bg-base no tema claro (qualquer página) */
[data-theme="light"] .bg-\[#0a0f1e\],
[data-theme="light"] .bg-\[#080d18\],
[data-theme="light"] .bg-\[#0f172a\],
[data-theme="light"] .bg-\[#0d1526\],
[data-theme="light"] .bg-\[#0a0f1e\]\/90,
[data-theme="light"] .bg-\[#0f172a\]\/80,
[data-theme="light"] .bg-\[#0f172a\]\/90 { background: var(--bg-base) !important; }
/* Topbars semi-transparentes → var correta */
[data-theme="light"] .bg-\[#0a0f1e\]\/80,
[data-theme="light"] .bg-\[#080d18\]\/80 { background: var(--topbar-bg) !important; }
[data-theme="light"] .text-slate-100,
[data-theme="light"] .text-white { color: var(--text-primary) !important; }
[data-theme="light"] .text-white\/50,
[data-theme="light"] .text-white\/40,
[data-theme="light"] .text-white\/30,
[data-theme="light"] .text-white\/20,
[data-theme="light"] .text-white\/15 { color: var(--text-muted) !important; }
[data-theme="light"] .text-white\/60,
[data-theme="light"] .text-white\/70 { color: var(--text-secondary) !important; }
[data-theme="light"] .border-white\/5,
[data-theme="light"] .border-white\/10 { border-color: var(--border) !important; }
[data-theme="light"] .bg-white\/5,
[data-theme="light"] .bg-white\/3 { background: var(--bg-hover) !important; }
[data-theme="light"] .bg-white\/10 { background: rgba(99,102,241,0.08) !important; }
[data-theme="light"] .tabela-chamados th { color: var(--text-label) !important; }
[data-theme="light"] .tabela-chamados td { color: var(--text-secondary) !important; }
[data-theme="light"] .tabela-chamados thead tr,
[data-theme="light"] .tabela-chamados tbody tr { border-color: var(--border) !important; }
[data-theme="light"] .tabela-chamados tbody tr:hover { background: var(--bg-hover) !important; }

/* Cards de configurações */
.card {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow: var(--shadow-card);
  position: relative;
  transition: background 0.3s, border-color 0.3s;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 1.5rem; right: 1.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,0.35), transparent);
}
.card-titulo { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted) !important; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
[data-theme="light"] .topbar { background: var(--topbar-bg) !important; border-color: var(--border) !important; }
[data-theme="light"] .btn-secundario { background: rgba(99,102,241,0.07) !important; border-color: rgba(99,102,241,0.15) !important; color: rgba(15,23,42,0.7) !important; }
[data-theme="light"] .logo-preview { background: rgba(99,102,241,0.05) !important; border-color: var(--border) !important; color: var(--text-muted) !important; }
[data-theme="light"] .logo-upload-btn { background: rgba(99,102,241,0.06) !important; border-color: rgba(99,102,241,0.15) !important; color: rgba(15,23,42,0.7) !important; }

/* ══════════════════════════════════════════════════════════
   SISTEMA DE TEMAS — variáveis aplicadas
   ══════════════════════════════════════════════════════════ */
.campo { background: var(--input-bg) !important; border-color: var(--input-border) !important; color: var(--text-primary) !important; }
.campo::placeholder { color: var(--text-muted) !important; }
.label-campo { color: var(--text-label) !important; }
.sidebar-secao { color: var(--text-muted) !important; }
.skeleton { background: var(--skeleton-bg) !important; }
::-webkit-scrollbar-thumb { background: var(--scrollbar) !important; }
.toast-global { background: var(--bg-elevated) !important; border-color: var(--border) !important; color: var(--text-primary) !important; }
.modal-box { background: var(--bg-surface) !important; border-color: var(--border) !important; }

/* ══════════════════════════════════════════════════════════
   SIDEBAR COLAPSÁVEL
   ══════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  #sidebar.sidebar-collapsed, .sidebar.sidebar-collapsed { width: var(--sidebar-mini) !important; }
  #sidebar.sidebar-collapsed .sidebar-label, .sidebar.sidebar-collapsed .sidebar-label { display: none !important; }
  #sidebar.sidebar-collapsed .sidebar-secao, #sidebar.sidebar-collapsed .sidebar-divider,
  .sidebar.sidebar-collapsed .sidebar-secao, .sidebar.sidebar-collapsed .sidebar-divider { display: none !important; }
  #sidebar.sidebar-collapsed .sidebar-user-block, .sidebar.sidebar-collapsed .sidebar-user-block { display: none !important; }
  #sidebar.sidebar-collapsed .sidebar-brand-text, .sidebar.sidebar-collapsed .sidebar-brand-text { display: none !important; }
  #sidebar.sidebar-collapsed .sidebar-brand-section, .sidebar.sidebar-collapsed .sidebar-brand-section { padding: 0.75rem 0.5rem !important; justify-content: center !important; }
  #sidebar.sidebar-collapsed .sidebar-link, .sidebar.sidebar-collapsed .sidebar-link { justify-content: center; padding: 0.625rem !important; gap: 0; border-left: none !important; }
  #sidebar.sidebar-collapsed .sidebar-link.ativo, .sidebar.sidebar-collapsed .sidebar-link.ativo { border-left: 2px solid var(--accent) !important; padding-left: calc(0.625rem - 2px) !important; }
  #sidebar.sidebar-collapsed .sidebar-footer-text, .sidebar.sidebar-collapsed .sidebar-footer-text { display: none !important; }
  #sidebar.sidebar-collapsed .btn-sair span, .sidebar.sidebar-collapsed .btn-sair span { display: none !important; }
  #sidebar.sidebar-collapsed .btn-sair, .sidebar.sidebar-collapsed .btn-sair { padding: 0.5rem !important; }
}

@media (min-width: 768px) {
  body.sidebar-collapsed .md\:ml-64 { margin-left: var(--sidebar-mini) !important; }
  body.sidebar-collapsed .main-content { margin-left: var(--sidebar-mini) !important; }
}

/* ══════════════════════════════════════════════════════════
   CONTROLES DE TEMA/COLAPSO (injetados via theme.js)
   ══════════════════════════════════════════════════════════ */
.sidebar-theme-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 0.75rem; border-radius: var(--radius-btn);
  background: var(--bg-hover); border: 1px solid var(--border);
  margin-bottom: 0.5rem; gap: 0.5rem; cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.sidebar-theme-row:hover { background: var(--bg-hover-strong); border-color: var(--border-hover); }
.sidebar-theme-row-label { font-size: 0.75rem; font-weight: 600; color: rgba(238,242,255,0.6); white-space: nowrap; }
#sidebar.sidebar-collapsed .sidebar-theme-row, .sidebar.sidebar-collapsed .sidebar-theme-row { justify-content: center; padding: 0.5rem; }
#sidebar.sidebar-collapsed .sidebar-theme-row-label, .sidebar.sidebar-collapsed .sidebar-theme-row-label { display: none; }

.theme-switch { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; }
.theme-switch input { opacity: 0; width: 0; height: 0; }
.theme-switch-slider { position: absolute; cursor: pointer; inset: 0; background: rgba(99,102,241,0.3); border-radius: 20px; transition: background 0.25s; }
.theme-switch-slider::before { content: ''; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; background: var(--accent); border-radius: 50%; transition: transform 0.25s; box-shadow: 0 1px 4px rgba(0,0,0,0.4); }
.theme-switch input:checked + .theme-switch-slider { background: rgba(234,179,8,0.2); }
.theme-switch input:checked + .theme-switch-slider::before { background: #eab308; transform: translateX(16px); }

.btn-colapso-sidebar {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 0.4rem; border-radius: 0.5rem;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); cursor: pointer;
  transition: all 0.2s; font-size: 0.75rem; margin-top: 0.25rem;
  font-family: inherit;
}
.btn-colapso-sidebar:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-hover); }

/* ══════════════════════════════════════════════════════════
   OVERRIDES TEMA CLARO — classes inline das páginas
   ══════════════════════════════════════════════════════════ */

/* Elementos com background hardcoded nas páginas */
[data-theme="light"] .faq-card,
[data-theme="light"] .agenda-card,
[data-theme="light"] .modal-box,
[data-theme="light"] .card,
[data-theme="light"] .topbar,
[data-theme="light"] .tabela th,
[data-theme="light"] .tabela td { background: var(--bg-surface) !important; }

[data-theme="light"] .faq-card { border-color: var(--border) !important; }
[data-theme="light"] .agenda-card { border-color: var(--border) !important; }
[data-theme="light"] .topbar { border-color: var(--border) !important; }

/* Textos hardcoded que ficam invisíveis no claro */
[data-theme="light"] .text-white\/25,
[data-theme="light"] .text-white\/20 { color: var(--text-muted) !important; }

/* Campo select option no tema claro */
[data-theme="light"] .campo option,
[data-theme="light"] select option { background: #fff !important; color: #0f172a !important; }
[data-theme="light"] select.campo { color-scheme: light; }

/* Sidebar links no tema claro (pages com inline .sidebar-link) */
[data-theme="light"] .sidebar-link { color: var(--text-secondary) !important; }
[data-theme="light"] .sidebar-link:hover { background: var(--bg-hover) !important; color: var(--text-primary) !important; }
[data-theme="light"] .sidebar-link.ativo { background: rgba(99,102,241,0.1) !important; color: #6366f1 !important; }
[data-theme="light"] .sidebar-link .icone { background: var(--bg-hover) !important; }

/* Tabelas das páginas internas */
[data-theme="light"] .tabela { border-color: var(--border); }
[data-theme="light"] .tabela th { background: var(--bg-elevated) !important; color: var(--text-label) !important; border-color: var(--border) !important; }
[data-theme="light"] .tabela td { color: var(--text-secondary) !important; border-color: var(--border) !important; }
[data-theme="light"] .tabela tr:hover td { background: var(--bg-hover) !important; }

/* Cards de relatório / stat cards */
[data-theme="light"] .stat-card,
[data-theme="light"] [class*="stat-"] { background: var(--bg-surface) !important; border-color: var(--border) !important; }

/* Resumo cards de relatorios */
[data-theme="light"] .resumo-card { background: var(--bg-surface) !important; border-color: var(--border) !important; }

/* FAQ cards no tema claro */
[data-theme="light"] .faq-card { background: var(--bg-surface) !important; }
[data-theme="light"] .faq-card:hover { border-color: var(--border-accent) !important; }

/* Modal genérico */
[data-theme="light"] .modal-box,
[data-theme="light"] [class*="modal"] .bg-\[#1e293b\] { background: var(--bg-surface) !important; border-color: var(--border) !important; }

/* Sidebar collapsed - topbar tooltip overflow */
#sidebar.sidebar-collapsed ~ * .topbar-titulo { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVIDADE MOBILE — melhorias globais
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Sidebar usa var() de largura — colapso não aplica no mobile */
  body.sidebar-collapsed .md\:ml-64,
  body.sidebar-collapsed .main-content { margin-left: 0 !important; }

  /* Sidebar collapsed no mobile: esconde completamente */
  #sidebar.sidebar-collapsed, .sidebar.sidebar-collapsed { 
    width: 260px !important; 
    transform: translateX(-100%); 
  }
  #sidebar.sidebar-collapsed.aberta, .sidebar.sidebar-collapsed.aberta { 
    transform: translateX(0) !important; 
  }

  /* Topbar mobile */
  header#header, .topbar {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Grid adaptativo */
  .grid.grid-cols-6,
  .grid.lg\:grid-cols-6 { grid-template-columns: repeat(2, 1fr) !important; }

  /* Painéis com padding reduzido */
  .painel { padding: 0.875rem !important; }

  /* Texto de overflow em topbar collapse */
  .sidebar-brand-section { flex-shrink: 0; min-width: 0; }
}

/* Sidebar collapsed: topbar overlap fix */
#sidebar.sidebar-collapsed + * + div > header,
#sidebar.sidebar-collapsed + div > header { left: var(--sidebar-mini); }

/* ── Sidebar collapsed: estado ativo visível e ícones centralizados ── */
#sidebar.sidebar-collapsed .sidebar-link,
.sidebar.sidebar-collapsed .sidebar-link {
  justify-content: center !important;
  padding-left: 0.625rem !important;
  padding-right: 0.625rem !important;
  border-left: none !important;
}
#sidebar.sidebar-collapsed .sidebar-link.ativo,
.sidebar.sidebar-collapsed .sidebar-link.ativo {
  border-left: 3px solid var(--accent) !important;
  padding-left: calc(0.625rem - 3px) !important;
  border-radius: 0.75rem;
}
#sidebar.sidebar-collapsed .icone,
.sidebar.sidebar-collapsed .icone {
  margin: 0 auto;
}

/* ── FAQ light mode: textos internos dos cards ─────────────────── */
[data-theme="light"] .faq-titulo { color: var(--text-primary) !important; }
[data-theme="light"] .faq-desc   { color: var(--text-secondary) !important; }
[data-theme="light"] .faq-materiais { color: #92400e !important; background: rgba(245,158,11,0.1) !important; border-color: rgba(245,158,11,0.25) !important; }

/* ── Rota do Dia light mode: agenda-card textos ─────────────────── */
[data-theme="light"] .agenda-card { background: var(--bg-surface) !important; border-color: var(--border) !important; }
[data-theme="light"] .tab-btn { background: var(--bg-hover) !important; border-color: var(--border) !important; color: var(--text-secondary) !important; }
[data-theme="light"] .tab-btn.ativo { background: rgba(99,102,241,0.12) !important; color: #6366f1 !important; border-color: rgba(99,102,241,0.3) !important; }

/* ── Configuracoes light mode: card-titulo e categorias ─────────── */
[data-theme="light"] .card-titulo { color: var(--text-muted) !important; }
[data-theme="light"] #listaCategorias .text-white\/80 { color: var(--text-primary) !important; }
[data-theme="light"] #listaCategorias { background: transparent !important; }
[data-theme="light"] #listaCategorias > div { background: var(--bg-hover) !important; border-color: var(--border) !important; }
[data-theme="light"] .logo-preview { background: var(--bg-hover) !important; border-color: var(--border) !important; color: var(--text-muted) !important; }
[data-theme="light"] .logo-upload-btn { background: var(--bg-hover) !important; border-color: var(--border) !important; color: var(--text-secondary) !important; }

/* ── Campos em páginas com tema light ────────────────────────────── */
[data-theme="light"] .campo { background: var(--input-bg) !important; border-color: var(--input-border) !important; color: var(--text-primary) !important; }
[data-theme="light"] .campo::placeholder { color: var(--text-muted) !important; }
[data-theme="light"] .label-campo { color: var(--text-label) !important; }
[data-theme="light"] .sidebar-link:hover { background: var(--bg-hover) !important; color: var(--text-primary) !important; }

/* ── Texto branco hardcoded em js renderizado ────────────────────── */
[data-theme="light"] [style*="color:white"],
[data-theme="light"] [style*="color: white"] { color: var(--text-primary) !important; }

/* ══════════════════════════════════════════════════════════
   ESTADOS VAZIOS
   ══════════════════════════════════════════════════════════ */
.estado-vazio {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 32px;
  text-align: center;
  color: rgba(255,255,255,0.2);
  gap: 12px;
}
[data-theme="light"] .estado-vazio {
  color: var(--text-muted);
}
.estado-vazio i { font-size: 3rem; }
.estado-vazio p { font-size: 0.875rem; }

/* ── Acessibilidade ──────────────────────────────────────── */
.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; }

*:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
  border-radius: 4px;
}

button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Chips e abas reutilizáveis (tema-aware) ─────────────── */
/* Classes: chip-data, chip-filtro, btn-filtro, aba-periodo   */
.chip-data,
.chip-filtro,
.btn-filtro,
.aba-periodo {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary) !important;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.15s;
}
.chip-data:hover,
.chip-filtro:hover,
.btn-filtro:hover,
.aba-periodo:hover {
  border-color: rgba(99,102,241,0.3);
  background: rgba(99,102,241,0.08);
  color: #818cf8 !important;
}
.chip-data.ativo,
.chip-filtro.ativo,
.btn-filtro.ativo,
.aba-periodo.ativo {
  border-color: rgba(99,102,241,0.4) !important;
  background: rgba(99,102,241,0.15) !important;
  color: #818cf8 !important;
}

/* ── Abas de navegação (tab-dash) ────────────────────────── */
.tab-dash {
  padding: 8px 16px;
  border-radius: 10px 10px 0 0;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary) !important;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.tab-dash:hover {
  background: var(--bg-hover);
  color: var(--text-primary) !important;
}
.tab-dash.ativo {
  background: var(--bg-surface) !important;
  color: #818cf8 !important;
  border-color: var(--border);
  border-bottom-color: var(--bg-surface);
}

/* ── Abas de import (tab-import) ─────────────────────────── */
.tab-import {
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.tab-import.ativo-indigo {
  background: rgba(99,102,241,0.15) !important;
  color: #818cf8 !important;
  border-color: rgba(99,102,241,0.3) !important;
}
.tab-import.ativo-verde {
  background: rgba(52,211,153,0.15) !important;
  color: #34d399 !important;
  border-color: rgba(52,211,153,0.3) !important;
}

/* ── Textos utilitários tema-aware ───────────────────────── */
.texto-muted  { color: var(--text-muted); }
.texto-label  { color: var(--text-label); }
