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

/* =====================================================
   CSS VARIABLES
   ===================================================== */
:root {
  --bg:          #080d14;
  --bg2:         #0e1521;
  --bg3:         #131d2e;
  --surface:     #111827;
  --surface2:    #1a2535;
  --surface3:    #1f2e44;
  --border:      rgba(255,255,255,0.07);
  --border2:     rgba(255,255,255,0.12);

  --gold:        #c9a84c;
  --gold-light:  #e4c06e;
  --gold-dim:    rgba(201,168,76,0.15);

  --teal:        #2dd4bf;
  --teal-dim:    rgba(45,212,191,0.12);

  --text:        #e8edf4;
  --text2:       #8a97aa;
  --text3:       #4d5e72;

  --success:     #22c55e;
  --warning:     #f59e0b;
  --danger:      #ef4444;
  --info:        #3b82f6;

  --success-dim: rgba(34,197,94,0.12);
  --warning-dim: rgba(245,158,11,0.12);
  --danger-dim:  rgba(239,68,68,0.12);
  --info-dim:    rgba(59,130,246,0.12);

  --radius:      12px;
  --radius-lg:   18px;
  --radius-sm:   8px;

  --font:        'Sora', sans-serif;
  --mono:        'DM Mono', monospace;

  --sidebar-w:   260px;
  --header-h:    64px;
  --transition:  0.2s cubic-bezier(0.4,0,0.2,1);
}

/* =====================================================
   RESET & BASE
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

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

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }

input, select, textarea, button {
  font-family: var(--font);
  font-size: 0.95rem;
}

/* =====================================================
   LAYOUT
   ===================================================== */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--header-h) 1fr;
  min-height: 100vh;
}

.main-content {
  grid-column: 2;
  grid-row: 2;
  padding: 28px 32px;
  overflow-y: auto;
}

/* =====================================================
   SIDEBAR
   ===================================================== */
.sidebar {
  grid-column: 1;
  grid-row: 1 / 3;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #000;
  flex-shrink: 0;
}

.sidebar-logo .logo-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.sidebar-logo .logo-sub {
  font-size: 0.7rem;
  color: var(--text3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-nav { padding: 16px 12px; flex: 1; }

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  padding: 12px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: var(--surface2);
  color: var(--text);
}

.nav-item.active {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.2);
}

.nav-item .nav-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}

.nav-item .nav-badge {
  margin-left: auto;
  background: var(--gold);
  color: #000;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.user-mini {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.user-mini .avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dim), var(--teal-dim));
  border: 1px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; color: var(--gold);
  flex-shrink: 0;
}

.user-mini .uinfo { flex: 1; min-width: 0; }
.user-mini .uname { font-size: 0.85rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-mini .uemail { font-size: 0.7rem; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* =====================================================
   TOP HEADER
   ===================================================== */
.topbar {
  grid-column: 2;
  grid-row: 1;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.topbar-actions { display: flex; align-items: center; gap: 12px; }

.topbar-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition);
  color: var(--text2);
  font-size: 1rem;
}
.topbar-btn:hover { background: var(--surface2); color: var(--text); }

/* =====================================================
   CARDS / SURFACES
   ===================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.card-sm { padding: 16px; border-radius: var(--radius); }

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  display: flex; align-items: center; gap: 8px;
}

.card-title .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

/* Balance card */
.balance-card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface3) 100%);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, var(--gold-dim), transparent 70%);
  pointer-events: none;
}

.balance-label { font-size: 0.75rem; color: var(--text3); letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 6px; }
.balance-amount { font-size: 2rem; font-weight: 700; color: var(--text); letter-spacing: -0.03em; font-family: var(--mono); }
.balance-currency { font-size: 0.9rem; color: var(--gold); font-weight: 600; margin-left: 8px; }

/* =====================================================
   STAT TILES
   ===================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--transition);
}
.stat-tile:hover { border-color: var(--border2); }

.stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; margin-bottom: 14px;
}
.stat-icon.gold { background: var(--gold-dim); }
.stat-icon.teal { background: var(--teal-dim); }
.stat-icon.success { background: var(--success-dim); }
.stat-icon.danger { background: var(--danger-dim); }
.stat-icon.info { background: var(--info-dim); }
.stat-icon.warning { background: var(--warning-dim); }

.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--text); font-family: var(--mono); margin-bottom: 4px; }
.stat-label { font-size: 0.78rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.05em; }

/* =====================================================
   TABLE
   ===================================================== */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }
