@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;600;700&display=swap');
/* ESPOKADO LANCHE — design system */

:root {
  --green-dark:  #284f42;
  --green-main:  #3f8068;
  --green-light: #73aa8e;
  --green-pale:  #eaf4ed;
  --gold:        #f6ae00;
  --gold-light:  #fff1b8;
  --red:         #bd1915;
  --orange:      #e65b16;
  --blue:        #1679a7;
  --bg:          #f7f0e5;
  --white:       #fffdf8;
  --text:        #251c15;
  --text-muted:  #74695f;
  --border:      #ddd5ca;
  --shadow:      0 18px 38px rgba(96,55,22,.12), 0 4px 10px rgba(96,55,22,.06);
  --radius:      16px;
  --radius-sm:   9px;
  --sidebar-w:   252px;
  --header-h:    60px;
}

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

body {
  font-family: 'DM Sans', 'Plus Jakarta Sans', sans-serif;
  background: radial-gradient(circle at 88% 0%, rgba(246,174,0,.14), transparent 25rem), var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}
.identity-pending .layout { visibility:hidden; }

/* ── Scrollbars ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  border: none; cursor: pointer; font-size: 14px; font-weight: 600;
  transition: all .2s; text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary   { background: var(--green-main); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #f5f5f5; }
.btn-danger    { background: var(--red); color: #fff; }
.btn-danger:hover { background: #a93226; }
.btn-gold      { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #b8943d; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-icon { padding: 8px; border-radius: 50%; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-muted); }
.form-control {
  width: 100%; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); font-size: 14px; background: #fff;
  transition: border-color .2s; outline: none;
}
.form-control:focus { border-color: var(--green-main); }
select.form-control { cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Cards ── */
.card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: 15px;
}
.card-body { padding: 20px; }

