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

/* ============================================================
   ESCOLHIDOS TV — Design System
   Tokens, componentes base e utilitários. Inspirado em Linear /
   Stripe / Vercel / Raycast: fundo escuro sóbrio, dourado usado
   só pra destacar, muito espaço, cantos suaves, glass sutil.
   ============================================================ */

:root {
  /* Cor */
  --bg: #090B10;
  --bg-soft: #11161F;
  --card: #151B26;
  --hover: #1B2331;
  --border: rgba(255,255,255,.06);
  --border-strong: rgba(255,255,255,.12);
  --text: #FFFFFF;
  --text-dim: #A2A9B7;
  --text-faint: #6B7280;

  --gold: #F4B324;
  --gold-soft: rgba(244,179,36,.13);
  --gold-dim: rgba(244,179,36,.35);
  --green: #22C55E;
  --green-soft: rgba(34,197,94,.13);
  --red: #EF4444;
  --red-soft: rgba(239,68,68,.13);
  --blue: #3B82F6;
  --blue-soft: rgba(59,130,246,.13);
  --purple: #8B5CF6;
  --purple-soft: rgba(139,92,246,.13);
  --cyan: #06B6D4;
  --cyan-soft: rgba(6,182,212,.13);
  --gray-soft: rgba(148,163,184,.13);
  --orange: #F97316;
  --orange-soft: rgba(249,115,22,.13);

  /* nomes usados pelo sistema antigo — mantidos como alias pra
     nenhuma regra existente quebrar */
  --accent: var(--gold);
  --accent-soft: var(--gold-soft);
  --yellow: #F59E0B;

  /* Espaço — bem mais generoso que o padrão anterior */
  --sp-1: 6px;
  --sp-2: 10px;
  --sp-3: 16px;
  --sp-4: 24px;
  --sp-5: 32px;
  --sp-6: 48px;
  --sp-7: 64px;

  /* Raio / sombra */
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-full: 999px;
  --shadow-sm: 0 2px 10px rgba(0,0,0,.25);
  --shadow: 0 12px 32px rgba(0,0,0,.35);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.45);
  --glow-gold: 0 0 0 1px var(--gold-dim), 0 8px 24px rgba(244,179,36,.16);

  --sidebar-w: 292px;
  --topbar-h: 76px;
  --transition: 200ms cubic-bezier(.4,0,.2,1);
  --transition-slow: 320ms cubic-bezier(.4,0,.2,1);
}

