/* ==========================================================================
   Meu Terreiro — Design System (inspirado em Spotify Dark)
   Fonte: docs/design-system/reference-dark.html
   ========================================================================== */

:root {
  /* ── Cores (Brand) ── */
  --bg: #0a0a0a;            /* Fundo da página */
  --surface: #111111;       /* Cards, containers */
  --mid: #1f1f1f;           /* Botões, inputs */
  --card: #252525;          /* Hover de cards */
  --green: #1ed760;         /* Accent / marca (CTA primário) */
  --white: #ffffff;         /* Texto primário */
  --silver: #b3b3b3;        /* Texto secundário */
  --muted: #7c7c7c;         /* Texto terciário / estados */

  /* ── Cores (Semânticas) ── */
  --neg: #f3727f;           /* Erro / negativo */
  --warn: #ffa42b;          /* Aviso */
  --info: #539df5;          /* Info / anúncio */

  /* ── Bordas ── */
  --border: #4d4d4d;
  --light-border: #7c7c7c;

  /* ── Sombras (Elevation) ── */
  --shadow-heavy: rgba(0, 0, 0, 0.5) 0px 8px 24px;   /* Dialog */
  --shadow-med: rgba(0, 0, 0, 0.3) 0px 8px 8px;      /* Elevated */

  /* ── Tipografia ── */
  --font: 'Inter', 'Helvetica Neue', helvetica, arial, sans-serif;

  /* ── Radius ── */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-pill: 500px;

  /* ── Spacing (escala 4/8/12/16/20) ── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  /* ── Layout ── */
  --sidebar-width: 240px;
  --topbar-height: 60px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

/* Layout shell */
.app-shell { display: flex; min-height: 100vh; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-content { flex: 1; padding: var(--space-6) var(--space-8) 48px; max-width: 1200px; width: 100%; margin: 0 auto; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--space-5) var(--space-4);
}
.sidebar-logo {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: var(--green);
  color: #000;
  border-radius: 50%;
  font-weight: 700;
}
.sidebar-title { font-size: 15px; font-weight: 700; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: var(--space-3) var(--space-2); }
.nav-section {
  display: block;
  margin: var(--space-4) var(--space-3) var(--space-2);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--silver);
}
.nav-section:first-child { margin-top: var(--space-1); }
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--silver);
  font-weight: 600;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--white); }
.nav-link.active { color: var(--white); background: var(--mid); }
.nav-link.active .nav-icon { color: var(--green); }
.nav-icon { width: 18px; text-align: center; font-size: 15px; }
.sidebar-footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-tenant { font-size: 13px; font-weight: 700; }
.sidebar-version { font-size: 10px; color: var(--muted); }