/* ── Badges ── */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
}
.badge-green  { background: var(--green-pale); color: var(--green-dark); }
.badge-red    { background: #fde8e6; color: var(--red); }
.badge-orange { background: #fef0e0; color: var(--orange); }
.badge-blue   { background: #e0f0ff; color: var(--blue); }
.badge-gray   { background: #f0f0f0; color: #666; }
.badge-gold   { background: var(--gold-light); color: #8a6c1a; }

/* ── Modal ── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: fadeIn .15s;
}
.modal {
  background: #fff; border-radius: var(--radius); width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: slideUp .2s;
}
.modal-header {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
}
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #999; line-height: 1; }

/* ── Toast notifications ── */
#toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  padding: 12px 18px; border-radius: var(--radius-sm); color: #fff;
  font-size: 14px; font-weight: 500; min-width: 220px;
  box-shadow: 0 4px 20px rgba(0,0,0,.2); animation: slideIn .3s;
  display: flex; align-items: center; gap: 10px;
}
.toast-success { background: var(--green-main); }
.toast-error   { background: var(--red); }
.toast-info    { background: var(--blue); }
.toast-warning { background: var(--orange); }

/* ── Loading ── */
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--green-pale); border-top-color: var(--green-main);
  animation: spin 0.8s linear infinite;
}
.loading-overlay {
  position: fixed; inset: 0; background: rgba(255,255,255,.8);
  z-index: 5000; display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 12px;
}

/* ── Tables ── */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data-table th {
  text-align: left; padding: 12px 16px; font-size: 12px; font-weight: 700;
  color: var(--text-muted); background: var(--bg); border-bottom: 1px solid var(--border);
  text-transform: uppercase; letter-spacing: .5px;
}
table.data-table td { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: #fafafa; }

/* ── Layout SPA ── */
.layout {
  display: flex; min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w); min-height: 100vh;
  background: linear-gradient(165deg, #fffaf1 0%, #f8ead7 100%);
  display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0;
  z-index: 100; transition: transform .3s;
}
.sidebar-logo {
  padding: 22px 18px; border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; gap: 12px;
}
.sidebar-logo img { width: 48px; height: 48px; border-radius: 8px; object-fit: contain; }
.sidebar-logo-text { color: var(--text); }
.sidebar-logo-text .brand { font-size: 17px; font-weight: 900; line-height: 1.1; letter-spacing:.4px; }
.sidebar-logo-text .sub { font-size: 10px; color: rgba(255,255,255,.6); }
.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav-section { padding: 4px 16px 4px; font-size: 10px; font-weight: 700; color: #9b7358; text-transform: uppercase; letter-spacing: 1px; margin-top: 8px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; color: #604c40; cursor: pointer;
  font-size: 14px; font-weight: 500; border-left: 3px solid transparent;
  transition: all .15s; text-decoration: none;
}
.nav-item:hover { background: rgba(189,25,21,.07); color: var(--red); }
.nav-item.active { background: linear-gradient(90deg,rgba(189,25,21,.14),rgba(246,174,0,.10)); color: var(--red); border-left-color: var(--gold); }
.nav-item .icon { width: 18px; text-align: center; font-size: 16px; }
.sidebar-footer {
  padding: 16px; border-top: 1px solid rgba(255,255,255,.1);
  color: #8d6b59; font-size: 12px;
}
.sidebar-user { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sidebar-user .avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
}
.sidebar-user .info .name { color: var(--text); font-size: 13px; font-weight: 600; }
.sidebar-user .info .role { font-size: 11px; }

/* Main Content */
.main-content {
  margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh;
}
.topbar {
  height: var(--header-h); background: rgba(255,253,248,.94); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 0 rgba(7,29,61,.06), 0 5px 18px rgba(7,29,61,.04);
}
.topbar-title { font-size: 18px; font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.page-content { padding: 24px; flex: 1; }

/* Mobile sidebar toggle */
.menu-toggle {
  display: none; background: none; border: none; font-size: 22px; cursor: pointer;
  padding: 4px; color: var(--text);
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 99;
}

/* ── Stats Cards ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: linear-gradient(155deg,#fff 0%,#fffaf0 100%); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px;
  border: 1px solid rgba(47,107,88,.06);
}
.stat-card .stat-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
.stat-card .stat-value { font-size: 28px; font-weight: 900; color: var(--green-dark); font-family:'Barlow Condensed',sans-serif; letter-spacing:.02em; }
.stat-card .stat-icon { font-size: 24px; }
.stat-card.gold .stat-value { color: var(--gold); }
.stat-card.red .stat-value  { color: var(--red); }
.stat-card.blue .stat-value { color: var(--blue); }

/* ── Balcões ── */
.tables-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px;
}
.table-card {
  border-radius: var(--radius); padding: 16px; cursor: pointer;
  text-align: center; transition: all .2s; border: 2px solid transparent;
  background: linear-gradient(160deg,#fff,#fff8e9); box-shadow: var(--shadow);
}
.table-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.table-card.livre   { border-color: #26753b; background: linear-gradient(160deg,#f7fff5,#e5f4df); }
.table-card.ocupada { border-color: var(--red); background: #fff0ee; }
.table-card.conta   { border-color: var(--orange); background: #fff8f0; }
.table-card .t-num  { font-size: 34px; font-weight: 900; color: var(--green-dark); font-family:'Barlow Condensed',sans-serif; }
.table-card .t-name { font-size: 11px; color: var(--text-muted); }
.table-card .t-status { font-size: 12px; margin-top: 4px; }
.table-card .t-total { font-size: 16px; font-weight: 700; color: var(--orange); margin-top: 4px; }

/* ── Menu Cardápio ── */
.menu-categories { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.cat-btn {
  padding: 8px 16px; border-radius: 20px; border: 2px solid var(--border);
  background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s;
}
.cat-btn.active { background: var(--green-main); color: #fff; border-color: var(--green-main); }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); cursor: pointer; transition: transform .2s;
}
.product-card:hover { transform: translateY(-2px); }
.product-card img { width: 100%; height: 140px; object-fit: cover; background: var(--bg); }
.product-card .p-body { padding: 14px; }
.product-card .p-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.product-card .p-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.4; }
.product-card .p-footer { display: flex; justify-content: space-between; align-items: center; }
.product-card .p-price { font-size: 18px; font-weight: 800; color: var(--green-main); }
.product-card .p-time  { font-size: 11px; color: var(--text-muted); }

/* ── KDS (Kitchen Display) ── */
.kds-header {
  background: var(--green-dark); color: #fff; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.kds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; padding: 16px; }
.kds-card {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  background: #fff; display: flex; flex-direction: column;
}
.kds-card.urgente { border: 2px solid var(--red); animation: pulse-red 1.5s infinite; }
.kds-card.atrasado { border: 2px solid var(--orange); }
.kds-card-header {
  padding: 12px 16px; font-weight: 700;
  display: flex; justify-content: space-between; align-items: center;
}
.kds-card-header.pendente  { background: var(--green-pale); color: var(--green-dark); }
.kds-card-header.cozinha   { background: #fff3cd; color: #856404; }
.kds-card-header.pronta    { background: #d1ecf1; color: #0c5460; }
.kds-items { flex: 1; padding: 12px 16px; }
.kds-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14px;
}
.kds-item:last-child { border-bottom: none; }
.kds-item .qty { font-weight: 800; min-width: 24px; font-size: 16px; color: var(--green-dark); }
.kds-item .item-name { flex: 1; }
.kds-item .item-notes { font-size: 11px; color: var(--orange); font-style: italic; }
.kds-item .item-check { cursor: pointer; font-size: 20px; }
.kds-timer { font-size: 24px; font-weight: 800; }
.kds-timer.normal  { color: var(--green-main); }
.kds-timer.warn    { color: var(--orange); }
.kds-timer.danger  { color: var(--red); }
.kds-card-footer { padding: 10px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; }

/* ── Cliente tablet menu ── */
.customer-header {
  background: var(--green-dark); padding: 16px 20px;
  color: #fff; position: sticky; top: 0; z-index: 10;
}
.customer-cart-badge {
  position: relative; display: inline-block;
}
.customer-cart-badge .count {
  position: absolute; top: -8px; right: -8px;
  background: var(--gold); color: #fff; width: 20px; height: 20px;
  border-radius: 50%; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.cart-drawer {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -4px 30px rgba(0,0,0,.15);
  z-index: 200; transform: translateY(100%); transition: transform .3s;
  max-height: 70vh; overflow-y: auto; padding: 20px;
}
.cart-drawer.open { transform: translateY(0); }

/* ── Animações ── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-red { 0%,100% { box-shadow: 0 0 0 0 rgba(192,57,43,.4); } 50% { box-shadow: 0 0 0 8px rgba(192,57,43,0); } }

/* ── Login page ── */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    linear-gradient(rgba(12,8,5,.55),rgba(12,8,5,.84)),
    radial-gradient(circle at 18% 24%, rgba(246,181,22,.27), transparent 27rem),
    radial-gradient(circle at 86% 75%, rgba(184,23,23,.38), transparent 32rem),
    linear-gradient(135deg, #100806 0%, #3e0a08 48%, #160806 100%);
  padding: 20px;
}
.login-card {
  background: rgba(255,253,248,.98); border-radius: 26px; padding: 38px 36px;
  width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: slideUp .4s;
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo img { width: 120px; height: auto; }
.login-logo h1 { font-size: 22px; font-weight: 800; color: var(--green-dark); margin-top: 12px; }
.login-logo p { color: var(--text-muted); font-size: 13px; }
.login-logo .brand-mark {
  width: 104px;
  height: 104px;
  border-radius: 30px;
  border-width: 4px;
  box-shadow: 0 10px 0 #9f1017, 0 20px 34px rgba(7,29,61,.28);
}

.brand-mark {
  width: 70px; height: 70px; margin: 0 auto 14px; border-radius: 22px;
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-weight:900; font-size:24px; letter-spacing:-1px;
  background:linear-gradient(145deg,var(--green-main),var(--green-dark));
  box-shadow:0 12px 28px rgba(23,63,53,.28);
  position:relative;
}
.brand-mark::after {
  content:""; width:12px; height:12px; border-radius:50%; background:var(--gold);
  position:absolute; right:10px; top:10px; box-shadow:0 0 0 4px rgba(255,255,255,.18);
}
.store-hero {
  background:linear-gradient(135deg,var(--green-dark),var(--green-main));
  color:#fff; border-radius:22px; padding:24px; margin-bottom:22px;
  display:flex; align-items:center; justify-content:space-between; gap:18px;
  box-shadow:0 16px 38px rgba(23,63,53,.18);
}
.store-hero h2 { font-size:24px; line-height:1.15; margin-bottom:6px; }
.store-hero p { color:rgba(255,255,255,.72); font-size:13px; }
.store-hero .hero-chip { background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.18); padding:9px 13px; border-radius:999px; font-size:12px; font-weight:700; white-space:nowrap; }

/* ── Configuração fiscal guiada ── */
.fiscal-steps {
  display:grid; grid-template-columns:1fr auto 1fr auto 1fr; gap:10px;
  align-items:center; margin-bottom:16px;
}
.fiscal-step-pill {
  display:flex; align-items:center; gap:10px; background:#fff; border:1px solid rgba(11,79,145,.12);
  border-radius:14px; padding:12px 14px; box-shadow:0 6px 18px rgba(7,29,61,.06);
}
.fiscal-step-pill > span, .fiscal-section-number {
  width:30px; height:30px; flex:0 0 30px; display:inline-flex; align-items:center; justify-content:center;
  border-radius:50%; background:var(--green-main); color:#fff; font-size:13px; font-weight:800;
}
.fiscal-step-pill div, .fiscal-form-section summary div, .fiscal-save-bar div { display:flex; flex-direction:column; gap:2px; }
.fiscal-step-pill b { color:var(--green-dark); font-size:13px; }
.fiscal-step-pill small, .fiscal-form-section summary small, .fiscal-save-bar small { color:var(--text-muted); font-size:11px; }
.fiscal-step-arrow { color:var(--text-muted); font-size:24px; }
.fiscal-guidance {
  padding:13px 15px; margin-bottom:14px; border-radius:12px; background:#eef6ff;
  color:#123d6b; border:1px solid #d7e9fb; font-size:13px;
}
.fiscal-form-section {
  border:1px solid rgba(11,79,145,.14); border-radius:14px; margin-bottom:12px;
  overflow:hidden; background:#fff;
}
.fiscal-form-section summary {
  display:flex; align-items:center; gap:11px; padding:14px 16px; cursor:pointer;
  list-style:none; background:#fbfcfe;
}
.fiscal-form-section summary::-webkit-details-marker { display:none; }
.fiscal-form-section summary::after {
  content:'⌄'; margin-left:auto; color:var(--text-muted); font-size:18px; transition:transform .2s;
}
.fiscal-form-section[open] summary::after { transform:rotate(180deg); }
.fiscal-form-section[open] summary { border-bottom:1px solid rgba(11,79,145,.10); }
.fiscal-section-content { padding:16px; }
.fiscal-accountant-warning, .fiscal-security-note {
  padding:12px 14px; border-radius:10px; font-size:12px; margin-bottom:14px;
}
.fiscal-accountant-warning { background:#fff7df; color:#745600; border:1px solid #f5df9a; }
.fiscal-security-note { background:#eef6ff; color:#123d6b; border:1px solid #d7e9fb; }
.fiscal-save-bar {
  display:flex; justify-content:space-between; align-items:center; gap:16px;
  position:sticky; bottom:10px; padding:14px 16px; margin-top:16px;
  background:rgba(255,255,255,.97); border:1px solid rgba(11,79,145,.14);
  border-radius:14px; box-shadow:0 10px 30px rgba(7,29,61,.12);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { display: block; opacity: 0; pointer-events: none; transition: opacity .3s; }
  .sidebar-overlay.open { opacity: 1; pointer-events: all; }
  .main-content { margin-left: 0; }
  .menu-toggle { display: block; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .topbar { padding: 0 16px; }
  .page-content { padding: 16px; }
  .kds-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tables-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-header { padding: 14px 16px; }
  .card-body { padding: 16px; }
  .topbar-title { font-size: 16px; }
  .topbar-actions { gap: 7px; }
  .topbar-actions > span:not(.notification-bell) { display: none !important; }
  .store-hero { border-radius: 16px; padding: 18px; }
  .store-hero h2 { font-size: 20px; }
  .fiscal-steps { grid-template-columns:1fr; gap:8px; }
  .fiscal-step-arrow { display:none; }
  .fiscal-save-bar { align-items:stretch; flex-direction:column; bottom:6px; }
  .fiscal-save-bar .btn { width:100%; }
  #dashGrid { grid-template-columns: 1fr !important; }
  .table-responsive { margin: 0 -16px; padding: 0 16px; }
  table.data-table { min-width: 620px; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { border-radius: 20px 20px 0 0; max-height: 92dvh; }
  .modal-body { padding: 20px; }
  .users-table-wrap { margin: 0; padding: 0; overflow: visible; }
  .users-table { min-width: 0 !important; display: block; }
  .users-table thead { display: none; }
  .users-table tbody { display: grid; gap: 12px; }
  .users-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px 14px;
    padding: 16px;
    background: var(--white);
    border: 1px solid rgba(11,79,145,.12);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
  .users-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 !important;
    border: 0 !important;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .users-table td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .users-table td:nth-child(1),
  .users-table td:nth-child(2) { grid-column: 1 / -1; }
  .users-table .user-actions { justify-content: flex-end; }
  .users-table .user-actions::before { display: none; }
}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
  .tables-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: 1fr; }
}

/* ── Misc ── */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.w-full { width: 100%; }
.online-dot { width:8px; height:8px; border-radius:50%; background:var(--green-light); display:inline-block; }
.offline-dot { width:8px; height:8px; border-radius:50%; background:var(--red); display:inline-block; }

/* Fair rotation + consistency monitoring */
.shift-card { margin:0 0 18px; border:1px solid rgba(189,25,21,.16); background:linear-gradient(135deg,#fffdf8,#fff4d8); }
.shift-card .card-body { padding:18px; }
.shift-top { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; }
.shift-kicker,.security-kicker { font-size:10px; letter-spacing:.12em; font-weight:800; color:var(--red); text-transform:uppercase; }
.shift-title { font-size:22px; font-weight:900; color:var(--green-dark); margin:3px 0; }
.shift-copy { font-size:12px; color:var(--text-muted); max-width:560px; }
.shift-control { min-width:145px; justify-content:center; padding:14px 18px; font-size:15px; }
.shift-metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:16px; }
.shift-metric { background:rgba(255,255,255,.72); border:1px solid rgba(189,25,21,.1); border-radius:12px; padding:10px; }
.shift-metric strong { display:block; font:800 24px 'Barlow Condensed',sans-serif; color:var(--red); }
.shift-metric span { display:block; font-size:10px; color:var(--text-muted); line-height:1.2; }
.shift-offline { margin-top:12px; padding:10px 12px; border-radius:10px; background:#fff0ee; color:var(--red); font-size:12px; font-weight:700; }
.shift-assignments { display:flex; flex-wrap:wrap; gap:6px 12px; margin-top:12px; padding:11px 13px; border-radius:12px; background:rgba(189,25,21,.06); border:1px solid rgba(189,25,21,.12); font-size:12px; }
.shift-assignments b { color:var(--red); }
.shift-assignments span { color:var(--text-muted); }
.rotation-list { display:grid; gap:10px; }
.rotation-row,.assignment-row { display:flex; align-items:center; gap:12px; padding:14px; border:1px solid var(--border); border-radius:14px; background:var(--white); }
.rotation-row.next { border-color:var(--gold); background:linear-gradient(100deg,#fff8dc,#fffdf8); box-shadow:0 5px 0 rgba(246,174,0,.16); }
.rotation-position { width:34px; height:34px; display:grid; place-items:center; border-radius:11px; background:var(--bg); color:var(--red); font-weight:900; }
.rotation-row.next .rotation-position { background:var(--gold); color:#5d4300; }
.rotation-main { flex:1; min-width:0; }
.rotation-main b { display:block; }
.rotation-main small { color:var(--text-muted); font-size:11px; }
.rotation-count { text-align:right; font:800 22px 'Barlow Condensed',sans-serif; color:var(--red); }
.rotation-count small { display:block; font:600 10px 'DM Sans',sans-serif; color:var(--text-muted); }
.security-toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:16px; }
.alert-nav-badge { background:var(--red); color:#fff; border-radius:999px; padding:1px 7px; font-size:10px; margin-left:auto; }
.security-alerts { display:grid; gap:12px; }
.security-alert { border-left:5px solid var(--gold); }
.security-alert.critical { border-left-color:var(--red); }
.security-alert.high { border-left-color:var(--orange); }
.security-alert .card-header { align-items:flex-start; gap:10px; }
.security-alert-title { flex:1; }
.security-alert-title b { display:block; font-size:15px; }
.security-alert-title small { color:var(--text-muted); font-size:11px; }
.security-details { color:var(--text-muted); font-size:13px; white-space:pre-line; }
.security-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }
.security-empty { background:linear-gradient(135deg,#fffdf8,#fff6df); border:1px dashed #e3c878; }

/* ── Impressoras · operação quente, acabamento premium ── */
.printer-hero { background:linear-gradient(118deg,#741b1d 0%,#a9362d 52%,#c97839 100%); color:#fff; border-radius:24px; padding:28px; margin-bottom:18px; display:flex; justify-content:space-between; align-items:center; gap:20px; box-shadow:0 16px 34px rgba(116,27,29,.2); position:relative; overflow:hidden; }
.printer-hero:after { content:""; position:absolute; width:260px; height:260px; border:1px solid rgba(255,239,194,.22); border-radius:50%; right:-80px; top:-100px; }
.printer-kicker { display:block; color:#b98236; font-size:10px; font-weight:900; letter-spacing:.14em; text-transform:uppercase; margin-bottom:5px; }
.printer-hero .printer-kicker { color:#f7d89a; }
.printer-hero h2 { font:800 30px/1.08 'Barlow Condensed',sans-serif; letter-spacing:.01em; margin-bottom:8px; }
.printer-hero p { max-width:600px; color:rgba(255,255,255,.78); font-size:13px; }
.printer-hero-mark { width:74px; height:74px; border:1px solid rgba(255,255,255,.3); border-radius:22px; display:grid; place-items:center; font-size:38px; color:#f5d49a; transform:rotate(-5deg); z-index:1; }
.printer-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-bottom:18px; }
.printer-stat { background:linear-gradient(145deg,#fffdf8,#fff3dd); border:1px solid rgba(178,112,48,.16); border-radius:16px; padding:16px 18px; min-height:106px; position:relative; }
.printer-stat-icon { color:#a9362d; font-size:20px; position:absolute; right:16px; top:14px; }
.printer-stat small { color:var(--text-muted); display:block; font-size:11px; text-transform:uppercase; letter-spacing:.06em; font-weight:800; max-width:75%; }
.printer-stat strong { color:#741b1d; display:block; font:800 31px 'Barlow Condensed',sans-serif; margin-top:12px; }
.printer-stat em { font:600 12px 'DM Sans',sans-serif; color:var(--text-muted); }
.printer-setup { margin-bottom:22px; border:1px solid rgba(178,112,48,.18); }
.printer-setup .card-header { align-items:flex-start; gap:14px; }
.printer-setup .card-header b { display:block; font-size:18px; }
.printer-steps { display:grid; grid-template-columns:repeat(4,1fr); gap:0; padding:20px; }
.printer-step { padding:0 16px; border-right:1px solid #eadfce; display:flex; flex-direction:column; gap:5px; }
.printer-step:first-child { padding-left:0; }.printer-step:last-child { border:0; padding-right:0; }
.printer-step b { color:#a9362d; font:800 23px 'Barlow Condensed',sans-serif; }.printer-step strong { color:#741b1d; font-size:13px; }.printer-step span { color:var(--text-muted); font-size:11px; line-height:1.45; }
.printer-note { margin:0 20px 20px; padding:11px 13px; color:#795d22; background:#fff7df; border:1px solid #f2dda2; border-radius:10px; font-size:12px; }
.printer-toolbar { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; margin:20px 0 12px; }.printer-toolbar h3 { color:#741b1d; font-size:20px; }.printer-toolbar p,.printer-jobs .card-header small { color:var(--text-muted); font-size:12px; display:block; }.printer-toolbar-actions { display:flex; gap:8px; flex-wrap:wrap; }
.printer-loading { display:grid; gap:12px; }.printer-skeleton { height:170px; border-radius:16px; background:linear-gradient(90deg,#f1e8dc,#fff8ed,#f1e8dc); background-size:200% 100%; animation:printerShimmer 1.4s infinite; }.printer-station { margin-bottom:14px; border:1px solid rgba(178,112,48,.18); }.printer-station-head { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:18px 20px 12px; }.printer-station-title,.printer-station-actions,.printer-device-main,.printer-device-actions { display:flex; align-items:center; gap:10px; }.printer-station-title h3 { color:#741b1d; font-size:17px; }.printer-station-title small,.printer-device-main small { display:block; color:var(--text-muted); font-size:11px; }.printer-live,.printer-offline { width:10px; height:10px; border-radius:50%; background:#3f8068; box-shadow:0 0 0 4px rgba(63,128,104,.12); flex:none; }.printer-offline { background:#bd1915; box-shadow:0 0 0 4px rgba(189,25,21,.1); }.printer-station-meta { display:flex; gap:20px; flex-wrap:wrap; padding:0 20px 14px; color:var(--text-muted); font-size:11px; border-bottom:1px solid var(--border); }.printer-station-meta b { color:var(--text); }.printer-devices { padding:8px 20px 0; }.printer-device { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:13px 0; border-bottom:1px dashed #e4d9ca; }.printer-device:last-child { border-bottom:0; }.printer-device.is-waiting { background:#fffaf0; margin:0 -10px; padding-left:10px; padding-right:10px; border-radius:10px; }.printer-device-icon { width:34px; height:34px; display:grid; place-items:center; background:#f8e6d1; border-radius:10px; color:#a9362d; font-size:20px; }.printer-device-main { min-width:0; }.printer-device-main strong { display:block; font-size:13px; }.printer-channel-list { display:block; color:#a36a2f; font-size:10px; margin-top:3px; }.printer-device-actions { justify-content:flex-end; flex-wrap:wrap; }.printer-device-empty,.printer-empty,.printer-error { text-align:center; padding:28px 20px; color:var(--text-muted); }.printer-add-device { background:none; border:0; border-top:1px solid var(--border); width:100%; padding:13px; color:#a9362d; cursor:pointer; font-weight:800; font-size:12px; }.printer-empty-mark { display:block; color:#b98236; font-size:40px; margin-bottom:4px; }.printer-empty h3,.printer-error h3 { color:#741b1d; margin-bottom:5px; }.printer-empty p,.printer-error p { font-size:13px; margin-bottom:14px; }.printer-jobs { margin-top:20px; border:1px solid rgba(178,112,48,.18); }.printer-jobs .card-header > div { display:flex; flex-direction:column; gap:3px; }.printer-jobs-table td small { display:block; color:var(--text-muted); font-size:11px; }.printer-job-error { max-width:250px; color:#9a5b48; font-size:11px; }.printer-job-actions { display:flex; gap:5px; justify-content:flex-end; }.printer-modal .modal-header h3 { color:#741b1d; }.printer-form-intro { color:var(--text-muted); font-size:13px; margin-bottom:18px; }.printer-check { display:flex; align-items:center; gap:8px; font-size:13px; font-weight:700; }.printer-channel-title { font-size:12px; color:var(--text-muted); font-weight:800; margin:18px 0 8px; }.printer-channels { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }.printer-channels label { border:1px solid var(--border); border-radius:9px; padding:9px; font-size:12px; cursor:pointer; }.credential-warning { background:#fff1df; color:#7a4c17; border:1px solid #efcf93; border-radius:12px; padding:14px; display:flex; flex-direction:column; gap:4px; font-size:13px; margin-bottom:16px; }.credential-warning span { font-size:11px; }.credential-field { margin-bottom:12px; }.credential-field label { display:block; color:var(--text-muted); font-size:11px; font-weight:800; margin-bottom:4px; }.credential-field > div { display:flex; gap:8px; align-items:center; }.credential-field code { flex:1; overflow:auto; background:#f7f0e5; border:1px solid var(--border); padding:10px; border-radius:8px; color:#741b1d; font-size:12px; }.printer-server-note { color:var(--text-muted); font-size:12px; padding-top:6px; }
@keyframes printerShimmer { to { background-position:-200% 0; } }
@media (max-width:768px) {
  .shift-top { flex-direction:column; }
  .shift-control { width:100%; }
  .shift-metrics { grid-template-columns:repeat(2,1fr); }
  .rotation-row,.assignment-row { align-items:flex-start; }
  .rotation-count { margin-left:auto; }
  .security-toolbar .btn { flex:1; }
}

/* v11 — operação tátil, profundidade controlada e hierarquia móvel */
:root {
  --surface: #fffaf2;
  --surface-strong: #fffdf8;
  --ink: #2a1b16;
  --line-strong: rgba(96,48,29,.20);
  --shadow-lift: 0 12px 0 rgba(125,14,11,.10), 0 24px 42px rgba(72,34,15,.13), inset 0 1px 0 rgba(255,255,255,.9);
}
body { color: var(--ink); }
.card, .stat-card, .operations-panel, .store-hero, .table-card, .product-card {
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lift);
}
.card { background: linear-gradient(145deg,var(--surface-strong),var(--surface)); }
.card-header { min-height: 58px; border-bottom: 1px solid var(--line-strong); }
.btn { min-height: 42px; border: 1px solid rgba(42,27,22,.13); box-shadow: 0 3px 0 rgba(42,27,22,.10); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.form-control { min-height: 44px; border: 2px solid var(--line-strong); background: #fffdf8; }
.sidebar { background: linear-gradient(165deg,#fffaf0,#f3dfc8); border-right: 1px solid rgba(125,14,11,.15); box-shadow: 12px 0 30px rgba(83,37,18,.08); }
.sidebar-logo { position: sticky; top: 0; z-index: 2; background: rgba(255,250,240,.95); border-bottom: 1px solid var(--line-strong); }
.sidebar-logo-text .sub { color: var(--text-muted); }
.sidebar-close { display:none; margin-left:auto; width:38px; height:38px; border:1px solid var(--line-strong); border-radius:10px; background:var(--surface-strong); color:var(--red); font-size:25px; line-height:1; cursor:pointer; }
.sidebar-nav { padding: 14px 10px; }
.nav-section { margin: 14px 8px 6px; padding: 8px 10px 5px; border-top: 1px solid rgba(125,14,11,.14); font-size: 10px; }
.nav-group-toggle { display:flex; width:calc(100% - 16px); margin:14px 8px 4px; padding:8px 10px 5px; justify-content:space-between; align-items:center; border:0; border-top:1px solid rgba(125,14,11,.14); background:none; color:#9b7358; font-size:10px; font-weight:800; letter-spacing:1px; text-transform:uppercase; cursor:pointer; }
.nav-group-toggle span { font-size:14px; }
.nav-item { min-height: 46px; margin: 2px 0; border-radius: 11px; border-left-width: 3px; padding: 11px 13px; }
.nav-item.active { box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 4px 12px rgba(125,14,11,.10); }
.sidebar-footer { background: rgba(255,253,248,.55); border-top: 1px solid var(--line-strong); }
.topbar { min-height: var(--header-h); background: rgba(255,253,248,.96); }
.page-content { max-width: 1540px; width: 100%; margin: 0 auto; }
.section.active { animation: sectionIn .22s ease both; }
.stat-card { min-height: 138px; padding: 22px; border-top: 3px solid var(--green-main); }
.stat-card.gold { border-top-color: var(--gold); }
.stat-card.red { border-top-color: var(--red); }
.stat-card.blue { border-top-color: var(--blue); }
.stat-card .stat-value { font-size: 34px; }
.operations-panel { background: rgba(255,253,248,.75); }
.order-stage { border: 1px solid var(--line-strong); box-shadow: inset 0 1px 0 #fff, 0 8px 16px rgba(68,32,12,.06); }
.users-access-card { border-left: 5px solid var(--gold); }
.access-link-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 0; border-bottom:1px solid var(--line-strong); }
.access-link-row:last-child { border-bottom:0; }
.access-link-row code { color:var(--red); font-size:12px; overflow-wrap:anywhere; }
.access-link-actions { display:flex; gap:6px; flex:0 0 auto; }
.role-note { padding:12px 14px; border:1px solid #edd18a; border-radius:12px; background:#fff7dc; color:#6d5100; font-size:12px; }
@keyframes sectionIn { from { opacity: .7; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width:768px) {
  .sidebar { width: min(86vw, 330px); }
  .sidebar-logo { padding: 14px; }
  .sidebar-close { display:grid; place-items:center; }
  .sidebar-nav { padding: 10px 12px 18px; }
  .sidebar-footer { padding: 12px; }
  .page-content { padding: 14px; }
  .topbar { padding: 0 12px; }
  .topbar-title { font-size: 15px; }
  .stat-card { min-height: 112px; padding: 16px; }
  .stat-card .stat-value { font-size: 29px; }
  .access-link-row { align-items:flex-start; flex-direction:column; }
  .access-link-actions { width:100%; }
  .access-link-actions .btn { flex:1; justify-content:center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:.01ms !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
}

.section { display: none; }
.section.active { display: block; }

.order-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; margin-bottom: 16px;
}
.order-card-header {
  padding: 14px 16px; display: flex; align-items: center;
  justify-content: space-between; border-bottom: 1px solid var(--border);
}
.order-items-list { padding: 12px 16px; }
.order-item-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; font-size: 14px; border-bottom: 1px dashed #f0f0f0;
}
.order-item-row:last-child { border-bottom: none; }
.order-total { padding: 12px 16px; background: var(--bg); font-weight: 700; font-size: 16px; display: flex; justify-content: space-between; }

.payment-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.pm-btn {
  padding: 14px 8px; border-radius: var(--radius-sm); border: 2px solid var(--border);
  background: #fff; cursor: pointer; text-align: center; transition: all .2s;
  font-size: 12px; font-weight: 600;
}
.pm-btn .pm-icon { font-size: 22px; display: block; margin-bottom: 4px; }
.pm-btn.selected { border-color: var(--green-main); background: var(--green-pale); }
.pm-btn:hover { border-color: var(--green-light); }

.report-chart { display: flex; flex-direction: column; gap: 8px; }
.chart-bar-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.chart-bar-label { width: 120px; text-align: right; color: var(--text-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-bar-wrap { flex: 1; background: var(--bg); border-radius: 4px; overflow: hidden; height: 22px; }
.chart-bar { height: 100%; background: var(--green-main); border-radius: 4px; transition: width .5s; display: flex; align-items: center; padding: 0 8px; }
.chart-bar-val { font-size: 11px; color: #fff; font-weight: 700; }

.notification-bell { position: relative; cursor: pointer; }
.notification-bell .badge-count {
  position: absolute; top: -6px; right: -6px;
  background: var(--red); color: #fff; width: 18px; height: 18px;
  border-radius: 50%; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.summary-box {
  background: var(--green-pale); border-radius: var(--radius-sm);
  padding: 16px; margin-bottom: 16px;
}
.summary-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.summary-row.total { font-weight: 800; font-size: 18px; border-top: 1px solid #ccc; margin-top: 8px; padding-top: 8px; }

/* tab pills */
.tab-pills { display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: var(--radius-sm); margin-bottom: 20px; }
.tab-pill { flex: 1; padding: 8px 4px; text-align: center; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text-muted); }
.tab-pill.active { background: #fff; color: var(--green-dark); box-shadow: 0 1px 6px rgba(0,0,0,.1); }

/* Brand layer: dimensional yellow/red/blue identity, without changing JS contracts. */
.brand-mark { overflow: hidden; background: #090909; border: 3px solid var(--red); box-shadow: 0 8px 18px rgba(35,20,10,.32); }
.brand-mark::after { display: none; }
.brand-mark img, .brand-logo { width: 100%; height: 100%; object-fit: cover; display: block; }
.sidebar-logo .brand-logo { width: 48px; height: 48px; border-radius: 10px; }
.stat-card { border-top: 4px solid var(--green-main); position: relative; }
.stat-card.gold { border-top-color: var(--gold); }
.stat-card.red { border-top-color: var(--red); }
.stat-card.blue { border-top-color: var(--blue); }
.stat-card .stat-icon { color: var(--red); }
.btn-primary { background: linear-gradient(145deg, #d12620, #8f0f0d); box-shadow: 0 5px 0 #5d0b09, 0 8px 15px rgba(143,15,13,.22); }
.btn-primary:hover { background: linear-gradient(145deg, #e53a31, #a51613); transform: translateY(-1px); }
.btn-gold { background: linear-gradient(145deg, #ffd329, #e9a900); color: #342500; box-shadow: 0 5px 0 #bd8500; }
.card, .stat-card, .order-card, .product-card, .table-card { border: 1px solid rgba(11,79,145,.08); }
.section.active { animation: sectionIn .22s ease both; }
@keyframes sectionIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 400px) {
  .page-content { padding: 12px; }
  .stats-grid { gap: 8px; }
  .stat-card { padding: 14px 12px; }
  .stat-card .stat-value { font-size: 22px; }
  .stat-card .stat-icon { font-size: 19px; }
}

/* ESPOKADO 3D operations layer */
.sidebar-logo { background: rgba(255,255,255,.4); }
.sidebar-footer { border-top-color: rgba(123,79,48,.15); }
.topbar { background: rgba(255,250,241,.92); }
.btn { border-radius: 12px; box-shadow: 0 4px 0 rgba(91,32,24,.12), 0 9px 16px rgba(91,32,24,.08); }
.btn-secondary { background: #fffaf2; }
.card, .stat-card, .order-card, .product-card, .table-card { box-shadow: var(--shadow), inset 0 1px rgba(255,255,255,.85); }
.table-card { min-height: 152px; position:relative; overflow:hidden; }
.table-card::before { content:""; position:absolute; width:90px; height:90px; border-radius:50%; right:-34px; top:-34px; background:rgba(246,174,0,.14); }
.table-card .t-num { position:relative; }
.channel-sales-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:0 0 18px; }
.channel-sales-card { padding:18px; border-radius:18px; background:linear-gradient(145deg,#fffdf8,#f5e3ca); border:1px solid rgba(189,25,21,.12); box-shadow:var(--shadow); }
.channel-sales-card strong { display:block; font-size:25px; color:var(--red); margin-top:5px; }
.channel-sales-card small { color:var(--text-muted); font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
.control-banner { padding:16px 18px; border-radius:16px; background:#fff8e9; border:1px solid #efd59e; color:#725327; margin-bottom:16px; }
.release-row, .driver-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 0; border-bottom:1px solid var(--border); }
.release-row:last-child, .driver-row:last-child { border-bottom:0; }
.assignment-address { display:flex; flex-direction:column; gap:5px; margin:14px 0; padding:14px; border-radius:14px; background:var(--gold-light); border:1px solid rgba(209,141,0,.2); }
.assignment-address span { color:var(--text-muted); }
.assignment-address a { color:var(--red); font-weight:800; }
.table-card.assigned-elsewhere { opacity:.72; cursor:not-allowed; }
.table-assignee { margin-top:7px; font-size:11px; font-weight:800; color:var(--red); }
.mobile-flow { max-width:720px; }
@media(max-width:700px){ .channel-sales-grid{grid-template-columns:1fr 1fr}.channel-sales-card strong{font-size:20px}.release-row,.driver-row{align-items:flex-start;flex-direction:column}.release-row .btn,.driver-row .btn{width:100%} }
.login-page { background: radial-gradient(circle at 18% 20%, rgba(246,174,0,.22), transparent 25rem), linear-gradient(135deg,#f9eddb,#f5cfc2 55%,#f8e7c8); }
.login-card { border:1px solid rgba(189,25,21,.12); box-shadow:0 24px 55px rgba(100,48,25,.18); }
.customer-header { background: linear-gradient(135deg,#7f1718,#b5251d) !important; }

/* ── Owner order board: a dense, dimensional three-stage control surface ── */
.operations-panel {
  margin: 26px 0 18px;
  padding: 22px;
  border: 1px solid rgba(37,28,21,.1);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,253,248,.98), rgba(249,242,229,.93));
  box-shadow: 0 18px 42px rgba(45,25,11,.12), inset 0 1px rgba(255,255,255,.9);
}
.operations-heading {
  display:flex; align-items:flex-end; justify-content:space-between; gap:16px;
  margin-bottom:18px;
}
.section-eyebrow { color:var(--red); font-size:10px; font-weight:800; letter-spacing:.16em; }
.operations-heading h3 { margin-top:3px; font-size:22px; letter-spacing:-.03em; }
.operations-meta { color:var(--text-muted); font-size:11px; font-weight:700; white-space:nowrap; }
.live-pip { display:inline-block; width:7px; height:7px; margin-right:5px; border-radius:50%; background:#2f8b55; box-shadow:0 0 0 4px rgba(47,139,85,.13); }
.order-board { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.order-stage {
  min-height:270px; padding:16px; border-radius:17px; overflow:hidden;
  background:#fff; border:1px solid rgba(37,28,21,.1);
  box-shadow:0 8px 18px rgba(45,25,11,.08);
  position:relative;
}
.order-stage::before { content:""; position:absolute; inset:0 0 auto; height:4px; background:var(--stage-color); }
.stage-analysis { --stage-color:#c53526; background:linear-gradient(150deg,#fff9f3,#fff); }
.stage-production { --stage-color:#d69613; background:linear-gradient(150deg,#fffaf0,#fff); }
.stage-ready { --stage-color:#2e8555; background:linear-gradient(150deg,#f4faf3,#fff); }
.stage-header { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.stage-header > div { display:flex; align-items:center; gap:9px; }
.stage-header h4 { font-size:15px; letter-spacing:-.01em; }
.stage-header strong { color:var(--stage-color); font-size:25px; font-family:'Barlow Condensed',sans-serif; line-height:1; }
.stage-index { color:var(--stage-color); font:800 10px 'Barlow Condensed',sans-serif; letter-spacing:.08em; }
.stage-caption { margin:5px 0 14px; color:var(--text-muted); font-size:11px; }
.stage-list { display:grid; gap:9px; }
.stage-empty { display:grid; place-items:center; min-height:126px; padding:18px; color:var(--text-muted); border:1px dashed rgba(37,28,21,.18); border-radius:12px; font-size:12px; text-align:center; }
.board-order {
  padding:12px 13px; border:1px solid rgba(37,28,21,.1); border-left:3px solid var(--stage-color);
  border-radius:11px; background:rgba(255,255,255,.88); cursor:pointer;
  box-shadow:0 4px 10px rgba(45,25,11,.06); transition:transform .18s, box-shadow .18s;
}
.board-order:hover { transform:translateY(-2px); box-shadow:0 9px 18px rgba(45,25,11,.13); }
.board-order-top, .board-order-bottom { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.board-order-top { color:var(--stage-color); font-size:11px; }
.board-order-top span { color:var(--text-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.board-order-name { margin:7px 0 9px; font-size:13px; font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.board-order-bottom { color:var(--text-muted); font-size:11px; }
.board-order-bottom strong { color:var(--text); font-size:12px; }

@media (max-width: 900px) {
  .order-board { grid-template-columns:1fr; }
  .order-stage { min-height:0; }
  .stage-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 520px) {
  .operations-panel { padding:15px; margin-top:18px; border-radius:17px; }
  .operations-heading { align-items:flex-start; flex-direction:column; gap:7px; }
  .operations-heading h3 { font-size:19px; }
  .stage-list { grid-template-columns:1fr; }
  .stage-empty { min-height:84px; }
}

/* ESPOKADO dashboard hero */
.dashboard-hero {
  min-height: 300px;
  margin-bottom: 18px;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 30px;
  color: #fff;
  isolation: isolate;
  background:
    radial-gradient(circle at 82% 44%, rgba(255,214,92,.52), transparent 18rem),
    linear-gradient(135deg,#b7191c 0%,#df3b22 57%,#f09a19 100%);
  box-shadow: 0 15px 0 #8f1518, 0 26px 42px rgba(125,42,19,.22);
  border: 1px solid rgba(246,174,0,.35);
}
.dashboard-hero::before {
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:linear-gradient(90deg,rgba(143,21,24,.72) 0%,rgba(184,23,23,.34) 45%,rgba(240,154,25,.02) 78%);
}
.dashboard-hero-content { max-width:570px; text-shadow:0 3px 16px rgba(112,24,15,.38); }
.hero-kicker { color:var(--gold); font-size:11px; font-weight:900; letter-spacing:.16em; margin-bottom:8px; }
.dashboard-hero h2 { font-family:'Barlow Condensed',sans-serif; font-size:clamp(34px,5vw,58px); line-height:.92; letter-spacing:.01em; text-transform:uppercase; max-width:520px; }
.dashboard-hero p { color:rgba(255,255,255,.84); font-size:14px; margin-top:10px; }
.hero-actions { display:flex; gap:9px; margin-top:20px; flex-wrap:wrap; }
.hero-action { border:0; border-radius:10px; padding:10px 15px; background:linear-gradient(145deg,#ffc62b,#e79b00); color:#261600; font-weight:900; cursor:pointer; box-shadow:0 4px 0 #9e6800; }
.hero-action.ghost { color:#fff; background:rgba(255,255,255,.13); border:1px solid rgba(255,255,255,.25); box-shadow:none; backdrop-filter:blur(8px); }
.hero-assistant-status { position:absolute; right:22px; bottom:20px; display:flex; align-items:center; gap:10px; padding:10px 14px; border-radius:14px; background:rgba(255,250,239,.90); border:1px solid rgba(246,174,0,.55); backdrop-filter:blur(10px); box-shadow:0 8px 20px rgba(120,35,16,.16); }
.hero-assistant-status div { display:flex; flex-direction:column; }
.hero-assistant-status small { font-size:8px; letter-spacing:.12em; color:var(--text-muted); }
.hero-assistant-status b { color:var(--red); font-size:12px; }
.assistant-pulse { width:11px; height:11px; border-radius:50%; background:#54d26d; box-shadow:0 0 0 6px rgba(84,210,109,.14); animation:pulseAssistant 1.8s infinite; }
@keyframes pulseAssistant { 50% { box-shadow:0 0 0 11px rgba(84,210,109,0); } }

.service-channels { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:22px 0; }
.service-channel { border:0; border-radius:18px; padding:17px; display:flex; align-items:center; gap:12px; text-align:left; cursor:pointer; color:#fff; transition:.2s; box-shadow:0 7px 0 rgba(0,0,0,.20),0 14px 25px rgba(35,20,10,.12); }
.service-channel:hover { transform:translateY(-2px); }
.service-channel > span { font-size:28px; filter:drop-shadow(0 4px 5px rgba(0,0,0,.25)); }
.service-channel div { display:flex; flex-direction:column; flex:1; }
.service-channel b { font-size:17px; }
.service-channel small { color:rgba(255,255,255,.72); font-size:10px; }
.service-channel em { font-style:normal; font-size:9px; font-weight:900; letter-spacing:.08em; padding:5px 7px; border-radius:7px; background:rgba(0,0,0,.18); }
.service-channel.counter { background:linear-gradient(145deg,#bc1d18,#760c0a); }
.service-channel.table { background:linear-gradient(145deg,#e6a200,#9a6000); }
.service-channel.delivery { background:linear-gradient(145deg,#24834b,#12502d); }

.order-channel-picker { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; margin-bottom:16px; }
.order-channel-option { border:2px solid var(--border); background:#fff; border-radius:14px; padding:13px 8px; display:flex; flex-direction:column; align-items:center; gap:2px; cursor:pointer; color:var(--text); }
.order-channel-option span { font-size:25px; }
.order-channel-option small { color:var(--text-muted); font-size:10px; }
.order-channel-option.active { border-color:var(--red); background:#fff2e3; box-shadow:0 5px 0 rgba(143,15,13,.18); transform:translateY(-2px); }

.espoka-fab { position:fixed; right:22px; bottom:22px; z-index:490; width:64px; height:64px; border-radius:50%; padding:3px; border:3px solid var(--gold); background:#111; cursor:pointer; box-shadow:0 8px 0 #72100d,0 14px 28px rgba(32,12,5,.32); }
.espoka-fab img { width:100%; height:100%; object-fit:cover; border-radius:50%; }
.espoka-fab-pulse { position:absolute; right:1px; top:1px; width:13px; height:13px; border-radius:50%; background:#47cc67; border:2px solid #fff; z-index:2; }
.espoka-panel { position:fixed; right:22px; bottom:100px; z-index:489; width:min(370px,calc(100vw - 28px)); border-radius:20px; overflow:hidden; background:#fffdf8; box-shadow:0 26px 70px rgba(26,11,5,.34); border:1px solid rgba(246,174,0,.4); transform:translateY(20px) scale(.96); opacity:0; pointer-events:none; transition:.22s; }
.espoka-panel.open { transform:none; opacity:1; pointer-events:auto; }
.espoka-panel-header { display:flex; align-items:center; gap:11px; padding:15px; color:#fff; background:linear-gradient(135deg,#1b110d,#710f0c); }
.espoka-panel-header img { width:47px; height:47px; border-radius:14px; object-fit:cover; border:2px solid var(--gold); }
.espoka-panel-header div { display:flex; flex-direction:column; flex:1; }
.espoka-panel-header small { font-size:8px; letter-spacing:.12em; color:#d8c5af; }
.espoka-panel-header b { color:var(--gold); font-size:18px; }
.espoka-panel-header span { font-size:10px; color:#dce7dd; }
.espoka-panel-header i { display:inline-block; width:7px; height:7px; border-radius:50%; background:#48cf68; margin-right:4px; }
.espoka-panel-header button { background:none; border:0; color:#fff; font-size:26px; cursor:pointer; }
.espoka-panel-body { padding:16px; }
.espoka-panel-body p { font-size:13px; color:var(--text-muted); margin-bottom:12px; }
.espoka-panel-body p b { color:var(--text); }
.espoka-panel-body > button { width:100%; text-align:left; padding:12px 13px; margin-top:7px; border:1px solid var(--border); border-radius:11px; background:#fff; color:var(--text); font-weight:700; cursor:pointer; }
.espoka-panel-body > button:hover { border-color:var(--gold); background:#fff9e8; }
.espoka-coming { margin-top:13px; padding:11px; border-radius:11px; background:#f2eee8; display:flex; flex-direction:column; }
.espoka-coming span { font-size:9px; color:var(--red); font-weight:900; letter-spacing:.1em; }
.espoka-coming small { color:var(--text-muted); margin-top:2px; }

@media (max-width: 768px) {
  .dashboard-hero { min-height:270px; padding:22px 18px; background-position:60% center; }
  .dashboard-hero::before { background:linear-gradient(90deg,rgba(143,21,24,.75),rgba(184,23,23,.18)),linear-gradient(0deg,rgba(143,21,24,.35),transparent); }
  .dashboard-hero-content { padding-bottom:45px; }
  .hero-assistant-status { left:18px; right:auto; bottom:16px; }
  .service-channels { grid-template-columns:1fr; gap:10px; }
  .service-channel { padding:14px 16px; }
  .espoka-fab { right:14px; bottom:14px; width:58px; height:58px; }
  .espoka-panel { right:14px; bottom:84px; }
}

/* ── Final brand polish: ESPOKADO visual language ──
   The logo is the hero, not an afterthought. Deep charcoal anchors the
   interface while bun yellow, ketchup red and lettuce green create a
   confident service rhythm. */
:root {
  --green-dark: #8f1518;
  --green-main: #b81717;
  --green-light: #e23824;
  --green-pale: #fff0d2;
  --gold: #f6b516;
  --gold-light: #fff4c7;
  --red: #9f1715;
  --orange: #e36a1f;
  --blue: #176b8f;
  --bg: #f4efe7;
  --white: #fffdf8;
  --text: #261b15;
  --text-muted: #75685d;
  --border: #e2d7ca;
  --shadow: 0 16px 34px rgba(48, 22, 8, .12), 0 3px 8px rgba(48, 22, 8, .07);
}

body {
  background:
    radial-gradient(circle at 92% 0%, rgba(246,181,22,.13), transparent 24rem),
    radial-gradient(circle at 2% 96%, rgba(184,23,23,.06), transparent 26rem),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  z-index: 9998;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.11'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.btn, .form-control, .card, .stat-card, .order-card, .product-card,
.table-card, .service-channel, .cat-btn, .type-card, .product-row {
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease,
    background-color .22s ease, color .22s ease;
}
.btn-primary { background: linear-gradient(145deg, #d52b20, #991311); }
.btn-primary:hover { box-shadow: 0 7px 0 #5d0b09, 0 15px 26px rgba(143,15,13,.22); }
.btn-secondary { background: rgba(255,253,248,.88); }
.btn-secondary:hover { border-color: var(--gold); background: var(--gold-light); }
.form-control { background: rgba(255,253,248,.92); }
.form-control:focus { box-shadow: 0 0 0 4px rgba(184,23,23,.12); }
.card:hover, .stat-card:hover { box-shadow: 0 20px 38px rgba(48,22,8,.15); }

.sidebar {
  background:
    radial-gradient(circle at 72% 0%, rgba(246,181,22,.30), transparent 14rem),
    linear-gradient(160deg, #fffaf0 0%, #f8ead5 62%, #f4d8c2 100%);
  border-right: 1px solid rgba(159,23,21,.12);
  box-shadow: 14px 0 34px rgba(83,36,16,.07);
}
.sidebar-logo { padding: 20px 18px 21px; }
.sidebar-logo .brand-mark {
  width: 58px !important; height: 58px !important; border-radius: 17px !important;
  border: 2px solid rgba(246,181,22,.75);
  box-shadow: 0 6px 0 #a81a17, 0 14px 22px rgba(112,40,20,.18);
}
.sidebar-logo .brand-logo { width: 100%; height: 100%; border-radius: 15px; }
.sidebar-logo-text .brand { color: var(--gold); letter-spacing: .7px; }
.sidebar-logo-text .brand { color: var(--red); }
.sidebar-logo-text .sub { color: var(--text-muted); }
.nav-item { border-left-width: 4px; }
.nav-item.active { box-shadow: inset 4px 0 var(--gold); border-left-color: transparent; }

.topbar { background: rgba(255,253,248,.9); backdrop-filter: blur(14px); }
.topbar-title { font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; letter-spacing: .03em; font-size: 21px; }

.brand-mark {
  border: 3px solid var(--gold);
  background: #fff8e8;
  box-shadow: 0 7px 0 #7d0e0b, 0 17px 30px rgba(34,10,5,.28);
  transform: translateY(-1px);
}
.brand-mark img, .brand-logo { object-fit: cover; }
.brand-mark--hero {
  width: 138px !important; height: 138px !important; border-radius: 38px !important;
  border-width: 5px; box-shadow: 0 10px 0 #7d0e0b, 0 25px 42px rgba(34,10,5,.36);
}
.brand-mark--hero img { border-radius: 32px; }

.login-page {
  position: relative;
  background:
    radial-gradient(circle at 17% 18%, rgba(246,181,22,.48), transparent 24rem),
    radial-gradient(circle at 86% 78%, rgba(184,23,23,.23), transparent 32rem),
    linear-gradient(135deg, #fff8e9 0%, #f7dcc1 48%, #f5bda8 100%);
}
.login-page::after {
  content: "LANCHES • BALCÃO • DELIVERY";
  position: absolute; left: 34px; bottom: 28px; color: rgba(125,26,20,.68);
  font: 800 11px 'Plus Jakarta Sans', sans-serif; letter-spacing: .22em;
}
.login-card {
  border: 1px solid rgba(246,181,22,.35);
  box-shadow: 0 20px 0 rgba(159,23,21,.78), 0 34px 70px rgba(112,40,20,.20);
}
.login-logo h1 { font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; letter-spacing: .04em; font-size: 27px; }

.customer-header {
  background: linear-gradient(105deg, #a51618, #d93420 72%, #f0a415) !important;
  box-shadow: 0 5px 18px rgba(31,10,4,.25);
}
.customer-logo .brand-mark {
  width: 52px !important; height: 52px !important; border-radius: 16px !important;
  border-width: 2px; box-shadow: 0 5px 0 #7d0e0b, 0 10px 18px rgba(0,0,0,.28);
}
.customer-logo .brand-logo { border-radius: 14px; }
.customer-logo .logo-text { color: var(--gold); font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; font-size: 20px; letter-spacing: .04em; }
.store-intro-card { border: 1px solid rgba(246,181,22,.4); }
.store-intro-card::before {
  content: "ESPOKADO LANCHE";
  position: absolute; top: 18px; right: 20px; color: rgba(255,244,199,.9);
  font: 800 10px 'Plus Jakarta Sans', sans-serif; letter-spacing: .15em;
}
.store-intro-card { position: relative; }
.type-screen > div:first-child .brand-mark {
  width: 128px !important; height: 128px !important; border-radius: 36px !important;
  border-width: 5px; box-shadow: 0 10px 0 #7d0e0b, 0 24px 38px rgba(34,10,5,.28);
}
.type-screen > div:first-child .brand-logo { border-radius: 31px; }
.type-screen h2 { font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; font-size: 28px; letter-spacing: .02em; }
.type-card:hover, .product-row:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(48,22,8,.15); }
.product-row.in-cart { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(246,181,22,.16), var(--shadow); }

@media (max-width:768px) {
  .printer-hero { padding:22px 18px; border-radius:18px; }.printer-hero h2 { font-size:26px; }.printer-hero-mark { display:none; }
  .printer-stats { grid-template-columns:1fr; }.printer-stat { min-height:84px; }.printer-stat strong { margin-top:8px; }
  .printer-setup .card-header,.printer-toolbar { align-items:stretch; flex-direction:column; }.printer-setup .card-header .btn { width:100%; justify-content:center; }
  .printer-steps { grid-template-columns:1fr 1fr; gap:18px 0; }.printer-step:nth-child(2) { border-right:0; }.printer-step:nth-child(3) { padding-left:0; }.printer-step:nth-child(4) { padding-right:0; }
  .printer-toolbar-actions .btn { flex:1; justify-content:center; }.printer-station-head { align-items:flex-start; flex-direction:column; }.printer-station-actions { width:100%; justify-content:space-between; }
  .printer-device { align-items:flex-start; flex-direction:column; }.printer-device-actions { width:100%; justify-content:flex-start; }.printer-jobs-table { min-width:700px; }
}

.dashboard-hero { box-shadow: 0 12px 0 #7d0e0b, 0 28px 46px rgba(43,20,7,.25); }
.dashboard-hero h2 { text-shadow: 0 4px 0 rgba(125,14,11,.42), 0 5px 18px rgba(125,35,15,.34); }
.dashboard-hero-logo {
  position: absolute;
  top: 50%;
  right: 172px;
  width: 132px;
  height: 132px;
  padding: 6px;
  transform: translateY(-54%) rotate(2deg);
  border-radius: 38px;
  background: linear-gradient(145deg, #ffd85c, #f6b516 45%, #8d140f 46%, #5d0b09);
  box-shadow: 0 12px 0 rgba(91,9,7,.9), 0 27px 42px rgba(0,0,0,.42);
  z-index: 2;
}
.dashboard-hero-logo::after {
  content: "";
  position: absolute;
  inset: 7px 18px auto;
  height: 26%;
  border-radius: 999px;
  background: linear-gradient(rgba(255,255,255,.42), rgba(255,255,255,0));
  pointer-events: none;
}
.dashboard-hero-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 31px;
}
.service-channel:hover { transform: translateY(-4px); box-shadow: 0 10px 0 rgba(0,0,0,.2), 0 20px 32px rgba(35,20,10,.16); }

@media (max-width: 768px) {
  .login-page::after { left: 18px; bottom: 15px; font-size: 9px; }
  .login-card { box-shadow: 0 12px 0 rgba(125,14,11,.55), 0 24px 48px rgba(0,0,0,.38); }
  .brand-mark--hero { width: 112px !important; height: 112px !important; }
  .type-screen > div:first-child .brand-mark { width: 108px !important; height: 108px !important; }
  .dashboard-hero-logo { width:88px; height:88px; right:18px; top:22px; transform:rotate(2deg); border-radius:26px; }
  .dashboard-hero-logo img { border-radius:21px; }
  .dashboard-hero-content { padding-right:72px; }
}

/* WhatsApp service desk + authorship: warm operational layer */
.whatsapp-inbox-card { border: 1px solid rgba(189,25,21,.18); box-shadow: 0 14px 30px rgba(96,55,22,.10); }
.whatsapp-inbox-header { background: linear-gradient(110deg,#fff8e9,#fffdf8); align-items:flex-start; }
.whatsapp-inbox-header h3 { margin-top:3px; color:var(--green-dark); }
.whatsapp-inbox-header p { color:var(--text-muted); font-size:12px; font-weight:400; margin-top:3px; }
.inbox-count { display:inline-grid; place-items:center; min-width:24px; height:24px; margin-left:6px; border-radius:999px; background:var(--red); color:#fff; font-size:12px; vertical-align:middle; }
.wa-request-row { display:flex; justify-content:space-between; gap:18px; padding:15px 0; border-bottom:1px solid var(--border); }
.wa-request-row:last-child { border-bottom:0; padding-bottom:0; }
.wa-request-copy { min-width:0; flex:1; }.wa-request-top { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }.wa-request-copy p { margin:6px 0 3px; font-size:13px; }.wa-request-copy small { color:var(--text-muted); font-size:11px; }
.wa-request-actions { display:flex; gap:6px; flex-wrap:wrap; align-items:center; justify-content:flex-end; }.inbox-empty,.inbox-loading { padding:22px 0; color:var(--text-muted); display:flex; flex-direction:column; gap:4px; }.inbox-empty b { color:var(--green-dark); }
.wa-addition-modal { max-width:680px; }.wa-order-summary { display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; padding:12px 14px; border-radius:12px; background:var(--bg); color:var(--green-dark); }.wa-order-summary span { color:var(--text-muted); font-size:12px; }.wa-source-note { margin:12px 0; padding:10px 12px; border:1px solid #f0d58a; border-radius:10px; background:#fff8df; color:#795b0c; font-size:12px; font-weight:600; }.wa-product-list,.wa-selected-items { display:grid; gap:7px; margin-bottom:14px; max-height:210px; overflow:auto; }.wa-product-row,.wa-selected-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 10px; border:1px solid var(--border); border-radius:10px; background:#fff; }.wa-product-row small { display:block; color:var(--text-muted); }.wa-selected-row > div:first-child { flex:1; }.wa-selected-row .form-control { margin-top:5px; font-size:12px; padding:7px 9px; }.wa-qty { display:flex; gap:8px; align-items:center; }.wa-qty button { border:1px solid var(--border); background:var(--bg); border-radius:7px; width:28px; height:28px; cursor:pointer; font-weight:800; }.wa-payment-choice { display:flex; gap:18px; flex-wrap:wrap; font-size:13px; }.wa-warning { padding:12px; border:1px solid #e6b44d; border-radius:10px; background:#fff6dc; color:#765500; display:grid; gap:8px; font-size:12px; }.wa-addition-inline { margin-top:7px; padding:7px 9px; border-radius:8px; background:#fff3d7; color:#765500; font-size:12px; }.auth-summary { display:flex; flex-wrap:wrap; gap:8px; margin:5px 0 15px; }.auth-stat { min-width:110px; padding:10px 12px; border:1px solid var(--border); border-radius:10px; background:linear-gradient(140deg,#fffdf8,#fff4dc); }.auth-stat small,.authorship-table td small { display:block; color:var(--text-muted); font-size:10px; }.auth-stat b { display:block; font-size:21px; color:var(--green-dark); }.authorship-table tr.audit-failure td { background:#fff0ee; }.authorship-table tr.audit-auth-event td:first-child { border-left:3px solid var(--gold); }.authorship-table details summary { cursor:pointer; color:var(--red); font-weight:700; }.authorship-table details span { display:block; max-width:240px; white-space:pre-wrap; font-size:11px; color:var(--text-muted); margin-top:4px; }.auth-pagination { display:flex; align-items:center; justify-content:center; gap:12px; padding-top:16px; font-size:12px; color:var(--text-muted); }
@media (max-width:768px) { .wa-request-row { flex-direction:column; gap:10px; }.wa-request-actions { justify-content:flex-start; }.wa-request-actions .btn { flex:1; }.auth-pagination { flex-wrap:wrap; }.audit-auth-filters { grid-template-columns:1fr; }.whatsapp-inbox-header { flex-direction:column; } }

/* ═══════════════════════════════════════════════════════════════════════
   ESPOKADO / service counter system
   A warm, high-contrast visual layer for long shifts: red signal, yolk gold,
   charcoal ink and a soft tortilla background. Kept as an override layer so
   the existing operational templates and inline hooks remain untouched.
   ═══════════════════════════════════════════════════════════════════════ */
:root {
  --green-dark:#24100d;
  --green-main:#b71918;
  --green-light:#d85c3f;
  --green-pale:#fff0e5;
  --gold:#f3ad18;
  --gold-light:#fff4c9;
  --red:#b71918;
  --orange:#d86725;
  --blue:#246b83;
  --bg:#f7f1e8;
  --white:#fffdf9;
  --text:#241b17;
  --text-muted:#75675e;
  --border:#e5d8cb;
  --shadow:0 16px 36px rgba(62,27,12,.10),0 3px 9px rgba(62,27,12,.06);
  --radius:14px;
  --radius-sm:8px;
  --sidebar-w:258px;
}

html { background:var(--bg); }
body {
  background:
    radial-gradient(circle at 100% 0,rgba(243,173,24,.16),transparent 23rem),
    linear-gradient(120deg,rgba(183,25,24,.025),transparent 42%),var(--bg);
  font-family:'Plus Jakarta Sans','DM Sans',sans-serif;
}
button,.btn,.nav-item,.cat-btn,.table-card,.product-card { -webkit-tap-highlight-color:transparent; }
.btn { border-radius:9px; min-height:38px; font-weight:800; letter-spacing:.01em; }
.btn-primary { background:var(--red); box-shadow:0 3px 0 #7f100f; }
.btn-primary:hover { background:#8f1112; transform:translateY(-1px); }
.btn-secondary { background:var(--white); border-color:#d8c7b8; }
.btn-secondary:hover { background:#fff5dc; border-color:var(--gold); }
.btn-gold { background:var(--gold); color:#3b2009; box-shadow:0 3px 0 #b77b0d; }
.form-control { min-height:42px; background:#fffefa; border-color:#dfcfc0; color:var(--text); }
.form-control:focus { border-color:var(--red); box-shadow:0 0 0 3px rgba(183,25,24,.11); }
.card,.stat-card,.product-card,.table-card { border:1px solid rgba(120,67,32,.11); box-shadow:var(--shadow); }
.card-header { background:linear-gradient(100deg,#fffdf9,#fff8ed); }
.badge-green { background:#fff0dc; color:#8d4f0d; }
.badge-blue { background:#e5f3f4; color:#246b83; }

.sidebar {
  background:linear-gradient(180deg,#24100d 0%,#301412 62%,#421713 100%);
  border-right:1px solid rgba(243,173,24,.18);
  box-shadow:8px 0 28px rgba(37,12,5,.16);
}
.sidebar-logo { padding:18px 17px 20px; border-bottom-color:rgba(255,255,255,.13); }
.sidebar-logo img { border-radius:50%; border:2px solid var(--gold); }
.sidebar-logo-text { color:#fff8e9; }
.sidebar-logo-text .brand { letter-spacing:.09em; font-family:'Barlow Condensed',sans-serif; font-size:22px; }
.sidebar-logo-text .sub { color:rgba(255,244,220,.62); }
.sidebar-nav { padding:15px 10px; }
.nav-group-toggle { color:#d9a987 !important; padding:13px 12px 7px !important; }
.nav-item { color:#f4dfcf; border-left:3px solid transparent; border-radius:8px; margin:2px 0; padding:11px 12px; }
.nav-item:hover { background:rgba(243,173,24,.11); color:#ffd66a; }
.nav-item.active { background:linear-gradient(90deg,rgba(243,173,24,.2),rgba(183,25,24,.28)); border-left-color:var(--gold); color:#ffd86b; }
.nav-item .icon { filter:saturate(.8); }
.sidebar-footer { border-top-color:rgba(255,255,255,.13); color:#d9a987; }
.sidebar-user .info .name { color:#fff8e9; }
.sidebar-user .avatar { background:var(--gold); color:#35160d; }

.topbar { background:rgba(255,253,249,.94); border-bottom-color:#eadbce; height:66px; }
.topbar-title { font-family:'Barlow Condensed',sans-serif; font-size:23px; letter-spacing:.015em; color:#341611; }
.page-content { padding:28px 30px 42px; max-width:1700px; width:100%; }
.online-dot { background:#2d9a67; box-shadow:0 0 0 4px rgba(45,154,103,.12); }

.stats-grid { gap:14px; }
.stat-card { position:relative; overflow:hidden; padding:18px 19px; min-height:126px; background:linear-gradient(145deg,#fffefa 0%,#fff3dd 100%); }
.stat-card::after { content:""; position:absolute; width:74px;height:74px;right:-18px;bottom:-24px;border-radius:50%;background:rgba(243,173,24,.15); }
.stat-card .stat-label { letter-spacing:.07em; font-size:10px; }
.stat-card .stat-value { font-size:34px; color:var(--red); }
.stat-card.gold .stat-value { color:#a96b08; }
.stat-card.blue .stat-value { color:var(--blue); }
.stat-card.red .stat-value { color:var(--red); }
.stat-icon { opacity:.88; }

.dashboard-hero { border-radius:18px; margin-bottom:18px; background-position:center; }
.service-channels { gap:12px; }
.service-channel { border:1px solid rgba(183,25,24,.14); border-radius:13px; background:var(--white); }
.service-channel em { color:var(--red); font-size:10px; font-style:normal; font-weight:900; letter-spacing:.08em; }
.operations-panel { border-color:rgba(183,25,24,.12); }
.operations-heading h3 { font-family:'Barlow Condensed',sans-serif; font-size:25px; letter-spacing:.02em; }
.order-stage { border-radius:12px; border-color:rgba(120,67,32,.12); }

.products-grid { grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:18px; }
.product-card { position:relative; border-radius:15px; }
.product-card img { height:170px; aspect-ratio:4/3; object-position:center; transition:transform .35s ease; }
.product-card:hover img { transform:scale(1.04); }
.product-card > .p-body { position:relative; background:linear-gradient(#fffefa,#fff9ef); padding:16px; }
.product-card .p-name { font-size:16px; color:#321712; }
.product-card .p-desc { min-height:34px; }
.product-card .p-price { color:var(--red); font-family:'Barlow Condensed',sans-serif; font-size:23px; }
.product-card .p-time { background:#fff1cb; padding:3px 7px; border-radius:99px; }

/* Audit is a reading surface first: stable rhythm, visual grouping and no
   microscopic text. The table can scroll horizontally on narrow devices. */
#section-auditoria .card-header { padding:18px 22px; }
#section-auditoria .audit-auth-filters,
#section-auditoria .audit-filters { background:#fff8ed; border:1px solid #ead6bd; border-radius:12px; padding:13px; }
#section-auditoria table.data-table { font-size:13px; }
#section-auditoria table.data-table th { background:#fff1d8; color:#684b35; font-size:10px; padding:11px 14px; }
#section-auditoria table.data-table td { padding:13px 14px; vertical-align:top; }
#section-auditoria table.data-table tbody tr:nth-child(even) td { background:rgba(255,249,238,.7); }
#section-auditoria table.data-table tbody tr:hover td { background:#fff3d1; }
.authorship-table td small { margin-top:3px; }
.authorship-table details summary { color:var(--red); }
.audit-failure td { background:#fff0ed !important; }
.auth-pagination { border-top:1px solid var(--border); margin-top:4px; }

.table-responsive { border-radius:12px; }
table.data-table th:first-child { border-radius:9px 0 0 0; }
table.data-table th:last-child { border-radius:0 9px 0 0; }

.login-page { background:
  linear-gradient(115deg,rgba(27,7,5,.84),rgba(62,14,10,.66)),
  url('/static/assets/espokado-hero.jpeg') center/cover;
}
.login-card { border:1px solid rgba(243,173,24,.42); box-shadow:0 18px 0 rgba(94,11,8,.48),0 30px 70px rgba(0,0,0,.42); }
.login-logo h1 { color:var(--red); font-family:'Barlow Condensed',sans-serif; font-size:28px; letter-spacing:.035em; }
.login-logo p { color:#795c4e; }
.brand-mark { background:linear-gradient(145deg,#f7c23b,#b71918); box-shadow:0 10px 0 #74100e,0 18px 30px rgba(90,17,9,.26); }

@media (max-width:768px) {
  .page-content { padding:18px 14px 30px; }
  .topbar { height:60px; }
  .topbar-title { font-size:20px; }
  .stats-grid { gap:9px; }
  .stat-card { min-height:108px; padding:14px; }
  .stat-card .stat-value { font-size:29px; }
  .products-grid { gap:10px; }
  .product-card img { height:auto; aspect-ratio:1.25; }
  .product-card .p-body { padding:12px; }
  .product-card .p-name { font-size:14px; }
  #section-auditoria .table-responsive { margin:0 -14px; padding:0 14px; }
  #section-auditoria table.data-table { min-width:860px; }
  #section-auditoria table.data-table td { padding:12px; }
}

/* ── v13 service-ready finish ─────────────────────────────────────────────
   Warm, light surfaces keep the operation readable in a busy service. The
   identity still comes from the ESPOKADO tomato and mustard mark. */
:root {
  --green-dark: #2d2926;
  --green-main: #b72824;
  --green-light: #c99a35;
  --green-pale: #fae9df;
  --gold: #d59a26;
  --gold-light: #fff1cf;
  --red: #b72824;
  --orange: #c9692e;
  --blue: #47728a;
  --bg: #f6f0e7;
  --white: #fffdf9;
  --text: #2d2926;
  --text-muted: #716861;
  --border: #e1d6ca;
  --line-strong: #dacabd;
  --surface-strong: #fffdf9;
  --shadow: 0 12px 28px rgba(72,42,24,.09), 0 2px 7px rgba(72,42,24,.05);
}

body {
  font-size: 15px;
  background: radial-gradient(circle at 88% 0%, rgba(213,154,38,.12), transparent 28rem), var(--bg);
}

.sidebar {
  background: #fffaf3;
  border-right: 1px solid #e4d7ca;
  box-shadow: 8px 0 26px rgba(65,40,25,.06);
}
.sidebar-logo {
  padding: 20px 18px;
  background: #fffaf3;
  border-bottom: 1px solid #e9ddd1;
}
.sidebar-logo-text { color: var(--text); }
.sidebar-logo-text .brand {
  color: var(--red);
  font-size: 22px;
  letter-spacing: .08em;
}
.sidebar-logo-text .sub { color: #91847a; font-size: 11px; }
.sidebar-nav { padding: 16px 11px; }
.nav-group-toggle {
  color: #927d6e !important;
  font-size: 11px !important;
  letter-spacing: .13em;
  padding: 14px 13px 8px !important;
}
.nav-item {
  min-height: 50px;
  padding: 13px 14px;
  gap: 14px;
  border-radius: 12px;
  color: #514841;
  font-size: 15px;
  font-weight: 600;
}
.nav-item .icon {
  width: 23px;
  font-size: 20px;
  line-height: 1;
}
.nav-item:hover { background: #fff0e7; color: var(--red); }
.nav-item.active {
  background: #fbe7dc;
  color: var(--red);
  border-left-color: var(--red);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 5px 14px rgba(183,40,36,.09);
}
.sidebar-footer {
  padding: 16px;
  background: #fff6ed;
  border-top: 1px solid #e9ddd1;
  color: #76685f;
}
.sidebar-user .info .name { color: var(--text); font-size: 14px; }
.sidebar-user .info .role { font-size: 12px; color: #8a7b70; }
.sidebar-user .avatar { background: var(--gold); color: #fffaf3; width: 40px; height: 40px; font-size: 16px; }

.topbar {
  height: 70px;
  background: rgba(255,253,249,.96);
  border-bottom-color: #e5d9ce;
}
.topbar-title { font-size: 25px; color: var(--text); }
.topbar-actions { gap: 15px; }
.menu-toggle { font-size: 26px; padding: 8px; }
.notification-bell { font-size: 22px; }
.notification-bell .badge-count { font-size: 12px; min-width: 20px; height: 20px; }

.btn {
  min-height: 44px;
  padding: 11px 20px;
  font-size: 15px;
  border-radius: 11px;
}
.btn-sm { min-height: 40px; padding: 9px 15px; font-size: 14px; }
.btn-lg { min-height: 50px; padding: 14px 24px; font-size: 17px; }
.btn-primary { background: var(--red); box-shadow: 0 3px 0 #851b19; }
.btn-primary:hover { background: #98201d; }
.btn-secondary { background: #fffdf9; border-color: #dacabd; }
.form-control { min-height: 48px; padding: 12px 15px; font-size: 15px; }
.form-group label { font-size: 14px; }

.card, .stat-card, .product-card, .table-card { box-shadow: var(--shadow); }
.card-header { padding: 18px 22px; font-size: 17px; }
.card-body { padding: 22px; }
.stat-card { min-height: 132px; padding: 20px; }
.stat-card .stat-label { font-size: 12px; }
.stat-card .stat-value { font-size: 38px; }
.stat-card .stat-icon { font-size: 28px; }
.table-card { padding: 19px; }
.table-card .t-num { font-size: 40px; }
.table-card .t-name, .table-card .t-status { font-size: 13px; }
.table-card .t-total { font-size: 18px; }
.cat-btn, .tab-pill { font-size: 15px; min-height: 44px; }
.tab-pill { padding: 11px 8px; }
table.data-table { font-size: 15px; }
table.data-table th { font-size: 13px; padding: 14px 17px; }
table.data-table td { padding: 15px 17px; }
.badge { font-size: 12px; padding: 5px 11px; }

.empty-state { padding: 64px 20px; }
.empty-state .icon { font-size: 56px; }
.empty-state p { font-size: 17px; }

@media (max-width:768px) {
  .sidebar { width: min(88vw, 350px); }
  .sidebar-logo { padding: 16px 14px; }
  .sidebar-nav { padding: 13px 11px 20px; }
  .nav-item { min-height: 54px; font-size: 16px; padding: 14px 15px; }
  .nav-item .icon { font-size: 22px; width: 25px; }
  .sidebar-footer { padding: 14px; }
  .topbar { height: 64px; padding: 0 13px; }
  .topbar-title { font-size: 23px; }
  .page-content { padding: 20px 14px 34px; }
  .card-header { padding: 17px 16px; }
  .card-body { padding: 18px 16px; }
  .stats-grid { gap: 11px; }
  .stat-card { min-height: 116px; padding: 15px; }
  .stat-card .stat-value { font-size: 32px; }
  .stat-card .stat-label { font-size: 11px; }
  .products-grid { gap: 12px; }
  .product-card .p-name { font-size: 15px; }
  .product-card .p-desc { font-size: 13px; }
  .product-card .p-price { font-size: 24px; }
  .modal-body { padding: 22px 18px; }
  table.data-table th { font-size: 12px; }
}
