/* ═══════════════════════════════════════════════════════════════
   BIDZZ DESIGN SYSTEM — Unified Tokens  v1.0  (2026-05)
   Importar ANTES do CSS de cada projeto.
   Projetos: bidz-pay-proxy · bidz2 admin · bidz-site
═══════════════════════════════════════════════════════════════ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Tokens ───────────────────────────────────────────────── */
:root {

  /* Brand — laranja BidZ */
  --orange:      #D35400;
  --orange-h:    #E05E05;
  --orange-dim:  rgba(211,84,0,.12);
  --orange-bd:   rgba(211,84,0,.28);
  --accent:      var(--orange);
  --accent-h:    var(--orange-h);

  /* Fundos escuros (admin panels) — 4 níveis */
  --bg:   #0D1117;
  --bg2:  #161B24;
  --bg3:  #1C2333;
  --bg4:  #222B3E;

  /* Fundos bidz-site (marketing / área do membro) */
  --navy:      #0B162C;
  --navy-deep: #060E1F;
  --navy-mid:  #0F1E3D;

  /* Texto */
  --t1: #F0F4FF;
  --t2: #8D9BB5;
  --t3: #4A5568;

  /* Bordas */
  --bd:  rgba(255,255,255,.06);
  --bd2: rgba(255,255,255,.12);

  /* Alfa de branco (bidz-site) */
  --white: #FFFFFF;
  --w90:   rgba(255,255,255,0.90);
  --w70:   rgba(255,255,255,0.70);
  --w40:   rgba(255,255,255,0.40);
  --w15:   rgba(255,255,255,0.15);
  --w10:   rgba(255,255,255,0.10);
  --w08:   rgba(255,255,255,0.08);
  --w05:   rgba(255,255,255,0.05);
  --w03:   rgba(255,255,255,0.03);

  /* Cores semânticas */
  --green:       #22C55E;
  --green-dim:   rgba(34,197,94,.10);
  --green-bd:    rgba(34,197,94,.25);

  --red:         #EF4444;
  --red-dim:     rgba(239,68,68,.10);
  --red-bd:      rgba(239,68,68,.25);

  --yellow:      #FBBF24;
  --yellow-dim:  rgba(251,191,36,.10);
  --yellow-bd:   rgba(251,191,36,.25);

  --blue:        #60A5FA;
  --blue-dim:    rgba(96,165,250,.10);
  --blue-bd:     rgba(96,165,250,.25);

  --purple:      #A78BFA;
  --purple-dim:  rgba(167,139,250,.10);
  --purple-bd:   rgba(167,139,250,.25);

  /* Tipografia */
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;

  /* Border-radius */
  --r-xl: 16px;
  --r-lg: 12px;
  --r-md: 8px;
  --r-sm: 6px;
  --r-xs: 4px;

  /* Transições */
  --t:    0.18s;
  --ease: cubic-bezier(0.4,0,0.2,1);

  /* Sombras */
  --sh:  0 1px 3px rgba(0,0,0,.5), 0 4px 20px rgba(0,0,0,.3);
  --sh2: 0 8px 40px rgba(0,0,0,.6);

  /* Layout */
  --sidebar-w: 232px;
  --nav-h:     64px;
  --max-w:     1200px;

  /* Z-index */
  --z-base:     1;
  --z-dropdown: 100;
  --z-modal:    200;
  --z-toast:    300;
  --z-top:      400;

  /* ── Aliases legados (bidz2) ────────────────────────────── */
  --z:    var(--orange);
  --z-h:  var(--orange-h);
  --z-bg: var(--orange-dim);
  --z-bd: var(--orange-bd);
  --gbg:  var(--green-dim);
  --gbd:  var(--green-bd);
  --rbg:  var(--red-dim);
  --rbd:  var(--red-bd);
  --bbg:  var(--blue-dim);
  --bbd:  var(--blue-bd);
  --amber:var(--yellow);
  --abg:  var(--yellow-dim);
  --abd:  var(--yellow-bd);
  --r:    var(--r-md);
  --r2:   var(--r-lg);
  --r3:   var(--r-xl);
  --sb:   var(--sidebar-w);
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  font-size: 13px;
  color: var(--t1);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }
