/* =========================================================
   PDV – Painel Web (Template Profissional + Acessível)
   ========================================================= */

/* ===== Reset / Base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.35;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }

/* ===== Tokens (padronização) ===== */
:root{
  /* =====================================================
     Theme System (PayTech)
     - Primary: #FB9B36
     - Success: #9DFF2C
     - BG: #000
     ===================================================== */

  --bg: #000000;
  --surface: #0f0f0f;
  --surface-2: #151515;
  --card: var(--surface);

  --text: #ffffff;
  --muted: rgba(255,255,255,0.72);
  --border: rgba(255,255,255,0.12);
  --border-2: rgba(255,255,255,0.16);

  --primary: #FB9B36;
  --primary-contrast: #000000;
  --primary-rgb: 251, 155, 54;

  --success: #9DFF2C;
  --success-contrast: #000000;
  --success-rgb: 157, 255, 44;

  --danger: #ff4d4d;
  --danger-rgb: 255, 77, 77;

  --warning: #ffcc00;
  --warning-rgb: 255, 204, 0;

  --shadow-sm: 0 10px 26px rgba(0,0,0,.45);
  --shadow-md: 0 18px 50px rgba(0,0,0,.55);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;

  --pad-1: 8px;
  --pad-2: 12px;
  --pad-3: 14px;
  --pad-4: 18px;

  /* =====================================================
     Legacy aliases (compatibilidade com CSS existente)
     ===================================================== */
  --brand-950: #000000;
  --brand-900: #0a0a0a;
  --brand-800: #0f0f0f;
  --brand-700: var(--primary);
  --brand-600: var(--primary);
  --brand-200: rgba(var(--primary-rgb), 0.18);

  --ok-700: #66cc00;
  --ok-600: #86ea1e;
  --ok-500: var(--success);

  --warn-600: #ffb300;
  --warn-500: var(--warning);

  --danger-600: #ff3b3b;
  --danger-500: var(--danger);
}

/* ===== Acessibilidade ===== */
.skip-link{
  position: absolute;
  left: 12px;
  top: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  z-index: 999;
  transform: translateY(-200%);
  transition: transform .15s ease;
}
.skip-link:focus{ transform: translateY(0); }

:focus-visible{
  outline: 3px solid rgba(var(--primary-rgb), .55);
  outline-offset: 2px;
  border-radius: 10px;
}

/* Scrollbar (Chrome/Edge) */
*::-webkit-scrollbar{ width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb{ background: rgba(255,255,255,.12); border-radius: 999px; }
*::-webkit-scrollbar-track{ background: transparent; }

/* ===== Helpers ===== */
.hint { min-height: 18px; font-size: 12px; color: var(--muted); }
.page-sub { margin-top: 6px; font-size: 12px; color: var(--muted); }

/* Badge */
.badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(var(--success-rgb), .18);
  color: var(--success);
  font-weight: 900;
  font-size: 12px;
}

/* ===== Inputs / Fields ===== */
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 12px; font-weight: 900; color: var(--muted); }

/* Unificação do padrão para input/select/textarea */
.input, .payment-select, .filters input[type="date"]{
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  outline: none;
  background: var(--surface-2);
  color: var(--text);
}
::placeholder{ color: rgba(255,255,255,.55); }
textarea.input{
  resize: vertical;
  min-height: 88px;
  line-height: 1.35;
}
.input:focus,
.payment-select:focus,
.filters input[type="date"]:focus{
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .18);
}

/* ===== Buttons ===== */
.btn-primary{
  padding: 10px 14px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: .02em;
  background: var(--primary);
  color: var(--primary-contrast);
  box-shadow: 0 10px 20px rgba(var(--primary-rgb), .18);
  transition: transform .06s ease, box-shadow .12s ease, filter .12s ease;
}
.btn-primary:hover{ box-shadow: 0 14px 26px rgba(var(--primary-rgb), .22); filter: saturate(1.06) brightness(.98); }
.btn-primary:active,
.btn-outline:active{ transform: translateY(1px); }
.btn-primary.small,
.btn-outline.small{ padding: 8px 12px; font-size: 12px; }
.btn-primary.full,
.btn-outline.full{ width: 100%; }

