/* ============================================================
   Wallet Banking App — Styles
   markbase.ru Wallet Module v2.0
   ============================================================ */

:root {
  --color-bg: #f5f6fa;
  --color-surface: #ffffff;
  --color-border: #eaedf0;
  --color-text: #0f172a;
  --color-text-secondary: #64748b;
  --color-primary: #2563eb;
  --color-primary-light: #eff6ff;
  --color-success: #16a34a;
  --color-success-light: #f0fdf4;
  --color-danger: #dc2626;
  --color-danger-light: #fef2f2;
  --color-warning: #d97706;
  --color-warning-light: #fffbeb;
  --color-purple: #7c3aed;
  --color-purple-light: #f5f3ff;
  --color-gold: #b45309;
  --color-gold-light: #fffbeb;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 4px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --header-h: 56px;
  --sidebar-w: 240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
}

/* ===== AUTH SCREEN ===== */
#auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
}
.auth-card {
  background: #fff;
  border-radius: 16px;
  padding: 48px 40px;
  text-align: center;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.auth-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.auth-logo svg { color: #fff; }
.auth-card h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.auth-card p { color: var(--color-text-secondary); margin-bottom: 28px; font-size: 14px; line-height: 1.6; }
.btn-auth {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s;
}
.btn-auth:hover { background: #1d4ed8; }

.auth-uam-wrap { position: relative; display: inline-block; }
.wsid-unified-btn {
  display: inline-flex; align-items: stretch; min-height: 44px;
  border: 2px solid var(--color-primary); border-radius: 10px; background: #fff;
  color: var(--color-text); text-decoration: none; padding: 0; cursor: pointer; overflow: visible;
}
.wsid-unified-btn__main { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 16px; text-align: left; }
.wsid-unified-btn__title { font-size: 15px; font-weight: 600; line-height: 1.2; }
.wsid-unified-btn__subtitle { font-size: 11px; font-weight: 400; opacity: .75; }
.wsid-unified-btn__info { width: 44px; border-left: 1px solid rgba(37,99,235,.2); background: transparent; font-style: italic; font-weight: 700; cursor: pointer; opacity: .7; display: flex; align-items: center; justify-content: center; }
.wsid-unified-btn__info:hover { opacity: 1; }
.wsid-unified-info { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 50; width: min(320px, 90vw); padding: 12px; border: 1px solid var(--color-border, #e2e8f0); border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.12); font-size: 13px; text-align: left; display: none; }
.wsid-unified-info.open { display: block; }
.wsid-unified-info ul { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.wsid-unified-info li span { display: block; font-weight: 600; font-size: 12px; }
.wsid-unified-info li small { display: block; color: var(--color-text-secondary); font-size: 11px; line-height: 1.35; }

/* ===== ADMIN BANNER ===== */
#admin-banner {
  background: #0f172a;
  color: #e2e8f0;
  text-align: center;
  padding: 5px 24px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3px;
  display: none;
}

/* ===== HEADER ===== */
#app-header {
  height: var(--header-h);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--color-text);
  text-decoration: none;
}
.header-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  flex-shrink: 0;
}
.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all .15s;
}
.header-nav a:hover { color: var(--color-text); background: #f1f5f9; }
.header-account {
  position: relative;
}
.account-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: none;
  transition: all .15s;
}
.account-trigger:hover { background: #f1f5f9; border-color: var(--color-border); }
.trigger-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.trigger-info { text-align: left; line-height: 1.3; }
.trigger-name { font-size: 13px; font-weight: 600; color: var(--color-text); }
.trigger-email { font-size: 11px; color: var(--color-text-secondary); }
.account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 280px;
  z-index: 200;
  overflow: hidden;
  display: none;
}
.account-dropdown.open { display: block; }
.dropdown-section { padding: 12px 16px; border-bottom: 1px solid var(--color-border); }
.dropdown-section:last-child { border-bottom: none; }
.dropdown-user { display: flex; align-items: center; gap: 12px; }
.dropdown-user .avatar-lg {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.dropdown-user-info .name { font-weight: 600; font-size: 14px; }
.dropdown-user-info .email { font-size: 12px; color: var(--color-text-secondary); margin-top: 2px; }
.dropdown-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.dropdown-balance .label { color: var(--color-text-secondary); }
.dropdown-balance .value { font-weight: 600; color: var(--color-primary); }
.dropdown-menu { list-style: none; }
.dropdown-menu li a, .dropdown-menu li button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--color-text);
  font-size: 13px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background .12s;
}
.dropdown-menu li a:hover, .dropdown-menu li button:hover { background: #f1f5f9; }
.dropdown-menu li button.danger { color: var(--color-danger); }
.badge-external {
  font-size: 10px;
  background: #f1f5f9;
  color: var(--color-text-secondary);
  border-radius: 4px;
  padding: 2px 6px;
  margin-left: auto;
}

/* ===== LAYOUT ===== */
#app-layout {
  display: flex;
  min-height: calc(100vh - var(--header-h));
}