a  { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }
input, select, textarea { font-family: var(--font); }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bd2); border-radius: 4px; }

/* ═══════════════════════════════════════════════════════════
   BOTÕES  (usados em todos os projetos admin)
═══════════════════════════════════════════════════════════ */

/* Base — pode ser aplicado junto com os modificadores */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--r-md);
  font-size: 12px; font-weight: 600;
  cursor: pointer; border: none; font-family: var(--font);
  transition: all var(--t) var(--ease); white-space: nowrap;
}
.btn:active  { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Modificadores — funcionam com .btn ou standalone */
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--orange); color: #fff;
  border: none; padding: 7px 14px; border-radius: var(--r-md);
  font-family: var(--font); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: background var(--t) var(--ease); white-space: nowrap;
}
.btn-primary:hover:not(:disabled) { background: var(--orange-h); }
.btn-primary:active  { transform: scale(.97); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; color: var(--t2);
  border: 1px solid var(--bd); padding: 7px 14px; border-radius: var(--r-md);
  font-family: var(--font); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all var(--t) var(--ease); white-space: nowrap;
}
.btn-ghost:hover { background: var(--bg3); color: var(--t1); border-color: var(--bd2); }

.btn-sec {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg3); color: var(--t1);
  border: 1px solid var(--bd2); padding: 7px 14px; border-radius: var(--r-md);
  font-family: var(--font); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all var(--t) var(--ease); white-space: nowrap;
}
.btn-sec:hover { background: var(--bg4); }

.btn-green {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--green-dim); color: var(--green);
  border: 1px solid var(--green-bd); padding: 7px 14px; border-radius: var(--r-md);
  font-family: var(--font); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all var(--t) var(--ease);
}
.btn-green:hover { background: var(--green); color: #fff; }

.btn-red {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--red-dim); color: var(--red);
  border: 1px solid var(--red-bd); padding: 7px 14px; border-radius: var(--r-md);
  font-family: var(--font); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all var(--t) var(--ease);
}
.btn-red:hover { background: var(--red); color: #fff; }

.btn-blue {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blue-dim); color: var(--blue);
  border: 1px solid var(--blue-bd); padding: 7px 14px; border-radius: var(--r-md);
  font-family: var(--font); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all var(--t) var(--ease);
}
.btn-blue:hover { background: var(--blue); color: #fff; }

/* Tamanhos */
.btn-sm { padding: 5px 11px !important; font-size: 11.5px !important; }
.btn-xs { padding: 3px 8px  !important; font-size: 10.5px !important; }
.btn-lg { padding: 10px 20px !important; font-size: 14px !important; }
.w-full { width: 100%; }

/* ═══════════════════════════════════════════════════════════
   CAMPOS DE FORMULÁRIO
═══════════════════════════════════════════════════════════ */
.field { display: flex; flex-direction: column; gap: 4px; }
.field label {
  font-size: 11px; font-weight: 600; color: var(--t2);
}
.field input,
.field select,
.field textarea {
  background: var(--bg3); border: 1px solid var(--bd2);
  border-radius: var(--r-md); color: var(--t1);
  padding: 8px 11px; font-size: 13px; outline: none;
  transition: border-color var(--t) var(--ease);
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-dim); }
.field input::placeholder,
.field textarea::placeholder { color: var(--t3); }
.field select option { background: var(--bg2); color: var(--t1); }

.error-msg {
  background: var(--red-dim); border: 1px solid var(--red-bd);
  border-radius: var(--r-md); color: #fca5a5;
  font-size: 12px; padding: 9px 12px;
}
.success-msg {
  background: var(--green-dim); border: 1px solid var(--green-bd);
  border-radius: var(--r-md); color: var(--green);
  font-size: 12px; padding: 9px 12px;
}

