/* ─────────────────────────────────────────────────────────────────────────────
   Gateway WhiteLabel — app.css
   Todas as cores via CSS custom properties (injetadas pelo PHP get_theme_css())
   ───────────────────────────────────────────────────────────────────────────── */

/* Fallback vars (sobrescritas pelo PHP) */
:root {
  --primary:      #6366f1;
  --primary-dark: #4f46e5;
  --primary-rgb:  99,102,241;
  --bg:           #0f0f13;
  --surface:      #18181f;
  --surface2:     #1f1f28;
  --border:       #2a2a35;
  --border2:      #222230;
  --text:         #f1f1f3;
  --text2:        #a0a0b0;
  --text3:        #666680;
  --success:      #22c55e;
  --success-rgb:  34,197,94;
  --danger:       #ef4444;
  --danger-rgb:   239,68,68;
  --warning:      #f59e0b;
  --warning-rgb:  245,158,11;
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  14px;
  --r-xl:  20px;
  --r-full: 9999px;
  --shadow: 0 2px 16px rgba(0,0,0,.25);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.35);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform .3s;
}

.sidebar-logo {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo img { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; }
.sidebar-logo-text {
  font-size: 15px; font-weight: 800; letter-spacing: -.3px;
  color: var(--text);
}

.nav-section { padding: 12px 0; }
.nav-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
  color: var(--text3); padding: 0 16px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; font-size: 13.5px; font-weight: 500;
  color: var(--text2); cursor: pointer; border-radius: 0;
  border-left: 2px solid transparent; transition: .15s;
}
.nav-item i { font-size: 15px; width: 18px; text-align: center; }
.nav-item:hover { background: rgba(255,255,255,.04); color: var(--text); text-decoration: none; }
.nav-item.active {
  background: rgba(var(--primary-rgb),.1);
  color: var(--primary);
  border-left-color: var(--primary);
}
.nav-badge {
  margin-left: auto; background: var(--primary);
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 20px; min-width: 18px; text-align: center;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
}
.sidebar-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(var(--primary-rgb),.15);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 10.5px; color: var(--text3); }