/* Fallback pra viewer claro, caso o tema do sistema force */
:root[data-theme="light"] {
  --bg: #F3F4F7; --bg-soft: #FFFFFF; --card: #FFFFFF; --hover: #EEF0F4;
  --border: rgba(15,23,42,.08); --border-strong: rgba(15,23,42,.16);
  --text: #0F1218; --text-dim: #5B6472; --text-faint: #8A93A3;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 700; letter-spacing: -.015em; margin: 0; }
label, .label-like { font-weight: 500; }

a { color: var(--gold); text-decoration: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

/* ===================== APP SHELL (sidebar + topbar) ===================== */

/* nav.js monta sidebar/topbar via JS depois de checar a sessão (chamada
   assíncrona) — sem isso, o <main> aparece "cru" (sem grid, sem sidebar)
   por um instante e dá um pulo visual quando o shell é injetado. Esconder
   até a classe app-shell chegar evita o flash; o fade-in disfarça o
   pequeno atraso da checagem de sessão. */
main { opacity: 0; }
body.app-shell main { opacity: 1; transition: opacity 160ms ease; }

body.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: 100vh;
  background:
    radial-gradient(1100px 560px at 14% -8%, rgba(244,179,36,.05), transparent 60%),
    var(--bg);
}

.sidebar {
  grid-row: 1 / -1;
  background: linear-gradient(180deg, var(--bg-soft), var(--card) 140%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 28px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo { display: flex; align-items: center; gap: 12px; padding: 4px 8px 36px; }
.sidebar-logo .mark {
  width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
  background: linear-gradient(135deg, #FFD666, var(--gold) 45%, #C7860F);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(244,179,36,.28);
  position: relative;
}
.sidebar-logo .mark svg { width: 22px; height: 22px; stroke: #1A1200; stroke-width: 2.4; }
.sidebar-logo .brand-text { font-weight: 800; font-size: 15.5px; line-height: 1.25; letter-spacing: -.01em; }
.sidebar-logo .brand-text .tv { color: var(--gold); }
.sidebar-logo .brand-text small { display: block; color: var(--text-faint); font-weight: 500; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; margin-top: 2px; }

.sidebar-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  position: relative;
}
.sidebar-nav a svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .8; transition: opacity var(--transition), stroke var(--transition); }
.sidebar-nav a:hover { background: var(--hover); color: var(--text); }
.sidebar-nav a.active {
  background: linear-gradient(90deg, var(--gold-soft), rgba(244,179,36,.03));
  color: var(--gold);
  border-left-color: var(--gold);
  font-weight: 600;
  box-shadow: inset 0 0 24px rgba(244,179,36,.06);
}
.sidebar-nav a.active svg { stroke: var(--gold); opacity: 1; filter: drop-shadow(0 0 6px rgba(244,179,36,.5)); }

.sidebar-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-faint);
  font-weight: 600;
  padding: 20px 14px 8px;
}

.sidebar-user {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 4px;
}
.sidebar-user .avatar-mini { width: 36px; height: 36px; }
.sidebar-user .who { flex: 1; min-width: 0; }
.sidebar-user .who .nome { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .who .cargo { font-size: 11px; color: var(--text-faint); }
.sidebar-user .btn-sair {
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-dim); padding: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.sidebar-user .btn-sair svg { width: 16px; height: 16px; }
.sidebar-user .btn-sair:hover { background: var(--red-soft); border-color: var(--red); color: var(--red); }

.content-col { display: flex; flex-direction: column; min-width: 0; height: 100vh; overflow: hidden; }

.topbar {
  height: var(--topbar-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 var(--sp-5);
  border-bottom: 1px solid var(--border);
  background: rgba(9,11,16,.72);
  backdrop-filter: blur(14px);
}
.topbar-title-wrap { display: flex; flex-direction: column; gap: 2px; }
.topbar-title { font-size: 19px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.topbar-subtitle { font-size: 12.5px; color: var(--text-faint); }
.topbar-back {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  color: var(--text-dim); border: 1px solid var(--border); flex-shrink: 0;
  transition: all var(--transition);
}
.topbar-back svg { width: 16px; height: 16px; }
.topbar-back:hover { color: var(--text); background: var(--hover); border-color: var(--border-strong); }
.topbar-spacer { flex: 1; }
.topbar-date { font-size: 13px; color: var(--text-dim); font-weight: 500; }
.topbar-icon-btn {
  position: relative; width: 38px; height: 38px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; color: var(--text-dim);
  border: 1px solid var(--border); transition: all var(--transition); cursor: pointer;
}
.topbar-icon-btn svg { width: 17px; height: 17px; }
.topbar-icon-btn:hover { color: var(--text); background: var(--hover); border-color: var(--border-strong); }
.topbar-icon-btn .dot {
  position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px; border: 2px solid var(--bg);
}
.topbar-user { display: flex; align-items: center; gap: 9px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid transparent; transition: all var(--transition); }
.topbar-user:hover { background: var(--hover); border-color: var(--border); }
.topbar-user b { font-size: 13px; font-weight: 600; color: var(--text); }

main {
  flex: 1;
  overflow-y: auto;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-5) 80px;
}

/* ===================== TYPOGRAPHY / SECTIONS ===================== */

h1 { font-size: 25px; margin: 0 0 6px; }
h2 { font-size: 15px; color: var(--text-dim); margin: var(--sp-6) 0 var(--sp-3); font-weight: 600; letter-spacing: .01em; }
h2:first-of-type { margin-top: 4px; }
.section-desc { color: var(--text-faint); font-size: 13.5px; margin: -10px 0 var(--sp-4); max-width: 680px; line-height: 1.55; }

/* ===================== GLASS / CARD BASE ===================== */

.card {
  background: linear-gradient(160deg, var(--card), var(--bg-soft) 130%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-4);
  box-shadow: var(--shadow-sm);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

/* ===================== KPI CARD ===================== */
/* Card de métrica premium: ícone grande num círculo iluminado + label +
   valor + descrição opcional. Substitui os ".stat" simples de antes. */

.stat, .kpi-card {
  position: relative;
  min-width: 0;
  background: linear-gradient(160deg, var(--card), var(--bg-soft) 160%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-4);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.stat::before, .kpi-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(160deg, rgba(255,255,255,.08), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.stat:hover, .kpi-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }

.kpi-card .icon-circle {
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-3); flex-shrink: 0;
}
.kpi-card .icon-circle svg { width: 22px; height: 22px; }
.icon-circle.green  { background: var(--green-soft);  color: var(--green);  box-shadow: 0 0 22px -6px rgba(34,197,94,.55); }
.icon-circle.red    { background: var(--red-soft);    color: var(--red);    box-shadow: 0 0 22px -6px rgba(239,68,68,.55); }
.icon-circle.blue   { background: var(--blue-soft);   color: var(--blue);   box-shadow: 0 0 22px -6px rgba(59,130,246,.55); }
.icon-circle.purple { background: var(--purple-soft); color: var(--purple); box-shadow: 0 0 22px -6px rgba(139,92,246,.55); }
.icon-circle.gold   { background: var(--gold-soft);   color: var(--gold);   box-shadow: 0 0 22px -6px rgba(244,179,36,.55); }
.icon-circle.cyan   { background: var(--cyan-soft);   color: var(--cyan);   box-shadow: 0 0 22px -6px rgba(6,182,212,.55); }
.icon-circle.gray   { background: var(--gray-soft);   color: var(--text-dim); }

.kpi-card .label, .stat .label { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-card .value, .stat .value {
  font-size: clamp(19px, 2.1vw, 25px); font-weight: 700; margin-top: 6px; letter-spacing: -.01em;
  overflow-wrap: break-word; word-break: break-word; line-height: 1.15;
}
.kpi-card .desc { font-size: 12px; color: var(--text-faint); margin-top: 6px; }

.stat.green .value { color: var(--green); }
.stat.yellow .value { color: var(--gold); }
.stat.red .value { color: var(--red); }

/* ===================== TABLES ===================== */

.table-wrap { overflow-x: auto; border-radius: var(--radius); }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--text-faint); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--hover); }
tbody tr:last-child td { border-bottom: none; }

/* ===================== FORMS ===================== */

form.inline { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: flex-end; margin-bottom: var(--sp-4); }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 12px; color: var(--text-dim); font-weight: 500; }

input, select, textarea {
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 12px 14px;
  font-size: 13.5px;
  font-family: inherit;
  color-scheme: dark;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
/* alguns navegadores (Safari, versões antigas de Chrome/Firefox) não
   aplicam color-scheme:dark ao popup nativo do <select>, deixando as
   <option> com fundo branco + texto branco herdado (só aparece no
   hover, pelo destaque nativo do SO) — força explicitamente aqui */
select option { background: var(--card); color: var(--text); }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); background: rgba(244,179,36,.03); }
input[type="date"] { cursor: pointer; }
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; padding: 2px; filter: invert(.7); }