/* ═══════════════════════════════════════════════════════════
   BADGES / CHIPS
═══════════════════════════════════════════════════════════ */
.badge, .chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 20px;
  font-size: 10.5px; font-weight: 600; white-space: nowrap;
}

/* Variantes de cor */
.badge-orange, .ch-z { background: var(--orange-dim); color: var(--orange); }
.badge-green,  .ch-g { background: var(--green-dim);  color: var(--green); }
.badge-red,    .ch-r { background: var(--red-dim);    color: var(--red); }
.badge-yellow, .ch-a { background: var(--yellow-dim); color: var(--yellow); }
.badge-blue,   .ch-b { background: var(--blue-dim);   color: var(--blue); }
.badge-purple        { background: var(--purple-dim); color: var(--purple); }
.badge-muted,  .ch-m { background: var(--bd);         color: var(--t2); }

/* Status de parcelas */
.badge-pendente   { background: var(--yellow-dim); color: var(--yellow); }
.badge-confirmado { background: var(--green-dim);  color: var(--green); }
.badge-contestado { background: var(--red-dim);    color: var(--red); }
.badge-atrasado   { background: var(--red-dim);    color: var(--red); }
.badge-cancelado  { background: var(--bd);         color: var(--t2); }
.badge-ativo      { background: var(--green-dim);  color: var(--green); }
.badge-inativo    { background: var(--bd);         color: var(--t2); }

/* Score */
.badge-excelente  { background: var(--green-dim);           color: var(--green); }
.badge-bom        { background: rgba(34,197,94,.10);         color: #4ade80; }
.badge-regular    { background: var(--yellow-dim);           color: var(--yellow); }
.badge-atencao    { background: rgba(249,115,22,.15);        color: #fb923c; }
.badge-critico    { background: var(--red-dim);              color: var(--red); }
.badge-tipo       { background: var(--blue-dim);             color: var(--blue); }

/* ═══════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════ */
.card {
  background: var(--bg2); border: 1px solid var(--bd);
  border-radius: var(--r-lg); box-shadow: var(--sh); overflow: hidden;
}
.card-hd {
  padding: 13px 18px; border-bottom: 1px solid var(--bd);
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}
.card-title {
  font-size: 13.5px; font-weight: 700;
  display: flex; align-items: center; gap: 7px;
}
.card-body { padding: 16px 18px; }

/* ── Stat cards (KPIs) ── */
.stat-card {
  background: var(--bg2); border: 1px solid var(--bd);
  border-radius: var(--r-lg); padding: 15px 16px;
  position: relative; overflow: hidden; box-shadow: var(--sh);
}
.stat-card::before, .kpi-stripe {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--bd2);
}
.stat-card.alert::before { background: var(--red); }
.stat-card.warn::before  { background: var(--yellow); }
.stat-card.good::before  { background: var(--green); }
.stat-card .label, .kpi-lbl {
  font-size: 10.5px; font-weight: 700; color: var(--t3);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 7px;
}
.stat-card .value, .kpi-val {
  font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: -.5px; color: var(--t1);
}
.stat-card.alert .value { color: var(--red); }
.stat-card.warn  .value { color: var(--yellow); }
.stat-card.good  .value { color: var(--green); }
.kpi-sub { font-size: 10.5px; color: var(--t3); margin-top: 5px; }

/* ═══════════════════════════════════════════════════════════
   TABELAS
═══════════════════════════════════════════════════════════ */
.table-wrap, .tbl-wrap {
  background: var(--bg2); border: 1px solid var(--bd);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh);
}
.table-wrap table, .tbl-wrap table, table.tbl {
  width: 100%; border-collapse: collapse; font-size: 12.5px;
}
.table-wrap th, .tbl-wrap th, table.tbl th {
  background: var(--bg3); color: var(--t3);
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 9px 14px; text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--bd);
}
.table-wrap td, .tbl-wrap td, table.tbl td {
  padding: 10px 14px; border-bottom: 1px solid var(--bd);
  color: var(--t1); vertical-align: middle;
}
.table-wrap tbody tr:last-child td,
.tbl-wrap  tbody tr:last-child td,
table.tbl  tbody tr:last-child td { border-bottom: none; }
.table-wrap tbody tr:hover td,
.tbl-wrap  tbody tr:hover td,
table.tbl  tbody tr:hover td { background: var(--bg3); }
.table-empty { text-align: center; color: var(--t3); padding: 40px 16px; font-size: 13px; }