.main-content {
  margin-left: 220px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-size: 15px; font-weight: 700; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.page-content { padding: 24px; flex: 1; }
.page-header { margin-bottom: 20px; }
.page-title { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.page-sub { font-size: 13px; color: var(--text2); margin-top: 3px; }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.card-body { padding: 18px; }

/* ── Stat cards ──────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  display: flex; gap: 14px; align-items: flex-start;
}
.stat-icon {
  width: 42px; height: 42px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.stat-label { font-size: 11.5px; color: var(--text2); margin-bottom: 4px; }
.stat-value { font-size: 22px; font-weight: 900; letter-spacing: -.5px; line-height: 1; }
.stat-sub { font-size: 11px; color: var(--text3); margin-top: 4px; }

/* ── Table ────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  padding: 10px 14px; text-align: left;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: var(--text3); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border2); transition: background .15s; }
tbody tr:hover { background: rgba(255,255,255,.025); }
tbody td { padding: 11px 14px; vertical-align: middle; }
tbody tr:last-child { border-bottom: none; }

/* ── Badges ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: var(--r-full);
  font-size: 10.5px; font-weight: 700; letter-spacing: .3px;
  white-space: nowrap;
}
.badge-success { background: rgba(var(--success-rgb),.12); color: var(--success); }
.badge-danger  { background: rgba(var(--danger-rgb),.12);  color: var(--danger); }
.badge-warning { background: rgba(var(--warning-rgb),.12); color: var(--warning); }
.badge-primary { background: rgba(var(--primary-rgb),.12); color: var(--primary); }
.badge-muted   { background: rgba(107,114,128,.12); color: var(--text3); }

/* ── Botões ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--r-md);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: .15s; line-height: 1;
  text-decoration: none !important; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; color: var(--text2); border-color: var(--border); }
.btn-outline:hover { background: rgba(255,255,255,.04); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 6px 13px; font-size: 12.5px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 12.5px; font-weight: 700;
  color: var(--text2); margin-bottom: 6px; letter-spacing: .2px;
}
.form-control {
  width: 100%; padding: 10px 14px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-md); color: var(--text);
  font-size: 14px; transition: border-color .15s;
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.12); }
.form-control::placeholder { color: var(--text3); }
.form-hint { font-size: 11.5px; color: var(--text3); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }

.input-wrap { position: relative; }
.input-wrap .input-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text3); font-size: 14px; pointer-events: none;
}
.input-wrap .form-control.with-icon { padding-left: 36px; }

select.form-control { cursor: pointer; }

/* ── Alert ────────────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--r-md);
  font-size: 13.5px; display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 16px; border: 1px solid transparent;
}
.alert-success { background: rgba(var(--success-rgb),.1); color: var(--success); border-color: rgba(var(--success-rgb),.2); }
.alert-danger  { background: rgba(var(--danger-rgb),.1);  color: var(--danger);  border-color: rgba(var(--danger-rgb),.2); }
.alert-warning { background: rgba(var(--warning-rgb),.1); color: var(--warning); border-color: rgba(var(--warning-rgb),.2); }
.alert-info    { background: rgba(var(--primary-rgb),.1); color: var(--primary); border-color: rgba(var(--primary-rgb),.2); }

/* ── Modal ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.modal-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 800; font-size: 15px;
}
.modal-body { padding: 20px; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex; gap: 8px; justify-content: flex-end;
}
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text3); font-size: 18px; padding: 2px;
  transition: color .15s;
}
.modal-close:hover { color: var(--text); }

/* ── Toast ────────────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed; top: 16px; right: 16px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--r-md);
  font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s ease; max-width: 320px;
  border: 1px solid transparent;
}
@keyframes toastIn { from { opacity:0; transform:translateX(100%); } }
.toast.success { background:var(--surface); border-color:rgba(var(--success-rgb),.3); color:var(--success); }
.toast.danger  { background:var(--surface); border-color:rgba(var(--danger-rgb),.3);  color:var(--danger); }
.toast.info    { background:var(--surface); border-color:rgba(var(--primary-rgb),.3); color:var(--primary); }

/* ── Pagination ──────────────────────────────────────────────────────────── */
.pagination { display:flex; gap:4px; align-items:center; flex-wrap:wrap; }
.page-link {
  padding: 6px 11px; border-radius: var(--r-sm);
  font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--border); color: var(--text2);
  background: var(--surface); cursor: pointer; transition: .15s;
}
.page-link:hover, .page-link.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* ── Comprovante ─────────────────────────────────────────────────────────── */
.receipt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.receipt-topbar { height: 4px; }
.receipt-topbar.success { background: linear-gradient(90deg, var(--success), #4ade80); }
.receipt-topbar.danger  { background: linear-gradient(90deg, var(--danger), #f87171); }
.receipt-topbar.warning { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.receipt-topbar.primary { background: linear-gradient(90deg, var(--primary), var(--primary-dark)); }
.receipt-topbar.muted   { background: linear-gradient(90deg, #374151, #6b7280); }

.receipt-header { text-align: center; padding: 24px 20px 16px; }
.receipt-status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 14px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  margin-bottom: 14px; border: 1px solid transparent;
}
.receipt-icon {
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin: 0 auto 12px;
}
.receipt-amount { font-size: 32px; font-weight: 900; letter-spacing: -1px; line-height: 1.1; }
.receipt-amount-label { font-size: 11px; color: var(--text3); font-weight: 600; letter-spacing: .5px; margin-top: 4px; }
.receipt-type { font-size: 13px; color: var(--text2); margin-top: 6px; }

.receipt-divider {
  display: flex; align-items: center; padding: 0 16px;
  margin: 4px 0;
}
.receipt-divider::before, .receipt-divider::after {
  content: ''; flex: 1; height: 1px;
  background: repeating-linear-gradient(90deg, var(--border) 0, var(--border) 6px, transparent 6px, transparent 10px);
}
.receipt-divider-dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; color: var(--text3); margin: 0 8px;
}

.receipt-section { padding: 14px 18px; border-top: 1px solid var(--border2); }
.receipt-section-title {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .9px;
  color: var(--text3); margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.receipt-row { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; }
.receipt-row + .receipt-row { border-top: 1px solid var(--border2); }
.receipt-row-icon {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: var(--surface2); border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text2);
}
.receipt-row-label { font-size: 10.5px; color: var(--text3); font-weight: 600; margin-bottom: 2px; }
.receipt-row-value { font-size: 13px; font-weight: 700; word-break: break-all; }
.receipt-row-value.mono { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 500; }

.receipt-financial {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg); padding: 4px 14px;
}
.receipt-fin-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; font-size: 13px; gap: 12px;
}
.receipt-fin-row + .receipt-fin-row { border-top: 1px solid var(--border2); }
.receipt-fin-row.total {
  border-top: 2px solid var(--border) !important;
  padding-top: 11px;
}
.receipt-fin-row.total .rf-label { font-weight: 800; font-size: 13.5px; }
.receipt-fin-row.total .rf-value { font-size: 18px; font-weight: 900; }
.rf-label { color: var(--text2); display: flex; align-items: center; gap: 7px; }
.rf-label i { font-size: 12px; color: var(--text3); width: 15px; text-align: center; }
.rf-value { font-weight: 700; text-align: right; }

.receipt-actions {
  padding: 16px 18px; display: flex; gap: 8px;
  justify-content: center; flex-wrap: wrap;
}
.receipt-brand {
  padding: 10px 18px 16px; text-align: center;
  font-size: 10.5px; font-weight: 700; letter-spacing: .5px;
  color: var(--text3); text-transform: uppercase;
  border-top: 1px solid var(--border2);
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 24px;
  color: var(--text3);
}
.empty-state i { font-size: 40px; margin-bottom: 12px; opacity: .5; display: block; }
.empty-state h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: var(--text2); }
.empty-state p { font-size: 13px; }

/* ── KYC upload ──────────────────────────────────────────────────────────── */
.kyc-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  padding: 32px; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.kyc-upload-zone:hover, .kyc-upload-zone.drag-over {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb),.04);
}
.kyc-upload-zone i { font-size: 32px; color: var(--text3); margin-bottom: 8px; }
.kyc-upload-zone p { font-size: 13px; color: var(--text2); }

/* ── PWA install prompt ───────────────────────────────────────────────────── */
.install-banner {
  background: linear-gradient(135deg, rgba(var(--primary-rgb),.12), transparent);
  border: 1px solid rgba(var(--primary-rgb),.2);
  border-radius: var(--r-xl); padding: 24px;
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px; flex-wrap: wrap;
}
.install-icon {
  width: 56px; height: 56px; border-radius: var(--r-lg);
  background: rgba(var(--primary-rgb),.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: var(--primary); flex-shrink: 0;
}

/* ── Admin theme panel ───────────────────────────────────────────────────── */
.color-picker-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
.color-swatch {
  width: 36px; height: 36px; border-radius: var(--r-md);
  border: 1px solid var(--border); cursor: pointer; padding: 0;
  overflow: hidden; flex-shrink: 0;
}
.color-swatch input[type=color] {
  width: 150%; height: 150%; margin: -25% 0 0 -25%; cursor: pointer;
  border: none; padding: 0;
}
.color-label { font-size: 12.5px; font-weight: 600; flex: 1; }
.color-hex { font-size: 12px; font-family: monospace; color: var(--text3); width: 80px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
.hamburger {
  display: none; background: none; border: none;
  color: var(--text); font-size: 20px; cursor: pointer;
  padding: 4px; margin-right: 8px;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,.4);
  }
  .main-content { margin-left: 0; }
  .hamburger { display: flex; align-items: center; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-content { padding: 16px; }
  .topbar { padding: 0 16px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* ── Utilities ────────────────────────────────────────────────────────────── */
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger)  !important; }
.text-warning { color: var(--warning) !important; }
.text-primary { color: var(--primary) !important; }
.text-muted   { color: var(--text3)   !important; }
.fw-bold { font-weight: 700 !important; }
.fw-black { font-weight: 900 !important; }
.fs-sm { font-size: 12px !important; }
.mt-1 { margin-top: 6px; }  .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; }
.gap-1 { gap: 6px; } .gap-2 { gap: 12px; }
.d-flex { display: flex; } .align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ── Stats grid ────────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color .2s;
}
.stat-card:hover { border-color: rgba(var(--primary-rgb),.3); }
.stat-icon {
  width: 42px; height: 42px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.stat-label { font-size: 11px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px; }
.stat-value { font-size: 22px; font-weight: 900; letter-spacing: -.5px; line-height: 1; }
.stat-sub   { font-size: 11px; color: var(--text3); margin-top: 2px; }

/* ── Color picker ─────────────────────────────────────────────────────────── */
.color-picker-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 10px 12px;
}
.color-swatch input[type=color] {
  width: 36px; height: 36px; border: none; border-radius: 8px;
  padding: 0; cursor: pointer; background: none;
}
.color-label { font-size: 13px; font-weight: 500; }