thead th {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text3);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
tbody tr:hover { background: var(--surface2); }
tbody tr:last-child { border-bottom: none; }
td { padding: 14px 16px; font-size: 0.88rem; vertical-align: middle; color: var(--text2); }
td.primary { color: var(--text); font-weight: 500; }
td.mono { font-family: var(--mono); font-size: 0.82rem; }

/* =====================================================
   BADGES
   ===================================================== */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-success  { background: var(--success-dim); color: var(--success); border: 1px solid rgba(34,197,94,0.2); }
.badge-warning  { background: var(--warning-dim); color: var(--warning); border: 1px solid rgba(245,158,11,0.2); }
.badge-danger   { background: var(--danger-dim);  color: var(--danger);  border: 1px solid rgba(239,68,68,0.2); }
.badge-pending  { background: var(--info-dim);    color: var(--info);    border: 1px solid rgba(59,130,246,0.2); }
.badge-default  { background: var(--surface2);    color: var(--text2);   border: 1px solid var(--border); }
.badge-gold     { background: var(--gold-dim);    color: var(--gold);    border: 1px solid rgba(201,168,76,0.2); }

/* =====================================================
   TRX ICON
   ===================================================== */
.trx-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 0.9rem; font-weight: 700;
}
.trx-icon.credit { background: var(--success-dim); color: var(--success); }
.trx-icon.debit  { background: var(--danger-dim);  color: var(--danger);  }

/* =====================================================
   FORMS
   ===================================================== */
.form-group { margin-bottom: 18px; }

label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text3);
  text-transform: uppercase;
  margin-bottom: 7px;
}

input[type=text], input[type=email], input[type=password],
input[type=number], input[type=date], select, textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}
input::placeholder { color: var(--text3); }
select option { background: var(--surface); color: var(--text); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* File input */
input[type=file] {
  padding: 8px;
  cursor: pointer;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #000;
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border2);
}
.btn-secondary:hover { background: var(--surface3); }

.btn-danger {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.25);
}
.btn-danger:hover { background: rgba(239,68,68,0.2); }

.btn-success {
  background: var(--success-dim);
  color: var(--success);
  border: 1px solid rgba(34,197,94,0.25);
}
.btn-success:hover { background: rgba(34,197,94,0.2); }

.btn-ghost { background: transparent; color: var(--text2); }
.btn-ghost:hover { background: var(--surface2); color: var(--text); }

.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 0.95rem; }
.btn-full { width: 100%; }
.btn-icon { padding: 9px; }

/* =====================================================
   ALERTS
   ===================================================== */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 18px;
  display: flex; align-items: flex-start; gap: 10px;
}
.alert-success { background: var(--success-dim); color: var(--success); border: 1px solid rgba(34,197,94,0.2); }
.alert-error   { background: var(--danger-dim);  color: var(--danger);  border: 1px solid rgba(239,68,68,0.2); }
.alert-warning { background: var(--warning-dim); color: var(--warning); border: 1px solid rgba(245,158,11,0.2); }
.alert-info    { background: var(--info-dim);    color: var(--info);    border: 1px solid rgba(59,130,246,0.2); }

/* =====================================================
   MODAL
   ===================================================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: min(560px, 95vw);
  transform: translateY(20px);
  transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.modal-title { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.modal-close {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: none; cursor: pointer;
  color: var(--text2); font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--surface3); color: var(--text); }

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding-top: 20px;
}

.page-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.page-btn:hover { background: var(--surface2); color: var(--text); }
.page-btn.active { background: var(--gold-dim); color: var(--gold); border-color: rgba(201,168,76,0.3); }

/* =====================================================
   KYC STEPS
   ===================================================== */
.kyc-steps {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 32px;
}
.kyc-step {
  display: flex; align-items: center; gap: 10px;
  flex: 1;
}
.step-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; color: var(--text3);
  flex-shrink: 0;
  transition: all var(--transition);
}
.step-circle.done { background: var(--success); border-color: var(--success); color: #fff; }
.step-circle.active { background: var(--gold-dim); border-color: var(--gold); color: var(--gold); }
.step-line { flex: 1; height: 2px; background: var(--border); margin: 0 8px; }
.step-line.done { background: var(--success); }
.step-label { font-size: 0.78rem; color: var(--text3); }

/* =====================================================
   CARD DISPLAY (virtual debit card)
   ===================================================== */
.virtual-card {
  width: 100%; max-width: 360px;
  aspect-ratio: 1.586 / 1;
  border-radius: 16px;
  background: linear-gradient(135deg, #1a2535 0%, #0d1a2a 60%, #1e1530 100%);
  border: 1px solid rgba(201,168,76,0.3);
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.virtual-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(201,168,76,0.15), transparent 70%);
}

.virtual-card::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(45,212,191,0.08), transparent 70%);
}