button {
  background: linear-gradient(135deg, #FFD666, var(--gold) 55%, #DE9C10);
  color: #1A1200;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 13.5px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(244,179,36,.25);
  transition: filter var(--transition), transform var(--transition), box-shadow var(--transition);
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
}
button svg { width: 15px; height: 15px; }
button:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(244,179,36,.32); }
button:active { transform: translateY(0); }
button.secondary {
  background: transparent; color: var(--text); border: 1px solid var(--border-strong);
  box-shadow: none;
}
button.secondary:hover { background: var(--hover); box-shadow: none; }
button.danger { background: linear-gradient(135deg, #F87171, var(--red) 60%); color: #fff; box-shadow: 0 4px 16px rgba(239,68,68,.25); }
button.danger:hover { box-shadow: 0 8px 22px rgba(239,68,68,.32); }
button.success { background: linear-gradient(135deg, #4ADE80, var(--green) 60%); color: #06210f; box-shadow: 0 4px 16px rgba(34,197,94,.25); }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; box-shadow: none; }

/* ===================== BADGES / CHIPS / SITUAÇÃO ===================== */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
}
.badge.ativo, .badge.concluido { background: var(--green-soft); color: var(--green); }
.badge.em-analise, .badge.pendente { background: var(--gold-soft); color: var(--gold); }
.badge.banido, .badge.golpe { background: var(--red-soft); color: var(--red); }
.badge.devolveu { background: var(--gray-soft); color: var(--text-dim); }

/* Badges de categoria genéricas (ex: categorias de custo fixo) */
.badge.cat-blue   { background: var(--blue-soft);   color: var(--blue); }
.badge.cat-green  { background: var(--green-soft);  color: var(--green); }
.badge.cat-gold   { background: var(--gold-soft);   color: var(--gold); }
.badge.cat-purple { background: var(--purple-soft); color: var(--purple); }
.badge.cat-gray   { background: var(--gray-soft);   color: var(--text-dim); }
.badge.cat-orange { background: var(--orange-soft); color: var(--orange); }
.badge.cat-cyan   { background: var(--cyan-soft);   color: var(--cyan); }

.botoes-status { display: flex; gap: 6px; flex-wrap: wrap; }

/* Variante clicável do badge (ex: alternar status de um registro) */
.badge-btn {
  border: 1.5px solid transparent; cursor: pointer; opacity: .55;
  transition: all var(--transition); font-family: inherit;
}
.badge-btn svg { width: 12px; height: 12px; }
.badge-btn:hover { opacity: .85; transform: translateY(-1px); box-shadow: none; }
.badge-btn.selecionado { opacity: 1; box-shadow: 0 0 0 1px currentColor inset; }
.badge-btn.selecionado.ativo { box-shadow: 0 0 14px -4px rgba(34,197,94,.6), 0 0 0 1px var(--green) inset; }
.badge-btn.selecionado.em-analise { box-shadow: 0 0 14px -4px rgba(244,179,36,.6), 0 0 0 1px var(--gold) inset; }
.badge-btn.selecionado.banido { box-shadow: 0 0 14px -4px rgba(239,68,68,.6), 0 0 0 1px var(--red) inset; }


/* ===================== BOTÕES DE ESCOLHA (plataforma legado) ===================== */

.botoes-escolha { display: flex; flex-wrap: wrap; gap: 8px; }
.botao-escolha {
  border: 2px solid transparent; border-radius: var(--radius-sm); padding: 10px 15px;
  font-size: 12.5px; font-weight: 700; cursor: pointer; color: #fff; opacity: .55;
  transition: all var(--transition); box-shadow: var(--shadow-sm);
}
.botao-escolha:hover { opacity: .85; transform: translateY(-1px); }
.botao-escolha.selecionado { opacity: 1; border-color: rgba(255,255,255,.6); box-shadow: 0 4px 14px rgba(0,0,0,.35); }

/* ===================== PLATFORM PREMIUM BADGE ===================== */

.plat-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px 7px 7px; border-radius: 999px; font-weight: 700; font-size: 12.5px;
  color: #fff; box-shadow: var(--shadow-sm); border: 1px solid rgba(255,255,255,.08);
}
.plat-badge .glyph {
  width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex-shrink: 0;
}
button.plat-badge { cursor: pointer; opacity: .55; transition: all var(--transition); border: 2px solid transparent; }
button.plat-badge:hover { opacity: .85; transform: translateY(-1px); }
button.plat-badge.selecionado { opacity: 1; border-color: rgba(255,255,255,.55); box-shadow: 0 4px 14px rgba(0,0,0,.35); }

/* ===================== AVATARS ===================== */

.avatar-mini { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--hover); flex-shrink: 0; }
.avatar-mini-placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-dim); border: 1px solid var(--border-strong);
}
.avatar-lg { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-lg-placeholder {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: var(--gold);
  background: var(--gold-soft); border: 1px solid var(--gold-dim);
}

/* ===================== INDICADOR CARDS ===================== */

.cards-dia { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-5); }
.card-indicador {
  background: linear-gradient(160deg, var(--card), var(--bg-soft) 160%);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--sp-3) 18px; cursor: pointer; transition: all var(--transition); box-shadow: var(--shadow-sm);
  animation: fadeIn 300ms ease both;
}
.card-indicador:hover { border-color: var(--border-strong); transform: translateY(-3px); box-shadow: var(--shadow); }
.card-indicador.ativo { border-color: var(--gold-dim); box-shadow: var(--glow-gold); }
.card-indicador .topo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-indicador .nome { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-indicador .stats-mini { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-dim); margin-bottom: 10px; }
.card-indicador .stats-mini span { display: flex; align-items: center; gap: 4px; }
.card-indicador .valor-dia { font-size: 15px; font-weight: 700; }
.card-indicador .valor-dia.pos { color: var(--green); }
.card-indicador .valor-dia.neg { color: var(--red); }