/* ===== SIDEBAR ===== */
#app-sidebar {
  width: var(--sidebar-w);
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding: 20px 12px;
  flex-shrink: 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
}
.sidebar-section { margin-bottom: 20px; }
.sidebar-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 0 12px;
  margin-bottom: 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .12s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.nav-item:hover { background: #f1f5f9; color: var(--color-text); }
.nav-item.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 600;
}
.nav-item svg { flex-shrink: 0; opacity: .75; }
.nav-item.active svg { opacity: 1; }

/* ===== MAIN CONTENT ===== */
#app-main {
  flex: 1;
  padding: 28px 32px;
  min-width: 0;
}
.page { display: none; }
.page.active { display: block; }
.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
}
.page-subtitle {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

/* ===== CARDS ===== */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}
.card-subtitle { font-size: 12px; color: var(--color-text-secondary); margin-top: 2px; }

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.stat-card.blue::before { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.stat-card.purple::before { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.stat-card.green::before { background: linear-gradient(90deg, #16a34a, #4ade80); }
.stat-card.orange::before { background: linear-gradient(90deg, #d97706, #fbbf24); }
.stat-card.gold::before { background: linear-gradient(90deg, #b45309, #f59e0b); }
.stat-label { font-size: 12px; color: var(--color-text-secondary); font-weight: 500; margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 700; line-height: 1; margin-bottom: 4px; }
.stat-value.blue { color: var(--color-primary); }
.stat-value.purple { color: var(--color-purple); }
.stat-value.green { color: var(--color-success); }
.stat-value.orange { color: var(--color-warning); }
.stat-value.gold { color: var(--color-gold); }
.stat-hint { font-size: 11px; color: var(--color-text-secondary); }
.stat-actions { margin-top: 14px; }

/* ===== BUTTON ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary { background: #f1f5f9; color: var(--color-text); border-color: var(--color-border); }
.btn-secondary:hover { background: #e2e8f0; }
.btn-danger { background: var(--color-danger-light); color: var(--color-danger); border-color: #fecaca; }
.btn-danger:hover { background: #fee2e2; }
.btn-success { background: var(--color-success-light); color: var(--color-success); border-color: #bbf7d0; }
.btn-success:hover { background: #dcfce7; }
.btn-ghost { background: transparent; color: var(--color-text-secondary); }
.btn-ghost:hover { background: #f1f5f9; color: var(--color-text); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; font-weight: 600; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-icon { padding: 8px; width: 36px; height: 36px; justify-content: center; }

/* ===== TABS ===== */
.tabs-bar {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 20px;
}
.tab-btn {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all .15s;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.tab-btn:hover { color: var(--color-text); background: #f8fafc; }
.tab-btn.active { color: var(--color-primary); border-bottom-color: var(--color-primary); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
  background: #fafbfc;
}
tbody td { padding: 12px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fafbfc; }
.empty-row td { text-align: center; color: var(--color-text-secondary); padding: 40px; }

/* ===== BADGES / TAGS ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}
.badge-green { background: var(--color-success-light); color: var(--color-success); }
.badge-red { background: var(--color-danger-light); color: var(--color-danger); }
.badge-orange { background: var(--color-warning-light); color: var(--color-warning); }
.badge-blue { background: var(--color-primary-light); color: var(--color-primary); }
.badge-purple { background: var(--color-purple-light); color: var(--color-purple); }
.badge-gray { background: #f1f5f9; color: var(--color-text-secondary); }
.badge-gold { background: var(--color-gold-light); color: var(--color-gold); }

/* ===== AMOUNT ===== */
.amount-positive { color: var(--color-success); font-weight: 600; }
.amount-negative { color: var(--color-danger); font-weight: 600; }

/* ===== ALERT ===== */
.alert {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
  align-items: flex-start;
}
.alert-info { background: var(--color-primary-light); color: #1e40af; border: 1px solid #bfdbfe; }
.alert-success { background: var(--color-success-light); color: #15803d; border: 1px solid #bbf7d0; }
.alert-warning { background: var(--color-warning-light); color: #92400e; border: 1px solid #fde68a; }
.alert-danger { background: var(--color-danger-light); color: #991b1b; border: 1px solid #fecaca; }
.alert svg { flex-shrink: 0; margin-top: 1px; }

/* ===== FORM ===== */
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 12px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 12px; font-weight: 500; color: var(--color-text-secondary); }
.form-input, .form-select {
  height: 38px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 13px;
  color: var(--color-text);
  background: var(--color-surface);
  transition: border-color .15s;
  outline: none;
  width: 100%;
}
.form-input:focus, .form-select:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.form-input::placeholder { color: #94a3b8; }

/* ===== CARD LIST ITEM ===== */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  margin-bottom: 10px;
  transition: box-shadow .12s;
}
.list-item:hover { box-shadow: var(--shadow-md); }
.list-item-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-blue { background: var(--color-primary-light); color: var(--color-primary); }
.icon-purple { background: var(--color-purple-light); color: var(--color-purple); }
.icon-green { background: var(--color-success-light); color: var(--color-success); }
.icon-orange { background: var(--color-warning-light); color: var(--color-warning); }
.icon-red { background: var(--color-danger-light); color: var(--color-danger); }
.list-item-info { flex: 1; min-width: 0; }
.list-item-title { font-size: 14px; font-weight: 600; }
.list-item-desc { font-size: 12px; color: var(--color-text-secondary); margin-top: 2px; }
.list-item-actions { display: flex; gap: 6px; align-items: center; }

/* ===== PAYMENT CARD ===== */
.payment-card-visual {
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
  border-radius: 16px;
  padding: 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
  max-width: 340px;
}
.payment-card-visual::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.payment-card-visual::after {
  content: '';
  position: absolute;
  bottom: -30px; right: 30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
}
.card-visual-type { font-size: 11px; opacity: .7; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 16px; }
.card-visual-pan { font-size: 18px; letter-spacing: 3px; font-weight: 600; margin-bottom: 20px; }
.card-visual-meta { display: flex; justify-content: space-between; }
.card-visual-meta span { font-size: 11px; opacity: .75; }
.card-visual-meta strong { font-size: 13px; display: block; margin-top: 2px; }
.test-card-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(255,255,255,.2);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ===== TIMELINE ===== */
.timeline { list-style: none; position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 15px; top: 0; bottom: 0;
  width: 2px;
  background: var(--color-border);
}
.timeline-item {
  position: relative;
  padding: 0 0 20px 44px;
}
.timeline-dot {
  position: absolute;
  left: 8px;
  top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--color-surface);
  box-shadow: 0 0 0 2px;
}
.timeline-dot.green { background: var(--color-success); box-shadow: 0 0 0 2px var(--color-success); }
.timeline-dot.blue { background: var(--color-primary); box-shadow: 0 0 0 2px var(--color-primary); }
.timeline-dot.orange { background: var(--color-warning); box-shadow: 0 0 0 2px var(--color-warning); }
.timeline-time { font-size: 11px; color: var(--color-text-secondary); }
.timeline-text { font-size: 13px; margin-top: 3px; }

/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: center;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: modalIn .2s ease;
}
@keyframes modalIn {
  from { transform: scale(.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-size: 18px; font-weight: 700; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--color-text-secondary); padding: 4px; border-radius: 6px; }
.modal-close:hover { background: #f1f5f9; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ===== LOADING ===== */
.spinner {
  width: 24px; height: 24px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  gap: 12px;
  color: var(--color-text-secondary);
}

/* ===== OVERVIEW HERO ===== */
.overview-hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 60%, #7c3aed 100%);
  border-radius: var(--radius);
  padding: 32px;
  color: #fff;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.overview-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.overview-hero-balance {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 4px;
}
.overview-hero-label { font-size: 14px; opacity: .75; margin-bottom: 24px; }
.overview-hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}
.overview-hero-stat {
  background: rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 12px 16px;
  backdrop-filter: blur(10px);
}
.overview-hero-stat .label { font-size: 11px; opacity: .75; margin-bottom: 6px; }
.overview-hero-stat .value { font-size: 20px; font-weight: 700; }
.hero-actions {
  position: absolute;
  bottom: 28px; right: 32px;
  display: flex;
  gap: 8px;
}
.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .15s;
}
.btn-hero-white { background: rgba(255,255,255,.95); color: #1e3a5f; }
.btn-hero-white:hover { background: #fff; }
.btn-hero-outline { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.btn-hero-outline:hover { background: rgba(255,255,255,.25); }

/* ===== PROGRESS BAR ===== */
.progress-wrap { background: #e2e8f0; border-radius: 100px; height: 6px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 100px; transition: width .3s; }
.progress-bar.green { background: var(--color-success); }
.progress-bar.orange { background: var(--color-warning); }
.progress-bar.red { background: var(--color-danger); }

/* ===== TOAST ===== */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--color-text);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  animation: toastIn .2s ease;
  pointer-events: all;
  max-width: 340px;
}
.toast.success { background: #15803d; }
.toast.error { background: var(--color-danger); }
.toast.warning { background: var(--color-warning); }
@keyframes toastIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== CARDS GRID ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.card-tile {}

.card-tile-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

.default-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255,255,255,.25);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
  backdrop-filter: blur(4px);
}

.card-visual-chip { margin-bottom: 16px; }
.card-visual-footer { display: flex; align-items: flex-end; justify-content: space-between; }
.card-visual-sub { font-size: 10px; opacity: .6; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px; }
.card-visual-val { font-size: 13px; font-weight: 600; color: #fff; }
.card-visual-brand-logo { display: flex; align-items: center; }

/* ===== ADD CARD MODAL — PREVIEW ===== */
.card-preview {
  background: linear-gradient(135deg,#1e3a5f,#2563eb);
  border-radius: 16px;
  padding: 22px 22px 18px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  user-select: none;
  transition: background .4s ease;
}

.card-preview::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  pointer-events: none;
}

.card-preview::after {
  content: '';
  position: absolute;
  bottom: -40px; right: 40px;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  pointer-events: none;
}

.card-preview-chip { margin-bottom: 14px; }

.card-preview-number {
  font-size: 20px;
  letter-spacing: 4px;
  font-weight: 600;
  font-family: 'Courier New', monospace;
  margin-bottom: 18px;
  min-height: 28px;
}

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

.card-preview-label { font-size: 9px; text-transform: uppercase; letter-spacing: .7px; opacity: .65; margin-bottom: 4px; }
.card-preview-holder { font-size: 13px; font-weight: 600; letter-spacing: .5px; }
.card-preview-expiry { font-size: 13px; font-weight: 600; }
.card-preview-brand { display: flex; align-items: center; }

/* ===== ADD CARD FORM ===== */
.card-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.cvv-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-secondary);
  padding: 4px;
  display: flex;
  align-items: center;
}

.card-number-input { letter-spacing: 2px; font-family: 'Courier New', monospace; }

.checkbox-form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-primary);
  cursor: pointer;
}
.checkbox-form-label input { width: 15px; height: 15px; accent-color: var(--color-primary); cursor: pointer; }

/* ===== TRANSFER PAGE ===== */
.transfer-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.transfer-form-card { max-width: none; }

.transfer-type-tabs {
  display: flex;
  gap: 4px;
  background: var(--color-surface-2, #f1f5f9);
  border-radius: 10px;
  padding: 4px;
}

.transfer-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: none;
  color: var(--color-text-secondary);
  transition: .15s;
}
.transfer-tab.active { background: #fff; color: var(--color-text-primary); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.transfer-tab:hover:not(.active) { color: var(--color-text-primary); }

.amount-input-wrap { position: relative; }
.amount-currency {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  color: var(--color-text-secondary);
  font-size: 14px;
  pointer-events: none;
}
.amount-input { padding-left: 28px !important; font-size: 16px !important; font-weight: 700; }

.transfer-quick-amounts { display: flex; gap: 6px; flex-wrap: wrap; }
.quick-amount-btn {
  padding: 5px 12px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: .15s;
}
.quick-amount-btn:hover { border-color: var(--color-primary); color: var(--color-primary); background: rgba(37,99,235,.06); }

.balance-display-lg {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -.02em;
}

.transfer-recent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
.transfer-recent-item:last-child { border-bottom: none; }
.transfer-recent-info { flex: 1; min-width: 0; }
.transfer-recent-desc { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transfer-recent-date { font-size: 11px; color: var(--color-text-secondary); margin-top: 2px; }
.transfer-recent-amount { font-size: 13px; font-weight: 700; flex-shrink: 0; }
.transfer-recent-amount.positive { color: var(--color-success); }
.transfer-recent-amount.negative { color: var(--color-warning); }

/* ===== SECURITY PAGE ===== */
.security-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--color-surface-2, #f8fafc);
  transition: .15s;
}
.security-feature:hover { background: #f1f5f9; }
.security-feature-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.security-feature-info { flex: 1; min-width: 0; }
.security-feature-title { font-size: 13px; font-weight: 700; }
.security-feature-desc { font-size: 12px; color: var(--color-text-secondary); margin-top: 2px; }

.form-hint { font-size: 11px; color: var(--color-text-secondary); margin-top: 4px; }

/* Toggle switch */
.toggle-switch { position: relative; display: inline-flex; cursor: pointer; }
.toggle-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  width: 38px; height: 22px;
  background: #cbd5e1;
  border-radius: 11px;
  position: relative;
  transition: background .2s;
  flex-shrink: 0;
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .2s;
}
.toggle-switch input:checked ~ .toggle-track { background: var(--color-primary); }
.toggle-switch input:checked ~ .toggle-track::after { transform: translateX(16px); }

/* ===== UTILITY ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gap-16 { gap: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.text-sm { font-size: 12px; }
.text-secondary { color: var(--color-text-secondary); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.w-full { width: 100%; }

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
  .header-nav { display: none; }
  #app-sidebar {
    position: fixed;
    top: var(--header-h);
    left: -100%;
    width: 260px;
    height: calc(100vh - var(--header-h));
    z-index: 999;
    transition: left 0.3s ease;
    box-shadow: var(--shadow-md);
  }
  #app-sidebar.open {
    left: 0;
  }
  #app-main { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .overview-hero { padding: 20px; }
  .overview-hero-balance { font-size: 32px; }
  .hero-actions { position: static; margin-top: 20px; }
  #app-header { padding: 0 16px; }
  .transfer-layout { grid-template-columns: 1fr; }
}
