/* ═══════════════════════════════════════════
   VEDÊ — Base: Variables, Reset, Utilities
   ═══════════════════════════════════════════ */

/* ── Tema Claro (padrão) ─────────────────────── */
:root {
  /* Superfícies */
  --bg:           #f4f5f8;
  --bg-card:      #ffffff;
  --bg-card-2:    #f0f2f6;
  --bg-input:     #ffffff;
  --bg-hover:     #e8ebf1;
  --border:       #e4e7ee;
  --border-2:     #cfd5e0;
  --border-focus: #4f46e5;
  /* Texto (contraste reforçado) */
  --text:         #0f1729;
  --text-2:       #3a4456;
  --text-3:       #677289;
  --text-muted:   #9aa3b5;
  --text-faint:   #b8c0cf;
  /* Marca — índigo */
  --primary:      #4f46e5;
  --primary-dk:   #4338ca;
  --primary-bg:   rgba(79,70,229,.08);
  /* Acento âmbar (coquetelaria) */
  --amber:        #d97706;
  --amber-dk:     #b45309;
  --amber-bg:     rgba(217,119,6,.10);
  /* Acento verde (sucesso / secundário) */
  --accent:       #0f9d6b;
  --accent-dk:    #0c7d55;
  --accent-bg:    rgba(15,157,107,.10);
  /* Semânticas */
  --blue:         #2563eb;
  --blue-bg:      rgba(37,99,235,.09);
  --ok:           #0f9d6b;
  --ok-bg:        rgba(15,157,107,.10);
  --warn:         #d97706;
  --warn-bg:      rgba(217,119,6,.10);
  --danger:       #dc2626;
  --danger-bg:    rgba(220,38,38,.09);
  --danger-border:#f3c4c4;
  /* Chips de setor */
  --bar:          #2563eb;
  --bar-bg:       rgba(37,99,235,.09);
  --cozinha:      #0f9d6b;
  --cozinha-bg:   rgba(15,157,107,.10);
  --salao:        #d97706;
  --salao-bg:     rgba(217,119,6,.10);
  /* Interativos derivados da marca (substituem o coral legado) */
  --ring:         0 0 0 3px rgba(79,70,229,.18);
  --edge:         rgba(79,70,229,.35);
  --edge-strong:  rgba(79,70,229,.55);
  --tint:         rgba(79,70,229,.05);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Montserrat', system-ui, sans-serif;
  /* Escala tipográfica */
  --fs-h1:    26px;
  --fs-h2:    17px;
  --fs-body:  14px;
  --fs-sm:    13px;
  --fs-xs:    11px;
  --fs-label: 11px;
  /* Raio */
  --r-xs:  4px;
  --r-sm:  8px;
  --r-btn: 10px;
  --r:     12px;
  --r-lg:  16px;
  --r-xl:  22px;
  --r-pill:999px;
  /* Sombra */
  --sh-1: 0 1px 2px rgba(15,23,42,.05), 0 1px 1px rgba(15,23,42,.04);
  --sh-2: 0 4px 16px rgba(15,23,42,.08);
  --sh-3: 0 12px 32px rgba(15,23,42,.14);
  /* Métricas */
  --sidebar-w:    220px;
  --sidebar-coll: 60px;
  --header-h:     52px;
  --nav-h:        64px;
  --ease:         .15s ease;
}