/* ===================== SEARCH / FORM CARDS ===================== */

.search-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-5); }
.search-card {
  background: linear-gradient(160deg, var(--card), var(--bg-soft) 160%);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-4); box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-card:hover { border-color: var(--border-strong); }
.search-card .sc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.sc-head .ic, .table-card-head .left .ic {
  width: 38px; height: 38px; border-radius: 12px; background: var(--gold-soft); color: var(--gold);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 0 18px -6px rgba(244,179,36,.5);
}
.sc-head .ic svg, .table-card-head .left .ic svg { width: 18px; height: 18px; }
.sc-head .titles, .table-card-head .left .titles { display: flex; flex-direction: column; gap: 2px; }
.sc-head span.t, .table-card-head .left span.t { font-weight: 700; font-size: 14px; }
.sc-head span.sub, .table-card-head .left span.sub { font-size: 11.5px; color: var(--text-faint); font-weight: 500; }
.search-card form { margin: 0; }

/* Padrãozinho de pontos decorativo no canto — só um toque premium sutil */
.search-card { position: relative; overflow: hidden; }
.search-card::after {
  content: ''; position: absolute; top: -10px; right: -10px; width: 120px; height: 90px;
  background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 10px 10px;
  -webkit-mask-image: radial-gradient(ellipse at top right, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse at top right, #000 0%, transparent 72%);
  pointer-events: none;
}

/* Par de campos lado a lado dentro de um form-card */
.field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-bottom: 14px; }
.field-row-2 .field { margin: 0; }

/* ===================== LAYOUT 2 COLUNAS (ex: Financeiro) ===================== */

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); align-items: start; margin-bottom: var(--sp-4); }
.two-col .col { display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0; }
@media (max-width: 980px) { .two-col { grid-template-columns: 1fr; } }

/* ===================== TABLE CARD (cabeçalho com busca/filtro + total) ===================== */

