/* ================= DESIGN SYSTEM CLEAN — SNOOPY LANCHES CRM v3.0 ================= */
:root {
  --bg: #F6F5F2;
  --surface: #FFFFFF;
  --surface-2: #FAF9F7;
  --border: #E7E3DC;
  --border-strong: #D6CFC5;
  --ink: #18181B;
  --ink-soft: #3F3F46;
  --muted: #64748B;
  --muted-light: #94A3B8;

  --brand: #C41E14;
  --brand-hover: #A3160E;
  --brand-soft: #FEF2F2;
  --brand-border: #FECACA;

  --ok: #15803D;
  --ok-hover: #166534;
  --ok-soft: #F0FDF4;
  --ok-border: #BBF7D0;

  --warn: #B45309;
  --warn-soft: #FFFBEB;
  --warn-border: #FDE68A;

  --info: #1D4ED8;
  --info-soft: #EFF6FF;
  --info-border: #BFDBFE;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-xs: 0 1px 2px rgba(24, 24, 27, 0.04);
  --shadow-sm: 0 1px 3px rgba(24, 24, 27, 0.05), 0 4px 12px rgba(24, 24, 27, 0.03);
  --shadow-md: 0 10px 28px rgba(24, 24, 27, 0.12);
  --sidebar-w: 224px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
}

body.no-nav {
  padding-left: 0 !important;
  padding-bottom: 24px;
}

.num, .money {
  font-variant-numeric: tabular-nums;
}

.svg-ic {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ================= TOPBAR ================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: var(--shadow-xs);
}

.topbar-brand {
  font-weight: 800;
  font-size: 14.5px;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
  white-space: nowrap;
}

.topbar-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.net-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ok-soft);
  color: var(--ok);
  border: 1px solid var(--ok-border);
}

.net-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22C55E;
}

.net-pill.off {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand-border);
}