.btn-outline{
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
  transition: background .12s ease, transform .06s ease, border-color .12s ease;
}
.btn-outline:hover{ background: rgba(255,255,255,.06); border-color: rgba(var(--primary-rgb), .35); }

.btn-ghost{
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.60);
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  transition: background .12s ease, transform .06s ease, border-color .12s ease;
}
.btn-ghost:hover{ background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.75); }
.btn-ghost:active{ transform: translateY(1px); }

.btn-ghost.small{
  border-color: var(--border-2);
  color: var(--text);
  background: var(--surface-2);
}
.btn-ghost.small:hover{ background: rgba(255,255,255,.06); }

.btn-link{
  width: 100%;
  background: transparent;
  border: none;
  padding: 10px 0 0;
  cursor: pointer;
  color: var(--primary);
  font-weight: 900;
  text-decoration: underline;
}
.btn-link:hover{ filter: brightness(0.95); }
.btn-link:active{ transform: translateY(1px); }

.icon-btn{
  width: 36px; height: 36px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  transition: background .12s ease, border-color .12s ease, transform .06s ease;
}
.icon-btn:hover{ background: rgba(255,255,255,.06); border-color: rgba(var(--primary-rgb), .25); }
.icon-btn:active{ transform: translateY(1px); }

/* ===== Chips / Tags (novo – usado em tabelas e status) ===== */
.chip{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text);
  white-space: nowrap;
}
.chip-dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.35);
}
.chip.ok{
  border-color: rgba(var(--success-rgb), .35);
  background: rgba(var(--success-rgb), .10);
  color: var(--success);
}
.chip.ok .chip-dot{ background: var(--ok-500); }
.chip.danger{
  border-color: rgba(var(--danger-rgb), .35);
  background: rgba(var(--danger-rgb), .10);
  color: var(--danger);
}
.chip.danger .chip-dot{ background: var(--danger-500); }
.chip.warn{
  border-color: rgba(var(--warning-rgb), .35);
  background: rgba(var(--warning-rgb), .12);
  color: var(--warning);
}
.chip.warn .chip-dot{ background: var(--warn-500); }

/* ===== Login ===== */
.login-box{
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(900px 340px at 18% 0%, rgba(var(--primary-rgb), .14), transparent 60%),
    radial-gradient(900px 340px at 82% 0%, rgba(var(--success-rgb), .12), transparent 60%),
    var(--bg);
}
.login-card{
  width: min(440px, 96vw);
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--border);
}
.brand{
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark{
  width: 44px; height: 44px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--brand-600), var(--brand-800));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(var(--primary-rgb), .18);
}
.login-card h2{ font-size: 18px; font-weight: 900; }

.form{ display: flex; flex-direction: column; gap: 12px; }
.login-foot{ margin-top: 4px; }

/* Google Identity Services (Login com Google) */
#googleLoginBoxLogin,
#googleLoginBoxRegister{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

#googleBtnLogin,
#googleBtnRegister{
  width: 100%;
  display: flex;
  justify-content: center;
}

