/* ============================================================
   RoxGamer Merchants — Main Stylesheet
   Light mode, clean professional UI
   Font: Sora (display) + DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

/* -------------------------------------------------------
   CSS Variables
   ------------------------------------------------------- */
:root {
  --primary:        #1d4ed8;
  --primary-dark:   #1e3a8a;
  --primary-light:  #dbeafe;
  --accent:         #0ea5e9;
  --success:        #16a34a;
  --success-light:  #dcfce7;
  --warning:        #d97706;
  --warning-light:  #fef9c3;
  --danger:         #dc2626;
  --danger-light:   #fee2e2;
  --info:           #0891b2;
  --info-light:     #cffafe;

  --bg:             #f0f4f8;
  --bg-card:        #ffffff;
  --bg-sidebar:     #0f172a;
  --bg-sidebar-hover: #1e293b;

  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --text-white:     #ffffff;

  --border:         #e2e8f0;
  --border-light:   #f1f5f9;

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:  0 10px 30px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.05);

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;

  --sidebar-width: 250px;
  --topbar-height: 64px;

  --font-display: 'Sora', sans-serif;
  --font-body:    'DM Sans', sans-serif;
}

/* -------------------------------------------------------
   Reset & Base
   ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* -------------------------------------------------------
   Auth Pages (Login / Register / Forgot)
   ------------------------------------------------------- */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1d4ed8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 460px;
  overflow: hidden;
}

.auth-card-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 32px 40px;
  text-align: center;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.auth-logo-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}

.auth-logo-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: white;
}

.auth-card-header p {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  margin-top: 4px;
}

.auth-card-body { padding: 36px 40px; }

.auth-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.auth-footer {
  padding: 18px 40px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Pending notice */
.pending-notice {
  text-align: center;
  padding: 40px;
}

.pending-notice-icon {
  width: 80px; height: 80px;
  background: var(--warning-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  margin: 0 auto 20px;
}

.pending-notice h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.pending-notice p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  max-width: 320px;
  margin: 0 auto 8px;
}

/* -------------------------------------------------------
   Form Elements
   ------------------------------------------------------- */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29,78,216,0.12);
  background: white;
}

.form-control::placeholder { color: var(--text-muted); }

.form-control.is-invalid { border-color: var(--danger); }

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group .form-control { padding-left: 42px; }

.input-group-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
}

.input-group .toggle-password {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  padding: 0;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
}

.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 5px;
  display: none;
}

select.form-control {
  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='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

textarea.form-control { resize: vertical; min-height: 100px; }

/* -------------------------------------------------------
   Buttons
   ------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-dark); color: white; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(29,78,216,0.35); }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #15803d; color: white; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; color: white; }

.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { background: #b45309; color: white; }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }

.btn-secondary {
  background: var(--bg);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: var(--border-light); }

.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* -------------------------------------------------------
   Alerts
   ------------------------------------------------------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: 18px;
  border-left: 4px solid;
}
.alert-icon { font-size: 16px; margin-top: 1px; flex-shrink: 0; }
.alert-success  { background: var(--success-light); border-color: var(--success);  color: #14532d; }
.alert-error    { background: var(--danger-light);  border-color: var(--danger);   color: #7f1d1d; }
.alert-warning  { background: var(--warning-light); border-color: var(--warning);  color: #78350f; }
.alert-info     { background: var(--info-light);    border-color: var(--info);     color: #164e63; }

/* -------------------------------------------------------
   Layout: Sidebar + Main
   ------------------------------------------------------- */
.layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s;
}

.sidebar-brand {
  padding: 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-brand-icon {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.sidebar-brand-text {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}

.sidebar-brand-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  font-weight: 400;
}

.sidebar-nav { flex: 1; padding: 16px 0; overflow-y: auto; }

.nav-section-label {
  padding: 10px 20px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.3);
}

.nav-item { margin: 2px 10px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
  text-decoration: none;
}

.nav-link:hover {
  background: var(--bg-sidebar-hover);
  color: white;
}

.nav-link.active {
  background: var(--primary);
  color: white;
}

.nav-icon { font-size: 17px; width: 20px; text-align: center; flex-shrink: 0; }

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
}

.sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-user-avatar {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: white;
  font-family: var(--font-display);
  flex-shrink: 0;
}

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { color: white; font-size: 13px; font-weight: 600; truncate: ellipsis; overflow: hidden; white-space: nowrap; }
.sidebar-user-role { color: rgba(255,255,255,0.4); font-size: 11px; }

/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar */
.topbar {
  height: var(--topbar-height);
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.topbar-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.topbar-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  padding: 8px 16px;
  border-radius: var(--radius-lg);
}

.topbar-balance-label { font-size: 12px; color: var(--primary); font-weight: 500; }
.topbar-balance-amount { font-size: 15px; font-weight: 700; color: var(--primary-dark); font-family: var(--font-display); }

.topbar-notif {
  position: relative;
  width: 38px; height: 38px;
  background: var(--bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 18px;
  border: 1.5px solid var(--border);
  transition: all 0.15s;
}
.topbar-notif:hover { background: var(--primary-light); border-color: var(--primary); }
.topbar-notif .badge-dot {
  position: absolute;
  top: 5px; right: 5px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid white;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-secondary);
}

/* Page content area */
.page-content { padding: 28px; flex: 1; }