/* ── Topbar ── */
.topbar {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  background: rgba(10, 10, 10, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-toggle { background: none; border: none; color: var(--silver); font-size: 20px; }
.topbar-title { font-size: 16px; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.user-name { display: block; font-size: 13px; font-weight: 700; text-align: right; color: var(--paper); }
.user-name:hover { color: var(--green); }
.user-role { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Tipografia (escala) ── */
h1, h2, h3 { margin: 0; }
h1 { font-size: 24px; font-weight: 700; }        /* Section Title */
h2 { font-size: 18px; font-weight: 600; line-height: 1.3; }  /* Feature */
h3 { font-size: 16px; font-weight: 700; }        /* Body Bold */
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: var(--space-6); flex-wrap: wrap; }
.page-heading > div:first-child { flex: 1 1 auto; min-width: 200px; }
.page-heading > div:last-child, .page-heading > .btn, .page-heading > a:not(:first-child) { flex-wrap: wrap; }
.page-heading h1 { line-height: 1.1; }
.page-subtitle { color: var(--silver); margin: 6px 0 0; font-size: 14px; }

/* ── Botões (Spotify pills) ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-pill);
  border: none;
  background: var(--mid);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.1s, background 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: scale(1.02); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--green); color: #000; }
.btn-primary:hover { background: #1fdf64; }
.btn-outline { background: transparent; border: 1px solid var(--light-border); color: var(--white); }
.btn-outline:hover { border-color: var(--white); transform: scale(1.02); }
.btn-danger { background: transparent; border: 1px solid var(--neg); color: var(--neg); }
.btn-sm { min-height: 32px; padding: 0 var(--space-4); font-size: 12px; }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--green); color: #000;
  font-size: 20px; font-weight: 700; border: none; cursor: pointer;
}
.btn-icon:hover { transform: scale(1.05); }

/* ── Cards ── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--space-4);
  transition: background 0.2s;
}
.card:hover { background: var(--card); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.card-title { font-size: 16px; font-weight: 700; }
.card.elevated { box-shadow: var(--shadow-med); }
.card.dialog { box-shadow: var(--shadow-heavy); }

/* ── KPI grid ── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-6); }
.kpi-card { position: relative; overflow: hidden; padding: var(--space-5); }
.kpi-card::after {
  content: ""; position: absolute; right: -22px; bottom: -30px;
  width: 90px; height: 90px; border-radius: 50%;
  background: var(--green); opacity: 0.1;
}
.kpi-label { font-size: 10px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--silver); }
.kpi-value { font-size: 32px; font-weight: 700; margin: var(--space-2) 0 var(--space-1); }
.kpi-trend { font-size: 11px; color: var(--green); font-weight: 600; }
.kpi-trend.down { color: var(--neg); }

/* ── Tabelas ── */
.table-wrap { overflow-x: auto; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th {
  padding: var(--space-3) var(--space-4);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--silver);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid rgba(255, 255, 255, 0.06); font-size: 13px; color: var(--silver); }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: var(--card); }
tbody tr:last-child td { border-bottom: 0; }
td strong { color: var(--white); font-weight: 700; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: capitalize;
  border: 1px solid var(--border);
}
.badge-success { color: var(--green); border-color: rgba(30, 215, 96, 0.4); }
.badge-warning { color: var(--warn); border-color: rgba(255, 164, 43, 0.4); }
.badge-danger { color: var(--neg); border-color: rgba(243, 114, 127, 0.4); }
.badge-info { color: var(--info); border-color: rgba(83, 157, 245, 0.4); }

/* ── Formulários (Spotify pills) ── */
.form-group { display: grid; gap: var(--space-1); margin-bottom: var(--space-4); max-width: 400px; }
label {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--white);
}
input, select, textarea {
  width: 100%;
  background: var(--mid);
  color: var(--white);
  border: none;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  outline: none;
  box-shadow: rgb(18, 18, 18) 0px 1px 0px, rgb(124, 124, 124) 0px 0px 0px 1px inset;
  transition: box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 2px var(--green); }
textarea { border-radius: var(--radius); min-height: 80px; resize: vertical; }
select { appearance: none; }
.form-input-error { box-shadow: 0 0 0 2px var(--neg); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); }
.form-actions { display: flex; justify-content: flex-end; gap: var(--space-3); margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid rgba(255, 255, 255, 0.08); }
.helptext { font-size: 11px; color: var(--muted); }
.errorlist { color: var(--neg); font-size: 12px; margin: 4px 0 0; padding-left: 18px; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  display: grid; place-items: center;
  padding: var(--space-6);
}
.modal {
  width: min(100%, 520px);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-heavy);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.modal-close { background: none; border: none; color: var(--silver); font-size: 22px; }
.modal-body { padding: var(--space-5); }
.modal-footer { display: flex; justify-content: flex-end; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-top: 1px solid rgba(255, 255, 255, 0.08); }

/* ── Toast ── */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: var(--space-2); }
.toast {
  padding: 12px 18px;
  border-radius: var(--radius);
  background: var(--mid);
  box-shadow: var(--shadow-med);
  font-size: 13px;
  animation: toast-in 0.25s ease;
}
.toast-success { border: 1px solid rgba(30, 215, 96, 0.5); }
.toast-error { border: 1px solid var(--neg); }
.toast-warning { border: 1px solid var(--warn); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ── Auth ── */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: var(--space-6); }
.auth-card {
  width: min(100%, 400px);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-heavy);
  padding: var(--space-8);
}
.auth-brand { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: var(--space-6); }
.auth-brand .sidebar-logo { width: 40px; height: 40px; font-size: 18px; }
.auth-title { text-align: center; font-size: 24px; margin-bottom: var(--space-1); }
.auth-subtitle { text-align: center; color: var(--silver); font-size: 14px; margin: 0 0 var(--space-6); }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-state .empty-icon { font-size: 40px; margin-bottom: var(--space-3); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar { position: fixed; z-index: 50; transform: translateX(-100%); transition: transform 0.25s ease; box-shadow: var(--shadow-heavy); }
  .sidebar.open { transform: translateX(0); }
  .app-content { padding: var(--space-4); }
  .topbar { padding: 0 var(--space-4); }
  .card-grid { grid-template-columns: 1fr; }
  /* Mobile: botões menos arredondados e que cabem na tela */
  .btn {
    border-radius: var(--radius);
    padding: 0 var(--space-4);
    font-size: 13px;
    letter-spacing: 0.8px;
    min-height: 38px;
  }
  .page-heading { align-items: flex-start; gap: 12px; }
  .page-heading > div:last-child, .page-heading > div { flex-wrap: wrap; }
  .page-heading > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
  .page-heading > div:last-child .btn { flex: 1 1 auto; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-value { font-size: 26px; }
  .form-row { grid-template-columns: 1fr; }
}

/* ── Chart bars (dashboard) ── */
.chart-bars { display: flex; align-items: flex-end; gap: var(--space-3); height: 200px; padding-top: var(--space-4); }
.chart-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); height: 100%; }
.chart-bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; background: rgba(255,255,255,0.04); border-radius: var(--radius-sm); overflow: hidden; }
.chart-bar {
  width: 100%;
  min-height: 4px;
  background: linear-gradient(180deg, var(--green), rgba(30, 215, 96, 0.4));
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: height 0.4s ease, opacity 0.2s;
  cursor: pointer;
}
.chart-bar:hover { opacity: 0.85; }
.chart-bar-label { font-size: 10px; color: var(--muted); font-weight: 600; }

