/**
 * PLIN ERP — Design Pro (Light Warm Theme)
 * Inclui após o CSS do módulo pra sobrescrever o dark mode.
 * Remover este arquivo restaura o visual original.
 */

/* ══ CORES ══ */
:root {
  --bg:#F5F3EF !important;
  --s1:#FFFFFF !important;
  --s2:#FAFAF9 !important;
  --s3:#F3F1EC !important;
  --b1:#E8E4DD !important;
  --b2:#D6D1C8 !important;
  --tx:#1F2937 !important;
  --mu:#6B7280 !important;
  --mu2:#9CA3AF !important;
  --ac:#10B981 !important;
  --acd:#D1FAE5 !important;
  --gr:#059669 !important;
  --grd:#ECFDF5 !important;
  --grd2:#D1FAE5 !important;
  --ye:#F59E0B !important;
  --yed:#FEF3C7 !important;
  --re:#EF4444 !important;
  --red2:#FEE2E2 !important;
  --or:#F97316 !important;
  --ord:#FFEDD5 !important;
  --pu:#8B5CF6 !important;
  --pud:#EDE9FE !important;
  /* aliases */
  --text:#1F2937 !important;
  --text2:#6B7280 !important;
  --muted:#6B7280 !important;
  --muted2:#9CA3AF !important;
  --card:#FFFFFF !important;
  --border:#E8E4DD !important;
  --border2:#D6D1C8 !important;
  --surface:#FFFFFF !important;
  --surface2:#FAFAF9 !important;
  --surface3:#F3F1EC !important;
  --accent:#10B981 !important;
  --green:#059669 !important;
  --red:#EF4444 !important;
  --yellow:#F59E0B !important;
  --orange:#F97316 !important;
  --purple:#8B5CF6 !important;
  --shadow:0 2px 8px rgba(0,0,0,.06);
  --shadow-md:0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:0 10px 30px rgba(0,0,0,.1);
}

/* ══ BASE ══ */
body { background: var(--bg) !important; color: var(--tx) !important; }

/* ══ SCROLLBAR ══ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: #D6D1C8; border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

/* ══ HEADER ══ */
.header, .topbar, .top-bar, [class*="header"] {
  background: rgba(255,255,255,.95) !important;
  border-bottom: 1px solid var(--b1) !important;
  box-shadow: 0 2px 16px rgba(0,0,0,.04) !important;
  color: var(--tx) !important;
}
.header-title, .top-bar-title, .brand-name { color: var(--tx) !important; }
.header-sub, .top-bar-sub, .brand-sub { color: var(--mu) !important; }

/* ══ CARDS ══ */
.mesa-card, .ped-card, .cmd-card, .ticket, .card, .sec-card,
.ci, .prod-item, .dlv-cat-card, .cat-card, .rest-cat-card {
  background: #fff !important;
  border: 1px solid #E8E4DD !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.05) !important;
  border-radius: 16px !important;
}
.cmd-card:active, .mesa-card:active, .ped-card:active {
  transform: scale(.98) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.08) !important;
}

