/* ============================================================
   HotspotPro v3 — Main CSS
   Theme: Orange / Black / White
   ============================================================ */

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

/* ── Variables ── */
:root {
  --orange:       #f97316;
  --orange-dark:  #ea6c0a;
  --orange-light: #fed7aa;
  --orange-pale:  #fff7ed;
  --black:        #0a0a0a;
  --black-soft:   #1a1a1a;
  --gray-900:     #111827;
  --gray-800:     #1f2937;
  --gray-700:     #374151;
  --gray-600:     #4b5563;
  --gray-500:     #6b7280;
  --gray-400:     #9ca3af;
  --gray-300:     #d1d5db;
  --gray-200:     #e5e7eb;
  --gray-100:     #f3f4f6;
  --gray-50:      #f9fafb;
  --white:        #ffffff;
  --green:        #22c55e;
  --green-pale:   #dcfce7;
  --red:          #ef4444;
  --red-pale:     #fee2e2;
  --blue:         #3b82f6;
  --blue-pale:    #dbeafe;
  --purple:       #8b5cf6;
  --purple-pale:  #ede9fe;
  --yellow:       #f59e0b;
  --yellow-pale:  #fef3c7;

  --sidebar-w:    260px;
  --topbar-h:     64px;
  --radius:       12px;
  --radius-lg:    16px;
  --radius-xl:    20px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:       0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --shadow-md:    0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  --shadow-lg:    0 20px 25px -5px rgba(0,0,0,.15), 0 8px 10px -6px rgba(0,0,0,.1);
  --transition:   all .2s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--gray-100);
       color: var(--gray-900); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ══════════════════════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════════════════════ */
.app-wrap   { display: flex; min-height: 100vh; }
.main-area  { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; transition: margin .3s; }
.page-body  { padding: 24px; flex: 1; max-width: 1400px; width: 100%; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w); background: var(--black); color: var(--gray-400);
  display: flex; flex-direction: column; position: fixed; top: 0; left: 0;
  height: 100vh; overflow-y: auto; overflow-x: hidden; z-index: 100;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.sidebar-brand {
  padding: 20px 20px 16px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-icon {
  width: 40px; height: 40px; background: linear-gradient(135deg,var(--orange),var(--orange-dark));
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0; box-shadow: 0 4px 12px rgba(249,115,22,.4);
}
.brand-name { font-size: 16px; font-weight: 800; color: var(--white); letter-spacing: -.3px; }
.brand-sub  { font-size: 10px; color: var(--gray-500); text-transform: uppercase; letter-spacing: .08em; }

.nav-section {
  padding: 16px 16px 6px; font-size: 10px; text-transform: uppercase;
  letter-spacing: .1em; color: var(--gray-600); font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  border-radius: 8px; margin: 1px 8px; font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: var(--transition); color: var(--gray-400);
  position: relative;
}
.nav-item:hover  { background: rgba(255,255,255,.06); color: var(--white); }
.nav-item.active { background: rgba(249,115,22,.15); color: var(--orange); }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; background: var(--orange); border-radius: 0 2px 2px 0;
}
.nav-item .ni  { width: 18px; text-align: center; font-size: 16px; flex-shrink: 0; }
.nav-item .nb  {
  margin-left: auto; background: var(--orange); color: var(--white); font-size: 10px;
  font-weight: 700; padding: 1px 6px; border-radius: 10px; min-width: 18px; text-align: center;
}
.sidebar-footer { margin-top: auto; padding: 12px 8px; border-top: 1px solid rgba(255,255,255,.06); }