.table-card {
  background: linear-gradient(160deg, var(--card), var(--bg-soft) 160%);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-4); box-shadow: var(--shadow-sm);
}
.table-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: 18px; }
.table-card-head .left { display: flex; align-items: center; gap: 12px; }
.table-card-head .filters { display: flex; align-items: center; gap: 8px; }
.table-card-head .filters input, .table-card-head .filters select { padding: 9px 12px; font-size: 12.5px; }
.table-card .table-wrap { border-radius: var(--radius-sm); }
.table-card table th, .table-card table td { padding: 13px 14px; }
.table-total-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 4px 4px; margin-top: 4px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-dim); font-weight: 600;
}
.table-total-row b { font-size: 16px; color: var(--gold); font-weight: 700; }

.search-input-wrap { position: relative; }
.search-input-wrap input { padding-right: 34px; }
.search-input-wrap svg { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-faint); pointer-events: none; }

/* ===================== TABS ===================== */

.tabs {
  display: flex; gap: 4px; flex-wrap: wrap; padding: 5px; margin-bottom: var(--sp-4);
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); width: fit-content;
}
.tab-btn {
  background: transparent; color: var(--text-dim); border: none; box-shadow: none;
  padding: 9px 16px; border-radius: 8px; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; transition: all var(--transition);
}
.tab-btn svg { width: 15px; height: 15px; }
.tab-btn:hover { background: var(--hover); color: var(--text); transform: none; box-shadow: none; }
.tab-btn.active { background: var(--gold); color: #1A1200; box-shadow: 0 2px 10px rgba(244,179,36,.3); }
.tab-panel.hidden { display: none; }

/* ===================== MATRIX TABLE (grade estilo planilha: item x mês) ===================== */

.matrix-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.matrix-table th, .matrix-table td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.matrix-table th { color: var(--text-faint); font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.matrix-table th.mes, .matrix-table td.mes { text-align: center; }
.matrix-table td.mes input {
  width: 82px; text-align: right; padding: 6px 8px; font-size: 12px;
  background: transparent; border: 1px solid transparent;
}
.matrix-table td.mes input:hover { border-color: var(--border); }
.matrix-table tbody tr:hover { background: var(--hover); }
.matrix-table tr.subtotal-row { background: rgba(255,255,255,.02); font-weight: 700; }
.matrix-table tr.subtotal-row td { color: var(--text-dim); border-bottom: 1px solid var(--border-strong); }
.matrix-table tr.total-row td { color: var(--gold); font-weight: 700; font-size: 13px; border-top: 2px solid var(--gold-dim); border-bottom: none; padding-top: 14px; }
.matrix-year-field { display: flex; align-items: center; gap: 10px; margin-bottom: var(--sp-3); }
.matrix-year-field label { font-size: 12px; color: var(--text-dim); font-weight: 500; }
.matrix-year-field input { width: 110px; }

/* ===================== SUMMARY / RESUMO PANEL ===================== */

.resumo-bloco { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: var(--sp-3); margin: var(--sp-4) 0; }
.resumo-bloco .item {
  background: linear-gradient(160deg, var(--card), var(--bg-soft) 160%);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px;
  font-size: 12px; color: var(--text-faint); font-weight: 600;
}
.resumo-bloco .item b { display: block; font-size: 20px; margin-top: 6px; color: var(--text); font-weight: 700; }

/* ===================== PENDÊNCIAS SIDEBAR ===================== */

.pend-panel {
  background: linear-gradient(160deg, var(--card), var(--bg-soft) 160%);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-3); box-shadow: var(--shadow-sm);
}
.pend-card {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); margin-bottom: 10px; transition: all var(--transition); background: rgba(255,255,255,.015);
}
.pend-card:last-child { margin-bottom: 0; }
.pend-card:hover { border-color: var(--gold-dim); background: var(--hover); }
.pend-card .info { flex: 1; min-width: 0; }
.pend-card .info .l1 { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pend-card .info .l2 { font-size: 11.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.pend-card .info .l2.texto-nota { font-size: 13.5px; color: var(--text); white-space: pre-wrap; overflow: visible; text-overflow: unset; line-height: 1.5; }

/* ===================== MODALS ===================== */

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(3,4,7,.75); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  animation: backdropFadeIn 150ms ease both; will-change: opacity;
}
.modal {
  background: linear-gradient(160deg, #1a1015, #150c10);
  border: 1.5px solid var(--red); border-radius: var(--radius-lg);
  will-change: transform, opacity;
  padding: 30px; max-width: 460px; width: 90%; box-shadow: var(--shadow-lg);
  animation: scaleIn 180ms cubic-bezier(.4,0,.2,1) both;
}
.modal.modal-largo { max-width: 600px; }
.modal h2 { color: var(--red); margin-top: 0; font-size: 16.5px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

/* Aviso do admin pro atendente — modal bloqueante (dourado, sem X, sem
   clique-fora), centralizado e mais chamativo que os modais de alerta. */
.modal.modal-aviso {
  border-color: var(--gold-dim); background: linear-gradient(160deg, var(--card), var(--bg-soft) 160%);
  text-align: center; max-width: 420px;
}
.modal-aviso-ic {
  width: 52px; height: 52px; border-radius: 16px; background: var(--gold-soft); color: var(--gold);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; box-shadow: var(--glow-gold);
}
.modal-aviso-ic svg { width: 24px; height: 24px; }
.modal.modal-aviso h2 { color: var(--text); text-align: center; }
.modal-aviso .msg { color: var(--text-dim); font-size: 14px; line-height: 1.55; white-space: pre-wrap; margin: 0; }
.modal-aviso .contador { font-size: 11.5px; color: var(--text-faint); margin-top: 12px; font-weight: 600; }
.modal.modal-aviso .actions { justify-content: center; margin-top: 22px; }

/* ===================== TOASTS ===================== */

.toast-wrap { position: fixed; top: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast {
  background: linear-gradient(160deg, var(--card), var(--bg-soft) 160%);
  border: 1px solid var(--gold-dim); border-radius: var(--radius); padding: 14px 18px;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 12px; cursor: pointer;
  animation: toastIn 220ms cubic-bezier(.4,0,.2,1) both; max-width: 320px; transition: opacity var(--transition);
}
.toast:hover { border-color: var(--gold); }
.toast .ic { color: var(--gold); flex-shrink: 0; display: flex; }
.toast .ic svg { width: 19px; height: 19px; }
.toast .txt { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.4; }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@media (max-width: 560px) { .toast-wrap { left: 16px; right: 16px; top: 16px; } .toast { max-width: none; } }

/* Variante "informativa" do modal — sem a borda/título vermelho de alerta,
   usada pra popups de detalhamento/consulta (não de confirmação destrutiva).
   Layout em 3 blocos (cabeçalho fixo / corpo rolável / rodapé fixo) pra
   caber muito conteúdo sem estourar a tela nem gerar scroll horizontal. */
.modal.modal-info {
  background: linear-gradient(160deg, var(--card), var(--bg-soft) 160%);
  border: 1px solid var(--border-strong);
  max-width: 1100px; width: 92vw; max-height: 90vh;
  padding: 0; display: flex; flex-direction: column;
}
.modal-info-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 24px 28px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.modal-info-head h2 { color: var(--text); margin: 0; font-size: 18px; }
.modal-info-head .sub { font-size: 12.5px; color: var(--text-faint); margin-top: 4px; font-weight: 500; }
.modal-close-x {
  width: 34px; height: 34px; padding: 0; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--border);
  color: var(--text-dim); display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: all var(--transition); flex-shrink: 0; box-shadow: none;
}
.modal-close-x:hover { color: var(--text); border-color: var(--border-strong); background: var(--hover); transform: none; box-shadow: none; }
.modal-close-x svg { width: 16px; height: 16px; }
.modal-info-body { padding: 20px 28px 26px; overflow-y: auto; overflow-x: hidden; }
.modal.modal-info .actions { padding: 16px 28px; margin: 0; border-top: 1px solid var(--border); flex-shrink: 0; }

/* Mini KPI compacto, usado dentro de modais de detalhamento */
.mini-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 20px; }
.mini-stat {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px;
}
.mini-stat.total-geral { border-color: var(--gold-dim); box-shadow: 0 0 0 1px var(--gold-dim) inset; }
.mini-stat .icon-circle { width: 32px; height: 32px; flex-shrink: 0; }
.mini-stat .icon-circle svg { width: 15px; height: 15px; }
.mini-stat .info { min-width: 0; }
.mini-stat .info .lbl { font-size: 10.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; white-space: nowrap; }
.mini-stat .info .val { font-size: 18px; font-weight: 700; margin-top: 2px; }

/* Tabela de detalhamento por casa, dentro de modal-info */
.tabela-detalhe td, .tabela-detalhe th { text-align: center; }
.tabela-detalhe td:first-child, .tabela-detalhe th:first-child { text-align: left; }
.tabela-detalhe tbody tr { transition: background 150ms ease; }
.tabela-detalhe tbody tr:hover { background: rgba(255,255,255,.035); }
.tabela-detalhe .n-concluido { color: var(--green); font-weight: 700; }
.tabela-detalhe .n-pendente { color: var(--gold); font-weight: 700; }
.tabela-detalhe .n-golpe { color: var(--red); font-weight: 700; }
.tabela-detalhe .n-devolveu { color: var(--blue); font-weight: 700; }
.total-pill {
  display: inline-block; min-width: 30px; padding: 5px 13px; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--gold-dim); color: var(--gold); font-weight: 700; font-size: 12.5px;
}

@media (max-width: 720px) {
  .modal.modal-info { width: 95vw; }
  .modal-info-head { padding: 18px 18px 14px; }
  .modal-info-body { padding: 16px 18px 20px; }
  .modal.modal-info .actions { padding: 14px 18px; }
  .mini-stat-row { grid-template-columns: repeat(2, 1fr); }
  .tabela-detalhe td, .tabela-detalhe th { padding: 9px 6px; font-size: 12px; }
}

/* ===================== DRAWER LATERAL ===================== */

.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(3,4,7,0); z-index: 100;
  transition: background 260ms ease;
}
.drawer-backdrop.open { background: rgba(3,4,7,.65); backdrop-filter: blur(3px); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 92vw;
  background: linear-gradient(160deg, var(--card), var(--bg-soft) 160%);
  border-left: 1px solid var(--border); box-shadow: var(--shadow-lg);
  padding: var(--sp-4) var(--sp-5); overflow-y: auto;
  transform: translateX(100%); transition: transform 280ms cubic-bezier(.4,0,.2,1);
}
.drawer-backdrop.open .drawer { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); }
.drawer-head h2 { font-size: 18px; }
.drawer-close {
  width: 34px; height: 34px; padding: 0; border-radius: 10px; background: var(--hover); color: var(--text-dim);
  display: flex; align-items: center; justify-content: center; cursor: pointer; border: none;
  transition: all var(--transition); flex-shrink: 0; box-shadow: none;
}
.drawer-close:hover { color: var(--text); background: var(--border-strong); transform: none; box-shadow: none; }
.drawer-close svg { width: 16px; height: 16px; }
.drawer form { display: flex; flex-direction: column; gap: 16px; }
.drawer form button[type="submit"] { margin-top: 4px; }