/* ══ MESA CARDS STATUS ══ */
.mesa-card.ocupada, .mesa-cell.ocupada {
  border-color: #FDE68A !important;
  background: linear-gradient(160deg,#fff,#FFFBEB) !important;
}
.mesa-card.conta, .mesa-cell.conta {
  border-color: #FECACA !important;
  background: linear-gradient(160deg,#fff,#FEF2F2) !important;
}
.mesa-card.atraso {
  border-color: #FCA5A5 !important;
  background: linear-gradient(160deg,#fff,#FEF2F2) !important;
}
.mesa-num { color: var(--tx) !important; }
.mesa-lbl { color: var(--mu) !important; }

/* ══ BUTTONS ══ */
.btn, button.btn {
  border-radius: 12px !important;
  border: 1px solid var(--b1) !important;
  background: #fff !important;
  color: var(--tx) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.06) !important;
}
.btn:active { transform: scale(.98) !important; }
.btn-primary, .btn.btn-primary {
  background: #10B981 !important;
  border-color: #10B981 !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(16,185,129,.3) !important;
}
.btn-success, .btn.btn-success {
  background: #059669 !important;
  border-color: #059669 !important;
  color: #fff !important;
}
.btn-danger, .btn.btn-danger {
  background: #EF4444 !important;
  border-color: #EF4444 !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(239,68,68,.25) !important;
}
.btn-add {
  background: #10B981 !important;
  color: #fff !important;
  border-radius: 50% !important;
  box-shadow: 0 4px 12px rgba(16,185,129,.3) !important;
}

/* ══ PILLS / CHIPS ══ */
.cat-pill, .cat-chip, .filtro-btn, .nav-tab, .tab {
  background: #fff !important;
  border: 1px solid #E8E4DD !important;
  color: #6B7280 !important;
  border-radius: 999px !important;
}
.cat-pill.on, .cat-pill.active, .cat-chip.active, .filtro-btn.active, .nav-tab.on, .tab.on, .tab.active {
  background: #10B981 !important;
  border-color: #10B981 !important;
  color: #fff !important;
}

/* ══ MODAIS ══ */
.modal-bg, .modal-sheet {
  background: var(--bg) !important;
}
.modal-hdr {
  background: #fff !important;
  border-bottom: 1px solid #E8E4DD !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.04) !important;
}
.modal-footer {
  background: #fff !important;
  border-top: 1px solid #E8E4DD !important;
  box-shadow: 0 -4px 16px rgba(0,0,0,.04) !important;
}
.modal-back {
  background: #fff !important;
  border: 1.5px solid #D1FAE5 !important;
  color: #059669 !important;
  border-radius: 999px !important;
}
.modal-title { color: var(--tx) !important; }

/* ══ INPUTS ══ */
input, textarea, select, .fi, .form-input, .form-select {
  background: #fff !important;
  border: 1.5px solid #E8E4DD !important;
  color: #1F2937 !important;
  border-radius: 12px !important;
}
input:focus, textarea:focus, select:focus {
  border-color: #10B981 !important;
  box-shadow: 0 0 0 3px rgba(16,185,129,.12) !important;
}
input::placeholder, textarea::placeholder { color: #9CA3AF !important; }

/* ══ BUSCA ══ */
.busca-input {
  border-radius: 22px !important;
  background: #fff !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.06) !important;
  border: none !important;
}

/* ══ TOASTS ══ */
.toast.ok, .tok { background: #ECFDF5 !important; color: #047857 !important; border-color: #A7F3D0 !important; }
.toast.err, .terr { background: #FEF2F2 !important; color: #B91C1C !important; border-color: #FECACA !important; }
.toast.warn, .twn { background: #FFFBEB !important; color: #B45309 !important; border-color: #FDE68A !important; }

/* ══ COZINHA KDS ══ */
.kds-col { border-right: 1px solid #E8E4DD !important; }
.col-novo { background: rgba(59,130,246,.04) !important; }
.col-preparo { background: rgba(251,146,60,.04) !important; }
.col-pronto { background: rgba(16,185,129,.04) !important; }
.kds-col-header { border-bottom: 1px solid #E8E4DD !important; }
.ticket { border-radius: 16px !important; }

/* ══ SIDEBAR (ERP shell) ══ */
.sidebar, .nav-sidebar {
  background: #fff !important;
  border-right: 1px solid #E8E4DD !important;
}
.nav-item { color: #6B7280 !important; }
.nav-item:hover { background: #F3F1EC !important; color: #1F2937 !important; }
.nav-item.active { background: #ECFDF5 !important; color: #059669 !important; border-left-color: #10B981 !important; }
.nav-section { color: #9CA3AF !important; }

/* ══ TABELAS ══ */
table, .table { border-color: #E8E4DD !important; }
th { background: #F5F3EF !important; color: #374151 !important; }
td { border-color: #E8E4DD !important; }
tr:hover td { background: #FAFAF9 !important; }

/* ══ BADGES ══ */
.nb, .badge, .nav-badge { background: #EF4444 !important; color: #fff !important; }

/* ══ FAB ══ */
.sacola-fab, .cart-fab {
  background: #10B981 !important;
  color: #fff !important;
  box-shadow: 0 8px 28px rgba(16,185,129,.4) !important;
}

/* ══ STAT CARDS ══ */
.stat-mini, .hkpi {
  background: #fff !important;
  border: 1px solid #E8E4DD !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.04) !important;
}

/* ══ EMPTY STATES ══ */
.empty-state, .kds-empty { color: #6B7280 !important; }
.empty-icon, .ei { opacity: .4 !important; }

/* ══ DELIVERY ══ */
.dlv-fechado-bar { background: linear-gradient(90deg,#EF4444,#DC2626) !important; }

/* ══ PORTAL ══ */
.hero-banner { background: linear-gradient(135deg,#ECFDF5,#D1FAE5) !important; border-color: rgba(16,185,129,.2) !important; }

/* ══ OVERRIDE PRETO DO IFRAME SHELL ══ */
.main-frame-wrap, #main-frame { background: var(--bg) !important; }
