:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #22263a;
  --border: #2e3250;
  --accent: #6c63ff;
  --accent-hover: #574fd6;
  --accent2: #00d4aa;
  --danger: #ff4f6d;
  --warning: #f59e0b;
  --success: #10b981;
  --text: #e8eaf0;
  --text-muted: #8b90a8;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --transition: 0.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ── LOGIN ─────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: radial-gradient(ellipse at 60% 20%, #1e1560 0%, var(--bg) 70%);
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo .logo-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.login-logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.login-logo p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* ── FORM ───────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
}

.form-control::placeholder { color: var(--text-muted); }

select.form-control { cursor: pointer; }

textarea.form-control { resize: vertical; min-height: 80px; }

/* ── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: #fff;
  width: 100%;
}

.btn-primary:hover { background: linear-gradient(135deg, var(--accent-hover), #7c3aed); box-shadow: 0 4px 20px rgba(108,99,255,0.35); }

.btn-success {
  background: linear-gradient(135deg, var(--success), #059669);
  color: #fff;
}

.btn-success:hover { box-shadow: 0 4px 16px rgba(16,185,129,0.3); }

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #e11d48);
  color: #fff;
}

.btn-danger:hover { box-shadow: 0 4px 16px rgba(255,79,109,0.3); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.82rem; border-radius: 6px; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 8px; }

/* ── ALERT ──────────────────────────────────────────── */
.alert {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-error { background: rgba(255,79,109,0.12); border: 1px solid rgba(255,79,109,0.3); color: #ff8096; }
.alert-success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3); color: #34d399; }
.alert-warning { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.3); color: #fbbf24; }

/* ── LAYOUT ─────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.sidebar-logo .logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.sidebar-logo span {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.sidebar-nav { flex: 1; padding: 0 0.75rem; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
}

.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active { background: rgba(108,99,255,0.15); color: var(--accent); }
.nav-item .nav-icon { font-size: 1.1rem; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 1rem 0.75rem 0;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* Main content */
.main {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 1.75rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
}

.content { padding: 2rem 1.75rem; flex: 1; }

/* ── HAMBURGER ──────────────────────────────────────── */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--text);
  font-size: 1.4rem;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
}

/* ── CARDS / GRID ───────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* ── STAT CARDS ─────────────────────────────────────── */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-icon.purple { background: rgba(108,99,255,0.15); }
.stat-icon.green { background: rgba(16,185,129,0.15); }
.stat-icon.red { background: rgba(255,79,109,0.15); }
.stat-icon.yellow { background: rgba(245,158,11,0.15); }

.stat-info .stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat-info .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ── TABS ───────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 1.5rem;
}

.tab-btn {
  flex: 1;
  padding: 0.65rem 1rem;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.tab-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 6px rgba(0,0,0,0.3);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── PAYMENT METHOD CARDS ───────────────────────────── */
.payment-cards { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.25rem; }

.payment-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.payment-card .pm-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.pm-icon.iban { background: rgba(108,99,255,0.15); }
.pm-icon.crypto { background: rgba(0,212,170,0.15); }

.payment-card .pm-info { flex: 1; min-width: 0; }
.payment-card .pm-label { font-size: 0.82rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.payment-card .pm-value { font-size: 0.95rem; font-weight: 600; margin-top: 0.15rem; word-break: break-all; }
.payment-card .pm-extra { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.1rem; }

.copy-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-btn.copied { border-color: var(--success); color: var(--success); }

/* ── TABLE ──────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(46,50,80,0.5);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.02); }

/* ── BADGES ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-pending { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-approved { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-rejected { background: rgba(255,79,109,0.15); color: #ff8096; }
.badge-deposit { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-withdraw { background: rgba(108,99,255,0.15); color: #a78bfa; }
.badge-active { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-inactive { background: rgba(139,144,168,0.15); color: var(--text-muted); }
.badge-iban { background: rgba(108,99,255,0.12); color: #a78bfa; }
.badge-crypto { background: rgba(0,212,170,0.12); color: var(--accent2); }

/* ── TOGGLE SWITCH ──────────────────────────────────── */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 24px;
  transition: .3s;
}

.slider:before {
  content: '';
  position: absolute;
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: .3s;
}

input:checked + .slider { background: var(--success); }
input:checked + .slider:before { transform: translateX(20px); }

/* ── MODAL ──────────────────────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow);
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-header h3 { font-size: 1.05rem; font-weight: 700; }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  padding: 0.2rem;
  transition: color var(--transition);
}

.modal-close:hover { color: var(--text); }

.modal-footer {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.modal-footer .btn { width: auto; }

/* ── EMPTY STATE ────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.5; }
.empty-state p { font-size: 0.9rem; }

/* ── DIVIDER ────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
}

/* ── SECTION HEADER ─────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
}

/* ── PAGE TITLE ─────────────────────────────────────── */
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.75rem;
  letter-spacing: -0.3px;
}

/* ── ADMIN BADGE ────────────────────────────────────── */
.admin-label {
  font-size: 0.7rem;
  background: rgba(108,99,255,0.2);
  color: var(--accent);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── SECTION SUB LABEL ──────────────────────────────── */
.section-sub-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}

/* ── INFO BOX ───────────────────────────────────────── */
.info-box {
  background: rgba(108,99,255,0.08);
  border: 1px solid rgba(108,99,255,0.2);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  font-size: 0.875rem;
  color: #c4bfff;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .main {
    margin-left: 0;
  }

  .hamburger {
    display: flex;
  }

  .content { padding: 1.25rem 1rem; }

  .topbar { padding: 0 1rem; }

  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }

  .tabs { flex-direction: row; }

  thead th:nth-child(n+5), tbody td:nth-child(n+5) { display: none; }
}

@media (max-width: 480px) {
  .login-card { padding: 2rem 1.25rem; }
  .stat-card { padding: 1rem; }
  .payment-card { flex-wrap: wrap; }
  .modal { padding: 1.5rem 1.25rem; }
  thead th:nth-child(n+4), tbody td:nth-child(n+4) { display: none; }
}
