/* ===== VEXAPAY GLOBAL STYLES ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-900: #060d1a;
  --bg-800: #0a1525;
  --bg-700: #0d1e35;
  --bg-card: #111e33;
  --teal: #2dd4a7;
  --teal-dim: rgba(45,212,167,0.12);
  --teal-border: rgba(45,212,167,0.25);
  --white: #ffffff;
  --text-primary: #f0f4f8;
  --text-secondary: rgba(255,255,255,0.55);
  --text-muted: rgba(255,255,255,0.28);
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);
  --red: #f87171;
  --red-bg: rgba(248,113,113,0.1);
  --green: #34d399;
  --green-bg: rgba(52,211,153,0.1);
  --amber: #fbbf24;
  --amber-bg: rgba(251,191,36,0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg-900); color: var(--text-primary); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font); border: none; outline: none; }
input, select, textarea { font-family: var(--font); outline: none; }

/* ===== BUTTONS ===== */
.btn-primary { background: linear-gradient(135deg, #2dd4a7 0%, #1ab88e 100%); color: #04342c; padding: 10px 22px; border-radius: var(--radius-md); font-size: 14px; font-weight: 600; transition: box-shadow 0.2s, transform 0.2s; box-shadow: 0 0 20px rgba(45,212,167,0.28); }
.btn-primary:hover { box-shadow: 0 0 34px rgba(45,212,167,0.50); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-primary); border: 1px solid var(--border-hover); padding: 10px 22px; border-radius: var(--radius-md); font-size: 14px; transition: border-color 0.15s, background 0.15s; }
.btn-ghost:hover { border-color: var(--teal); background: var(--teal-dim); }
.btn-danger { background: var(--red-bg); color: var(--red); border: 1px solid rgba(248,113,113,0.2); padding: 8px 16px; border-radius: var(--radius-md); font-size: 13px; font-weight: 500; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ===== BADGES ===== */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 500; }
.badge-success { background: var(--green-bg); color: var(--green); }
.badge-warning { background: var(--amber-bg); color: var(--amber); }
.badge-danger { background: var(--red-bg); color: var(--red); }
.badge-info { background: var(--teal-dim); color: var(--teal); }
.badge-dot::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ===== CARDS ===== */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.card-sm { padding: 14px 16px; }

/* ===== INPUTS ===== */
.input { width: 100%; padding: 10px 14px; background: var(--bg-700); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text-primary); font-size: 14px; transition: border-color 0.15s; }
.input:focus { border-color: var(--teal); }
.input::placeholder { color: var(--text-muted); }
.input-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; display: block; font-weight: 500; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff80' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* ===== TABLES ===== */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; padding: 10px 14px; color: var(--text-muted); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text-primary); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255,255,255,0.02); }

/* ===== NAV ===== */
.nav { background: var(--bg-900); border-bottom: 1px solid var(--border); padding: 0 32px; height: 60px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
.nav-logo { font-size: 18px; font-weight: 700; color: var(--white); letter-spacing: -0.5px; }
.nav-logo span { color: var(--teal); }
.nav-links { display: flex; gap: 4px; }
.nav-link { padding: 7px 14px; border-radius: var(--radius-md); font-size: 13px; color: var(--text-secondary); transition: color 0.15s, background 0.15s; }
.nav-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--teal); background: var(--teal-dim); }
.nav-right { display: flex; gap: 10px; align-items: center; }

/* ===== SIDEBAR ===== */
.sidebar { width: 220px; background: var(--bg-800); border-right: 1px solid var(--border); height: 100vh; position: fixed; top: 0; left: 0; display: flex; flex-direction: column; padding: 0 0 20px; overflow-y: auto; }
.sidebar-logo { padding: 18px 20px 14px; font-size: 18px; font-weight: 700; color: var(--white); border-bottom: 1px solid var(--border); }
.sidebar-logo span { color: var(--teal); }
.sidebar-section { padding: 16px 12px 6px; font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.sidebar-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-md); font-size: 13px; color: var(--text-secondary); margin: 1px 8px; transition: all 0.15s; }
.sidebar-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.sidebar-link.active { color: var(--teal); background: var(--teal-dim); }
.sidebar-link i { font-size: 16px; }
.sidebar-bottom { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--border); }

/* ===== LAYOUT ===== */
.app-layout { display: flex; min-height: 100vh; }
.main-content { margin-left: 220px; flex: 1; padding: 28px 32px; min-height: 100vh; }
.page-header { margin-bottom: 24px; }
.page-title { font-size: 22px; font-weight: 600; color: var(--text-primary); }
.page-sub { font-size: 14px; color: var(--text-secondary); margin-top: 3px; }

/* ===== STAT CARDS ===== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.stat-value { font-size: 26px; font-weight: 600; color: var(--text-primary); }
.stat-change { font-size: 12px; margin-top: 5px; }
.stat-change.up { color: var(--green); }
.stat-change.down { color: var(--red); }

/* ===== UTILS ===== */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-teal { color: var(--teal); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.font-500 { font-weight: 500; }
.font-600 { font-weight: 600; }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ===== MODAL ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal { background: var(--bg-800); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 28px; width: 100%; max-width: 480px; }
.modal-title { font-size: 17px; font-weight: 600; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 99px; }

/* ===== TOAST ===== */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 18px; font-size: 13px; display: flex; align-items: center; gap: 10px; z-index: 9999; animation: slideUp 0.2s ease; }
.toast.success { border-color: rgba(52,211,153,0.3); }
.toast.error { border-color: rgba(248,113,113,0.3); }
@keyframes slideUp { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.2s; z-index: 200; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