.net-pill.off .dot {
  background: var(--brand);
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.icon-btn:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn-ghost-sm {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font: 600 12px inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-ghost-sm:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

/* ================= NAVEGAÇÃO MOBILE (BARRA INFERIOR CLEAN) ================= */
.sidebar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  z-index: 30;
  display: flex;
  align-items: stretch;
}

.sidebar[hidden] { display: none; }
.sidebar-brand, .sidebar-footer { display: none; }

.nav-list {
  display: flex;
  width: 100%;
  justify-content: space-around;
  align-items: stretch;
}

.nav-item {
  flex: 1;
  position: relative;
  border: 0;
  background: none;
  color: var(--muted);
  font: 600 11px inherit;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.nav-item .nav-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-item.on {
  color: var(--brand);
  font-weight: 700;
}

.nav-item.on::after {
  content: '';
  position: absolute;
  top: 0;
  left: 24%;
  right: 24%;
  height: 2.5px;
  background: var(--brand);
  border-radius: 0 0 4px 4px;
}

.nav-badge {
  position: absolute;
  top: 5px;
  right: calc(50% - 19px);
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-badge[hidden] { display: none; }

/* ================= NAVEGAÇÃO DESKTOP (SIDEBAR ESQUERDA CLEAN) ================= */
@media (min-width: 960px) {
  body {
    padding-left: var(--sidebar-w);
    padding-bottom: 32px;
  }

  .sidebar {
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: var(--sidebar-w);
    height: 100vh;
    padding: 16px 12px;
    border-top: 0;
    border-right: 1px solid var(--border);
    flex-direction: column;
    justify-content: space-between;
    background: var(--surface);
  }

  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 18px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .brand-name {
    display: block;
    font-weight: 800;
    font-size: 14px;
    color: var(--ink);
    letter-spacing: -0.02em;
  }

  .brand-sub {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
  }

  .nav-list {
    flex-direction: column;
    gap: 4px;
    flex: 1;
    justify-content: flex-start;
  }

  .nav-item {
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
  }

  .nav-item:hover {
    background: var(--surface-2);
    color: var(--ink);
  }

  .nav-item.on {
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 700;
  }

  .nav-item.on::after { display: none; }

  .nav-badge {
    position: static;
    margin-left: auto;
  }

  .sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }

  .topbar-logo, .topbar-brand { display: none; }
  .topbar-sub { font-size: 15px; font-weight: 700; color: var(--ink); }
  #btnSair, #btnConfig { display: none !important; }
}

/* ================= CONTEÚDO PRINCIPAL ================= */
main {
  padding: 16px;
  max-width: 1180px;
  margin: 0 auto;
  padding-bottom: 96px;
}

@media (min-width: 960px) {
  main {
    padding: 22px 28px 48px;
  }
}

.loading-box {
  padding: 48px 16px;
  text-align: center;
  color: var(--muted);
  font-weight: 500;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.page-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.page-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.sec-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 20px 0 10px;
}

/* ================= CARDS & SURFACES ================= */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.card-compact {
  padding: 12px 14px;
}

.card-tinted {
  background: var(--surface-2);
}

.card-warn {
  background: var(--warn-soft);
  border-color: var(--warn-border);
}

.card-ok {
  background: var(--ok-soft);
  border-color: var(--ok-border);
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.row-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.gap-6 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gap-8 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.muted { color: var(--muted); font-size: 12.5px; }
.pos { color: var(--ok); }
.neg { color: var(--brand); }

.kpi-val {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.kpi-val.brand { color: var(--brand); }
.kpi-val.ok { color: var(--ok); }

/* ================= GRIDS ================= */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid-4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

@media (min-width: 720px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ================= INPUTS & FORMS ================= */
.field {
  margin-bottom: 10px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: 500 14px inherit;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(196, 30, 20, 0.10);
}

input::placeholder { color: var(--muted-light); }

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-wrap .search-ic {
  position: absolute;
  left: 11px;
  color: var(--muted);
  pointer-events: none;
  display: inline-flex;
}

.search-wrap input {
  padding-left: 36px;
}

/* ================= BOTÕES ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--brand);
  color: #fff;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  font: 700 13.5px inherit;
  width: 100%;
  cursor: pointer;
  transition: background 0.15s, transform 0.08s, border-color 0.15s, color 0.15s;
}

.btn:hover:not(:disabled) { background: var(--brand-hover); }
.btn:active:not(:disabled) { transform: scale(0.99); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn.ok { background: var(--ok); }
.btn.ok:hover:not(:disabled) { background: var(--ok-hover); }

.btn.secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn.secondary:hover:not(:disabled) { background: var(--surface-2); }

.btn.soft {
  background: var(--surface-2);
  color: var(--ink-soft);
  border-color: var(--border);
}
.btn.soft:hover:not(:disabled) { background: var(--border); color: var(--ink); }

.btn.danger {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand-border);
}
.btn.danger:hover:not(:disabled) { background: #FEE2E2; }

.btn.sm {
  width: auto;
  padding: 7px 11px;
  font-size: 12.5px;
  font-weight: 600;
}

.btn.xs {
  width: auto;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 600;
}

.btn.link {
  background: none;
  border: 0;
  color: var(--brand);
  font-weight: 600;
  padding: 8px;
}
.btn.link:hover { background: var(--brand-soft); }

/* ================= BADGES / TAGS / ALERTS ================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--ink-soft);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-border); }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-border); }
.badge.danger { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-border); }
.badge.info { background: var(--info-soft); color: var(--info); border-color: var(--info-border); }

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 10px;
  background: var(--warn-soft);
  border: 1px solid var(--warn-border);
  color: #92400E;
}

.banner.ok { background: var(--ok-soft); border-color: var(--ok-border); color: #166534; }
.banner.info { background: var(--info-soft); border-color: var(--info-border); color: #1E40AF; }
.banner.danger { background: var(--brand-soft); border-color: var(--brand-border); color: #991B1B; }

/* ================= SEGMENTED TABS & PILLS ================= */
.tabs {
  display: inline-flex;
  background: var(--border);
  padding: 3px;
  border-radius: 10px;
  gap: 2px;
}

.tabs button {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  padding: 7px 14px;
  border-radius: 8px;
  font: 700 13px inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.tabs button.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 8px;
  scrollbar-width: none;
}
.pills::-webkit-scrollbar { display: none; }

.pills button {
  flex: 0 0 auto;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 6px 13px;
  font: 600 12.5px inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.pills button:hover { border-color: var(--ink-soft); color: var(--ink); }

.pills button.on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* ================= PDV (LAYOUT 2 COLUNAS NO DESKTOP) ================= */
.pdv-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

@media (min-width: 960px) {
  .pdv-layout {
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 20px;
  }
  .pdv-cart-col {
    position: sticky;
    top: 72px;
    max-height: calc(100vh - 92px);
    overflow-y: auto;
  }
}

.cat-heading {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 14px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.prod-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 640px) {
  .prod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.prod-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-height: 92px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.08s;
}

.prod-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.prod-card.in-cart {
  border-color: var(--brand);
  background: #FFFDFC;
}

.prod-name {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.25;
}

.prod-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.prod-price {
  font-weight: 800;
  font-size: 13.5px;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.prod-stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  padding: 2px;
  flex-shrink: 0;
}

.prod-stepper button {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: var(--surface);
  color: var(--brand);
  font-weight: 800;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.prod-stepper span {
  min-width: 18px;
  text-align: center;
  font-weight: 800;
  font-size: 12px;
  color: var(--brand);
}

/* Botões de 1 toque (Pagamento e Tipo) */
.choice-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.choice-grid-5 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

@media (min-width: 480px) {
  .choice-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.choice-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  font: 600 12px inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s;
}

.choice-btn:hover { background: var(--surface-2); color: var(--ink); }

.choice-btn.on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* Itens do Carrinho */
.cart-line {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.cart-line:last-child { border-bottom: 0; }

.cart-line-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.cart-line-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.qty-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.qty-mini button {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qty-mini button:hover { background: var(--surface-2); }

/* Barra Flutuante Mobile de Carrinho */
.cart-float {
  position: fixed;
  bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  left: 12px;
  right: 12px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  padding: 11px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 25;
  box-shadow: var(--shadow-md);
}

@media (min-width: 960px) {
  .cart-float { display: none; }
}

/* ================= CLIENTES & FIDELIDADE ================= */
.cli-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cli-row:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cli-info { min-width: 0; flex: 1; }
.cli-name { font-weight: 700; font-size: 14px; color: var(--ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.hit-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-top: 6px;
  text-align: left;
  cursor: pointer;
  font: 600 13.5px inherit;
}
.hit-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }

.loyalty-box {
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  padding: 12px;
  margin-top: 10px;
}

.stamps {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
  margin: 10px 0 4px;
}

.stamp {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
}

.stamp.filled {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.stamp.bonus {
  background: #F59E0B;
  border-color: #D97706;
  color: #fff;
}

/* ================= PRODUTOS (SWITCH DISPONÍVEL/ESGOTADO) ================= */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-track {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #CBD5E1;
  position: relative;
  transition: background 0.15s;
}

.switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s;
}

.switch input:checked + .switch-track {
  background: var(--ok);
}

.switch input:checked + .switch-track::after {
  transform: translateX(16px);
}

.prod-paused {
  opacity: 0.6;
  background: var(--surface-2);
}

/* ================= FILA DE PREPARO / STATUS ================= */
.order-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.pedido-cancelado {
  opacity: 0.6;
  background: var(--surface-2);
}

.pedido-cancelado .riscado {
  text-decoration: line-through;
}

/* ================= PROGRESSO, TABELAS E GRÁFICOS ================= */
.progress {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; }
th { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.ta-right { text-align: right; }

.chart-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 8px;
}

.chart-wrap svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-wrap svg text {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* ================= LOGIN ================= */
.login-wrap {
  max-width: 400px;
  margin: 40px auto;
}

.login-hero {
  text-align: center;
  margin-bottom: 20px;
}

.login-hero img {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
}

.login-hero h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

/* ================= MODAL CLEAN ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 24, 27, 0.52);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
  animation: fadeBackdrop 0.15s ease;
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  animation: popModal 0.16s ease-out;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.modal-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ================= TOAST ================= */
#toast-container {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: min(360px, calc(100vw - 24px));
  pointer-events: none;
}

.toast {
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 13px;
  box-shadow: var(--shadow-md);
  border-left: 4px solid #F59E0B;
  animation: slideToast 0.18s ease-out;
  pointer-events: auto;
}

.toast.ok { border-left-color: #22C55E; }
.toast.err { border-left-color: #EF4444; }

@keyframes fadeBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popModal {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slideToast {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.empty-state {
  text-align: center;
  padding: 28px 16px;
  color: var(--muted);
}
