/* =====================================================
   SOLVIX v4 — Estilos Globais
   Modularizado por Claude Sonnet 4.6
   ===================================================== */

/* === VARIÁVEIS E RESET === */
:root {
  /* ── Cores de acento (iguais em ambos os temas) ── */
  --gold:     #D4A017;
  --gold-dim: #C49010;
  --green:    #22C55E;
  --gl:       #F5B700;
  --gd:       #C49010;
  --yellow:   #F5B700;
  --purple:   #A855F7;
  --blue:     #3B82F6;

  /* ── Variáveis de tema — modo ESCURO (padrão) ── */
  --bg:         #0B0D10;
  --bg2:        #0f0f13;
  --bg3:        #111111;
  --card:       #141418;
  --card2:      #1a1a1a;
  --border:     rgba(255,255,255,.07);
  --border2:    rgba(255,255,255,.10);
  --shadow:     0 8px 32px rgba(0,0,0,.4);

  /* ── Texto ── */
  --tx:         #E8E0D0;   /* texto principal */
  --tx2:        #aaaaaa;   /* texto secundário */
  --tx3:        #666666;   /* texto terciário / placeholder */
  --tx-inv:     #0B0D10;   /* texto sobre fundo claro (botões dourados) */

  /* ── Inputs ── */
  --inp-bg:     #1a1a1a;
  --inp-border: #3a3020;
  --inp-text:   #E8E0D0;
  --inp-ph:     #555555;

  /* ── Safe-area iPhone ── */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--tx);
  min-height: 100vh;
  overflow-x: hidden;
  /* Transição suave ao trocar tema */
  transition: background .25s, color .25s;
}

/* === HEADER === */
.hdr {
  background: rgba(10, 10, 14, 0.95);
  border-bottom: 1px solid rgba(255,255,255,.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0 28px;
  /* Altura base + safe-area do iPhone (notch / dynamic island) */
  height: calc(60px + var(--sat));
  padding-top: var(--sat);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .2);
}