/* ── Topbar ── */
.topbar {
  height: var(--topbar-h); background: var(--white); border-bottom: 1px solid var(--gray-200);
  padding: 0 24px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50; gap: 16px;
}
.topbar-left  { display: flex; align-items: center; gap: 12px; }
.topbar-title { font-size: 17px; font-weight: 700; color: var(--gray-900); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-wallet {
  display: flex; align-items: center; gap: 6px; background: var(--orange-pale);
  color: var(--orange-dark); padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 700;
  text-decoration: none; transition: var(--transition);
}
.topbar-wallet:hover { background: var(--orange-light); }
.topbar-user {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px;
  background: var(--gray-50); border-radius: 8px; font-size: 13px;
}
.avatar {
  width: 30px; height: 30px; background: linear-gradient(135deg,var(--orange),var(--orange-dark));
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: white; font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }

/* ══════════════════════════════════════════════════════════
   COMPONENTS
══════════════════════════════════════════════════════════ */

/* ── Cards ── */
.card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); overflow: hidden;
  animation: fadeInUp .3s ease both;
}
.card-header {
  padding: 16px 20px; font-weight: 700; font-size: 15px; color: var(--gray-900);
  border-bottom: 1px solid var(--gray-100); display: flex; align-items: center;
  justify-content: space-between; gap: 10px;
}
.card-header .ch-icon { font-size: 18px; }
.card-body   { padding: 20px; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--gray-100); background: var(--gray-50); }

/* ── Stat Cards ── */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 16px;
}
.stat-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 20px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 4px;
  position: relative; overflow: hidden; transition: var(--transition);
  animation: fadeInUp .3s ease both;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--stat-color, var(--orange));
}
.stat-card.orange { --stat-color: var(--orange); }
.stat-card.green  { --stat-color: var(--green); }
.stat-card.blue   { --stat-color: var(--blue); }
.stat-card.purple { --stat-color: var(--purple); }
.stat-card.red    { --stat-color: var(--red); }
.stat-top   { display: flex; align-items: flex-start; justify-content: space-between; }
.stat-icon  {
  width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-size: 20px; background: var(--orange-pale);
}
.stat-card.green  .stat-icon { background: var(--green-pale); }
.stat-card.blue   .stat-icon { background: var(--blue-pale); }
.stat-card.purple .stat-icon { background: var(--purple-pale); }
.stat-card.red    .stat-icon { background: var(--red-pale); }
.stat-val   { font-size: 26px; font-weight: 800; color: var(--gray-900); margin-top: 12px; line-height: 1; }
.stat-lbl   { font-size: 13px; font-weight: 500; color: var(--gray-500); margin-top: 4px; }
.stat-sub   { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.stat-trend { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; margin-top: 8px; }
.stat-trend.up   { color: var(--green); }
.stat-trend.down { color: var(--red); }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
  border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap;
}
.badge.orange { background: var(--orange-pale); color: var(--orange-dark); }
.badge.green  { background: var(--green-pale);  color: #166534; }
.badge.red    { background: var(--red-pale);    color: #991b1b; }
.badge.blue   { background: var(--blue-pale);   color: #1e40af; }
.badge.purple { background: var(--purple-pale); color: #5b21b6; }
.badge.yellow { background: var(--yellow-pale); color: #92400e; }
.badge.gray   { background: var(--gray-100);    color: var(--gray-600); }
.badge.black  { background: var(--gray-900);    color: var(--white); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; border-radius: var(--radius); font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; transition: var(--transition); white-space: nowrap;
  font-family: inherit; position: relative; overflow: hidden;
}
.btn::after {
  content: ''; position: absolute; inset: 0; background: rgba(255,255,255,.1);
  opacity: 0; transition: opacity .15s;
}
.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(.98); }
.btn-primary { background: linear-gradient(135deg,var(--orange),var(--orange-dark)); color: var(--white); box-shadow: 0 4px 12px rgba(249,115,22,.35); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(249,115,22,.45); transform: translateY(-1px); }
.btn-dark    { background: var(--black); color: var(--white); }
.btn-dark:hover { background: var(--gray-800); }
.btn-success { background: var(--green); color: var(--white); }
.btn-danger  { background: var(--red); color: var(--white); }
.btn-warning { background: var(--yellow); color: var(--white); }
.btn-info    { background: var(--blue); color: var(--white); }
.btn-light   { background: var(--gray-100); color: var(--gray-700); }
.btn-light:hover { background: var(--gray-200); }
.btn-outline { background: transparent; color: var(--orange); border: 1.5px solid var(--orange); }
.btn-outline:hover { background: var(--orange-pale); }
.btn-ghost  { background: transparent; color: var(--gray-600); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-block  { display: flex; width: 100%; }
.btn-sm     { padding: 6px 14px; font-size: 12px; border-radius: 8px; }
.btn-xs     { padding: 4px 10px; font-size: 11px; border-radius: 6px; }
.btn-lg     { padding: 14px 28px; font-size: 15px; border-radius: var(--radius-lg); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── Forms ── */
.form-group   { margin-bottom: 18px; }
.form-label   { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-label .req { color: var(--red); margin-left: 2px; }
.form-control {
  display: block; width: 100%; padding: 11px 14px; font-size: 14px; font-family: inherit;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius); outline: none;
  background: var(--white); color: var(--gray-900); transition: var(--transition);
}
.form-control:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(249,115,22,.12); }
.form-control::placeholder { color: var(--gray-400); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 16px; }
.form-hint { font-size: 12px; color: var(--gray-400); margin-top: 5px; }
.input-group { display: flex; align-items: stretch; }
.input-group .form-control { border-radius: var(--radius) 0 0 var(--radius); }
.input-group .btn { border-radius: 0 var(--radius) var(--radius) 0; }
.input-icon-wrap { position: relative; }
.input-icon-wrap .form-control { padding-left: 40px; }
.input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-400); font-size: 16px; }

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  padding: 11px 16px; text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--gray-500); background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200); white-space: nowrap; font-weight: 600;
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover td { background: var(--orange-pale); }
.table-striped tbody tr:nth-child(even) td { background: var(--gray-50); }

/* ── Alerts ── */
.alert {
  padding: 13px 16px; border-radius: var(--radius); font-size: 14px;
  margin-bottom: 16px; display: flex; align-items: flex-start; gap: 10px;
  animation: slideDown .25s ease;
}
.alert-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--green-pale);  color: #166534; border: 1px solid #bbf7d0; }
.alert-danger  { background: var(--red-pale);    color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: var(--yellow-pale); color: #92400e; border: 1px solid #fde68a; }
.alert-info    { background: var(--blue-pale);   color: #1e40af; border: 1px solid #bfdbfe; }
.alert-orange  { background: var(--orange-pale); color: var(--orange-dark); border: 1px solid var(--orange-light); }

/* ── Modals ── */
.overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px); align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.overlay.open { display: flex; animation: fadeIn .2s ease; }
.modal {
  background: var(--white); border-radius: var(--radius-xl); padding: 28px;
  width: 100%; max-width: 480px; box-shadow: var(--shadow-lg);
  animation: scaleIn .25s cubic-bezier(.34,1.56,.64,1);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title  { font-size: 18px; font-weight: 800; color: var(--gray-900); }
.modal-close  { background: var(--gray-100); border: none; border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 16px; transition: var(--transition); }
.modal-close:hover { background: var(--gray-200); }

/* ── Tabs ── */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--gray-100); border-radius: var(--radius); width: fit-content; margin-bottom: 20px; }
.tab-btn { padding: 8px 18px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; background: transparent; color: var(--gray-500); transition: var(--transition); }
.tab-btn.active { background: var(--white); color: var(--orange); box-shadow: var(--shadow-sm); }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn .2s ease; }