/* ===================== LISTA DE CHIPS (substitui tabela tradicional) ===================== */

.chip-list { display: flex; flex-direction: column; gap: 10px; }
.chip-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: var(--radius); background: rgba(255,255,255,.015);
  transition: all var(--transition); animation: fadeIn 250ms ease both;
}
.chip-row:hover { border-color: var(--border-strong); background: var(--hover); }
.chip-row .chip-ic {
  width: 38px; height: 38px; border-radius: 11px; background: var(--gold-soft); color: var(--gold);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.chip-row .chip-ic svg { width: 17px; height: 17px; }
.chip-row .col-numero { min-width: 168px; }
.chip-row .numero { font-weight: 700; font-size: 14px; }
.chip-row .criado-em { font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.chip-row .col-atendente { display: flex; align-items: center; gap: 9px; min-width: 150px; }
.chip-row .col-atendente span { font-size: 13px; font-weight: 600; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-row .col-status { flex-shrink: 0; }
.chip-row .col-obs { flex: 1; min-width: 140px; }
.chip-row .col-obs input {
  width: 100%; background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 7px 9px; font-size: 13px; color: var(--text);
}
.chip-row .col-obs input::placeholder { color: var(--text-faint); }
.chip-row .col-obs input:hover { border-color: var(--border); }
.chip-row .col-obs input:focus { background: var(--bg-soft); border-color: var(--gold-dim); outline: none; }
.chip-row .col-acoes { flex-shrink: 0; position: relative; }

/* Menu "..." de ações */
.acoes-btn {
  width: 32px; height: 32px; padding: 0; border-radius: 9px; background: transparent; color: var(--text-faint);
  display: flex; align-items: center; justify-content: center; cursor: pointer; border: none; box-shadow: none;
  transition: all var(--transition);
}
.acoes-btn:hover { background: var(--border-strong); color: var(--text); transform: none; box-shadow: none; }
.acoes-btn svg { width: 17px; height: 17px; }
.dropdown-menu {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 168px; z-index: 20;
  background: var(--bg-soft); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: 6px; animation: scaleIn 140ms ease both; transform-origin: top right;
}
.dropdown-menu button {
  width: 100%; text-align: left; background: transparent; box-shadow: none; color: var(--text-dim);
  padding: 9px 11px; font-size: 12.5px; font-weight: 600; border-radius: 7px; display: flex; align-items: center; gap: 8px;
}
.dropdown-menu button svg { width: 14px; height: 14px; flex-shrink: 0; }
.dropdown-menu button:hover { background: var(--hover); color: var(--text); transform: none; box-shadow: none; }
.dropdown-menu button.danger-text { color: var(--red); }
.dropdown-menu button.danger-text:hover { background: var(--red-soft); }

/* ===================== PAGINAÇÃO ===================== */

.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: var(--sp-4); }
.pagination button {
  min-width: 34px; height: 34px; padding: 0 10px; border-radius: 999px; background: transparent;
  color: var(--text-dim); box-shadow: none; font-size: 12.5px; font-weight: 700;
  border: 1px solid transparent; transition: all var(--transition);
}
.pagination button:hover:not(:disabled) { background: var(--hover); color: var(--text); transform: none; box-shadow: none; }
.pagination button.active { background: var(--gold); color: #1A1200; box-shadow: 0 2px 10px rgba(244,179,36,.3); }
.pagination button:disabled { opacity: .3; cursor: default; }

/* ===================== SPARKLINE (mini gráfico decorativo em KPI) ===================== */

.kpi-card .sparkline { width: 100%; height: 26px; margin-top: 10px; display: block; opacity: .7; }

/* ===================== EMPTY STATE ===================== */

.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 48px 20px; color: var(--text-faint);
}
.empty-state .ic {
  width: 52px; height: 52px; border-radius: 16px; background: var(--hover); color: var(--text-faint);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.empty-state .ic svg { width: 24px; height: 24px; }
.empty-state .t { font-size: 14px; font-weight: 700; color: var(--text-dim); margin-bottom: 4px; }
.empty-state .sub { font-size: 12.5px; }

/* ===================== LOGIN ===================== */

.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(900px 480px at 50% -10%, rgba(244,179,36,.10), transparent 60%),
    radial-gradient(700px 400px at 100% 100%, rgba(139,92,246,.06), transparent 60%),
    var(--bg);
}
.login-card {
  width: 380px; background: linear-gradient(160deg, var(--card), var(--bg-soft) 160%);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px 36px;
  box-shadow: var(--shadow-lg); animation: scaleIn 220ms cubic-bezier(.4,0,.2,1) both;
}
.login-card .mark {
  width: 54px; height: 54px; border-radius: 16px;
  background: linear-gradient(135deg, #FFD666, var(--gold) 45%, #C7860F);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(244,179,36,.32);
  margin: 0 auto 20px;
}
.login-card .mark svg { width: 26px; height: 26px; stroke: #1A1200; stroke-width: 2.4; }
.login-card h1 { text-align: center; font-size: 20px; }
.login-card .brand-sub { text-align: center; color: var(--text-faint); font-size: 12.5px; margin-top: 6px; letter-spacing: .04em; text-transform: uppercase; font-weight: 600; }
.login-card form { display: flex; flex-direction: column; gap: 16px; margin-top: 28px; }
.login-card button { margin-top: 6px; }
.error-msg { color: var(--red); font-size: 12.5px; margin-top: 10px; min-height: 16px; }

/* ===================== SKELETON LOADING ===================== */

.skeleton { background: linear-gradient(90deg, var(--hover) 25%, #232b3a 37%, var(--hover) 63%); background-size: 400% 100%; animation: skeleton-shine 1.4s ease infinite; border-radius: var(--radius-sm); }
@keyframes skeleton-shine { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ===================== ANIMATIONS ===================== */

@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes backdropFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(244,179,36,.35); } 50% { box-shadow: 0 0 0 6px rgba(244,179,36,0); } }

.fade-in { animation: fadeIn 250ms ease both; }

/* ===================== UTIL ===================== */

.hidden { display: none !important; }
.text-dim { color: var(--text-dim); }
.text-faint { color: var(--text-faint); }
.mt-0 { margin-top: 0; }
.icon-btn { display: inline-flex; align-items: center; gap: 7px; }

/* ===================== RESPONSIVE ===================== */

@media (max-width: 1180px) {
  :root { --sidebar-w: 240px; }
  main { padding: var(--sp-5) var(--sp-4) 56px; }
}

@media (max-width: 860px) {
  body.app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 90;
    transform: translateX(-100%); transition: transform var(--transition); width: 260px;
  }
  .sidebar.abrir { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .content-col { grid-column: 1; }
  .topbar { padding: 0 18px; }
  .topbar-date { display: none; }
  main { padding: 20px 18px 44px; }
  .sidebar-toggle { display: flex !important; }
}

.sidebar-toggle {
  display: none; width: 36px; height: 36px; padding: 0; border-radius: var(--radius-sm);
  align-items: center; justify-content: center; color: var(--text); border: 1px solid var(--border); flex-shrink: 0;
}
.sidebar-toggle svg { width: 18px; height: 18px; }

@media (max-width: 560px) {
  form.inline { flex-direction: column; align-items: stretch; }
  form.inline .field { width: 100%; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .chip-row { flex-wrap: wrap; }
  .chip-row .col-numero { min-width: 120px; }
  .chip-row .col-atendente { min-width: 0; order: 3; }
  .chip-row .col-obs { order: 4; flex-basis: 100%; }
  .table-card-head .filters { width: 100%; }
  .table-card-head .filters > * { flex: 1; min-width: 130px; }
  .drawer { width: 100%; max-width: 100vw; }
}
