﻿/* ========== Theme ==========
   Cores base e tema claro/escuro com CSS vars
*/
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #d9e0ef;
  --primary: #2563eb;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #ef4444;
  --info: #0ea5e9;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.08);
}

[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #0f172a;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --border: #1f2937;
  --primary: #3b82f6;
  --shadow: 0 2px 6px rgba(0,0,0,0.5);
}

/* ========== Base ==========
*/
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Garante que elementos com atributo [hidden] sumam totalmente */
[hidden] { display: none !important; }
.icon-credit {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Em modo de autenticaÃ§Ã£o, evita rolagem da pÃ¡gina */
body.auth-mode { overflow: hidden; }

.layout { display: flex; min-height: 100vh; }

/* ========== Sidebar ==========
*/
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 260px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 12px;
  transition: width .2s ease, transform .2s ease;
  z-index: 4;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 18px;
}
.brand i { color: var(--primary); font-size: 20px; }
.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .04em;
  box-shadow: 0 6px 14px rgba(37,99,235,.25);
}
.topbar-brand .brand-badge { width: 26px; height: 26px; font-size: 12px; }
.pill .brand-badge { width: 18px; height: 18px; font-size: 10px; border-radius: 6px; }
.brand-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
.auth-brand .brand-logo-img { width: 32px; height: 32px; }
.topbar-brand .brand-logo-img { width: 24px; height: 24px; }
.pill .brand-logo-img {
  width: 16px;
  height: 16px;
  margin-right: 6px;
}

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
}
.nav-item:hover { background: rgba(99,102,241,.08); border-color: rgba(99,102,241,.25); }
.nav-item i { font-size: 18px; color: #8b95b7; }
.nav-item.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.nav-item.active i { color: #fff; }

.sidebar-footer { margin-top: auto; }

/* Colapso (desktop) */
body.sidebar-collapsed .sidebar { width: 80px; }
body.sidebar-collapsed .sidebar .brand-name,
body.sidebar-collapsed .sidebar .nav-item span { display: none; }
body.sidebar-collapsed .sidebar .brand { justify-content: center; }
body.sidebar-collapsed .sidebar .nav-item { justify-content: center; }

/* Off-canvas (mobile) */
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; transform: translateX(-100%); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .overlay { display: block; }
  /* Topbar: centraliza a marca e usa sÃ³ Ã­cone */
  .topbar { position: relative; }
  .topbar-brand { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: auto; display: block; }
  .topbar-brand .wordmark { display: inline-block; white-space: nowrap; max-width: 66vw; overflow: hidden; text-overflow: ellipsis; }
  .topbar-brand .wordmark { font-size: 15px; }
  .topbar-brand .brand-icon { display: none; }
}

/* ========== Main / Topbar ==========
*/
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar-brand { display: flex; align-items: center; gap: 8px; }
.topbar-brand .wordmark { font-size: 18px; letter-spacing: .06em; font-weight: 800; }
.topbar-brand i { color: var(--primary); font-size: 18px; line-height: 1; }
.topbar-brand .brand-emoji { font-size: 18px; line-height: 1; margin-right: 6px; }
.topbar-brand .wordmark { color: var(--text); }
[data-theme="light"] .topbar-brand .wordmark { color: #000; }
[data-theme="dark"] .topbar-brand .wordmark { color: #fff; }
.topbar .left, .topbar .right { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); cursor: pointer;
}
.icon-btn:hover { box-shadow: var(--shadow); }

.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; min-width: 260px; background: var(--surface); }
.search i { color: var(--muted); }
.search input { border: 0; outline: 0; background: transparent; color: var(--text); width: 100%; }

.user { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 12px; }
.user img { width: 28px; height: 28px; border-radius: 50%; }
.user i { color: var(--muted); }
.brand-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 999px; background: linear-gradient(135deg, var(--primary), #22d3ee 65%); color: #fff; font-family: 'Sora', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; font-weight: 800; font-size: 16px; box-shadow: 0 6px 16px rgba(99,102,241,.22), inset 0 0 0 1px rgba(255,255,255,.18); border: 1px solid rgba(0,0,0,.06); letter-spacing: .02em; }
.user-wrap { position: relative; }
.user-menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; min-width: 170px; z-index: 20; display: grid; gap: 2px; }
.user-menu button { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 0; background: transparent; color: var(--text); border-radius: 8px; cursor: pointer; }
.user-menu button:hover { background: rgba(99,102,241,.08); }

.content { padding: 24px; display: block; }
.content h1 { font-size: 22px; margin: 6px 0 18px; }
/* Typography */
h1, h2 { line-height: 1.25; letter-spacing: -0.01em; }
h2 { font-size: 18px; }

/* ========== Cards ==========
*/
.cards {
  display: grid; gap: 16px;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}
@media (max-width: 1200px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .cards { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.card-label { color: var(--muted); font-size: 13px; }
.card-value { font-size: 26px; font-weight: 700; margin-top: 6px; }
.card-delta { margin-top: 8px; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 999px; }
.card-delta.up { background: rgba(22,163,74,.12); color: var(--success); }
.card-delta.down { background: rgba(239,68,68,.12); color: var(--danger); }

/* ========== Panels / Charts ==========
*/
.grid-2 { display: grid; gap: 16px; grid-template-columns: 1.2fr 1fr; margin-top: 16px; }
@media (max-width: 1200px) { .grid-2 { grid-template-columns: 1fr; } }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel h2 { font-size: 16px; margin: 0; }
.panel-actions { display: flex; gap: 8px; }
.chip { border: 1px solid var(--border); background: transparent; color: var(--text); padding: 6px 10px; border-radius: 999px; cursor: pointer; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.danger { border-color: rgba(239,68,68,.35); color: #b91c1c; }
.chip.danger:hover { border-color: rgba(239,68,68,.6); color: #991b1b; background: rgba(239,68,68,.08); }

/* ========== Table ==========
*/
.table-wrap { width: 100%; overflow: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table thead th { font-size: 13px; color: var(--muted); font-weight: 600; }
.table tbody tr:hover { background: rgba(99,102,241,.06); }
.notice-panel { display: flex; align-items: center; gap: 16px; border: 1px solid rgba(250,176,5,.35); background: rgba(250,176,5,.08); }
.notice-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: rgba(250,176,5,.2); color: #b45309; font-size: 24px; flex-shrink: 0; }
.notice-copy { display: grid; gap: 4px; }
.notice-title { font-size: 15px; font-weight: 700; margin: 0; color: var(--text); }
.notice-body { font-size: 13px; color: var(--muted); margin: 0; }
.status { padding: 4px 8px; border-radius: 999px; font-size: 12px; }
.status.success { background: rgba(22,163,74,.12); color: var(--success); }
.status.warning { background: rgba(217,119,6,.12); color: var(--warning); }
.status.danger { background: rgba(239,68,68,.12); color: var(--danger); }
.status.info { background: rgba(14,165,233,.12); color: var(--info); }
/* Neutral badge (cliente) */
.status.neutral { background: rgba(107,114,128,.14); color: var(--muted); }

/* ========== Overlay (mobile) ==========
*/
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 3; display: none;
}
body.sidebar-open .overlay { display: block; }

/* Helpers */
::selection { background: rgba(99,102,241,.3); }
input::placeholder { color: var(--muted); }

/* ========== Formulários ========== */
.form { display: grid; gap: 12px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-weight: 600; font-size: 14px; color: var(--muted); }
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.form-grid { display: grid; gap: 12px; }
.form-grid.two-col { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-row.full-row { grid-column: 1 / -1; }
.form-note { margin: 0; font-size: 13px; color: var(--muted); }
.form-card {
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(99,102,241,.02), rgba(14,165,233,.02)), var(--surface);
  box-shadow: var(--shadow);
}
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.form-actions .form-note { margin-right: auto; }
.form-actions .btn { flex-shrink: 0; }
.form-actions .chip { background: rgba(255,255,255,.5); }

/* Aviso de indisponibilidade / mensagens fixas */
.notice-panel {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(120deg, rgba(99,102,241,.06), rgba(14,165,233,.03)), var(--surface);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.notice-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(99,102,241,.12);
  color: var(--primary);
  flex-shrink: 0;
  font-size: 20px;
}
.notice-title { margin: 0 0 2px; font-weight: 700; }
.notice-body { margin: 0; color: var(--muted); line-height: 1.5; }
.notice-panel + .balance-card { margin-top: 8px; }

/* ========== Mobile tweaks ==========
   Ajustes extras para telas pequenas
*/
@media (max-width: 900px) {
  .topbar { padding-top: calc(12px + env(safe-area-inset-top)); padding-left: calc(16px + env(safe-area-inset-left)); padding-right: calc(16px + env(safe-area-inset-right)); }
  .search { min-width: 0; flex: 1; }
  .topbar .left { flex: 1; }
  .topbar .right { gap: 8px; }
}

@media (max-width: 600px) {
  .topbar { flex-wrap: wrap; gap: 8px; }
  .topbar .left { order: 1; width: 100%; display: flex; gap: 8px; }
  .topbar-brand { order: 2; width: 100%; display: flex; justify-content: center; }
  .topbar .search { order: 2; width: 100%; }
  .topbar .right { order: 3; width: 100%; display: flex; justify-content: space-between; }
  .user span, .user i { display: none; }
  .content { padding: 16px 12px; }
  .panel { padding: 12px; }
  .card { padding: 12px; }
}

/* ========== Toasts (notificaÃ§Ãµes) ========== */
.toast-container {
  position: fixed;
  top: 68px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 50;
  pointer-events: none;
}
.toast {
  position: relative;
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 18px 38px rgba(0,0,0,.14), 0 1px 0 rgba(255,255,255,.7) inset;
  backdrop-filter: blur(10px);
  transform: translateY(-12px) scale(.98);
  opacity: 0;
  animation: toast-in .32s cubic-bezier(.18,.89,.32,1.1) forwards;
  overflow: hidden;
}
.toast::before { display: none; }
.toast .icon { font-size: 20px; line-height: 1; margin-top: 2px; }
.toast .msg { font-size: 14px; display: flex; flex-direction: column; gap: 2px; color: #05070a; }
.toast .msg-title { font-weight: 700; letter-spacing: .2px; color: #020305; }
.toast .msg-desc { color: #0a0c10; font-size: 13px; line-height: 1.45; }
.toast .close { margin-left: 8px; margin-top: 2px; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 8px; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; }
.toast .close:hover { background: rgba(0,0,0,.06); }
.toast.success { border-color: rgba(22,163,74,.35); box-shadow: 0 10px 28px rgba(22,163,74,.22); background: linear-gradient(135deg, rgba(16,185,129,.12), rgba(255,255,255,.8)); }
.toast.success .icon { color: var(--success); }
.toast.danger { border-color: rgba(239,68,68,.35); box-shadow: 0 10px 28px rgba(239,68,68,.18); background: linear-gradient(135deg, rgba(239,68,68,.12), rgba(255,255,255,.8)); }
.toast.danger .icon { color: var(--danger); }
.toast.warning { border-color: rgba(217,119,6,.35); box-shadow: 0 10px 28px rgba(217,119,6,.18); background: linear-gradient(135deg, rgba(217,119,6,.12), rgba(255,255,255,.8)); }
.toast.warning .icon { color: var(--warning); }
.toast.info { border-color: rgba(14,165,233,.35); box-shadow: 0 10px 28px rgba(14,165,233,.18); background: linear-gradient(135deg, rgba(14,165,233,.12), rgba(255,255,255,.8)); }
.toast.info .icon { color: var(--info); }
.toast.hide { animation: toast-out .22s ease forwards; }

@keyframes toast-in { to { opacity: 1; transform: translate(0, 0) scale(1); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px) scale(.96); } }

@media (max-width: 640px) {
  .toast-container {
    top: auto;
    bottom: 16px;
    left: 12px;
    right: 12px;
    gap: 8px;
    align-items: stretch;
  }
  .toast {
    width: 100%;
    transform: translateY(0) scale(1);
    padding: 14px 15px;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0,0,0,.16);
    align-items: center;
  }
  .toast .msg { width: 100%; align-items: center; text-align: center; }
  .toast .msg-title { font-size: 15px; width: 100%; }
  .toast .msg-desc { font-size: 13px; width: 100%; }
  .toast .close {
    margin-left: auto;
    flex-shrink: 0;
  }
  .toast.hide { animation: toast-out-mobile .24s ease forwards; }
}
@keyframes toast-out-mobile { to { opacity: 0; transform: translateY(-6px) scale(.96); } }

/* ========== Settings (ConfiguraÃ§Ãµes) ========== */
.settings-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.avatar-uploader { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.avatar-uploader .avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); background: var(--bg); }
.avatar-uploader .avatar-actions { display: flex; gap: 8px; }
.avatar-uploader .chip i { margin-right: 6px; }

@media (max-width: 600px) {
  .avatar-uploader .avatar { width: 80px; height: 80px; }
}

/* ========== Modal (Admin) ========== */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal-card { width: 100%; max-width: 520px; background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(244,247,252,.94)); border: 1px solid rgba(226,232,240,.9); border-radius: 14px; box-shadow: 0 18px 42px rgba(0,0,0,.12); padding: 18px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-head h3 { margin: 0; font-size: 18px; color: var(--text); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }

.purchase-card { background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(236,239,244,.96)); border-color: rgba(226,232,240,.9); box-shadow: 0 16px 40px rgba(0,0,0,.14); color: #0f172a; }
.purchase-kicker { margin: 0; color: #475569; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 11px; }
.purchase-title { margin: 2px 0 0; color: #0f172a; }
.purchase-body { display: grid; gap: 12px; color: #0f172a; }
.purchase-desc { margin: 0; color: #1f2937; }
.purchase-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(226,232,240,.9);
}
.purchase-summary .summary-item { display: grid; gap: 4px; padding: 8px 10px; border-radius: 10px; background: rgba(248,250,252,.96); border: 1px solid rgba(226,232,240,.9); color: #0f172a; }
.purchase-summary span { color: #334155; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.purchase-summary strong { color: #0f172a; font-size: 18px; }
.purchase-card .modal-actions .chip { background: rgba(99,102,241,.1); color: #1f2937; border: 1px solid rgba(99,102,241,.3); }
.purchase-card .modal-actions .chip:hover { background: rgba(99,102,241,.16); }

.wordmark { font-family: 'Sora', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-kerning: normal; }
.wordmark-gradient { background: linear-gradient(90deg, #818cf8, #22d3ee 50%, #10b981); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pill { display:inline-flex; align-items:center; gap:8px; border:1px solid var(--border); background: rgba(99,102,241,.1); color: var(--primary); padding:8px 12px; border-radius:999px; font-weight:600; }
.btn-primary { display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border-radius:12px; border:1px solid transparent; background: linear-gradient(90deg, #2563eb, #1d4ed8); color:#fff; cursor:pointer; box-shadow: 0 10px 30px rgba(37,99,235,.25); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-secondary { display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border-radius:12px; border:1px solid var(--border); background: var(--surface); color: var(--text); }
.btn.primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  color: #fff;
  box-shadow: 0 10px 26px rgba(34,197,94,.25);
  cursor: pointer;
  transition: filter .15s ease, transform .1s ease;
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.primary:active { transform: translateY(1px); }
/* Loja (cards) */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 14px; }
.shop-card { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; transition: transform .18s ease, box-shadow .18s ease; }
.shop-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0,0,0,.12); }
.shop-card img { width: 100%; height: 150px; object-fit: cover; background: linear-gradient(135deg, #111, #222); }
.shop-card-body { padding: 14px; display: grid; gap: 8px; }
.shop-card-title { margin: 0; font-size: 16px; }
.shop-card-desc { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.shop-card-meta { display: flex; align-items: center; justify-content: space-between; font-weight: 700; }
.shop-card-meta span { font-size: 14px; color: var(--text); }
.shop-card-footer { padding: 12px 14px 14px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); gap: 8px; flex-wrap: wrap; }
.shop-chip { background: rgba(99,102,241,.12); color: #6366f1; padding: 6px 10px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.shop-action { width: 100%; }
.shop-action .chip { width: 100%; justify-content: center; }
.table td.actions { white-space: nowrap; }
.table-actions { display: inline-flex; align-items: center; gap: 8px; }
.table td.actions { width: 140px; }
@media (max-width: 640px){
  .table-actions { gap: 6px; }
  .table td.actions { width: auto; }
}

.rank-user { display: flex; align-items: center; gap: 10px; }
.rank-user .avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); background: var(--bg); }
.rank-points { font-weight: 700; }
.rank-pos { font-weight: 800; letter-spacing: .06em; }

.balance-card {
  position: relative;
  display: grid;
  gap: 12px;
  border: 1px solid #101827;
  border-radius: 18px;
  padding: 18px 18px 20px;
  background:
    radial-gradient(120px 120px at 18% 20%, rgba(79,70,229,.18), transparent 60%),
    radial-gradient(200px 180px at 82% 0%, rgba(14,165,233,.16), transparent 65%),
    linear-gradient(135deg, #0b1220 0%, #0f172a 35%, #0b1220 100%);
  box-shadow: 0 20px 45px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.05);
  margin-bottom: 16px;
  overflow: hidden;
}
.balance-card::after {
  content: '';
  position: absolute;
  inset: -40% auto auto 45%;
  width: 170px;
  height: 170px;
  background: radial-gradient(circle, rgba(99,102,241,.24), transparent 62%);
  transform: rotate(12deg);
  pointer-events: none;
}
.balance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
}
.balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  color: #cbd5f5;
  font-weight: 700;
  letter-spacing: .02em;
}
.balance-chip i { color: #a5b4fc; }
.balance-body { display: flex; align-items: center; gap: 18px; position: relative; z-index: 1; }
.balance-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #22d3ee, #6366f1);
  color: #fff;
  box-shadow: 0 14px 28px rgba(99,102,241,.35), inset 0 0 0 1px rgba(255,255,255,.18);
}
.balance-icon i { font-size: 24px; }
.balance-info { display: grid; gap: 6px; text-align: center; justify-items: center; }
.balance-label {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
  color: #cbd5f5;
  border: 1px solid rgba(255,255,255,.08);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: 12px;
  backdrop-filter: blur(2px);
}
.balance-label i { color: #a5b4fc; }
.balance-amount {
  margin: 0;
  font-size: 40px;
  text-align: left;
  font-family: 'Sora', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  letter-spacing: -0.01em;
  color: #e5e7ff;
}
.balance-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(99,102,241,.4);
  background: linear-gradient(135deg, #111827, #0b1220);
  color: #a5b4fc;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.06);
  transition: transform .18s ease, box-shadow .22s ease, border-color .18s ease, background .25s ease, color .18s ease;
}
.balance-refresh i { font-size: 20px; }
.balance-refresh:hover {
  transform: translateY(-1px) scale(1.03) rotate(18deg);
  border-color: rgba(99,102,241,.65);
  box-shadow: 0 12px 26px rgba(79,70,229,.26), inset 0 0 0 1px rgba(255,255,255,.12);
  background: linear-gradient(135deg, #111827, #11172a);
  color: #cbd5f5;
}
.balance-refresh:active { transform: translateY(0) rotate(0deg) scale(.98); }
.balance-sub { margin: 0; color: #9ca3af; font-size: 13px; }

/* Admin grid */
.admin-tabs { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.admin-tabs .chip { border-radius: 12px; }
.admin-tab { display: block; }
.slide-card { margin-top: 12px; padding: 14px; border: 1px dashed var(--border); border-radius: 12px; background: rgba(99,102,241,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.02); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; }

@media (max-width: 1100px){
  .admin-tabs { gap: 8px; }
}

@media (max-width: 640px){
  .balance-card { padding: 16px; border-radius: 16px; gap: 10px; }
  .balance-body { align-items: flex-start; gap: 12px; }
  .balance-amount { font-size: 34px; }
  .balance-refresh { width: 44px; height: 44px; }
  .chip.large { width: 100%; justify-content: center; }
  .purchase-summary { grid-template-columns: 1fr; }
}

/* Purchase modal */
.purchase-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.modal-card { max-width: 520px; }
@media (max-width: 640px){
  .modal-card { width: 100%; }
  #purchaseModal .modal-card { max-width: 420px; }
}

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ========== Minimal home look (fewer boxes) ========== */

/* ========== Home compact overrides ========== */

/* Processo de CriaÃ§Ã£o â€” timeline style using existing markup */
  content: counter(step);
  counter-increment: step;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
  content: '';
  position: absolute; top: 18px; left: calc(36px + 12px); right: -8px; height: 2px;
  background: var(--border);
}

@media (max-width: 900px) {
}

/* Remove connector line if any thin line is visible */

/* ========== Responsive refinements ========== */
@media (max-width: 820px) {
  /* Home hero becomes single column */
  .hero-cta { gap: 8px; }
  .btn-primary, .btn-secondary, .chip { width: 100%; justify-content: center; }
}

@media (max-width: 640px) {
  /* Topbar compacto: 1 linha (hambÃºrguer | marca | avatar) */
  .topbar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px; padding: 8px 12px; position: relative; }
  .topbar .left { grid-column: 1; width: auto; display: flex; gap: 6px; }
  .topbar-brand { grid-column: 2; position: static; transform: none; width: auto; display: flex; align-items: center; justify-self: center; }
  .topbar .search { display: none; }
  .topbar .right { grid-column: 3; width: auto; display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
  #themeToggle { display: none; }
  .topbar-brand .wordmark { display: inline-block; white-space: nowrap; max-width: 66vw; overflow: hidden; text-overflow: ellipsis; }
  .topbar-brand i { font-size: 16px; }
  .topbar-brand .brand-icon { display: none; }
  .user { padding: 0; border: 0; background: transparent; }
  .user img { width: 32px; height: 32px; }
  .user span, .user i { display: none; }
  .content { padding: 16px 12px; }
  .form-grid.two-col { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column; align-items: flex-start; }
  .form-actions .btn { width: 100%; justify-content: center; }
  .notice-panel { padding: 12px 14px; }
  .notice-icon { width: 36px; height: 36px; }
}

/* Tables become easier to scroll/read on mobile */
@media (max-width: 600px) {
  .table th, .table td { padding: 8px; font-size: 13px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
}

/* Admin modal full width on small screens */
@media (max-width: 560px) {
  .modal-backdrop { padding: 10px; }
  .modal-card { max-width: none; width: 100%; }
}

/* Auth form tweaks on small screens */
@media (max-width: 520px) {
  .auth-card { padding: 16px; }
  .tabs { grid-template-columns: 1fr 1fr; }
}
.pill { animation: glow 4s ease-in-out infinite alternate; }

@keyframes floaty {
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}
@keyframes glow {
  from { box-shadow: 0 0 0 rgba(99,102,241,0); }
  to { box-shadow: 0 8px 28px rgba(99,102,241,.25); }
}