/* ── Pagination ── */
.pagination { display: flex; gap: 4px; flex-wrap: wrap; }
.page-link { padding: 7px 13px; border-radius: 8px; font-size: 13px; font-weight: 500; background: var(--white); color: var(--gray-600); border: 1px solid var(--gray-200); transition: var(--transition); }
.page-link:hover { border-color: var(--orange); color: var(--orange); }
.page-link.active { background: var(--orange); color: var(--white); border-color: var(--orange); }

/* ── Period Tabs ── */
.period-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.period-tab { padding: 6px 16px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--white); color: var(--gray-500); border: 1px solid var(--gray-200); cursor: pointer; transition: var(--transition); }
.period-tab:hover { border-color: var(--orange); color: var(--orange); }
.period-tab.active { background: var(--orange); color: var(--white); border-color: var(--orange); }

/* ── Filter Bar ── */
.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filter-bar .form-control { width: auto; min-width: 140px; }

/* ── Status Dot ── */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.status-dot.green  { background: var(--green); box-shadow: 0 0 0 3px rgba(34,197,94,.2); animation: pulse 2s infinite; }
.status-dot.red    { background: var(--red); }
.status-dot.orange { background: var(--orange); }
.status-dot.gray   { background: var(--gray-400); }

/* ── Code ── */
code { background: var(--gray-100); padding: 2px 7px; border-radius: 5px; font-size: .88em; font-family: 'JetBrains Mono', monospace; color: var(--orange-dark); }
pre  { background: var(--gray-900); color: #e2e8f0; padding: 16px 18px; border-radius: var(--radius); overflow-x: auto; font-size: .85em; }

/* ── Auth Layout ── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--black) 0%, var(--gray-900) 50%, var(--gray-800) 100%);
  padding: 20px; position: relative; overflow: hidden;
}
.auth-page::before {
  content: ''; position: absolute; width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle,rgba(249,115,22,.15) 0%,transparent 70%);
  top: -200px; right: -200px; pointer-events: none;
}
.auth-page::after {
  content: ''; position: absolute; width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle,rgba(249,115,22,.1) 0%,transparent 70%);
  bottom: -100px; left: -100px; pointer-events: none;
}
.auth-card {
  background: var(--white); border-radius: var(--radius-xl); padding: 40px 36px;
  width: 100%; max-width: 420px; box-shadow: var(--shadow-lg);
  animation: scaleIn .3s cubic-bezier(.34,1.56,.64,1); position: relative; z-index: 1;
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo-icon {
  width: 64px; height: 64px; background: linear-gradient(135deg,var(--orange),var(--orange-dark));
  border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 30px; margin: 0 auto 12px; box-shadow: 0 8px 24px rgba(249,115,22,.4);
}
.auth-logo h1 { font-size: 22px; font-weight: 800; color: var(--gray-900); }
.auth-logo p  { font-size: 13px; color: var(--gray-500); margin-top: 4px; }
.input-eye { position: relative; }
.input-eye .form-control { padding-right: 44px; }
.eye-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--gray-400); font-size: 18px; padding: 0; transition: color .15s; }
.eye-btn:hover { color: var(--gray-600); }

/* ── Wallet Hero ── */
.wallet-hero {
  background: linear-gradient(135deg,var(--black),var(--gray-800));
  border-radius: var(--radius-xl); padding: 28px; color: var(--white); margin-bottom: 20px;
  position: relative; overflow: hidden;
}
.wallet-hero::after {
  content: ''; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px;
  background: radial-gradient(circle,rgba(249,115,22,.25) 0%,transparent 70%); pointer-events: none;
}
.wallet-balance { font-size: 38px; font-weight: 900; color: var(--orange); line-height: 1; }
.wallet-label   { font-size: 13px; color: rgba(255,255,255,.6); margin-top: 4px; }
.wallet-stats   { display: flex; gap: 24px; margin-top: 20px; flex-wrap: wrap; }
.wallet-stat    { flex: 1; min-width: 100px; }
.wallet-stat-val { font-size: 16px; font-weight: 700; color: var(--white); }
.wallet-stat-lbl { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 2px; }

/* ── Connection Status ── */
.conn-status { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--gray-50); border-radius: var(--radius); margin-bottom: 16px; }
.conn-status strong { font-size: 14px; color: var(--gray-900); }
.conn-status .conn-detail { font-size: 12px; color: var(--gray-500); margin-left: auto; }