/* ── Tema Escuro (cinza neutro + marca) ───────── */
[data-theme="dark"] {
  /* Superfícies em escala de cinza fria e nítida */
  --bg:           #0c0d10;
  --bg-card:      #16181d;
  --bg-card-2:    #1d2026;
  --bg-input:     #1d2026;
  --bg-hover:     #262a32;
  --border:       #262a32;
  --border-2:     #363b45;
  --border-focus: #818cf8;

  /* Texto */
  --text:         #f2f4f8;
  --text-2:       #c7cdd9;
  --text-3:       #8a92a3;
  --text-muted:   #5b6273;
  --text-faint:   #474d59;

  /* Marca — índigo */
  --primary:      #818cf8;
  --primary-dk:   #6366f1;
  --primary-bg:   rgba(129,140,248,.12);

  /* Acento âmbar */
  --amber:        #f59e0b;
  --amber-dk:     #d97706;
  --amber-bg:     rgba(245,158,11,.12);

  /* Acento verde */
  --accent:       #34d399;
  --accent-dk:    #10b981;
  --accent-bg:    rgba(52,211,153,.10);

  /* Semânticas */
  --blue:         #60a5fa;
  --blue-bg:      rgba(96,165,250,.10);
  --ok:           #34d399;
  --ok-bg:        rgba(52,211,153,.10);
  --warn:         #fbbf24;
  --warn-bg:      rgba(251,191,36,.10);
  --danger:       #f87171;
  --danger-bg:    rgba(248,113,113,.10);
  --danger-border:#3a1d1d;

  /* Chips de setor */
  --bar:          #60a5fa;
  --bar-bg:       rgba(96,165,250,.10);
  --cozinha:      #34d399;
  --cozinha-bg:   rgba(52,211,153,.10);
  --salao:        #fbbf24;
  --salao-bg:     rgba(251,191,36,.10);

  /* Interativos derivados da marca */
  --ring:         0 0 0 3px rgba(129,140,248,.30);
  --edge:         rgba(129,140,248,.40);
  --edge-strong:  rgba(129,140,248,.60);
  --tint:         rgba(129,140,248,.07);

  /* Sombras mais densas no escuro */
  --sh-1: 0 1px 2px rgba(0,0,0,.4);
  --sh-2: 0 4px 16px rgba(0,0,0,.5);
  --sh-3: 0 12px 32px rgba(0,0,0,.6);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body { min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button { font-family: var(--font-body); cursor: pointer; }
input, select, textarea { font-family: var(--font-body); }

.brand-logo { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 54px; color: var(--text); letter-spacing: -1px; line-height: 1; margin-bottom: 4px; }
.brand-tagline { font-size: 8px; color: var(--text-faint); letter-spacing: 3px; text-transform: uppercase; font-weight: 600; margin-bottom: 40px; }
.screen-logo-area { text-align: center; min-height: 0; }
.screen-logo-area img { max-height: 80px; width: auto; max-width: 240px; object-fit: contain; }
.screen-logo-area:empty { display: none; }
[hidden] { display: none !important; }
.screen-center { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 20px; background: var(--bg); }
.spinner { width: 24px; height: 24px; border: 2px solid var(--border-2); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

.section-label { font-size: 10px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.divider { height: 1px; background: var(--border); margin: 12px 0; }

.cat-divider { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; }
.cat-divider-line { flex: 1; height: 1px; background: var(--border); }
.cat-divider-label { font-size: 10px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; }

.empty-state { text-align: center; padding: 48px 20px; color: var(--text-faint); }
.empty-state-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state-text { font-size: 12px; line-height: 1.8; white-space: pre-line; }

#toast-container { position: fixed; top: calc(var(--header-h) + 12px); left: 50%; transform: translateX(-50%); z-index: 9999; pointer-events: none; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.toast { padding: 9px 20px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; white-space: nowrap; animation: toast-in .2s ease; }
.toast-ok   { background: var(--accent); color: var(--bg); }
.toast-err  { background: var(--danger); color: #fff; }
.toast-warn { background: var(--warn); color: var(--bg); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-2); flex-shrink: 0; transition: background var(--ease); }
.sync-dot.synced  { background: var(--accent); animation: pulse 2s infinite; }
.sync-dot.syncing { background: var(--warn); animation: spin .8s linear infinite; border: 2px solid transparent; border-top-color: var(--warn); }
.sync-dot.error   { background: var(--danger); }
.sync-dot.local   { background: var(--border-2); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.notice { border-radius: var(--r-sm); padding: 10px 14px; font-size: 12px; margin-bottom: 12px; line-height: 1.7; }
.notice-warn   { background: var(--warn-bg);   border: 1px solid rgba(251,146,60,.3); color: var(--warn); }
.notice-info   { background: var(--blue-bg);   border: 1px solid rgba(99,190,214,.3); color: var(--blue); }
.notice-ok     { background: var(--ok-bg);     border: 1px solid rgba(94,201,158,.3); color: var(--ok); }
.notice-danger { background: var(--danger-bg); border: 1px solid rgba(248,113,113,.3); color: var(--danger); }