/* ── PDV (point of sale) ── */
.pos-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--space-4); align-items: start; }
.pos-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--space-2); }
.pos-product {
  display: flex; flex-direction: column; gap: 4px;
  padding: var(--space-3);
  background: var(--mid);
  border: none;
  border-radius: var(--radius);
  color: var(--white);
  text-align: left;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
}
.pos-product:hover { background: var(--card); transform: scale(1.02); }
.pos-product:active { transform: scale(0.97); }
.pos-product-name { font-size: 13px; font-weight: 600; }
.pos-product-price { font-size: 11px; color: var(--green); font-weight: 700; }
.pos-cart { min-height: 160px; max-height: 320px; overflow-y: auto; }
.pos-cart-item {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
}
.pos-cart-name { flex: 1; font-weight: 600; }
.pos-cart-qty { color: var(--silver); }
.pos-cart-line { font-weight: 700; min-width: 70px; text-align: right; }
.pos-cart-remove { background: none; border: none; color: var(--neg); font-size: 18px; cursor: pointer; }
.pos-cart-total {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--space-3) 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 16px;
}
.pos-cart-total strong { font-size: 22px; color: var(--green); }

@media (max-width: 900px) {
  .pos-layout { grid-template-columns: 1fr; }
}

/* Fix: garantir que [hidden] sempre esconda (sobrepõe display:grid do overlay) */
[hidden] { display: none !important; }

/* ── Action detail grid (responsivo) ── */
.action-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 768px) {
  .action-detail-grid { grid-template-columns: 1fr; }
}

/* ── Vincular venda a ação (PDV) ── */
.pos-action-bind {
  margin-top: 14px;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.pos-action-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--silver);
  margin-bottom: 10px;
}
.pos-action-opt {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}
.pos-action-options { display: grid; gap: 8px; }
.pos-action-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.pos-action-option:active { background: var(--card); }
.pos-action-option.checked {
  border-color: var(--green);
  background: rgba(30, 215, 96, 0.08);
}
.pos-action-check { display: none; }
.pos-action-checkbox {
  width: 22px; height: 22px;
  flex-shrink: 0;
  border: 2px solid var(--light-border);
  border-radius: 6px;
  display: grid;
  place-items: center;
  transition: background 0.15s, border-color 0.15s;
}
.pos-action-option.checked .pos-action-checkbox {
  background: var(--green);
  border-color: var(--green);
}
.pos-action-option.checked .pos-action-checkbox::after {
  content: "✓";
  color: #000;
  font-size: 14px;
  font-weight: 700;
}
.pos-action-name { flex: 1; font-size: 14px; font-weight: 600; }
.pos-action-meta { font-size: 11px; color: var(--muted); font-family: var(--font-mono); }