/* ═══════════════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════════════ */
.modal-overlay, .overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.65); backdrop-filter: blur(4px);
  z-index: var(--z-modal); align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open, .overlay.open { display: flex; }

.modal-box, .modal {
  background: var(--bg2); border: 1px solid var(--bd2);
  border-radius: var(--r-xl);
  width: 100%; max-width: 520px; max-height: 87vh;
  overflow-y: auto; box-shadow: var(--sh2);
  transform: translateY(10px); transition: transform .2s var(--ease);
}
.modal-box.wide, .modal.wide { max-width: 680px; }
.modal-overlay.open .modal-box,
.overlay.open .modal { transform: none; }

.modal-header, .mhd {
  padding: 18px 20px; border-bottom: 1px solid var(--bd);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title, .m-title { font-size: 15px; font-weight: 700; }
.modal-close, .m-x {
  background: none; border: none; color: var(--t3); font-size: 16px;
  cursor: pointer; width: 26px; height: 26px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t) var(--ease);
}
.modal-close:hover, .m-x:hover { background: var(--bg3); color: var(--t1); }
.modal-form, .mbody { padding: 20px; display: flex; flex-direction: column; gap: 13px; }
.modal-footer, .mfoot {
  padding: 14px 20px; border-top: 1px solid var(--bd);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* ═══════════════════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--bg2); border: 1px solid var(--bd2);
  border-radius: var(--r-md); padding: 12px 18px;
  font-size: 12.5px; font-weight: 600; z-index: var(--z-toast);
  display: none; animation: slideUp .2s var(--ease);
  max-width: 300px; box-shadow: var(--sh2);
}
.toast.ok   { border-color: var(--green-bd); color: var(--green); }
.toast.err  { border-color: var(--red-bd);   color: #fca5a5; }
.toast.info { border-color: var(--blue-bd);  color: var(--blue); }
.toast.show { display: block; }

/* ═══════════════════════════════════════════════════════════
   LOGO  (markup partilhado)
═══════════════════════════════════════════════════════════ */
.logo-bid  { font-weight: 800; color: var(--t1); letter-spacing: -.5px; }
.logo-z    { font-weight: 800; color: var(--orange); letter-spacing: -.5px; }
.logo-z2   { font-weight: 800; color: var(--orange); letter-spacing: -.5px; }
.logo-pay  { font-weight: 800; color: var(--blue);   letter-spacing: -.5px; }

/* ═══════════════════════════════════════════════════════════
   UTILITÁRIOS
═══════════════════════════════════════════════════════════ */
.text-muted   { color: var(--t3); }
.text-sm      { font-size: 11.5px; }
.text-orange  { color: var(--orange); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.text-blue    { color: var(--blue); }
.mono         { font-family: var(--mono); font-size: 11.5px; }
.tr           { text-align: right; }
.tc           { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.flex         { display: flex; }
.gap-2        { gap: 8px; }
.items-center { align-items: center; }
.req          { color: var(--red); }

/* ═══════════════════════════════════════════════════════════
   ANIMAÇÕES
═══════════════════════════════════════════════════════════ */
@keyframes fadeIn  { from { opacity:0 }           to { opacity:1 } }
@keyframes slideUp { from { opacity:0; transform:translateY(8px) } to { opacity:1; transform:translateY(0) } }
@keyframes spin    { from { transform:rotate(0deg) } to { transform:rotate(360deg) } }
@keyframes blink   { 0%,100% { opacity:1 } 50% { opacity:.3 } }
@keyframes pulse   {
  0%, 100% { box-shadow: 0 0 0 2px var(--green-dim) }
  50%      { box-shadow: 0 0 0 5px rgba(34,197,94,.05) }
}