/* ── Toast animation ──────────────────────────────────────────────────────── */
.toast { opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translateY(0); }

/* ── Badge colors ─────────────────────────────────────────────────────────── */
.badge-primary { background: rgba(var(--primary-rgb),.15); color: var(--primary); }
.badge-success { background: rgba(var(--success-rgb),.15); color: var(--success); }
.badge-warning { background: rgba(var(--warning-rgb),.15); color: var(--warning); }
.badge-danger  { background: rgba(var(--danger-rgb),.15);  color: var(--danger);  }
.badge-muted   { background: rgba(255,255,255,.06);         color: var(--text2);   }

/* ── btn-warning ─────────────────────────────────────────────────────────── */
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #d97706; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #16a34a; }
.btn-danger  { background: var(--danger);  color: #fff; }
.btn-danger:hover  { background: #dc2626; }

/* ── Grid utilities ───────────────────────────────────────────────────────── */
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 20px; }
.mt-1 { margin-top: 4px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 20px; }

/* ── PWA install banner ───────────────────────────────────────────────────── */
#pwa-install-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 14px 20px; display: flex; align-items: center; gap: 12px;
  z-index: 9999; box-shadow: 0 -4px 20px rgba(0,0,0,.25);
  transform: translateY(100%); transition: transform .3s;
}
#pwa-install-banner.show { transform: translateY(0); }

/* ── Pagination ───────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: 4px; flex-wrap: wrap; }
.page-link {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text2); font-size: 13px; font-weight: 600;
  transition: .15s; text-decoration: none;
}
.page-link:hover { background: rgba(var(--primary-rgb),.1); color: var(--primary); text-decoration: none; }
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .stat-value { font-size: 18px; }
}