/* ── OTP Input ── */
.otp-input { font-size: 28px !important; font-weight: 800 !important; letter-spacing: 10px !important; text-align: center !important; font-family: 'JetBrains Mono', monospace !important; }

/* ── Mode Toggle ── */
.mode-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-opt input { display: none; }
.mode-btn {
  display: flex; flex-direction: column; align-items: center; padding: 16px 12px;
  border: 2px solid var(--gray-200); border-radius: var(--radius); cursor: pointer;
  transition: var(--transition); background: var(--white); text-align: center; gap: 4px;
}
.mode-btn:hover { border-color: var(--orange); }
.mode-opt input:checked + .mode-btn { border-color: var(--orange); background: var(--orange-pale); }
.mode-btn-icon  { font-size: 26px; }
.mode-btn-label { font-size: 13px; font-weight: 700; color: var(--gray-800); }
.mode-btn-desc  { font-size: 11px; color: var(--gray-500); }

/* ── Two Column ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.three-col { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }

/* ── Section Title ── */
.section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--gray-400); display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }

/* ── Spinner ── */
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2.5px solid rgba(255,255,255,.3); border-top-color: var(--white);
  border-radius: 50%; animation: spin .7s linear infinite; vertical-align: middle;
}
.spinner-dark { border-color: rgba(0,0,0,.15); border-top-color: var(--orange); }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state .es-icon { font-size: 48px; margin-bottom: 12px; opacity: .5; }
.empty-state h4 { font-size: 15px; color: var(--gray-500); font-weight: 600; }
.empty-state p  { font-size: 13px; color: var(--gray-400); margin-top: 4px; }