.hdr-logo { height: 44px; width: auto; object-fit: contain; filter: brightness(0) invert(1); }
.hdr-brand { display: flex; align-items: center; }
.hdr-brand-text {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 4px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #D4A017 0%, #FFD700 50%, #D4A017 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  user-select: none;
}
.hdr-user { color: #D4A017; font-size: 14px; display: flex; align-items: center; gap: 12px; }

.btn-out {
  background: rgba(255, 255, 255, .12);
  border: none;
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
}
.btn-out:hover { background: rgba(255, 255, 255, .22); }

/* === SCREENS / NAVEGAÇÃO === */
.screen { display: none; }
.screen.active { display: block; }
#scr-solvix.active { display: flex !important; }
#scr-super.active { display: block !important; }

/* === LOGIN === */
#scr-login {
  min-height: 100vh;
  background: linear-gradient(135deg, #0A0A0A, #1a1500, #0A0A0A);
  align-items: center;
  justify-content: center;
}
#scr-login.active { display: flex; }

.login-card {
  background: #1A1A1A;
  border: 1px solid rgba(212, 160, 23, .3);
  border-radius: 12px;
  padding: 44px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .6);
  text-align: center;
}
.login-logo { height: 72px; width: auto; object-fit: contain; margin-bottom: 24px; }
.login-card h2 { font-size: 19px; font-weight: 600; margin-bottom: 22px; color: #D4A017; }

/* === FORM GROUPS === */
.fg { margin-bottom: 16px; text-align: left; }
.fg label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--tx2);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.fg input, .fg select, .fg textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--inp-border);
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  background: var(--inp-bg);
  color: var(--inp-text);
}
.fg input:focus, .fg select:focus, .fg textarea:focus { outline: none; border-color: #D4A017; }
.fg textarea { resize: vertical; min-height: 80px; }

/* === BOTÕES PRINCIPAIS === */
.btn-p {
  background: linear-gradient(135deg, #8B6914, #D4A017);
  color: #000;
  border: none;
  padding: 13px 28px;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 6px;
  box-shadow: 0 4px 16px rgba(212, 160, 23, .3);
  transition: transform .15s;
}
.btn-p:hover { transform: translateY(-1px); }

.btn-o {
  background: transparent;
  border: 1px solid #D4A017;
  color: #D4A017;
  padding: 9px 22px;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.btn-o:hover { background: #D4A017; color: #000; }

.btn-sm { padding: 5px 12px; border-radius: 8px; border: none; font-family: 'Outfit', sans-serif; font-size: 12px; font-weight: 700; cursor: pointer; }
.brs { background: rgba(198, 40, 40, .15); color: #ef9a9a; border: 1px solid rgba(198,40,40,.3); }

.lerr { color: #e53935; font-size: 13px; margin-top: 10px; display: none; }

/* === APP === */
#scr-app { background: var(--bg); min-height: 100vh; }
.app-body { max-width: 1080px; margin: 0 auto; padding: 28px 18px; }

/* === TABS === */
.tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.tab {
  padding: 9px 20px;
  border-radius: 30px;
  border: 1px solid #3a3020;
  background: #1A1A1A;
  color: #888;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
}
.tab.active { background: linear-gradient(135deg, #8B6914, #D4A017); color: #000; border-color: #D4A017; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* === PANELS === */
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  animation: fadeIn .3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pt { font-family: 'Bebas Neue', sans-serif; font-size: 24px; color: #e8e0d0; letter-spacing: 1px; margin-bottom: 6px; }
.ps { color: #aaa; font-size: 13px; margin-bottom: 20px; }

/* === GRIDS === */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 680px) { .g2, .g3 { grid-template-columns: 1fr; } }

/* === TABELAS === */
.dt { width: 100%; border-collapse: collapse; margin-top: 14px; }
.dt th { background: var(--bg2); color: #D4A017; padding: 9px 13px; text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.dt td { padding: 9px 13px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--tx2); }
.dt tr:last-child td { border-bottom: none; }
.dt tr:hover td { background: rgba(212, 160, 23, .04); }

/* === BADGES === */
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.bg  { background: rgba(34, 197, 94, .15); color: #86EFAC; }
.bb  { background: rgba(59, 130, 246, .15); color: #93C5FD; }

/* === CARDS INVERSORES / ESTRUTURAS === */
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.inv-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px; cursor: pointer; transition: all .2s; text-align: center; background: var(--card2); }

.inv-card:hover { border-color: #D4A017; }
.inv-card.sel { border-color: #D4A017; background: rgba(212, 160, 23, .08); }
.inv-name { font-weight: 700; font-size: 13px; color: #f0f0f0; }
.inv-det  { font-size: 11px; color: #aaa; margin-top: 3px; }
.inv-qty  { font-size: 16px; font-weight: 700; color: #D4A017; margin-top: 4px; }

.sc-grid { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.sc-card { border: 1px solid var(--border); border-radius: 10px; padding: 10px 16px; cursor: pointer; transition: all .2s; font-weight: 600; font-size: 13px; color: var(--tx2); text-align: center; background: var(--card2); }
.sc-card.sel { border-color: #D4A017; background: rgba(212, 160, 23, .15); color: #fff; }
.sc-preco { font-size: 11px; color: #D4A017; font-weight: 700; margin-top: 2px; }

/* === RESULT BOX / PREÇO BOX === */
.rbox { background: var(--card2); border-radius: 14px; padding: 22px; margin-top: 18px; border: 1px solid var(--border); }
.rbox h3 { font-family: 'Bebas Neue', sans-serif; font-size: 20px; color: #D4A017; margin-bottom: 14px; letter-spacing: 1px; }
.rrow { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #2a2a2a; align-items: center; }
.rrow:last-child { border-bottom: none; font-weight: 700; }
.rl { color: #888; font-size: 13px; }
.rv { font-weight: 700; color: #D4A017; font-size: 15px; }
.rv.big { font-size: 20px; color: #D4A017; }

.preco-box { background: linear-gradient(135deg, #1a1500, #111); border-radius: 14px; padding: 20px; margin-top: 16px; border: 2px solid #D4A017; }
.preco-box h3 { font-family: 'Bebas Neue', sans-serif; font-size: 20px; color: #D4A017; margin-bottom: 12px; }
.preco-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #2a2a2a; font-size: 13px; color: #aaa; }
.preco-row:last-child { border-bottom: none; font-size: 17px; font-weight: 700; }
.preco-total { font-size: 22px; color: #D4A017; font-weight: 700; }

/* === STEPS === */
.steps { display: flex; gap: 0; margin-bottom: 24px; }
.si { flex: 1; text-align: center; position: relative; }
.si::after { content: ''; position: absolute; top: 15px; left: 50%; width: 100%; height: 2px; background: #2a2a2a; z-index: 0; }
.si:last-child::after { display: none; }
.sn { width: 30px; height: 30px; border-radius: 50%; background: #2a2a2a; color: #666; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; margin: 0 auto 5px; position: relative; z-index: 1; transition: all .3s; }
.si.done   .sn { background: #8B6914; color: #fff; }
.si.active .sn { background: var(--yellow); color: #D4A017; box-shadow: 0 0 0 4px rgba(249, 198, 19, .3); }
.sl { font-size: 10px; color: #888; font-weight: 500; }
.si.done .sl, .si.active .sl { color: #D4A017; font-weight: 700; }

/* === DIVISORES / ALERTAS === */
.sdiv { border: none; border-top: 2px solid var(--border); margin: 20px 0; }
.alert { padding: 11px 16px; border-radius: 10px; font-size: 13px; margin-bottom: 14px; }
.ag { background: rgba(212, 160, 23, .08); color: #D4A017; border-left: 4px solid #D4A017; }

/* === TOAST === */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: #8B6914; color: #fff;
  padding: 12px 22px; border-radius: 12px;
  font-size: 14px; font-weight: 600;
  z-index: 9999;
  transform: translateY(80px); opacity: 0;
  transition: all .35s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}
.toast.show { transform: translateY(0); opacity: 1; }

/* === MODAIS === */
.modal-bg { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 500; align-items: center; justify-content: center; }
.modal-bg.active { display: flex; }
.modal { background: var(--card); border-radius: 20px; padding: 32px; max-width: 520px; width: 90%; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); max-height: 90vh; overflow-y: auto; color: var(--tx); }
.modal h3 { font-family: 'Bebas Neue', sans-serif; font-size: 22px; color: #D4A017; margin-bottom: 18px; }
.modal label { color: var(--tx2); }
.modal input, .modal select, .modal textarea { background: #2a2a2a; color: #e8e0d0; border-color: #3a3a3a; }
.modal input::placeholder, .modal textarea::placeholder { color: #555; }
.modal p { color: #aaa; }
.modal-act { display: flex; gap: 10px; margin-top: 20px; }

/* === ADMIN PANEL === */
.margem-box { background: linear-gradient(135deg, #1a1500, #111); border-radius: 14px; padding: 20px; border: 1px solid #D4A017; margin-bottom: 20px; }
.margem-box h3 { font-family: 'Bebas Neue', sans-serif; font-size: 18px; color: #D4A017; margin-bottom: 10px; }
.admin-tag { display: inline-block; background: #e53935; color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px; margin-left: 6px; vertical-align: middle; }

/* === CONTRATO === */
.ct-sec { background: rgba(255,255,255,.04); border-radius: 12px; padding: 20px; margin-bottom: 16px; border: 1px solid var(--border); }
.ct-sec h4 { font-family: 'Bebas Neue', sans-serif; font-size: 18px; color: #D4A017; margin-bottom: 14px; letter-spacing: 1px; }

/* === UPLOAD PANEL === */
.img-upload-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; margin-top: 4px; }
.img-card { border: 2px solid var(--border); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); transition: box-shadow .2s; }
.img-card:hover { box-shadow: 0 4px 16px rgba(46, 125, 50, .15); }
.img-card-preview { width: 100%; height: 150px; object-fit: contain; background: #f5f5f5; display: block; border-bottom: 1px solid var(--border); }
.img-card-preview.empty { background: #f9f9f9; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.img-card-body { padding: 14px; }
.img-card-title { font-weight: 700; font-size: 13px; color: #D4A017; margin-bottom: 3px; }
.img-card-desc { font-size: 11px; color: #888; margin-bottom: 12px; line-height: 1.4; }
.img-card-status { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; margin-bottom: 10px; }
.st-ok      { background: rgba(212, 160, 23, .08); color: #D4A017; }
.st-empty   { background: #fff3e0; color: #e65100; }
.st-pending { background: rgba(33, 150, 243, .12); color: #1565c0; }
.img-card-pending { border-color: #1565c0; box-shadow: 0 0 0 2px rgba(33,150,243,.25); }
.img-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-upload { background: #D4A017; color: #fff; border: none; padding: 8px 16px; border-radius: 8px; font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 600; cursor: pointer; flex: 1; }
.btn-upload:hover { background: #8B6914; }
.btn-remove { background: #ffebee; color: #c62828; border: none; padding: 8px 12px; border-radius: 8px; font-family: 'Outfit', sans-serif; font-size: 12px; font-weight: 700; cursor: pointer; }
.btn-remove:hover { background: #ffcdd2; }
.upload-tip { background: #e3f2fd; border-left: 4px solid #1976d2; border-radius: 8px; padding: 12px 16px; font-size: 12px; color: #0d47a1; margin-bottom: 16px; line-height: 1.6; }

/* ══ SOLVIX MULTI-TENANT — TELA INICIAL ══ */
/* ══ LOGIN PREMIUM — Black Matte + Glassmorphism ══════════════════ */
#scr-solvix {
  display: none; min-height: 100vh;
  align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  background: #060606;
}
#scr-solvix.active { display: flex; }

/* Box principal — glassmorphism sem borda dourada forte */
.slvx-box {
  position: relative;
  width: 400px; max-width: 92vw;
  background: rgba(12,12,12,.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 0.5px solid rgba(255,255,255,.06);
  border-radius: 24px;
  padding: 36px 32px 28px;
  box-shadow:
    0 0 0 0.5px rgba(212,160,23,.08),
    0 32px 64px rgba(0,0,0,.6),
    0 0 80px rgba(212,160,23,.04) inset;
}

/* Logo — menor, glow suave e constante */
.slvx-logo {
  display: block;
  width: 200px; margin: 0 auto;
  filter: drop-shadow(0 0 12px rgba(212,160,23,.35));
  mix-blend-mode: screen;
  animation: slvxGlowSoft 5s ease-in-out infinite;
}
@keyframes slvxGlowSoft {
  0%,100% { filter: drop-shadow(0 0 10px rgba(212,160,23,.3)); }
  50%      { filter: drop-shadow(0 0 20px rgba(212,160,23,.55)) drop-shadow(0 0 40px rgba(212,160,23,.15)); }
}

/* Labels */
.slvx-label {
  display: block; font-size: 10px; letter-spacing: 1.5px;
  text-transform: uppercase; color: #4a4a4a;
  margin-bottom: 6px; font-weight: 600;
}

/* Wrapper do campo com ícone */
.slvx-field-wrap {
  position: relative; display: flex; align-items: center; margin-bottom: 0;
}
.slvx-field-icon {
  position: absolute; left: 14px; width: 16px; height: 16px;
  color: #3a3a3a; pointer-events: none; flex-shrink: 0;
}

/* Inputs — glass effect */
.slvx-input {
  width: 100%;
  background: rgba(255,255,255,.03);
  border: 0.5px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 13px 16px 13px 42px;
  color: #e8e0d0; font-size: 14px;
  outline: none; font-family: inherit;
  transition: border-color .25s, background .25s, box-shadow .25s;
  -webkit-appearance: none;
}
.slvx-input::placeholder { color: #2e2e2e; }
.slvx-input:focus {
  border-color: rgba(212,160,23,.35);
  background: rgba(212,160,23,.03);
  box-shadow: 0 0 0 3px rgba(212,160,23,.06), 0 0 20px rgba(212,160,23,.04) inset;
}

/* Botão CTA — shimmer líquido */
.slvx-btn {
  width: 100%; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #8B6410 0%, #C49010 40%, #D4A017 60%, #B8870F 100%);
  border: none; border-radius: 12px; padding: 14px 20px;
  color: #000; font-size: 12px; font-weight: 800;
  letter-spacing: 2.5px; text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(212,160,23,.2), 0 1px 0 rgba(255,255,255,.15) inset;
  transition: transform .15s, box-shadow .25s;
}
/* Shimmer passando */
.slvx-btn-shimmer {
  position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  transform: skewX(-20deg);
  animation: shimmerSlide 3s ease-in-out infinite;
}
@keyframes shimmerSlide {
  0%   { left: -100%; }
  50%  { left: 150%; }
  100% { left: 150%; }
}
.slvx-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(212,160,23,.3), 0 1px 0 rgba(255,255,255,.2) inset;
}
.slvx-btn:active { transform: translateY(0) scale(.98); }

/* Estado de loading do botão de login */
.slvx-btn.loading {
  pointer-events: none;
  opacity: .85;
}
.slvx-btn.loading .slvx-btn-shimmer {
  animation: shimmerSlide .8s ease-in-out infinite;
}
@keyframes loginSpinner {
  to { transform: rotate(360deg); }
}
.slvx-login-spinner {
  width: 16px; height: 16px; border: 2px solid rgba(0,0,0,.2);
  border-top-color: #000; border-radius: 50%;
  animation: loginSpinner .7s linear infinite;
  flex-shrink: 0;
}

/* Erro */
.slvx-err {
  background: rgba(239,68,68,.08); border: 0.5px solid rgba(239,68,68,.25);
  border-radius: 8px; padding: 10px 14px; font-size: 12px;
  color: #FCA5A5; margin-top: 10px; display: none;
}

/* Legacy — manter compatibilidade */
.slvx-bg, .slvx-grid, .slvx-tag, .slvx-foot, .slvx-divider { display: none; }

/* === SUPER ADMIN PANEL === */
#scr-super { display: none; min-height: 100vh; background: #0B0D10; color: #fff; }
#scr-super.active { display: block; }

/* ── SUPER ADMIN PREMIUM ─────────────────────────────── */

/* Topbar */
.sa-topbar {
  height: 60px;
  background: rgba(10,10,16,0.97);
  border-bottom: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; gap: 16px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,.04);
}
.sa-topbar-left  { display:flex; align-items:center; gap:12px; }
.sa-topbar-right { display:flex; align-items:center; gap:10px; }
.sa-logo-mark {
  width:36px; height:36px; border-radius:10px;
  background: linear-gradient(135deg,#F5C842,#C49010);
  display:flex; align-items:center; justify-content:center;
  font-size:16px; font-weight:900; color:#000;
  box-shadow: 0 4px 14px rgba(245,183,0,.3);
}
.sa-brand     { font-size:15px; font-weight:800; color:#F5B700; letter-spacing:-0.5px; line-height:1; font-family:'Outfit',sans-serif; }
.sa-brand-sub { font-size:10px; color:#2e2e45; font-weight:500; margin-top:2px; letter-spacing:.5px; font-family:'Outfit',sans-serif; }
.sa-user-pill {
  display:flex; align-items:center; gap:7px;
  padding:6px 14px; border-radius:20px;
  background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.07);
  font-size:12px; color:#9090b0; font-family:'Outfit',sans-serif;
}
.sa-user-dot { width:7px; height:7px; border-radius:50%; background:#22C55E; box-shadow:0 0 8px rgba(34,197,94,.6); }
.sa-logout-btn {
  display:flex; align-items:center; gap:6px;
  padding:7px 14px; border-radius:10px;
  background:rgba(239,68,68,.08); border:1px solid rgba(239,68,68,.18);
  color:#f87171; font-size:12px; font-weight:600; cursor:pointer;
  font-family:'Outfit',sans-serif; transition:all .15s;
}
.sa-logout-btn:hover { background:rgba(239,68,68,.14); }

/* Body */
.sa-body {
  padding: 28px 24px 60px;
  max-width: 1100px; margin: 0 auto;
  position: relative; z-index: 1;
}

/* Ambient orbs */
.sa-orb { position:fixed; border-radius:50%; pointer-events:none; z-index:0; }
.sa-orb-1 { top:-120px; right:-80px; width:500px; height:500px;
  background:radial-gradient(circle,rgba(168,85,247,.07) 0%,transparent 70%); }
.sa-orb-2 { bottom:-80px; left:-60px; width:400px; height:400px;
  background:radial-gradient(circle,rgba(245,183,0,.05) 0%,transparent 70%); }

/* KPI Cards */
.sa-kpis {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:12px; margin-bottom:24px;
}
.sa-kpi {
  background:linear-gradient(145deg,#0f0f13,#0b0b0f);
  border:1px solid rgba(255,255,255,.06); border-radius:18px;
  padding:18px 16px 16px;
  box-shadow:0 4px 16px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.04);
  display:flex; flex-direction:column; align-items:flex-start; gap:10px;
}
.sa-kpi-icon {
  width:40px; height:40px; border-radius:12px;
  border:1px solid; display:flex; align-items:center; justify-content:center;
}
.sa-kpi-val   { font-size:26px; font-weight:700; color:#F6F7FB; letter-spacing:-1px; line-height:1; font-family:'Outfit',sans-serif; }
.sa-kpi-label { font-size:11px; color:#3a3a5a; font-weight:600; letter-spacing:.4px; text-transform:uppercase; font-family:'Outfit',sans-serif; }

/* Section header */
.sa-section-header {
  display:flex; justify-content:space-between; align-items:center;
  flex-wrap:wrap; gap:12px; margin-bottom:16px;
}
.sa-section-title { font-size:17px; font-weight:700; color:#F6F7FB; letter-spacing:-.3px; font-family:'Outfit',sans-serif; }
.sa-section-sub   { font-size:11.5px; color:#3a3a5a; margin-top:3px; font-family:'Outfit',sans-serif; }

/* Buttons SA */
.sa-btn-primary {
  display:inline-flex; align-items:center; gap:7px;
  padding:9px 18px; border-radius:11px;
  background:linear-gradient(135deg,#F5C842,#C49010);
  color:#000; font-size:13px; font-weight:700; cursor:pointer;
  border:none; font-family:'Outfit',sans-serif;
  box-shadow:0 4px 14px rgba(245,183,0,.25);
  transition:opacity .15s, transform .12s;
}
.sa-btn-primary:hover  { opacity:.9; }
.sa-btn-primary:active { transform:scale(.97); }
.sa-btn-danger {
  display:inline-flex; align-items:center; gap:7px;
  padding:9px 16px; border-radius:10px;
  background:rgba(239,68,68,.1); border:1px solid rgba(239,68,68,.25);
  color:#f87171; font-size:13px; font-weight:600; cursor:pointer;
  font-family:'Outfit',sans-serif; transition:all .15s;
}
.sa-btn-danger:hover { background:rgba(239,68,68,.18); }
.sa-btn-ghost {
  display:inline-flex; align-items:center; gap:6px;
  padding:7px 14px; border-radius:9px;
  background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08);
  color:#9090b0; font-size:12px; font-weight:600; cursor:pointer;
  font-family:'Outfit',sans-serif; transition:all .15s;
}
.sa-btn-ghost:hover { border-color:rgba(245,183,0,.3); color:#F5B700; }

/* Integrador cards */
.sa-integ-card {
  background:linear-gradient(145deg,#0f0f13,#0b0b0f);
  border:1px solid rgba(255,255,255,.06); border-radius:18px;
  padding:16px; cursor:pointer;
  box-shadow:0 4px 16px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.04);
  transition:transform .15s, border-color .15s, box-shadow .15s;
}
.sa-integ-card:hover {
  transform:translateY(-2px);
  border-color:rgba(245,183,0,.18);
  box-shadow:0 8px 28px rgba(0,0,0,.4);
}
.sa-integ-card.sa-card-active { border-color:rgba(245,183,0,.35); box-shadow:0 0 0 1px rgba(245,183,0,.15),0 8px 28px rgba(0,0,0,.4); }
.sa-card-top    { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:12px; }
.sa-card-logo   { width:40px; height:40px; border-radius:11px; background:rgba(245,183,0,.1); border:1px solid rgba(245,183,0,.15); display:flex; align-items:center; justify-content:center; font-size:15px; font-weight:800; color:#F5B700; font-family:'Outfit',sans-serif; flex-shrink:0; }
.sa-card-name   { font-size:14.5px; font-weight:700; color:#F6F7FB; letter-spacing:-.2px; margin-bottom:3px; font-family:'Outfit',sans-serif; }
.sa-card-email  { font-size:11px; color:#3a3a5a; font-family:'Outfit',sans-serif; }
.sa-card-stats  { display:grid; grid-template-columns:1fr 1fr 1fr; gap:6px; margin-bottom:12px; }
.sa-card-stat   { background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.05); border-radius:9px; padding:8px 10px; text-align:center; }
.sa-card-stat-v { font-size:15px; font-weight:700; color:#F6F7FB; font-family:'Outfit',sans-serif; line-height:1; }
.sa-card-stat-l { font-size:9.5px; color:#3a3a5a; font-weight:600; letter-spacing:.4px; text-transform:uppercase; margin-top:3px; font-family:'Outfit',sans-serif; }
.sa-card-badges { display:flex; flex-wrap:wrap; gap:5px; margin-bottom:10px; }
.sa-badge { display:inline-flex; align-items:center; gap:4px; padding:3px 9px; border-radius:20px; font-size:10.5px; font-weight:600; font-family:'Outfit',sans-serif; }
.sa-badge-gold   { background:rgba(245,183,0,.12); border:1px solid rgba(245,183,0,.25); color:#F5B700; }
.sa-badge-green  { background:rgba(34,197,94,.1); border:1px solid rgba(34,197,94,.2); color:#22C55E; }
.sa-badge-red    { background:rgba(239,68,68,.1); border:1px solid rgba(239,68,68,.2); color:#f87171; }
.sa-badge-purple { background:rgba(168,85,247,.1); border:1px solid rgba(168,85,247,.2); color:#A855F7; }
.sa-badge-blue   { background:rgba(59,130,246,.1); border:1px solid rgba(59,130,246,.2); color:#3B82F6; }
.sa-card-expand { width:100%; padding:8px; border-radius:9px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.07); color:#6060a0; font-size:11.5px; font-weight:600; cursor:pointer; font-family:'Outfit',sans-serif; transition:all .15s; display:flex; align-items:center; justify-content:center; gap:5px; }
.sa-card-expand:hover { background:rgba(245,183,0,.07); border-color:rgba(245,183,0,.2); color:#F5B700; }

/* Wizard de ações */
.sa-wizard {
  background:linear-gradient(145deg,#0f0f14,#0c0c12);
  border:1px solid rgba(245,183,0,.2); border-radius:20px;
  padding:20px; box-shadow:0 8px 32px rgba(0,0,0,.4),0 0 0 1px rgba(245,183,0,.08);
}
.sa-wizard-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.sa-wizard-title  { font-size:15px; font-weight:700; color:#F6F7FB; letter-spacing:-.2px; font-family:'Outfit',sans-serif; }
.sa-wizard-sub    { font-size:11.5px; color:#3a3a5a; margin-top:2px; font-family:'Outfit',sans-serif; }
.sa-wizard-close  { width:30px; height:30px; border-radius:8px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.08); display:flex; align-items:center; justify-content:center; color:#4a4a6a; cursor:pointer; transition:all .15s; }
.sa-wizard-close:hover { background:rgba(239,68,68,.1); color:#f87171; }
.sa-wizard-tabs { display:flex; gap:6px; margin-bottom:16px; flex-wrap:wrap; }
.sa-wtab { padding:7px 14px; border-radius:10px; border:1px solid rgba(255,255,255,.07); background:rgba(255,255,255,.04); color:#6060a0; font-size:12px; font-weight:600; cursor:pointer; font-family:'Outfit',sans-serif; transition:all .15s; }
.sa-wtab.active { background:rgba(245,183,0,.1); border-color:rgba(245,183,0,.25); color:#F5B700; }
.sa-wizard-body { }
.sa-toggle-row { display:flex; align-items:center; justify-content:space-between; padding:12px 14px; background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.05); border-radius:12px; margin-bottom:8px; }
.sa-toggle-info .sa-toggle-name { font-size:13.5px; font-weight:600; color:#d0d0e8; font-family:'Outfit',sans-serif; margin-bottom:2px; }
.sa-toggle-info .sa-toggle-desc { font-size:11px; color:#303048; font-family:'Outfit',sans-serif; }
.sa-toggle-btn { position:relative; width:44px; height:24px; border-radius:12px; cursor:pointer; border:none; transition:background .2s; flex-shrink:0; }
.sa-toggle-btn.on  { background:#22C55E; }
.sa-toggle-btn.off { background:rgba(255,255,255,.1); }
.sa-toggle-btn::after { content:''; position:absolute; top:3px; width:18px; height:18px; border-radius:50%; background:#fff; transition:left .2s; box-shadow:0 1px 4px rgba(0,0,0,.3); }
.sa-toggle-btn.on::after  { left:23px; }
.sa-toggle-btn.off::after { left:3px; }
.sa-wizard-danger { margin-top:12px; padding:12px 14px; background:rgba(239,68,68,.07); border:1px solid rgba(239,68,68,.15); border-radius:12px; display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.sa-wizard-danger-label { font-size:12px; font-weight:600; color:#f87171; font-family:'Outfit',sans-serif; }
.sa-wizard-danger-sub   { font-size:11px; color:rgba(248,113,113,.5); font-family:'Outfit',sans-serif; margin-top:2px; }

/* Paginação */
.sa-page-btn { width:34px; height:34px; border-radius:9px; border:1px solid rgba(255,255,255,.07); background:rgba(255,255,255,.04); color:#6060a0; font-size:13px; font-weight:700; cursor:pointer; display:flex; align-items:center; justify-content:center; font-family:'Outfit',sans-serif; transition:all .15s; }
.sa-page-btn:hover { border-color:rgba(245,183,0,.3); color:#F5B700; }
.sa-page-btn.active { background:rgba(245,183,0,.12); border-color:rgba(245,183,0,.3); color:#F5B700; }
.sa-page-btn:disabled { opacity:.3; cursor:default; }

/* Danger zone */
.sa-danger-zone { padding:14px 18px; background:rgba(239,68,68,.06); border:1px solid rgba(239,68,68,.15); border-radius:14px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px; margin-top:8px; }
.sa-danger-title { font-size:12.5px; font-weight:700; color:#f87171; font-family:'Outfit',sans-serif; margin-bottom:2px; }
.sa-danger-sub   { font-size:11.5px; color:rgba(248,113,113,.45); font-family:'Outfit',sans-serif; }

/* Legacy sup- aliases (mantém modal existente funcionando) */
.sup-topbar { display:none; }
.sup-body   { display:none; }
.sup-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 500; align-items: center; justify-content: center; }
.sup-modal.open { display: flex; }

.sup-card       { background: #1A1A1A; border: 1px solid #2A2A2A; border-radius: 4px; padding: 24px; margin-bottom: 20px; }
.sup-card-title { font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #D4A017; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid #2A2A2A; }
.sup-table      { width: 100%; border-collapse: collapse; }
.sup-table th   { text-align: left; padding: 10px 14px; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: #444; border-bottom: 1px solid #2A2A2A; font-weight: 600; }
.sup-table td   { padding: 12px 14px; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.04); color: #888; vertical-align: middle; }
.sup-table td strong { color: #fff; }

.sup-g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.sup-g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.sup-fi label  { display: block; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: #666; margin-bottom: 6px; font-weight: 500; }
.sup-fi input, .sup-fi select { width: 100%; background: #222; border: 1px solid #2A2A2A; border-radius: 3px; padding: 10px 13px; color: #fff; font-size: 14px; outline: none; transition: border-color .2s; font-family: inherit; }
.sup-fi input:focus, .sup-fi select:focus { border-color: #D4A017; }

.sup-btn         { display: inline-flex; align-items: center; padding: 9px 18px; border-radius: 3px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s; border: none; font-family: inherit; }
.sup-btn-gold    { background: linear-gradient(135deg, #A07810, #D4A017); color: #000; }
.sup-btn-gold:hover { opacity: .85; }
.sup-btn-out     { background: transparent; border: 1px solid #2A2A2A; color: #888; }
.sup-btn-out:hover { border-color: #D4A017; color: #D4A017; }
.sup-btn-red     { background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.3); color: #FCA5A5; }
.sup-btn-red:hover { background: rgba(239,68,68,.25); }
.sup-btn-sm      { padding: 6px 12px; font-size: 12px; }

.sup-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 500; align-items: center; justify-content: center; }
.sup-modal.open { display: flex; }
.sup-mbox { background: #1A1A1A; border: 1px solid rgba(212,160,23,.3); border-radius: 4px; padding: 32px; width: 560px; max-width: 95vw; max-height: 90vh; overflow-y: auto; }
.sup-mhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.sup-mhead h3 { font-size: 16px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #D4A017; }
.sup-mcls { background: none; border: none; color: #888; font-size: 20px; cursor: pointer; }

.badge-g { background: rgba(34,197,94,.15); color: #86EFAC; display: inline-block; padding: 3px 10px; border-radius: 2px; font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.badge-r { background: rgba(239,68,68,.15); color: #FCA5A5; display: inline-block; padding: 3px 10px; border-radius: 2px; font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.badge-o { background: rgba(212,160,23,.15); color: #F0C040; display: inline-block; padding: 3px 10px; border-radius: 2px; font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }

/* ══════════════════════════════════════════════════════
   MODO CLARO — Premium Light Theme
   Fundo branco gelo, texto preto grafite, acentos dourados
   ══════════════════════════════════════════════════════ */
body.light-mode {
  /* ── Variáveis de tema — modo CLARO ── */
  --bg:         #F4F5F7;
  --bg2:        #EAECEF;
  --bg3:        #FFFFFF;
  --card:       #FFFFFF;
  --card2:      #F9FAFB;
  --border:     rgba(0,0,0,.09);
  --border2:    rgba(0,0,0,.13);
  --shadow:     0 4px 24px rgba(0,0,0,.08);

  --tx:         #1C1C2E;
  --tx2:        #4B5563;
  --tx3:        #9CA3AF;
  --tx-inv:     #FFFFFF;

  --inp-bg:     #FFFFFF;
  --inp-border: rgba(0,0,0,.14);
  --inp-text:   #1C1C2E;
  --inp-ph:     #9CA3AF;

  --green:      #16A34A;

  background: var(--bg);
  color: var(--tx);
}

/* ── Transição suave ao trocar tema ─────────────────────────────── */
body.light-mode * { transition: background-color .2s, color .2s, border-color .2s; }
/* Exceções: não anima imagens, canvas, SVG */
body.light-mode img,
body.light-mode canvas,
body.light-mode svg { transition: none; }

/* ─── HEADER ─────────────────────────────────────────── */
body.light-mode .hdr {
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid rgba(0,0,0,.07);
  box-shadow: 0 1px 12px rgba(0,0,0,.06);
}
body.light-mode .hdr-brand-text {
  background: linear-gradient(135deg, #C49010 0%, #D4A017 50%, #A37810 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
body.light-mode .hdr-logo { filter: none; }
body.light-mode .hdr-nome { color: #1C1C2E; }
body.light-mode .btn-out  { background: rgba(0,0,0,.07); color: #1C1C2E; }
body.light-mode .btn-out:hover { background: rgba(0,0,0,.12); }
body.light-mode .hdr-tema-btn { color: #555; }

/* ─── SIDEBAR DESKTOP ────────────────────────────────── */
body.light-mode .desk-nav {
  background: #FFFFFF;
  border-right: 1px solid rgba(0,0,0,.07);
  box-shadow: 2px 0 16px rgba(0,0,0,.04);
}
body.light-mode .desk-nav-item { color: #111111; background: transparent; }
body.light-mode .desk-nav-label { color: #111111 !important; font-weight: 600; }
body.light-mode .desk-nav-icon  { color: #111111 !important; opacity: 1; }
body.light-mode .desk-nav-item:hover { background: rgba(0,0,0,.05); }
body.light-mode .desk-nav-item:hover .desk-nav-label { color: #000 !important; }
body.light-mode .desk-nav-item:hover .desk-nav-icon  { color: #000 !important; }
body.light-mode .desk-nav-item.active { background: rgba(212,160,23,.12); border-right: 2px solid #D4A017; }
body.light-mode .desk-nav-item.active .desk-nav-label { color: #96700A !important; font-weight: 700; }
body.light-mode .desk-nav-item.active .desk-nav-icon  { color: #D4A017 !important; }
body.light-mode .desk-nav-section { color: #9CA3AF; }
body.light-mode .desk-nav-badge   { background: rgba(212,160,23,.15); color: #C49010; }

/* ─── RIGHT PANEL DESKTOP ────────────────────────────── */
body.light-mode .desk-right    { background: #F0F1F3; border-left: 1px solid rgba(0,0,0,.07); }
body.light-mode .desk-topbar   { background: rgba(255,255,255,.97) !important; border-bottom: 1px solid rgba(0,0,0,.07) !important; box-shadow: 0 1px 12px rgba(0,0,0,.06) !important; }
body.light-mode .desk-sidebar  { background: #FFFFFF !important; border-right: 1px solid rgba(0,0,0,.07) !important; }
body.light-mode .desk-layout   { background: var(--bg); }
body.light-mode .desk-content  { background: var(--bg); }
body.light-mode .desk-mini-card { background: #FFFFFF; border: 1px solid rgba(0,0,0,.07); box-shadow: 0 2px 8px rgba(0,0,0,.04); }
body.light-mode .desk-mini-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
body.light-mode .desk-mini-val   { color: #1C1C2E; }
body.light-mode .desk-mini-label { color: #6B7280; }

/* ─── BOTTOM NAV MOBILE ──────────────────────────────── */
body.light-mode #bottom-nav {
  background: rgba(255,255,255,.96) !important;
  border-color: rgba(0,0,0,.08) !important;
  box-shadow: 0 -4px 20px rgba(0,0,0,.08) !important;
}
body.light-mode .bn-icon                   { color: #9CA3AF !important; }
body.light-mode .bn-label                  { color: #9CA3AF !important; }
body.light-mode .bn-item.active .bn-icon   { color: #C49010 !important; }
body.light-mode .bn-item.active .bn-label  { color: #C49010 !important; }

/* ─── TABS ───────────────────────────────────────────── */
body.light-mode .tab-bar { background: rgba(255,255,255,.95); border-top: 1px solid rgba(0,0,0,.07); box-shadow: 0 -2px 12px rgba(0,0,0,.05); }
body.light-mode .tab { color: #9CA3AF; }
body.light-mode .tab.active { color: #C49010; border-bottom-color: #D4A017; }

/* ─── PAINÉIS E CARDS ────────────────────────────────── */
body.light-mode .panel     { background: #FFFFFF; border: 1px solid rgba(0,0,0,.07); box-shadow: 0 2px 12px rgba(0,0,0,.04); }
body.light-mode .pt        { color: #1C1C2E !important; font-weight: 700; }
body.light-mode .ps        { color: #6B7280 !important; }
body.light-mode .tab-content { background: transparent; }
body.light-mode .ct-sec    { background: #F9FAFB; border-color: rgba(0,0,0,.08); }
body.light-mode .ct-sec h4 { color: #C49010; }
body.light-mode .rbox      { background: #FFFFFF; border-color: rgba(0,0,0,.08); }
body.light-mode .sc-card   { background: #FFFFFF; border-color: rgba(0,0,0,.08); color: #1C1C2E; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
body.light-mode .sc-card.sel { background: rgba(212,160,23,.08); border-color: rgba(212,160,23,.3); }
body.light-mode .inv-card  { background: #FFFFFF; border-color: rgba(0,0,0,.08); color: #1C1C2E; }
body.light-mode .inv-card.sel { background: rgba(212,160,23,.08); }
body.light-mode .inv-name  { color: #1C1C2E; }
body.light-mode .inv-det   { color: #6B7280; }
body.light-mode .inv-qty   { color: #C49010; }

/* ─── HOME ───────────────────────────────────────────── */
body.light-mode #home-hero-card       { background: linear-gradient(135deg, #1C1C2E, #2D3748); box-shadow: 0 8px 32px rgba(28,28,46,.25); }
body.light-mode .home-metric-card     { background: #FFFFFF !important; border: 1px solid rgba(0,0,0,.08) !important; box-shadow: 0 2px 10px rgba(0,0,0,.05) !important; }

/* ─── MODAIS ─────────────────────────────────────────── */
body.light-mode .modal         { background: #FFFFFF !important; color: #1C1C2E !important; box-shadow: 0 24px 80px rgba(0,0,0,.2); border: 1px solid rgba(0,0,0,.08); }
body.light-mode .modal label   { color: #374151 !important; }
body.light-mode .modal h2,
body.light-mode .modal h3      { color: #1C1C2E !important; }
body.light-mode .modal-bg      { background: rgba(0,0,0,.35); }

/* ─── INPUTS GLOBAIS ─────────────────────────────────── */
body.light-mode input,
body.light-mode select,
body.light-mode textarea        { background: var(--inp-bg) !important; color: var(--inp-text) !important; border-color: var(--inp-border) !important; }
body.light-mode input::placeholder,
body.light-mode textarea::placeholder { color: var(--inp-ph) !important; }
body.light-mode input:focus,
body.light-mode select:focus,
body.light-mode textarea:focus  { border-color: #D4A017 !important; box-shadow: 0 0 0 2px rgba(212,160,23,.15) !important; }

/* ─── INPUTS DENTRO DE .fg ───────────────────────────── */
body.light-mode .fg label      { color: #374151 !important; }
body.light-mode .fg input,
body.light-mode .fg select,
body.light-mode .fg textarea   { color: #1C1C2E !important; background: #FFFFFF !important; border-color: rgba(0,0,0,.14) !important; }

/* ─── TABELAS ────────────────────────────────────────── */
body.light-mode .dt            { border-color: #E5E7EB; }
body.light-mode .dt thead th   { background: #F3F4F6; color: #374151; border-bottom: 1px solid #E5E7EB; }
body.light-mode .dt tbody td   { color: #374151; border-bottom: 1px solid #F3F4F6; }
body.light-mode .dt tbody tr:hover { background: #F9FAFB; }

/* ─── TIPOGRAFIA GERAL ───────────────────────────────── */
body.light-mode h1, body.light-mode h2,
body.light-mode h3, body.light-mode h4,
body.light-mode h5, body.light-mode h6 { color: #1C1C2E !important; }
body.light-mode p  { color: #374151; }
body.light-mode strong { color: #1C1C2E !important; }
body.light-mode small  { color: #6B7280 !important; }
body.light-mode label  { color: #374151; }
body.light-mode .rl    { color: #6B7280; }
body.light-mode .rv    { color: #C49010; }

/* ─── PRECO-BOX (mantém fundo escuro — legível em ambos) */
body.light-mode .preco-box     { background: linear-gradient(135deg, #1C1C2E, #2D3748) !important; }
body.light-mode .preco-row     { color: #D1D5DB !important; border-color: rgba(255,255,255,.1) !important; }

/* ─── DRAWER (mobile) ────────────────────────────────── */
body.light-mode .drawer         { background: #FFFFFF; border-left: 1px solid rgba(0,0,0,.08); box-shadow: -8px 0 40px rgba(0,0,0,.12); }
body.light-mode .drw-item       { color: #374151; }
body.light-mode .drw-item:hover { background: rgba(0,0,0,.04); }
body.light-mode .drw-item-label { color: #1C1C2E; }
body.light-mode .drw-item-sub   { color: #9CA3AF; }
body.light-mode .drw-header     { border-bottom: 1px solid rgba(0,0,0,.07); }
body.light-mode .drw-avatar     { background: rgba(212,160,23,.15); color: #C49010; }
body.light-mode .drw-nome       { color: #1C1C2E; }
body.light-mode .drw-email      { color: #6B7280; }

/* ─── DROPDOWN CLIENTES ──────────────────────────────── */
body.light-mode #cli-drop       { background: #FFFFFF !important; border-color: rgba(0,0,0,.10) !important; box-shadow: 0 8px 24px rgba(0,0,0,.10) !important; }
body.light-mode .cli-drop-item  { border-bottom-color: #F3F4F6 !important; }

/* ─── ALERTAS ────────────────────────────────────────── */
body.light-mode .alert  { background: rgba(212,160,23,.08) !important; color: #92600A !important; border-color: rgba(212,160,23,.25) !important; }
body.light-mode .brs    { background: #ffebee !important; color: #c62828 !important; border-color: #ef9a9a !important; }
body.light-mode .btn-sm { color: #333 !important; }

/* ─── TOAST ──────────────────────────────────────────── */
body.light-mode .toast  { background: #FFFFFF !important; color: #1C1C2E !important; border-color: rgba(0,0,0,.12) !important; }

/* ─── OFFLINE BANNER ─────────────────────────────────── */
body.light-mode #offline-banner { background: #92400E; }

/* ─── SPLASH / LOGIN ─────────────────────────────────── */
body.light-mode #scr-solvix    { background: linear-gradient(135deg, #1C1C2E, #2D3748); }

/* ─── BOTÃO SAIR PROPOSTA ────────────────────────────── */
body.light-mode .prop-sair-btn { color: #6B7280; }

/* ─── SCROLLBAR ──────────────────────────────────────── */
body.light-mode ::-webkit-scrollbar-track { background: #F3F4F6; }
body.light-mode ::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 4px; }
body.light-mode ::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }

/* ═══════════════════════════════════════════════════════════════════
   COBERTURA DE STYLE INLINE — captura cores hardcoded nas views
   Usa attribute selector para sobrescrever sem tocar no HTML
   ═══════════════════════════════════════════════════════════════════ */

/* Fundos escuros → branco/cinza claro */
body.light-mode [style*="background:#0B0D10"],
body.light-mode [style*="background: #0B0D10"],
body.light-mode [style*="background:#0f0f13"],
body.light-mode [style*="background:#111111"],
body.light-mode [style*="background: #111111"],
body.light-mode [style*="background:#111;"],
body.light-mode [style*="background:#1a1a1a"],
body.light-mode [style*="background: #1a1a1a"],
body.light-mode [style*="background:#1a1a2e"],
body.light-mode [style*="background: #1a1a2e"],
body.light-mode [style*="background:#1e1e1e"],
body.light-mode [style*="background:#222"],
body.light-mode [style*="background:#141418"]  { background: #FFFFFF !important; border-color: rgba(0,0,0,.08) !important; }

/* Semi-transparentes escuras → semi-transparentes claras */
body.light-mode [style*="background:rgba(255,255,255,.03)"],
body.light-mode [style*="background: rgba(255,255,255,.03)"],
body.light-mode [style*="background:rgba(255,255,255,.04)"],
body.light-mode [style*="background: rgba(255,255,255,.04)"],
body.light-mode [style*="background:rgba(255,255,255,.05)"],
body.light-mode [style*="background:rgba(255,255,255,.06)"],
body.light-mode [style*="background: rgba(255,255,255,.06)"],
body.light-mode [style*="background:rgba(255,255,255,.07)"],
body.light-mode [style*="background:rgba(255,255,255,.08)"],
body.light-mode [style*="background: rgba(255,255,255,.08)"],
body.light-mode [style*="background:rgba(255,255,255,.10)"],
body.light-mode [style*="background:rgba(255,255,255,.12)"]  { background: rgba(0,0,0,.03) !important; }

/* Bordas brancas semi-transparentes → bordas escuras */
body.light-mode [style*="border:1px solid rgba(255,255,255,.05)"],
body.light-mode [style*="border:1px solid rgba(255,255,255,.07)"],
body.light-mode [style*="border: 1px solid rgba(255,255,255,.07)"],
body.light-mode [style*="border:1px solid rgba(255,255,255,.08)"],
body.light-mode [style*="border: 1px solid rgba(255,255,255,.08)"],
body.light-mode [style*="border:1px solid rgba(255,255,255,.1)"],
body.light-mode [style*="border: 1px solid rgba(255,255,255,.1)"],
body.light-mode [style*="border:1px solid rgba(255,255,255,.12)"],
body.light-mode [style*="border-color:rgba(255,255,255,.07)"],
body.light-mode [style*="border-color:rgba(255,255,255,.1)"]  { border-color: rgba(0,0,0,.09) !important; }

/* Textos claros hardcoded → texto escuro */
body.light-mode [style*="color:#E8E0D0"],
body.light-mode [style*="color: #E8E0D0"],
body.light-mode [style*="color:#e8e0d0"],
body.light-mode [style*="color: #e8e0d0"],
body.light-mode [style*="color:#F6F7FB"],
body.light-mode [style*="color: #F6F7FB"],
body.light-mode [style*="color:#ddd"],
body.light-mode [style*="color: #ddd"],
body.light-mode [style*="color:#ccc"],
body.light-mode [style*="color: #ccc"],
body.light-mode [style*="color:#eee"],
body.light-mode [style*="color:#d1d5db"]  { color: #1C1C2E !important; }

/* Textos cinza escuro → cinza médio legível */
body.light-mode [style*="color:#888"],
body.light-mode [style*="color: #888"],
body.light-mode [style*="color:#999"],
body.light-mode [style*="color:#666"],
body.light-mode [style*="color: #666"],
body.light-mode [style*="color:#555"],
body.light-mode [style*="color: #555"],
body.light-mode [style*="color:#aaa"],
body.light-mode [style*="color: #aaa"],
body.light-mode [style*="color:#bbb"],
body.light-mode [style*="color:#9090b0"],
body.light-mode [style*="color:#9090c0"],
body.light-mode [style*="color:#4a4a6a"],
body.light-mode [style*="color:#3a3a5a"],
body.light-mode [style*="color:#5a5a7a"],
body.light-mode [style*="color:#6060a0"],
body.light-mode [style*="color:#7070a0"]  { color: #4B5563 !important; }

/* Textos muito escuros (quase pretos — legíveis no dark, invisíveis no light) */
body.light-mode [style*="color:#2a2a"],
body.light-mode [style*="color:#1a1a"],
body.light-mode [style*="color:#111"],
body.light-mode [style*="color:#000"]  { color: #1C1C2E !important; }

/* Fundos pretos em divs de dados que viram brancos */
body.light-mode [style*="background:var(--bg2)"]  { background: #FFFFFF !important; }

/* ── Todos os gradientes escuros inline → fundo claro ──────────── */
body.light-mode [style*="background:linear-gradient(145deg,#0f0f13"],
body.light-mode [style*="background:linear-gradient(145deg,#0f0f14"],
body.light-mode [style*="background: linear-gradient(145deg,#0f0f14"],
body.light-mode [style*="background:linear-gradient(135deg, #0f0f13"],
body.light-mode [style*="background:linear-gradient(145deg,#0b0b0f"],
body.light-mode [style*="background:linear-gradient(145deg,#0c0c10"],
body.light-mode [style*="background:linear-gradient(145deg,#0c0c11"] { background: #F1F3F5 !important; }

/* ── Fundos sólidos escuros inline ─────────────────────────────── */
body.light-mode [style*="background:#1a1a2e"],
body.light-mode [style*="background: #1a1a2e"],
body.light-mode [style*="background:#0f0f14"],
body.light-mode [style*="background:#1e1a0e"],
body.light-mode [style*="background: #1e1a0e"],
body.light-mode [style*="background:#1a1a1a"],
body.light-mode [style*="background: #1a1a1a"],
body.light-mode [style*="background:#1A1A1A"],
body.light-mode [style*="background: #1A1A1A"],
body.light-mode [style*="background:#1e1e1e"],
body.light-mode [style*="background: #1e1e1e"],
body.light-mode [style*="background:#212121"],
body.light-mode [style*="background:#111"],
body.light-mode [style*="background: #111"] { background: #FFFFFF !important; border-color: rgba(0,0,0,.08) !important; }

/* ── Gradientes RGBA de status (mantém cor, ajusta opacidade) ───── */
body.light-mode [style*="background:linear-gradient(135deg,rgba(168,85,247"] { background: rgba(168,85,247,.08) !important; }
body.light-mode [style*="background:linear-gradient(135deg,rgba(245,183,0"]  { background: rgba(212,160,23,.10) !important; }
body.light-mode [style*="background:linear-gradient(135deg,rgba(34,197,94"]  { background: rgba(34,197,94,.10)  !important; }
body.light-mode [style*="background:linear-gradient(135deg,rgba(59,130,246"] { background: rgba(59,130,246,.10) !important; }
body.light-mode [style*="background:linear-gradient(135deg,rgba(255,152,0"]  { background: rgba(255,152,0,.10)  !important; }

/* ── rgba brancas sobre escuro → rgba escuras sobre claro ──────── */
body.light-mode [style*="background:rgba(255,255,255,.02)"],
body.light-mode [style*="background:rgba(255,255,255,.03)"],
body.light-mode [style*="background:rgba(255,255,255,.04)"],
body.light-mode [style*="background:rgba(255,255,255,.05)"],
body.light-mode [style*="background:rgba(255,255,255,.06)"],
body.light-mode [style*="background: rgba(255,255,255,.06)"],
body.light-mode [style*="background:rgba(255,255,255,.07)"],
body.light-mode [style*="background:rgba(255,255,255,.08)"],
body.light-mode [style*="background: rgba(255,255,255,.08)"],
body.light-mode [style*="background:rgba(255,255,255,.10)"],
body.light-mode [style*="background:rgba(255,255,255,.12)"],
body.light-mode [style*="background:rgba(255,255,255,.15)"],
body.light-mode [style*="background:rgba(255,255,255,.18)"],
body.light-mode [style*="background:rgba(255,255,255,.20)"] { background: rgba(0,0,0,.03) !important; }

/* ── Gradientes de cards de status sólidos (mantém cor) ─────────── */
body.light-mode [style*="background:rgba(59,130,246"]  { background: rgba(59,130,246,.10) !important; }
body.light-mode [style*="background:rgba(34,197,94"]   { background: rgba(34,197,94,.10)  !important; }
body.light-mode [style*="background:rgba(239,68,68"]   { background: rgba(239,68,68,.10)  !important; }
body.light-mode [style*="background:rgba(245,183,0"]   { background: rgba(245,183,0,.10)  !important; }
body.light-mode [style*="background:rgba(168,85,247"]  { background: rgba(168,85,247,.10) !important; }
body.light-mode [style*="background:rgba(255,152,0"]   { background: rgba(255,152,0,.10)  !important; }

/* ── Textos coloridos — versões mais escuras para contraste ──────── */
body.light-mode [style*="color:#3B82F6"]  { color: #1D4ED8 !important; }
body.light-mode [style*="color:#22C55E"]  { color: #15803D !important; }
body.light-mode [style*="color:#f87171"]  { color: #DC2626 !important; }
body.light-mode [style*="color:#F5B700"]  { color: #B45309 !important; }
body.light-mode [style*="color:#A855F7"]  { color: #7C3AED !important; }
body.light-mode [style*="color:#FF9800"]  { color: #C05000 !important; }

/* ── Modo escuro: garantias de legibilidade ──────────────────── */
body:not(.light-mode) .fg label         { color: #bbb; }
body:not(.light-mode) .fg input,
body:not(.light-mode) .fg select,
body:not(.light-mode) .fg textarea      { color: #e8e0d0; background: #1a1a1a; border-color: #3a3020; }
body:not(.light-mode) .fg input::placeholder,
body:not(.light-mode) .fg textarea::placeholder { color: #555; }
body:not(.light-mode) .ct-sec          { background: rgba(255,255,255,.03); border-color: #2a2a2a; }
body:not(.light-mode) .ct-sec h4       { color: #D4A017; }
body:not(.light-mode) .panel           { background: #111; border-color: #2a2a2a; }
body:not(.light-mode) .rl              { color: #aaa; }
body:not(.light-mode) .rbox            { background: #111; border-color: #2a2a2a; }
body:not(.light-mode) .preco-row       { color: #ccc; border-color: #2a2a2a; }
body:not(.light-mode) .dt td           { color: #ccc; }
body:not(.light-mode) h3,
body:not(.light-mode) h4               { color: #e8e0d0; }
body:not(.light-mode) strong           { color: #e8e0d0; }
body:not(.light-mode) small            { color: #999; }


.sup-btn-green { background: rgba(33,150,83,.2); color: #21a353; border-color: #21a353; }

/* ══════════════════════════════════════════════════════
   RESPONSIVIDADE — MOBILE FIRST
   Breakpoints: 480px (mobile), 768px (tablet), 1080px (desktop)
   ══════════════════════════════════════════════════════ */

/* ── Header mobile ──────────────────────────────────── */
@media (max-width: 768px) {
  .hdr {
    padding: 0 14px;
    height: 54px;
  }
  .hdr-brand-text {
    font-size: 18px;
    letter-spacing: 2px;
  }
  .hdr-logo { height: 34px; }
  .hdr-user {
    gap: 8px;
    font-size: 12px;
  }
  /* Esconde nome completo no header em telas pequenas */
  .hdr-nome { display: none; }
  #hdr-plano { display: none; }
}

/* ── App body ───────────────────────────────────────── */
@media (max-width: 768px) {
  .app-body { padding: 12px 10px; }
  .panel    { padding: 16px 14px; }
}

/* ── Tabs — scroll horizontal no mobile ─────────────── */
@media (max-width: 768px) {
  .tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    margin-bottom: 14px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    padding: 8px 14px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* ── Tabelas — scroll horizontal no mobile ──────────── */
@media (max-width: 768px) {
  .dt-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .dt th, .dt td { 
    padding: 8px 10px; 
    font-size: 12px;
    white-space: nowrap;
  }
  /* Colunas menos importantes somem no mobile */
  .dt .col-hide-mobile { display: none; }
}

/* ── Cards e grids ──────────────────────────────────── */
@media (max-width: 600px) {
  .g2, .g3 { grid-template-columns: 1fr; }
  .inv-grid { grid-template-columns: 1fr 1fr; }
  .img-upload-grid { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .inv-grid { grid-template-columns: 1fr; }
}

/* ── Modais — full screen no mobile ────────────────── */
@media (max-width: 600px) {
  .modal-bg { align-items: flex-end; }
  .modal {
    width: 100%;
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    padding: 22px 18px;
  }
}

/* ── Login card mobile ──────────────────────────────── */
@media (max-width: 480px) {
  .slvx-box {
    padding: 32px 22px;
    border-radius: 4px;
  }
  .slvx-logo { width: 220px; }
  .login-card { padding: 28px 20px; }
}

/* ── Steps do wizard — compacto no mobile ───────────── */
@media (max-width: 600px) {
  .steps { gap: 0; }
  .sl    { font-size: 8px; }
  .sn    { width: 24px; height: 24px; font-size: 11px; }
  .si::after { top: 12px; }
}

/* ── Botões de ação — full width no mobile ──────────── */
@media (max-width: 480px) {
  .btn-p { font-size: 15px; padding: 12px 20px; }
  .modal-act { flex-direction: column; }
  .modal-act button { width: 100%; }
}

/* ── Header usuário — comprime ──────────────────────── */
@media (max-width: 480px) {
  .hdr-user { gap: 6px; }
  .btn-out  { padding: 5px 10px; font-size: 11px; }
}

/* ── Toast — bottom center no mobile ───────────────── */
@media (max-width: 600px) {
  .toast {
    left: 14px;
    right: 14px;
    bottom: 16px;
    text-align: center;
    font-size: 13px;
  }
}

/* ── Pipeline — scroll horizontal ──────────────────── */
@media (max-width: 600px) {
  .pip-step { min-width: 70px; }
  .pip-dot  { width: 26px; height: 26px; font-size: 12px; }
}

/* ── Super admin — empilha no mobile ───────────────── */
@media (max-width: 600px) {
  .sup-g2, .sup-g3 { grid-template-columns: 1fr; }
  .sup-body        { padding: 16px 12px; }
  .sup-table th, .sup-table td { 
    padding: 8px 10px; 
    font-size: 12px;
  }
  .sup-mbox { padding: 22px 16px; }
}

/* ── Resultado da proposta — legível no mobile ──────── */
@media (max-width: 600px) {
  .rbox    { padding: 16px; }
  .rl      { font-size: 12px; }
  .rv      { font-size: 13px; }
  .rv.big  { font-size: 17px; }
  .preco-total { font-size: 18px; }
}

/* ── Painel financeiro — cards empilhados ───────────── */
@media (max-width: 600px) {
  #fin-resumo-cards {
    grid-template-columns: 1fr 1fr !important;
  }
  #adp-cards {
    grid-template-columns: 1fr 1fr !important;
  }
}
@media (max-width: 380px) {
  #fin-resumo-cards,
  #adp-cards { grid-template-columns: 1fr !important; }
}

/* ── Filtros em coluna no mobile ────────────────────── */
@media (max-width: 600px) {
  #proj-busca-cli,
  #proj-busca-vend,
  #proj-filtro-status,
  #proj-data-ini,
  #proj-data-fim,
  #fin-busca,
  #fin-filtro-status { min-width: 100% !important; }
}

/* ── Dashboard ranking — legível no mobile ──────────── */
@media (max-width: 600px) {
  #adp-ranking > div > div { flex-direction: column; gap: 2px; }
}

/* ══════════════════════════════════════════════════════
   DESKTOP — layout mais espaçoso acima de 1080px
   ══════════════════════════════════════════════════════ */
@media (min-width: 1080px) {
  .app-body { padding: 32px 24px; }
  .panel    { padding: 32px; }
  .tabs     { gap: 10px; margin-bottom: 28px; }
  .tab      { padding: 10px 22px; font-size: 14px; }

  /* Dashboard e financeiro side-by-side no desktop */
  .dash-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  /* Ranking mais largo no desktop */
  #adp-ranking { max-width: 100%; }

  /* Tabelas mais legíveis */
  .dt th, .dt td { padding: 11px 16px; font-size: 14px; }
}

/* ══════════════════════════════════════════════════════════════
   CORREÇÕES DE CONTRASTE — v70
   Garante legibilidade em modo escuro E claro
   ══════════════════════════════════════════════════════════════ */

/* ── Inputs com var() — garantia de contraste ── */
input, select, textarea {
  color: var(--tx, #e8e0d0);
  background: var(--bg2, #1e1e1e);
}
input::placeholder, textarea::placeholder { color: #666; }

/* ── Tabelas: contraste mínimo garantido ── */
.dt th { color: #D4A017 !important; background: #0d0d0d !important; }
.dt td { color: #d0d0d0 !important; }
.dt tr:nth-child(even) td { background: rgba(255,255,255,.02); }
.dt tr:hover td { background: rgba(212,160,23,.06) !important; }

/* ── Panels: títulos e subtítulos sempre legíveis ── */
.panel .pt { color: var(--tx); }
.panel .ps { color: var(--tx2); }
body.light-mode .panel .pt { color: #1a1a1a; }
body.light-mode .panel .ps { color: #555; }

/* ── Badges: contraste mínimo 4.5:1 ── */
.bg   { background: rgba(34,197,94,.18)  !important; color: #6EE7B7 !important; }
.bb   { background: rgba(59,130,246,.18) !important; color: #93C5FD !important; }
.badge-p { background: rgba(168,85,247,.18) !important; color: #D8B4FE !important; }

/* ── Botão remover: visível no escuro ── */
.brs { background: rgba(198,40,40,.18) !important; color: #FFCDD2 !important; border: 1px solid rgba(198,40,40,.35) !important; }
body.light-mode .brs { background: #ffebee !important; color: #c62828 !important; border-color: #ef9a9a !important; }

/* ── Modais: fundo e texto sempre contrastantes ── */
.modal { background: #1e1e1e !important; color: #e8e0d0 !important; border: 1px solid #333; }
.modal label { color: #bbb !important; font-size: 13px; }
.modal input, .modal select, .modal textarea {
  background: #2a2a2a !important; color: #e8e0d0 !important;
  border-color: #444 !important;
}
.modal input::placeholder, .modal textarea::placeholder { color: #666 !important; }
body.light-mode .modal { background: #fff !important; color: #1a1a1a !important; border-color: #ddd; }
body.light-mode .modal label { color: #333 !important; }
body.light-mode .modal input,
body.light-mode .modal select,
body.light-mode .modal textarea { background: #f5f5f5 !important; color: #1a1a1a !important; border-color: #ccc !important; }

/* ── Formulários fora de modal (fg) ── */
body:not(.light-mode) .fg label { color: #ccc !important; }
body:not(.light-mode) .fg input,
body:not(.light-mode) .fg select,
body:not(.light-mode) .fg textarea { color: #e8e0d0 !important; background: #1a1a1a !important; border-color: #3a3020 !important; }
body:not(.light-mode) .fg input::placeholder,
body:not(.light-mode) .fg textarea::placeholder { color: #555 !important; }
body.light-mode .fg label { color: #333 !important; }
body.light-mode .fg input,
body.light-mode .fg select,
body.light-mode .fg textarea { color: #1a1a1a !important; background: #fff !important; border-color: #ccc !important; }

/* ── Super admin: cards e tabelas ── */
.sup-card { background: #1a1a1a; color: #e8e0d0; }
.sup-table th { background: #0d0d0d; color: #D4A017; }
.sup-table td { color: #ccc; border-color: #2a2a2a; }

/* ── Btn-sm legível em ambos os temas ── */
.btn-sm { color: #e8e0d0 !important; }
body.light-mode .btn-sm { color: #333 !important; }

/* ── Texto geral em divs de conteúdo dinâmico ── */
body:not(.light-mode) strong { color: #e8e0d0; }
body:not(.light-mode) small  { color: #999; }
body.light-mode strong { color: #1a1a1a; }
body.light-mode small  { color: #555; }

/* ── Pip steps (pipeline de execução) ── */
.pip-dot.done  { background: #D4A017 !important; border-color: #D4A017 !important; }
.pip-dot.atual { background: #21a353 !important; border-color: #21a353 !important; color: #fff !important; }
.pip-dot.pend  { background: #2a2a2a !important; border-color: #444 !important;    color: #666 !important; }

/* ── Toast ── */
.toast { background: #2a2a2a !important; color: #e8e0d0 !important; border: 1px solid #444; }

/* ═══════════════════════════════════════════════════════════════════════
   SOLVIX — Desktop Layout Premium (≥ 1024px)
   Sidebar + Topbar + Content + Right Panel
═══════════════════════════════════════════════════════════════════════ */

/* ── Variáveis de layout ─────────────────────────────────────────── */
:root {
  --sidebar-w:     240px;
  --sidebar-w-collapsed: 64px;
  --topbar-h:      60px;
  --rightpanel-w:  280px;
}

/* ── Topbar premium ─────────────────────────────────────────────── */
.desk-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--topbar-h);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
}

/* Search bar central */
.desk-search-wrap {
  flex: 1; max-width: 520px; margin: 0 auto;
  position: relative; display: flex; align-items: center;
}
.desk-search-icon {
  position: absolute; left: 14px; color: #64748b; pointer-events: none; flex-shrink: 0;
}
.desk-search-input {
  width: 100%; padding: 9px 80px 9px 40px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; color: #E8E0D0;
  font-family: 'Outfit', sans-serif; font-size: 13.5px;
  outline: none; transition: border-color .15s, background .15s;
}
.desk-search-input:focus {
  border-color: rgba(245,183,0,.3);
  background: rgba(255,255,255,.07);
}
.desk-search-input::placeholder { color: #64748b; }
.desk-search-kbd {
  position: absolute; right: 12px;
  font-size: 11px; color: #94a3b8;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 5px; padding: 2px 7px; font-family: monospace; pointer-events: none;
}

/* Topbar right cluster */
.desk-topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.desk-empresa { font-size: 11.5px; color: rgba(255,255,255,.55); white-space: nowrap; }
.desk-icon-btn {
  width: 34px; height: 34px; border-radius: 9px; border: none; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  color: #6060a0; display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.desk-icon-btn:hover { background: rgba(255,255,255,.09); color: #F5B700; }

/* Avatar */
.desk-avatar-wrap {
  display: flex; align-items: center; gap: 9px; cursor: pointer;
  padding: 5px 10px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.07);
  transition: background .15s;
}
.desk-avatar-wrap:hover { background: rgba(255,255,255,.06); }
.desk-avatar {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg,#2d1b6b,#1a0e3d);
  border: 1.5px solid rgba(245,183,0,.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #F5B700;
}
.desk-avatar-name {
  font-size: 13px; font-weight: 600; color: #E8E0D0; line-height: 1.2;
}
.desk-avatar-role { font-size: 10.5px; color: #94a3b8; }

/* ── Desktop layout grid ─────────────────────────────────────────── */
.desk-layout {
  display: flex;
  margin-top: var(--topbar-h);
  min-height: calc(100vh - var(--topbar-h));
  background: var(--bg);
}

/* ── SIDEBAR ─────────────────────────────────────────────────────── */
.desk-sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--border);
  position: fixed; top: var(--topbar-h); left: 0; bottom: 0;
  overflow-y: auto; overflow-x: hidden;
  z-index: 150;
  display: flex; flex-direction: column;
  transition: width .22s cubic-bezier(.16,1,.3,1);
  scrollbar-width: none;
  color: var(--tx);
}
.desk-sidebar::-webkit-scrollbar { display: none; }

.desk-sidebar-logo {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.desk-logo-text {
  display: block; font-size: 18px; font-weight: 900; letter-spacing: 2px;
  background: linear-gradient(135deg,#F5C842,#F5B700,#C49010);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 3px;
}
.desk-logo-sub { font-size: 10.5px; color: #9ca3af !important; font-weight: 400; }

/* Nav items */
.desk-nav { flex: 1; padding: 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.desk-nav-section {
  font-size: 9px; font-weight: 700; color: #6b7280 !important;
  letter-spacing: 2px; text-transform: uppercase;
  padding: 12px 8px 5px; margin-top: 4px;
}
.desk-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px; border-radius: 11px; cursor: pointer;
  border: none; background: transparent; width: 100%; text-align: left;
  font-family: 'Outfit', sans-serif;
  transition: all .14s; position: relative;
  -webkit-tap-highlight-color: transparent;
}
.desk-nav-item:hover { background: rgba(255,255,255,.04); }
.desk-nav-item.active {
  background: rgba(245,183,0,.09);
  border: 1px solid rgba(245,183,0,.15);
  box-shadow: 0 0 0 0 transparent, inset 3px 0 0 #F5B700;
}
.desk-nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 20%; height: 60%;
  width: 3px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg,#F5B700,#C49010);
  box-shadow: 2px 0 10px rgba(245,183,0,.5);
}
.desk-nav-icon {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #6b7280 !important;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  transition: all .14s;
}
.desk-nav-item.active .desk-nav-icon {
  background: rgba(245,183,0,.12);
  border-color: rgba(245,183,0,.2);
  color: #F5B700 !important;
  box-shadow: 0 0 12px rgba(245,183,0,.1);
}
.desk-nav-item:hover .desk-nav-icon { color: #e2e8f0 !important; }
.desk-nav-label {
  font-size: 13.5px; font-weight: 500; color: #cbd5e1 !important;
  white-space: nowrap; transition: color .14s;
}
.desk-nav-item.active .desk-nav-label { color: #F6F7FB !important; font-weight: 700; }
.desk-nav-item:hover .desk-nav-label { color: #f1f5f9 !important; }
.desk-nav-badge {
  margin-left: auto; font-size: 9.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
  background: rgba(245,183,0,.15); color: #F5B700;
  border: 1px solid rgba(245,183,0,.2);
}

/* Collapse button */
.desk-sidebar-collapse {
  margin: auto 10px 14px; padding: 8px; border-radius: 9px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  color: #6b7280; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .14s; width: calc(100% - 20px);
}
.desk-sidebar-collapse:hover { background: rgba(255,255,255,.07); color: #6060a0; }

/* Collapsed state */
.desk-sidebar.collapsed { width: var(--sidebar-w-collapsed); }
.desk-sidebar.collapsed .desk-logo-sub,
.desk-sidebar.collapsed .desk-nav-label,
.desk-sidebar.collapsed .desk-nav-badge,
.desk-sidebar.collapsed .desk-nav-section,
.desk-sidebar.collapsed .desk-logo-text { opacity: 0; pointer-events: none; }
.desk-sidebar.collapsed .desk-sidebar-collapse svg { transform: rotate(180deg); }
.desk-sidebar.collapsed .desk-nav-item { justify-content: center; }
.desk-sidebar.collapsed .desk-nav-icon { margin: 0; }

/* ── CONTENT ─────────────────────────────────────────────────────── */
.desk-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  margin-right: var(--rightpanel-w);
  min-width: 0;
  background: var(--bg);
  transition: margin-left .22s cubic-bezier(.16,1,.3,1);
}
.desk-sidebar.collapsed ~ .desk-content { margin-left: var(--sidebar-w-collapsed); }

/* ── RIGHT PANEL ─────────────────────────────────────────────────── */
.desk-right-panel {
  width: var(--rightpanel-w); flex-shrink: 0;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  position: fixed; top: var(--topbar-h); right: 0; bottom: 0;
  overflow-y: auto; padding: 20px 16px;
  z-index: 150; scrollbar-width: none;
}
.desk-right-panel::-webkit-scrollbar { display: none; }
.desk-right-title {
  font-size: 10px; font-weight: 700; color: #9ca3af !important;
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 14px;
}
.desk-quick-actions { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.desk-qa-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06);
  transition: all .14s; text-align: left; font-family: 'Outfit', sans-serif;
}
.desk-qa-item:hover {
  background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.1);
  transform: translateX(2px);
}
.desk-qa-icon {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.desk-qa-label { font-size: 13px; font-weight: 600; color: #E8E0D0; }
.desk-qa-sub   { font-size: 11px; color: #94a3b8; margin-top: 1px; }
.desk-qa-arrow { margin-left: auto; color: #64748b; flex-shrink: 0; }
.desk-right-divider {
  height: 1px; background: rgba(255,255,255,.06); margin: 16px 0;
}
.desk-mini-cards { display: flex; flex-direction: column; gap: 10px; }
.desk-mini-card {
  background: linear-gradient(145deg,#0f0f13,#0b0b0f);
  border: 1px solid rgba(255,255,255,.07); border-radius: 14px;
  padding: 14px; position: relative; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.desk-mini-card-icon {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.desk-mini-card-label {
  font-size: 10.5px; color: #94a3b8; font-weight: 600;
  letter-spacing: .4px; text-transform: uppercase; margin-bottom: 5px;
}
.desk-mini-card-value {
  font-size: 19px; font-weight: 700; letter-spacing: -.5px; line-height: 1.1;
}
.desk-mini-card-sub { font-size: 11px; color: #94a3b8; margin-top: 3px; }

/* ── MOBILE: ocultar sidebar e right panel ───────────────────────── */
@media (max-width: 1023px) {
  .desk-sidebar     { display: none !important; }
  .desk-right-panel { display: none !important; }
  .desk-content     { margin-left: 0 !important; margin-right: 0 !important; }
  .desk-search-wrap { display: none !important; }
  .desk-avatar-info { display: none; }
  .desk-avatar-wrap { gap: 0; border: none; padding: 0; }
  .desk-empresa     { display: none !important; }
}

/* ── DESKTOP: ocultar mobile tabs ────────────────────────────────── */
@media (min-width: 1024px) {
  .mobile-tabs-only { display: none !important; }
  .desk-hide-on-desk { display: none !important; }
  .desk-topbar { padding: 0 20px 0 calc(var(--sidebar-w) + 20px); }
  #bottom-nav  { display: none !important; }
  .desk-content .tab-content.active { padding: 24px 28px 40px; }
  #home-wrap { max-width: 100%; padding: 24px 0 40px; }
  #home-metrics {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
  }
}

/* Desktop widescreen */
@media (min-width: 1280px) {
  #home-metrics { grid-template-columns: repeat(3, 1fr) !important; }
}


/* ── Dashboard premium — mobile fixes ────────────────────────────── */
.adp-rank-grid {
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 520px) {
  .adp-rank-grid { grid-template-columns: 1fr !important; }
  #adp-grafico-wrap canvas { height: 180px !important; }
}

/* ── Botão tema na tela de login ─────────────────────────────────── */
body.light-mode #btn-tema-login {
  background: rgba(0,0,0,.07) !important;
  border-color: rgba(0,0,0,.12) !important;
}
body.light-mode #btn-tema-login:hover {
  background: rgba(0,0,0,.13) !important;
}