/* ── Badge meta atingida (PDV) ── */
.pos-action-done {
  font-size: 10px;
  font-weight: 700;
  color: var(--green);
  border: 1px solid rgba(30, 215, 96, 0.4);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* ── Checkbox customizado (padrão Oppozy — mesmo estilo do PDV) ── */
.custom-check-option {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.custom-check-option:active { background: var(--card); }
.custom-check-option.checked {
  border-color: var(--green);
  background: rgba(30, 215, 96, 0.08);
}
.custom-check { display: none; }
.custom-checkbox {
  width: 22px; height: 22px;
  flex-shrink: 0;
  border: 2px solid var(--light-border);
  border-radius: 6px;
  display: grid;
  place-items: center;
  transition: background 0.15s, border-color 0.15s;
}
.custom-check-option.checked .custom-checkbox {
  background: var(--green);
  border-color: var(--green);
}
.custom-check-option.checked .custom-checkbox::after {
  content: "✓";
  color: #000;
  font-size: 14px;
  font-weight: 700;
}
.custom-check-label { font-size: 13px; font-weight: 600; }

/* Linha de checkboxes em 2 colunas */
.check-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 768px) {
  .check-row { grid-template-columns: 1fr; }
}

/* ── Backdrop do menu (mobile) ── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}
@media (max-width: 768px) {
  .sidebar-backdrop.visible { display: block; }
}

/* ── Alerta de erro (login/auth) ── */
.auth-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
  background: rgba(243, 114, 127, 0.1);
  border: 1px solid rgba(243, 114, 127, 0.45);
  border-radius: var(--radius);
  color: var(--neg);
  font-size: 13px;
  font-weight: 600;
}
.auth-alert-icon { font-size: 16px; flex-shrink: 0; }

/* ── Alerta de bloqueio (brute force) ── */
.auth-alert--blocked {
  background: rgba(243, 114, 127, 0.18);
  border-color: rgba(243, 114, 127, 0.7);
  font-weight: 700;
}

/* ── Sino de notificações (topbar) ── */
.topbar-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  text-decoration: none;
  transition: background 0.15s;
}
.topbar-bell:hover { background: var(--mid); }
.bell-icon { font-size: 18px; }
.bell-badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--oxide);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid var(--bg);
}

/* ── Modal de notificações (design system) ── */
.notif-modal { max-width: 480px; width: 100%; }
.notif-modal-body {
  display: grid;
  gap: 10px;
  max-height: 50vh;
  overflow-y: auto;
}
.notif-modal-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--mid);
  border: 1px solid var(--paper-12);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.notif-modal-icon { font-size: 20px; flex-shrink: 0; }
.notif-modal-msg { font-size: 13px; font-weight: 600; line-height: 1.4; }
.notif-modal-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.notif-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--paper-12);
  padding-top: 14px;
}

/* ── SweetAlert2 (design system) ── */
.swal-notif-popup {
  border: 1px solid rgba(241, 236, 227, 0.1);
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}
/* Desktop: canto inferior direito */
@media (min-width: 769px) {
  .swal2-container.swal2-bottom-end {
    align-items: flex-end;
    justify-content: flex-end;
    padding: 24px;
  }
  .swal2-container.swal2-bottom-end .swal2-popup {
    margin: 0 !important;
  }
}
/* Mobile: centralizado */
@media (max-width: 768px) {
  .swal2-container.swal2-center { padding: 16px; }
  .swal2-container.swal2-center .swal2-popup { margin: 0 !important; }
}
.swal-notif-html { font-family: 'Inter', sans-serif !important; }
.swal-notif-confirm {
  font-family: 'Inter', sans-serif !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  border-radius: 8px !important;
  color: #000 !important;
  padding: 10px 18px !important;
}
.swal-notif-cancel {
  font-family: 'Inter', sans-serif !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  border-radius: 8px !important;
  color: #b3b3b3 !important;
  background: #1f1f1f !important;
  border: 1px solid #2e2e2e !important;
  padding: 10px 18px !important;
}
.swal-notif-cancel:hover {
  color: #f1ece3 !important;
  border-color: #4a4a4a !important;
}
/* Botão de fechar (✕) */
.swal2-close {
  color: #6f6f6f !important;
  font-size: 22px !important;
}
.swal2-close:hover { color: #f1ece3 !important; }

/* ── Submenu (nav-group) ── */
.nav-group { display: flex; flex-direction: column; }
.nav-group-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  color: var(--silver);
  padding: 10px 12px;
  border-radius: 8px;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.nav-group-toggle:hover { background: var(--mid); color: var(--paper); }
.nav-chevron { margin-left: auto; font-size: 11px; transition: transform 0.2s; color: var(--muted); }
.nav-group.open .nav-chevron { transform: rotate(180deg); }
.nav-submenu {
  display: none;
  flex-direction: column;
  margin-left: 14px;
  padding-left: 10px;
  border-left: 1px solid var(--mid);
}
.nav-group.open .nav-submenu { display: flex; }
.nav-sub-link { font-size: 13px; padding: 8px 10px; }
.nav-sub-link .nav-icon { font-size: 13px; }

/* ── Ocultar setas dos inputs number ── */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ── DataTables (design system) ── */
.dataTables_wrapper {
  padding: 0;
}
.dt-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 12px 14px 4px;
  gap: 8px;
  font-size: 12px;
  color: var(--silver);
}
.dt-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  color: var(--silver);
}
.dt-toolbar select {
  background: var(--bg);
  border: 1px solid var(--mid);
  border-radius: 8px;
  color: var(--paper);
  padding: 5px 8px;
  font-size: 12px;
}
.dt-toolbar select:focus {
  border-color: var(--green);
  outline: none;
}
.dt-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--silver);
  border-top: 1px solid var(--paper-12);
}
.dataTables_info {
  font-size: 12px;
  color: var(--silver);
}
.dataTables_paginate {
  display: flex;
  gap: 4px;
}
.dataTables_paginate .paginate_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--mid) !important;
  border-radius: 8px !important;
  background: var(--surface) !important;
  color: var(--silver) !important;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  margin: 0 !important;
}
.dataTables_paginate .paginate_button:hover {
  background: var(--mid) !important;
  color: var(--paper) !important;
}
.dataTables_paginate .paginate_button.current {
  background: var(--green) !important;
  border-color: var(--green) !important;
  color: #000 !important;
  font-weight: 700;
}
.dataTables_paginate .paginate_button.disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}
/* Mantém o layout da tabela com espaço adequado */
table.data-table {
  width: 100% !important;
}
table.data-table thead th {
  white-space: nowrap;
}

