/* ── Tokens ───────────────────────────────────────────────────────── */
:root {
  --bg:       #0d0d0d;
  --surface:  #161616;
  --surface2: #1f1f1f;
  --border:   #2a2a2a;
  --accent:   #c8963e;      /* âmbar de barril */
  --accent2:  #7eb77f;      /* verde garrafa */
  --danger:   #c94040;
  --text:     #e8e2d9;
  --text-muted: #7a7369;
  --sidebar-w: 220px;
  --radius:   6px;
  --font-head: 'Syne', sans-serif;
  --font-mono: 'DM Mono', monospace;
}

/* ── Reset ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--text); }

/* ── Sidebar ──────────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow-y: auto; z-index: 100;
}
.sidebar-brand {
  display: flex; align-items: center; gap: .6rem;
  padding: 1.2rem 1rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-head);
  font-weight: 800; font-size: .85rem;
  letter-spacing: .05em; color: var(--accent);
}
.brand-icon { font-size: 1.4rem; }
.sidebar-user {
  display: flex; align-items: center; gap: .75rem;
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--border);
}
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #000;
  font-family: var(--font-head); font-weight: 800;
  display: grid; place-items: center; font-size: .85rem; flex-shrink: 0;
}
.user-name { font-weight: 500; font-size: .85rem; }
.user-role { font-size: .72rem; color: var(--text-muted); }

.nav-links { list-style: none; padding: .5rem 0; flex: 1; }
.nav-links li a {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem 1rem;
  color: var(--text-muted);
  font-size: .8rem; font-family: var(--font-mono);
  transition: color .15s, background .15s;
}
.nav-links li a:hover, .nav-links li a.active {
  color: var(--text); background: var(--surface2);
}
.nav-links li a.active { border-left: 3px solid var(--accent); }
.nav-icon { font-size: 1rem; width: 1.2rem; text-align: center; }
.nav-section {
  padding: .9rem 1rem .3rem;
  font-size: .65rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted); font-family: var(--font-head);
}
.sidebar-logout {
  display: flex; align-items: center; gap: .5rem;
  padding: .8rem 1rem;
  color: var(--text-muted); font-size: .8rem;
  border-top: 1px solid var(--border);
  transition: color .15s;
}
.sidebar-logout:hover { color: var(--danger); }

/* ── Main ─────────────────────────────────────────────────────────── */
main { min-height: 100vh; padding: 2rem; }
main.with-sidebar { margin-left: var(--sidebar-w); }