/* O GIS injeta uma DIV interna com largura fixa; centralizamos e limitamos */
#googleBtnLogin > div,
#googleBtnRegister > div{
  width: min(320px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

/* ===== App full screen ===== */
.app{
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ===== Top bar ===== */
.top-bar{
  background: var(--surface);
  color: var(--text);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

/* ===== Neon Bar (scanner) =====
   Mantém a altura fina do layout (1px) e aplica glow + varredura suave.
*/
.neon-bar{
  position: relative;
  width: 100%;
  height: 1px; /* preserva a altura original */
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary, #FB9B36),
    var(--accent, var(--success, #9DFF2C)),
    var(--primary, #FB9B36),
    transparent
  );
  overflow: hidden;
  box-shadow:
    0 0 6px rgba(251, 155, 54, 0.55),
    0 0 12px rgba(157, 255, 44, 0.22);
  opacity: 0.95;
}

.neon-bar::before{
  content: "";
  position: absolute;
  top: 0;
  left: -30%;
  width: 30%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.95),
    transparent
  );
  animation: neonMove 2.2s linear infinite;
  filter: blur(1.5px);
  opacity: 0.85;
}

@keyframes neonMove{
  0% { left: -30%; }
  100% { left: 100%; }
}
/* Linha do topo: agora renderizada via HTML com `.neon-bar` */
.maintenance-banner{
  width: 100%;
  padding: 10px 14px;
  box-sizing: border-box;
  background: rgba(251, 155, 54, 0.10);
  border-bottom: 1px solid rgba(251, 155, 54, 0.22);
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0,0,0,.55);
}
.maintenance-banner strong{
  color: var(--primary);
}

/* =========================
   Estoque (toggle stockEnabled)
========================= */

body.stock-disabled .product-stock{
  display: none !important;
}

body.stock-disabled #productsTable th.stock-col,
body.stock-disabled #productsTable td.stock-col{
  display: none !important;
}

body.stock-disabled .stock-field{
  display: none !important;
}
.app-title{ font-size: 16px; font-weight: 900; }
.subtitle{ font-size: 12px; opacity: .92; }


.top-left{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.top-left-text{
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.merchant-logo{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  object-fit: cover;
  flex: 0 0 auto;
}

.top-right{ display: flex; align-items: center; gap: 10px; }
.status-dot{
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--ok-500);
  box-shadow: 0 0 0 4px rgba(var(--success-rgb), .18);
}
.status-text{ font-size: 12px; opacity: .95; }

/* ===== Shell (sidebar + content) ===== */
.shell{
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 250px 1fr;
}

/* ===== Sidebar ===== */
.sidebar{
  background: var(--surface);
  color: #fff;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.sidebar-title{ font-size: 12px; font-weight: 900; opacity: .95; margin-bottom: 6px; }
.nav{ display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1; }

.nav-item{
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform .06s ease, background .12s ease, border-color .12s ease;
}
.nav-item:hover{ background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.26); }
.nav-item:active{ transform: translateY(1px); }

.nav-dot{
  width: 10px; height: 10px; border-radius: 999px;
  background: rgba(255,255,255,.65);
}
.nav-item.active{
  background: rgba(var(--primary-rgb), .16);
  color: var(--text);
  border-color: rgba(var(--primary-rgb), .35);
  box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), .15);
}
.nav-item.active .nav-dot{ background: var(--ok-500); }