/* DataTables dentro do .table-wrap — espaçamento preservado */
.table-wrap .dataTables_wrapper .dataTables_scroll,
.table-wrap .dataTables_wrapper table.data-table {
  margin: 0;
}
.dataTables_wrapper .dataTables_scrollBody {
  overflow-x: auto !important;
}

/* ── Botões de ação com ícone (coluna Ações) ── */
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  position: relative;
}
.action-btn:active { transform: scale(0.92); }
.action-btn--primary {
  background: var(--green);
  color: #000;
}
.action-btn--primary:hover { background: #1acf57; }
.action-btn--danger {
  background: rgba(243, 114, 127, 0.12);
  border-color: rgba(243, 114, 127, 0.4);
  color: var(--neg);
}
.action-btn--danger:hover { background: rgba(243, 114, 127, 0.22); }
.action-btn--outline {
  background: transparent;
  border-color: var(--mid);
  color: var(--silver);
}
.action-btn--outline:hover { border-color: var(--silver); color: var(--paper); }
.action-btn--warn {
  background: rgba(255, 164, 43, 0.12);
  border-color: rgba(255, 164, 43, 0.4);
  color: var(--warn);
}
.action-btn--warn:hover { background: rgba(255, 164, 43, 0.22); }
.action-btn--info {
  background: rgba(83, 157, 245, 0.12);
  border-color: rgba(83, 157, 245, 0.4);
  color: var(--info);
}
.action-btn--info:hover { background: rgba(83, 157, 245, 0.22); }

/* Tooltip */
.action-btn[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: var(--mid);
  color: var(--paper);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 20;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.action-btn[data-tip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* Coluna de ações: largura mínima, botões em linha */
td:last-child .action-cell,
.action-cell {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.settings-payment-options,
.pos-payment-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.pos-payment-methods {
  margin-top: 18px;
}

.pos-sale-notes {
  margin-top: 18px;
}

.pos-sale-notes textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
}

.pos-credit-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.pos-credit-summary {
  color: var(--neg);
  font-size: 12px;
  font-weight: 600;
}

.pos-credit-modal[hidden] { display: none; }
.pos-credit-modal { position: fixed; inset: 0; z-index: 1000; }
.pos-credit-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .65); }
.pos-credit-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 460px);
  margin: 12vh auto 0;
  padding: 20px;
  border-radius: 12px;
  background: var(--surface, #1d1d1f);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

.pos-credit-dialog label:not(.custom-check-option) {
  display: block;
  margin: 18px 0 6px;
  font-size: 13px;
}

.pos-credit-dialog select { width: 100%; box-sizing: border-box; }
.modal-close { border: 0; background: transparent; color: var(--muted); font-size: 24px; cursor: pointer; }