/* ── Utilities ── */
.text-orange { color: var(--orange); }
.text-success { color: #16a34a; }
.text-danger  { color: var(--red); }
.text-warning { color: var(--yellow); }
.text-muted   { color: var(--gray-400); }
.text-sm      { font-size: 12px; }
.text-xs      { font-size: 11px; }
.font-bold    { font-weight: 700; }
.font-black   { font-weight: 900; }
.text-center  { text-align: center; }
.mt-1{margin-top:4px} .mt-2{margin-top:8px} .mt-3{margin-top:12px} .mt-4{margin-top:16px} .mt-6{margin-top:24px}
.mb-1{margin-bottom:4px} .mb-2{margin-bottom:8px} .mb-3{margin-bottom:12px} .mb-4{margin-bottom:16px} .mb-6{margin-bottom:24px}
.gap-2{gap:8px} .gap-3{gap:12px} .gap-4{gap:16px}
.flex{display:flex} .flex-col{flex-direction:column} .items-center{align-items:center}
.justify-between{justify-content:space-between} .justify-center{justify-content:center}
.flex-wrap{flex-wrap:wrap} .flex-1{flex:1} .w-full{width:100%}
.hidden{display:none!important} .inline{display:inline}
.overflow-hidden{overflow:hidden} .relative{position:relative}

/* ══════════════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════════════ */
@keyframes fadeIn      { from{opacity:0} to{opacity:1} }
@keyframes fadeInUp    { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }
@keyframes slideDown   { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }
@keyframes scaleIn     { from{opacity:0;transform:scale(.94)} to{opacity:1;transform:scale(1)} }
@keyframes spin        { to{transform:rotate(360deg)} }
@keyframes pulse       { 0%,100%{opacity:1} 50%{opacity:.4} }
@keyframes shimmer     {
  from { background-position: -1000px 0; }
  to   { background-position:  1000px 0; }
}
.shimmer {
  background: linear-gradient(90deg,var(--gray-100) 25%,var(--gray-50) 50%,var(--gray-100) 75%);
  background-size: 1000px 100%; animation: shimmer 1.5s infinite;
}
/* Stagger animation for cards */
.stat-card:nth-child(1){animation-delay:.05s}
.stat-card:nth-child(2){animation-delay:.1s}
.stat-card:nth-child(3){animation-delay:.15s}
.stat-card:nth-child(4){animation-delay:.2s}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width:1024px) {
  .two-col { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr 1fr; }
}
@media (max-width:768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-260px); width: 260px; }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .menu-toggle { display: flex; align-items: center; }
  .page-body  { padding: 16px; }
  .topbar     { padding: 0 16px; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .form-row   { grid-template-columns: 1fr; }
  .two-col, .three-col { grid-template-columns: 1fr; }
  .topbar-user .user-name { display: none; }
  .auth-card { padding: 28px 20px; }
  .mode-toggle { grid-template-columns: 1fr; }
}
@media (max-width:480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .period-tabs { gap: 4px; }
  .period-tab { padding: 5px 12px; font-size: 11px; }
}

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