.sidebar-foot{
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.15);
  position: relative;
  z-index: 1;
}
.mini{ display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.mini-label{ font-size: 11px; opacity: .90; font-weight: 900; }
.mini-value{ font-size: 12px; font-weight: 900; }

/* ===== Content ===== */
.content{
  min-height: 0;
  overflow: hidden;
}

/* ===== Pages ===== */
.tab-page{ display: none; height: 100%; }
.tab-page.active{ display: flex; flex-direction: column; height: 100%; min-height: 0; }

/* ===== Page / Header / Panel ===== */
.page{ flex: 1; min-height: 0; overflow: auto; padding: var(--pad-3); }
.page-header{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.page-actions{ display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.store-header{
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
}

#storeName{
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text, #ffffff);
  letter-spacing: 0.5px;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

@media (max-width: 420px){
  #storeName{ font-size: 1.35rem; }
}

.panel{
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 12px;
  min-height: 0;
  border: 1px solid var(--border);
}

/* ======= NOVOS: Painéis "soft" e títulos internos (Configurações) ======= */
.panel-soft{
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: none;
}
.panel-title{
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 10px;
}

/* ===== Category Bar ===== */
.category-bar{
  display: flex;
  gap: 8px;
  overflow-x: auto;
  background: var(--surface);
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.category{
  border: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .06s ease, background .12s ease;
}
.category:hover{ background: rgba(255,255,255,.10); }
.category:active{ transform: translateY(1px); }
.category.active{ background: rgba(var(--primary-rgb), .20); border: 1px solid rgba(var(--primary-rgb), .30); color: var(--text); }

/* ===== Sales layout ===== */
.layout{
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 12px;
  padding: 12px;
}

.products-section{ min-height: 0; overflow: auto; background: transparent; }
.section-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.section-title{ font-size: 14px; font-weight: 900; color: var(--text); }

.product-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

/* Product card */
.product-card{
  background: var(--card);
  border-radius: var(--r-md);
  padding: 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border: 1px solid var(--border);
  transition: transform .10s ease, box-shadow .12s ease;
}
.product-card:hover{ transform: translateY(-2px); box-shadow: var(--shadow-md); }
.product-image{
  width: 100%;
  height: 128px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--border);
  margin-bottom: 8px;
}
.product-name{ font-size: 13px; font-weight: 900; margin-bottom: 2px; }
.product-price{ font-size: 15px; font-weight: 900; color: var(--success); }
.product-stock{ font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Cart */
.cart-section{
  min-height: 0;
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border);
}
.cart-section h2, .cart-section h3{ font-size: 16px; font-weight: 900; }

.cart-items{
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding-top: 10px;
  padding-bottom: 10px;
}
.cart-item{ display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; }
.cart-item-info{ display: flex; flex-direction: column; }
.cart-item-name{ font-weight: 900; }
.cart-item-details{ font-size: 12px; color: var(--muted); }

.cart-item-actions{ display: flex; align-items: center; gap: 8px; }
.qty-btn{
  width: 32px; height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  font-weight: 900;
  transition: background .12s ease, border-color .12s ease;
}
.qty-btn:hover{ background: rgba(255,255,255,.06); border-color: rgba(var(--primary-rgb), .25); }
.qty-value{ min-width: 20px; text-align: center; font-weight: 900; }
.remove-btn{
  width: 32px; height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(239,68,68,.25);
  background: rgba(239,68,68,.08);
  color: var(--danger-500);
  cursor: pointer;
  font-weight: 900;
  transition: background .12s ease, transform .06s ease;
}
.remove-btn:hover{ background: rgba(239,68,68,.12); }
.remove-btn:active{ transform: translateY(1px); }

.cart-summary{ display: flex; flex-direction: column; gap: 10px; }
.summary-row{ display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.summary-total{ font-size: 18px; font-weight: 900; }

.cart-actions{ display: flex; flex-direction: column; gap: 10px; }

/* ===== Reports ===== */
.reports{ flex: 1; min-height: 0; padding: var(--pad-3); overflow: auto; }
.reports-header{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.filters{ display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.filters label{
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
}

.cards{
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.card{
  background: var(--card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 12px;
  border: 1px solid var(--border);
}
.card-title{ font-size: 12px; color: var(--muted); font-weight: 900; }
.card-value{ font-size: 18px; font-weight: 900; margin-top: 6px; }

.two-cols{
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 12px;
  min-height: 0;
}
.list{ display: flex; flex-direction: column; gap: 8px; }
.list-row{ display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.list-row strong{ font-weight: 900; }
.list-empty{ font-size: 12px; color: var(--muted); padding: 6px 0; }

.table-wrap{
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.table{ width: 100%; border-collapse: collapse; }
.table th, .table td{ padding: 10px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 12px; }
.table th{ text-align: left; background: rgba(255,255,255,.04); font-weight: 900; color: var(--text); }

/* ===== Ações em tabela (novo – usado para Produtos/Usuários) ===== */
.table-actions{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.action-btn{
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
  font-size: 12px;
  transition: background .12s ease, transform .06s ease, border-color .12s ease;
}
.action-btn:hover{ background: rgba(255,255,255,.10); border-color: rgba(var(--primary-rgb), .22); }
.action-btn:active{ transform: translateY(1px); }
.action-btn.primary{
  border-color: rgba(var(--primary-rgb), .35);
  background: rgba(var(--primary-rgb), .12);
  color: var(--text);
}
.action-btn.primary:hover{ background: rgba(var(--primary-rgb), .16); }
.action-btn.danger{
  border-color: rgba(var(--danger-rgb), .35);
  background: rgba(var(--danger-rgb), .10);
  color: var(--danger);
}
.action-btn.danger:hover{ background: rgba(var(--danger-rgb), .14); }

/* ===== Modal ===== */
.modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 50;
}
.modal-card{
  width: min(720px, 96vw);
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 14px;
  border: 1px solid var(--border);
}
.modal-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.modal-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.modal-actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

/* =========================================================
   NOVOS: Users tab (tabela + modal + destaque visual)
   ========================================================= */
#tab-users .panel{
  background:
    radial-gradient(900px 320px at 10% 0%, rgba(var(--primary-rgb), .10), transparent 60%),
    radial-gradient(900px 320px at 90% 0%, rgba(var(--success-rgb), .08), transparent 60%),
    var(--card);
}

#tab-users .table th{
  background: rgba(255,255,255,.04);
}

#tab-users .page-sub{
  max-width: 820px;
}

#tab-users .table td{
  vertical-align: middle;
}

/* =========================================================
   NOVOS: Settings (Merchant Settings) - Switch/Toggle e Layout
   ========================================================= */

.settings-form{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* mantém compatível com seus grids; usado também dentro de Configurações */
.settings-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-row{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

/* Toggle acessível */
.toggle{
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  transition: background .12s ease, border-color .12s ease, transform .06s ease;
}
.toggle:hover{
  background: rgba(255,255,255,.10);
}
.toggle:active{
  transform: translateY(1px);
}

/* escondemos o checkbox visualmente, mantendo acessível */
.toggle input{
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* UI do switch */
.toggle-ui{
  width: 44px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  position: relative;
  flex: 0 0 auto;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.toggle-ui::after{
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: var(--text);
  box-shadow: 0 6px 14px rgba(0,0,0,.14);
  transition: left .15s ease;
}

/* texto do toggle */
.toggle-text{
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.toggle-text strong{
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
}
.toggle-text .hint{
  min-height: auto;
}

/* Estado checked (o input vem antes do .toggle-ui) */
.toggle input:checked + .toggle-ui{
  background: rgba(var(--success-rgb), .25);
  border-color: rgba(var(--success-rgb), .40);
  box-shadow: 0 0 0 3px rgba(var(--success-rgb), .18);
}
.toggle input:checked + .toggle-ui::after{
  left: 21px;
}

/* Foco por teclado */
.toggle input:focus-visible + .toggle-ui{
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .18);
  border-color: rgba(var(--primary-rgb), .35);
}

/* Logo do Estabelecimento (Configurações) */
.logo-settings{
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  align-items: start;
}
.logo-preview{
  width: 96px;
  height: 96px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.logo-preview img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.logo-placeholder{
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 10px;
}
.logo-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}

/* Para cards dentro de Configurações ficarem equilibrados */
#tab-settings .card .hint{
  margin-top: 6px;
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .shell{ grid-template-columns: 1fr; }
  .layout{ grid-template-columns: 1fr; }
  .two-cols{ grid-template-columns: 1fr; }
  .cards{ grid-template-columns: 1fr; }
  .modal-grid{ grid-template-columns: 1fr; }

  /* settings grid no mobile */
  .settings-grid{ grid-template-columns: 1fr; }

  .merchant-logo{
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .logo-settings{ grid-template-columns: 1fr; }
  .logo-preview{ width: 88px; height: 88px; }
}
/* =========================================================
   AUTH TABS (Entrar / Criar Conta)
   ========================================================= */

.auth-tabs{
  display: flex;
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 6px;
}

.auth-tab{
  flex: 1;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: #f9fafb;
  color: var(--primary-contrast);
  cursor: pointer;
  font-weight: 900;
  font-size: 13px;
  transition: background .12s ease, border-color .12s ease, transform .06s ease;
}

.auth-tab:hover{
  background: #f3f4f6;
}

.auth-tab:active{
  transform: translateY(1px);
}

.auth-tab.active{
  background: linear-gradient(90deg, var(--brand-600), var(--brand-700));
  color: var(--primary-contrast);
  border-color: rgba(124,42,168,.45);
  box-shadow: 0 8px 18px rgba(124,42,168,.22);
}

/* Painéis de autenticação */
.auth-pane{
  display: none;
}

.auth-pane.active{
  display: block;
}
/* ========================================================= */ 