/* ── Page header ─────────────────────────────────────────────────── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.page-title {
  font-family: var(--font-head); font-size: 1.5rem; font-weight: 800;
}
.page-subtitle { color: var(--text-muted); font-size: .8rem; margin-top: .2rem; }

/* ── Flash ───────────────────────────────────────────────────────── */
.flash-container { margin-bottom: 1rem; }
.flash {
  padding: .7rem 1rem; border-radius: var(--radius);
  font-size: .85rem; margin-bottom: .4rem;
}
.flash-success { background: #1a2e1a; border: 1px solid var(--accent2); color: var(--accent2); }
.flash-danger  { background: #2e1a1a; border: 1px solid var(--danger);  color: var(--danger); }
.flash-warning { background: #2e261a; border: 1px solid var(--accent);  color: var(--accent); }
.flash-info    { background: #1a222e; border: 1px solid #5b8dd9;        color: #5b8dd9; }

/* ── Cards ───────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
}
.card-title {
  font-family: var(--font-head); font-weight: 700;
  font-size: .85rem; margin-bottom: 1rem;
  text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted);
}

/* ── Stat cards ──────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.stat-label { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .4rem; }
.stat-value { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; }
.stat-value.accent  { color: var(--accent); }
.stat-value.success { color: var(--accent2); }
.stat-value.danger  { color: var(--danger); }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.1rem; border-radius: var(--radius);
  font-family: var(--font-mono); font-size: .82rem; font-weight: 500;
  border: none; cursor: pointer; transition: opacity .15s, transform .1s;
  white-space: nowrap;
}
.btn:hover { opacity: .85; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #000; }
.btn-success { background: var(--accent2); color: #000; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-ghost   { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-sm { padding: .35rem .75rem; font-size: .76rem; }

/* ── Table ───────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .83rem; }
th {
  text-align: left; padding: .6rem .8rem;
  font-family: var(--font-head); font-size: .7rem;
  text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
td { padding: .65rem .8rem; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface2); }

/* ── Forms ───────────────────────────────────────────────────────── */
.form-grid { display: grid; gap: 1rem; }
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: .35rem; }
label { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
input, select, textarea {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-mono); font-size: .85rem;
  padding: .6rem .8rem;
  width: 100%;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
}
textarea { resize: vertical; min-height: 80px; }

/* ── Badge ───────────────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: .2rem .55rem;
  border-radius: 100px; font-size: .7rem; font-weight: 500;
}
.badge-success { background: #1a2e1a; color: var(--accent2); }
.badge-danger  { background: #2e1a1a; color: var(--danger); }
.badge-warning { background: #2e261a; color: var(--accent); }
.badge-info    { background: #1a222e; color: #5b8dd9; }

/* ── PDV específico ──────────────────────────────────────────────── */
.pdv-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.2rem;
  height: calc(100vh - 4rem);
}
.pdv-left { display: flex; flex-direction: column; gap: 1rem; overflow: hidden; }
.pdv-right { display: flex; flex-direction: column; gap: 1rem; }

.barcode-bar {
  display: flex; gap: .6rem; align-items: center;
}
.barcode-input {
  flex: 1; font-size: 1rem; padding: .7rem 1rem;
  border-color: var(--accent);
}
.cart-list { flex: 1; overflow-y: auto; }
.cart-item {
  display: flex; align-items: center; gap: .8rem;
  padding: .6rem .8rem;
  border-bottom: 1px solid var(--border);
  font-size: .83rem;
}
.cart-item:hover { background: var(--surface2); }
.cart-item-name { flex: 1; }
.cart-item-qty {
  display: flex; align-items: center; gap: .4rem;
}
.qty-btn {
  width: 24px; height: 24px; border-radius: 4px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); cursor: pointer; font-size: .9rem;
  display: grid; place-items: center;
}
.qty-btn:hover { border-color: var(--accent); color: var(--accent); }
.cart-item-price { font-family: var(--font-head); font-weight: 700; color: var(--accent); min-width: 70px; text-align: right; }
.cart-remove { color: var(--danger); cursor: pointer; font-size: .85rem; }

.total-panel { background: var(--surface2); border-radius: var(--radius); padding: 1rem; }
.total-row { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: .4rem; }
.total-row.big { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.payment-btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .5rem; margin: .8rem 0; }
.pay-btn {
  padding: .6rem; border-radius: var(--radius);
  border: 2px solid var(--border); background: transparent;
  color: var(--text-muted); cursor: pointer; font-family: var(--font-mono); font-size: .78rem;
  transition: all .15s; text-align: center;
}
.pay-btn:hover, .pay-btn.selected { border-color: var(--accent); color: var(--accent); background: #1f180d; }

/* ── Login ───────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center;
  background: radial-gradient(ellipse at center, #1a1208 0%, var(--bg) 70%);
}
.login-box { width: 380px; }
.login-logo {
  text-align: center; margin-bottom: 2rem;
  font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: var(--accent);
}
.login-logo small { display: block; font-size: .8rem; color: var(--text-muted); font-weight: 400; margin-top: .2rem; }

/* ── Cupom de impressão ──────────────────────────────────────────── */
@media print {
  .sidebar, .no-print { display: none !important; }
  main.with-sidebar { margin-left: 0; }
  body { background: white; color: black; font-family: monospace; }
  .cupom { max-width: 300px; margin: 0 auto; font-size: 12px; }
}

/* ── Utilitários ─────────────────────────────────────────────────── */
.text-right  { text-align: right; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-success{ color: var(--accent2); }
.text-danger { color: var(--danger); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

/* Estoque mínimo alerta */
.row-alert td { background: #2e1a1a22; }
.row-alert td:first-child { border-left: 3px solid var(--danger); }

/* ─────────────────────────────────────────────────────────────────
   Easy Menu — específico
   ───────────────────────────────────────────────────────────────── */

/* Kanban */
.kanban {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 1100px) { .kanban { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .kanban { grid-template-columns: 1fr; } }

.kanban-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .8rem;
  min-height: 400px;
}
.kanban-col h5 {
  font-family: var(--font-head);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: .8rem;
  display: flex; justify-content: space-between; align-items: center;
}

.pedido-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: .7rem .8rem;
  margin-bottom: .6rem;
}
.pedido-card .num {
  font-family: var(--font-head); font-weight: 800;
  font-size: 1.1rem; color: var(--accent);
}
.pedido-card .cliente { font-size: .8rem; color: var(--text); margin-top: .15rem; }
.pedido-card .meta { font-size: .7rem; color: var(--text-muted); margin-top: .15rem; }
.pedido-card .total {
  font-family: var(--font-head); font-weight: 700;
  font-size: .95rem; color: var(--accent2); margin-top: .3rem;
}
.pedido-card .actions { display: flex; gap: .3rem; margin-top: .6rem; flex-wrap: wrap; }

.pulse-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent2); animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: .5; transform: scale(1.3); }
}

/* Cardápio público (sem sidebar, mais leve) */
body.public {
  background: var(--bg);
  font-family: var(--font-mono);
}
.public-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
  position: sticky; top: 0; z-index: 50;
}
.public-header .inner {
  max-width: 700px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.public-header .nome-site {
  font-family: var(--font-head); font-weight: 800;
  font-size: 1.1rem; color: var(--accent);
}

.public-main { max-width: 700px; margin: 0 auto; padding: 1rem; padding-bottom: 100px; }

.categoria-titulo {
  font-family: var(--font-head); font-weight: 800;
  font-size: 1.1rem; color: var(--accent);
  margin: 1.5rem 0 .7rem;
  border-bottom: 1px solid var(--border); padding-bottom: .4rem;
}

.item-row {
  display: flex; gap: 1rem; padding: .8rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: .6rem; cursor: pointer;
  transition: border-color .15s;
}
.item-row:hover { border-color: var(--accent); }
.item-row.indisponivel { opacity: .5; cursor: not-allowed; }
.item-img {
  width: 80px; height: 80px; flex-shrink: 0;
  background-size: cover; background-position: center;
  background-color: var(--surface2); border-radius: var(--radius);
}
.item-body { flex: 1; display: flex; flex-direction: column; }
.item-body h6 { font-size: .92rem; font-weight: 600; margin-bottom: .2rem; }
.item-desc { font-size: .76rem; color: var(--text-muted); flex: 1; }
.item-foot { display: flex; justify-content: space-between; align-items: end; margin-top: .3rem; }
.item-preco { font-family: var(--font-head); font-weight: 700; color: var(--accent); }
.item-tempo { font-size: .7rem; color: var(--text-muted); }

/* Carrinho flutuante */
.cart-fab {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #000;
  padding: .8rem 1.4rem; border-radius: 50px;
  font-family: var(--font-head); font-weight: 700;
  display: flex; align-items: center; gap: .7rem;
  border: 0; cursor: pointer; z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
.cart-fab.escondido { display: none; }
.cart-fab:hover { transform: translateX(-50%) scale(1.04); }

/* Modal simples */
.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,.7);
  display: none; align-items: center; justify-content: center;
  z-index: 200; padding: 1rem;
}
.modal-bg.open { display: flex; }
.modal-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.2rem;
  max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto;
}
.modal-box h3 { font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; margin-bottom: .8rem; }
.modal-close { float: right; cursor: pointer; color: var(--text-muted); font-size: 1.2rem; background:none; border:0; }

/* Status badges */
.badge-aguardando { background:#2e261a; color:var(--accent); }
.badge-em_preparo { background:#1a222e; color:#5b8dd9; }
.badge-pronto     { background:#1a2e1a; color:var(--accent2); }
.badge-finalizado { background:#1f1f1f; color:var(--text-muted); }
.badge-cancelado  { background:#2e1a1a; color:var(--danger); }

