/* =========================================================
visual.css — visual moderno do ProHair ERP
Carregado DEPOIS do tema.css. Só muda aparência (cores,
cantos, sombras, espaçamentos). Não mexe em nada do
funcionamento. Para voltar ao visual anterior, basta tirar
a linha deste arquivo do index.html.
========================================================= */

/* ---------- Tokens comuns (claro e escuro) ---------- */
:root {
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Tema claro: tons quentes que combinam com o cobre ---------- */
:root[data-theme="light"] {
  --bg: #F6F4F0;
  --bg-elevated: #FBFAF8;
  --surface: #FFFFFF;
  --surface-2: #F7F5F1;
  --surface-hover: #F3EEE6;
  --border: #E4DED4;
  --border-soft: #EDE8E0;
  --text: #1D1B18;
  --text-dim: #5A554D;
  --text-faint: #8C867C;
  --accent-soft: #C89B6C24;
  --shadow-sm: 0 1px 2px rgba(40, 30, 15, .04), 0 2px 10px -4px rgba(40, 30, 15, .06);
  --shadow-md: 0 2px 4px rgba(40, 30, 15, .04), 0 12px 28px -10px rgba(40, 30, 15, .14);
  --shadow-lg: 0 24px 60px -18px rgba(40, 30, 15, .25);
}

/* ---------- Fundo e estrutura ---------- */
.content { padding: 28px 32px 64px; }
@media (max-width: 620px) { .content { padding: 16px; } }

:root[data-theme="light"] .sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border-soft);
}
:root[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, .78);
  backdrop-filter: saturate(160%) blur(12px);
}

/* ---------- Menu lateral ---------- */
.sidebar__nav { gap: 3px; }
.nav-item {
  border-radius: 10px;
  padding: 10px 12px;
  transition: background .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.nav-item:hover { transform: translateX(2px); }
.nav-item.is-active {
  background: linear-gradient(90deg, var(--accent-soft), transparent 140%);
  color: var(--accent-strong);
}
:root[data-theme="light"] .nav-item.is-active { color: #8A5E33; }
:root[data-theme="light"] .nav-item.is-active .nav-icon { color: #A87645; }
.brand-mark { border-radius: 14px; }

/* ---------- Cabeçalho das páginas ---------- */
.page-header {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 22px;
}
.page-header h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.page-header .page-sub, .page-sub { margin-top: 4px; }

/* ---------- Cards / indicadores ---------- */
.card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  transition: box-shadow .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.card:hover { box-shadow: var(--shadow-md); }
.card > p:first-child {
  font-size: 11.5px !important;
  letter-spacing: .06em !important;
  text-transform: uppercase;
  color: var(--text-faint) !important;
  font-weight: 600;
  margin-bottom: 8px !important;
}
.card h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.grid { gap: 16px; }

/* ---------- Botões ---------- */
.btn {
  border-radius: 10px;
  transition: background .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease);
}
:root[data-theme="light"] .btn:not(.btn--primary):not(.btn--danger):not(.btn--ghost) {
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(40, 30, 15, .05);
}
:root[data-theme="light"] .btn:not(.btn--primary):not(.btn--danger):not(.btn--ghost):hover {
  background: var(--surface-2);
  border-color: #D6CEC1;
}
.btn--primary {
  background: linear-gradient(180deg, #D0A678, #C08F5F);
  border-color: #BC8B5B;
  color: #2A1A08;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 4px 12px -4px rgba(176, 124, 72, .55);
}
.btn--primary:hover {
  background: linear-gradient(180deg, #D8B087, #C89766);
  border-color: #C08F5F;
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 8px 18px -6px rgba(176, 124, 72, .6);
}
.btn--danger { background: transparent; }
:root[data-theme="light"] .btn--danger { color: #D2384C; border-color: #F1B7BF; }
:root[data-theme="light"] .btn--danger:hover { background: #D2384C; border-color: #D2384C; color: #fff; }

/* Botões de período (Ontem, Diário, Semanal...) */
.dash-filtro__btn {
  border-radius: 999px !important;
  transition: background .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease);
}
.dash-filtro__btn:not(.is-on):hover { border-color: var(--accent) !important; color: var(--accent-strong); }
.dash-filtro__btn.is-on { box-shadow: 0 4px 12px -4px rgba(176, 124, 72, .55); }

/* ---------- Campos ---------- */
.input, select.input, textarea.input { border-radius: 10px; }
:root[data-theme="light"] .input,
:root[data-theme="light"] select.input,
:root[data-theme="light"] textarea.input { background: var(--surface); }
:root[data-theme="light"] .input:hover { border-color: #D6CEC1; }
:root[data-theme="light"] .table-toolbar .search-mini { background: var(--surface); border-radius: 10px; }
:root[data-theme="light"] .topbar__search { background: var(--surface-2); border-radius: 10px; }

/* ---------- Tabelas ---------- */
.table-wrap {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.table-toolbar { padding: 14px 18px; }
.data-table thead th {
  background: var(--surface-2);
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: .07em;
  padding: 12px 18px;
}
.data-table tbody td { padding: 14px 18px; border-bottom-color: var(--border-soft); }
.data-table tbody tr:nth-child(even) { background: transparent; }
.data-table tbody tr:hover { background: var(--surface-hover); }
.pagination { padding: 14px 18px; }

/* Pedido que acabou de ser lançado (fica destacado alguns segundos) */
.data-table tbody tr.pedido-novo,
.data-table tbody tr.pedido-novo:hover {
  background: var(--accent-soft) !important;
  box-shadow: inset 3px 0 0 var(--accent);
  transition: background .6s var(--ease);
}

/* ---------- Selos ---------- */
.badge { padding: 4px 10px; letter-spacing: .03em; }

/* ---------- Ranking ---------- */
.rk-item { border-radius: 12px; transition: background .15s var(--ease); }

/* ---------- Modais, avisos e popups ---------- */
.modal { border-radius: 18px; border-color: var(--border-soft); }
.modal__header, .modal__footer { padding-left: 22px; padding-right: 22px; }
.modal__body { padding: 22px; }
.modal-overlay { background: rgba(20, 16, 10, .42); backdrop-filter: blur(4px); }
.toast { border-radius: 12px; box-shadow: var(--shadow-md); }
:root[data-theme="light"] .toast { background: var(--surface); }
#riPopup { border-radius: 14px !important; box-shadow: var(--shadow-lg) !important; }

/* ---------- Barra de rolagem mais discreta ---------- */
:root[data-theme="light"] *::-webkit-scrollbar-thumb { background: #DDD6CB; }
:root[data-theme="light"] *::-webkit-scrollbar-thumb:hover { background: #CBC2B4; }

/* ---------- Menu: "Pedidos de Venda" em destaque ---------- */
.nav-item[data-view="listaVendas"] { font-weight: 800; color: var(--text); }
.nav-item[data-view="listaVendas"] .nav-icon { color: var(--accent-strong); }

/* ---------- Pedidos de Venda: linha inteira alinhada (botões não "cortam" a linha) ---------- */
.data-table td.row-actions { display: table-cell; text-align: right; white-space: nowrap; }
.data-table td.row-actions > .btn { margin-left: 6px; vertical-align: middle; }