.card-chip {
  width: 38px; height: 28px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 5px;
  margin-bottom: 24px;
}

.card-pan {
  font-family: var(--mono);
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: var(--text);
  margin-bottom: 16px;
}

.card-bottom {
  display: flex; justify-content: space-between; align-items: flex-end;
}

.card-expiry-label { font-size: 0.6rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.1em; }
.card-expiry-val { font-family: var(--mono); font-size: 0.9rem; color: var(--text); }
.card-holder { font-size: 0.85rem; color: var(--text); text-transform: uppercase; letter-spacing: 0.08em; }
.card-network { font-size: 1.1rem; color: var(--gold); font-weight: 700; }

/* =====================================================
   FX CONVERTER
   ===================================================== */
.fx-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.fx-rate-display {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin: 16px 0;
}

.fx-rate-badge {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold);
}

/* =====================================================
   IBAN DISPLAY
   ===================================================== */
.iban-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 16px;
  transition: border-color var(--transition);
}
.iban-card:hover { border-color: var(--border2); }

.iban-currency-badge {
  min-width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  background: var(--gold-dim);
  border: 1px solid rgba(201,168,76,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: var(--gold);
  text-align: center; letter-spacing: 0.05em;
}

.iban-info { flex: 1; min-width: 0; }
.iban-label { font-size: 0.78rem; color: var(--text3); }
.iban-number { font-family: var(--mono); font-size: 0.88rem; color: var(--text); margin: 3px 0; }
.iban-balance { font-size: 1.1rem; font-weight: 700; color: var(--text); font-family: var(--mono); }
.iban-bic { font-size: 0.75rem; color: var(--text3); font-family: var(--mono); }

/* =====================================================
   TABS
   ===================================================== */
.tabs { display: flex; gap: 4px; margin-bottom: 24px; background: var(--surface); border-radius: var(--radius); padding: 4px; }
.tab {
  padding: 8px 18px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 500; color: var(--text2);
  cursor: pointer; transition: all var(--transition);
}
.tab.active { background: var(--surface3); color: var(--text); }
.tab:hover:not(.active) { color: var(--text); }

/* =====================================================
   EMPTY STATES
   ===================================================== */
.empty-state {
  text-align: center; padding: 48px 24px;
  color: var(--text3);
}
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { font-size: 0.9rem; }

/* =====================================================
   LOADER
   ===================================================== */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.page-loader {
  display: flex; align-items: center; justify-content: center;
  min-height: 200px;
}

/* =====================================================
   AUTH PAGES
   ===================================================== */
.auth-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.auth-bg {
  position: absolute; inset: 0; pointer-events: none;
}
.auth-bg::before {
  content: '';
  position: absolute; top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(201,168,76,0.04), transparent 60%);
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: min(440px, 95vw);
  position: relative;
  z-index: 1;
}

.auth-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
}

.auth-logo .logo-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900; color: #000;
}

.auth-title { font-size: 1.5rem; font-weight: 700; color: var(--text); margin-bottom: 6px; letter-spacing: -0.02em; }
.auth-subtitle { font-size: 0.875rem; color: var(--text3); margin-bottom: 28px; }

.auth-divider { text-align: center; font-size: 0.8rem; color: var(--text3); margin: 18px 0; position: relative; }
.auth-divider::before, .auth-divider::after {
  content: ''; position: absolute; top: 50%; width: calc(50% - 30px);
  height: 1px; background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* =====================================================
   NOTICE / INFO BOX
   ===================================================== */
.info-box {
  background: var(--info-dim);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.85rem;
  color: var(--info);
  margin-bottom: 16px;
}

/* =====================================================
   SEARCH BAR
   ===================================================== */
.search-bar {
  position: relative;
}
.search-bar input {
  padding-left: 38px;
}
.search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text3); pointer-events: none;
}

/* =====================================================
   COPY BUTTON
   ===================================================== */
.copy-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.72rem;
  color: var(--text2);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.copy-btn:hover { color: var(--gold); border-color: var(--gold); }

/* =====================================================
   GRID UTILITIES
   ===================================================== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.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-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--text3); }
.text-gold { color: var(--gold); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-right { text-align: right; }
.font-mono { font-family: var(--mono); }
.font-bold { font-weight: 700; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: var(--header-h) 1fr;
  }
  .sidebar {
    display: none;
  }
  .topbar, .main-content { grid-column: 1; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .main-content { padding: 16px; }
}

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

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: fadeInUp 0.35s ease forwards; }
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }
.delay-5 { animation-delay: 0.25s; }