.page-header { margin-bottom: 24px; }
.page-header h1 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}
.page-header p { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

/* -------------------------------------------------------
   Cards
   ------------------------------------------------------- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.card-body { padding: 22px; }
.card-footer { padding: 14px 22px; background: var(--bg); border-top: 1px solid var(--border); }

/* -------------------------------------------------------
   Stat Cards (Dashboard)
   ------------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon.blue   { background: var(--primary-light); }
.stat-icon.green  { background: var(--success-light); }
.stat-icon.orange { background: var(--warning-light); }
.stat-icon.cyan   { background: var(--info-light); }
.stat-icon.red    { background: var(--danger-light); }

.stat-info { flex: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 4px; }
.stat-value { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* -------------------------------------------------------
   Tables & DataTables
   ------------------------------------------------------- */
.table-wrap { overflow-x: auto; }

table.dataTable {
  width: 100% !important;
  border-collapse: collapse;
  font-size: 13.5px;
}

table.dataTable thead th {
  background: var(--bg);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 12px 14px;
  border-bottom: 2px solid var(--border);
  border-top: none;
  white-space: nowrap;
}

table.dataTable tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}

table.dataTable tbody tr:hover { background: #f8faff; }
table.dataTable tbody tr:last-child td { border-bottom: none; }

/* DataTables toolbar */
.dataTables_wrapper .dataTables_filter input {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}
.dataTables_wrapper .dataTables_filter input:focus { border-color: var(--primary); }

.dataTables_wrapper .dataTables_length select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 13px;
  font-family: var(--font-body);
}

.dataTables_wrapper .dataTables_info { font-size: 12px; color: var(--text-muted); }

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: var(--radius-sm) !important;
  border: none !important;
  font-size: 13px !important;
  padding: 6px 12px !important;
  color: var(--text-secondary) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--primary) !important;
  color: white !important;
  border: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.current) {
  background: var(--primary-light) !important;
  color: var(--primary) !important;
}

/* -------------------------------------------------------
   Badges
   ------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.badge-success   { background: var(--success-light);  color: #14532d; }
.badge-danger    { background: var(--danger-light);   color: #7f1d1d; }
.badge-warning   { background: var(--warning-light);  color: #78350f; }
.badge-info      { background: var(--info-light);     color: #164e63; }
.badge-secondary { background: #f1f5f9;               color: #475569; }
.badge-primary   { background: var(--primary-light);  color: var(--primary-dark); }

/* -------------------------------------------------------
   Modal
   ------------------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px);
  transition: transform 0.2s;
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-header {
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-muted); line-height: 1; padding: 4px; }
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 26px; }
.modal-footer { padding: 16px 26px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* -------------------------------------------------------
   Crypto Selection (Balance page)
   ------------------------------------------------------- */
.crypto-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }

.crypto-option { display: none; }
.crypto-label {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  padding: 16px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.crypto-label:hover { border-color: var(--primary); background: var(--primary-light); }
.crypto-option:checked + .crypto-label { border-color: var(--primary); background: var(--primary-light); }

.crypto-icon { font-size: 28px; }
.crypto-name { font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.crypto-network { font-size: 10px; color: var(--text-muted); }

/* Payment address box */
.payment-box {
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}
.payment-box .qr-placeholder {
  width: 140px; height: 140px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 50px;
}
.payment-address {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-family: monospace;
  font-size: 13px;
  word-break: break-all;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.copy-btn { font-size: 12px; }

/* -------------------------------------------------------
   API Docs page
   ------------------------------------------------------- */
.api-key-box {
  display: flex; gap: 10px; align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}
.api-key-text {
  font-family: monospace;
  font-size: 13px;
  flex: 1;
  word-break: break-all;
  color: var(--text-primary);
}

.code-block {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  font-family: 'Courier New', monospace;
  font-size: 12.5px;
  line-height: 1.7;
  overflow-x: auto;
  margin: 10px 0;
}
.code-block .key   { color: #93c5fd; }
.code-block .str   { color: #86efac; }
.code-block .num   { color: #fca5a5; }
.code-block .cmnt  { color: #64748b; }

.endpoint-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
}
.endpoint-header {
  padding: 14px 20px;
  background: var(--bg);
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border);
}
.method-badge {
  padding: 4px 10px;
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  font-family: monospace;
}
.endpoint-url { font-family: monospace; font-size: 13px; color: var(--text-primary); }
.endpoint-body { padding: 18px 20px; }

/* -------------------------------------------------------
   Progress / Loading
   ------------------------------------------------------- */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------------------------------------------
   Utilities
   ------------------------------------------------------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.flex   { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 20px; }
.mt-4 { margin-top: 28px; }
.mb-3 { margin-bottom: 20px; }
.text-muted { color: var(--text-muted); }
.text-small { font-size: 12px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-mono { font-family: monospace; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-primary-c { color: var(--primary); }
.w-100 { width: 100%; }
.d-none { display: none; }

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* Empty state */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-family: var(--font-display); font-size: 16px; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 13px; color: var(--text-muted); }

/* Admin sidebar slight tweak */
.admin-badge { background: var(--warning); color: white; font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; margin-left: 6px; }

/* -------------------------------------------------------
   Responsive
   ------------------------------------------------------- */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .mobile-menu-btn { display: block; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .crypto-grid { grid-template-columns: repeat(3,1fr); }
  .page-content { padding: 16px; }
  .auth-card-body { padding: 26px 22px; }
  .auth-card-header { padding: 24px 22px; }
  .topbar { padding: 0 16px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .topbar-balance { display: none; }
}

/* -------------------------------------------------------
   Sidebar overlay (mobile)
   ------------------------------------------------------- */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99;
}
.sidebar-overlay.active { display: block; }
