/* ============================================================
   TAREON — Fintech Design System
   Inspired by modern minimalist mobile/web financial UI
   Zero Emojis • 100% Professional Vector Aesthetics
   ============================================================ */

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

:root {
  /* ── Default Theme: Deep Navy Blue Fintech Mode ───────────── */
  --bg:              #070D1E;
  --bg-gradient:     linear-gradient(180deg, #070D1E 0%, #0B1530 100%);
  --surface:         #0F1E3D;
  --surface-2:       #142852;
  --surface-3:       #1B3366;
  --surface-dark:    #050A17;
  --surface-dark-2:  #091226;

  /* Primary Accent: Electric Sapphire & Royal Blue */
  --primary:         #2563EB;
  --primary-hover:   #1D4ED8;
  --primary-light:   rgba(37, 99, 235, 0.18);
  --primary-dark:    #3B82F6;
  --primary-glow:    rgba(37, 99, 235, 0.45);
  --accent-cyan:     #00D2FF;
  --accent-cyan-light: rgba(0, 210, 255, 0.15);

  /* Contrast / Accent Colors */
  --dark-text:       #050A17;
  --text-main:       #F8FAFC;
  --text-muted:      #94A3B8;
  --text-subtle:     #64748B;
  --text-light:      #FFFFFF;

  --border:          #1A2F5E;
  --border-light:    #122244;
  --border-dark:     #223D7A;

  --danger:          #EF4444;
  --danger-light:    rgba(239, 68, 68, 0.15);
  --warning:         #F59E0B;
  --warning-light:   rgba(245, 158, 11, 0.15);
  --success:         #10B981;
  --success-light:   rgba(16, 185, 129, 0.15);
  --info:            #0284C7;
  --info-light:      rgba(2, 132, 199, 0.15);

  --shadow-sm:       0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-card:     0 8px 24px rgba(5, 10, 23, 0.45);
  --shadow-hover:    0 16px 36px rgba(37, 99, 235, 0.22);
  --shadow-dark:     0 16px 40px rgba(4, 8, 18, 0.7);
  --shadow-blue:     0 8px 24px rgba(37, 99, 235, 0.4);
}

/* ── Light Theme Variables (Modern Fintech Light Mode) ─────── */
[data-theme="light"] {
  --bg:              #F8FAFC;
  --bg-gradient:     linear-gradient(180deg, #F8FAFC 0%, #EEF2F6 100%);
  --surface:         #FFFFFF;
  --surface-2:       #F1F5F9;
  --surface-3:       #E2E8F0;
  --surface-dark:    #0F1E3D;
  --surface-dark-2:  #162850;

  --dark-text:       #0F172A;
  --text-main:       #0F172A;
  --text-muted:      #475569;
  --text-subtle:     #64748B;
  --text-light:      #FFFFFF;

  --border:          #E2E8F0;
  --border-light:    #EDF2F7;
  --border-dark:     #CBD5E1;

  /* Sophisticated Sapphire for Light Theme (Never blown out cyan) */
  --primary:         #1D4ED8;
  --primary-hover:   #1E40AF;
  --primary-light:   #EFF6FF;
  --primary-dark:    #1E3A8A;
  --primary-glow:    rgba(29, 78, 216, 0.2);
  --accent-cyan:     #0284C7;
  --accent-cyan-light: #F0F9FF;

  --shadow-sm:       0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-card:     0 4px 16px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03);
  --shadow-hover:    0 10px 24px rgba(29, 78, 216, 0.12);
  --shadow-dark:     0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-blue:     0 4px 16px rgba(29, 78, 216, 0.25);
}

:root {
  /* ── Radii ───────────────────────────────────────────────── */
  --radius-xs:       6px;
  --radius-sm:       10px;
  --radius-md:       14px;
  --radius-lg:       20px;
  --radius-xl:       28px;
  --radius-full:     9999px;

  /* ── Transitions ─────────────────────────────────────────── */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition:      0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* ── Typography ──────────────────────────────────────────── */
  --font-head:       'Plus Jakarta Sans', sans-serif;
  --font-body:       'Inter', sans-serif;

  --sidebar-w:       270px;
  --topbar-h:        72px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Remove Native Horizontal Scrollbars Everywhere ─────── */
*::-webkit-scrollbar:horizontal {
  display: none !important;
  height: 0px !important;
  width: 0px !important;
}

/* Modern Minimalist Vertical Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 0px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.45);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

/* ── Icon Utility ─────────────────────────────────────────── */
.t-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ── Global Brand Logo ────────────────────────────────────── */
.brand-logo, .sidebar-logo, .auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  user-select: none;
}

.logo-badge {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  background: linear-gradient(135deg, #1E40AF 0%, #2563EB 55%, #00D2FF 100%);
  color: #FFFFFF;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.logo-badge:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.55);
}
.logo-badge svg {
  display: block;
}

.logo-text {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.logo-text span {
  color: var(--accent-cyan);
}
[data-theme="light"] .logo-text {
  color: #0F172A;
}
[data-theme="light"] .logo-text span {
  color: var(--primary);
}

/* Ensure high contrast on dark panels (auth hero, dark cards) even when theme is light */
.auth-left .logo-text,
.auth-brand .logo-text,
.surface-dark .logo-text,
[data-surface="dark"] .logo-text {
  color: #FFFFFF !important;
}
.auth-left .logo-text span,
.auth-brand .logo-text span,
.surface-dark .logo-text span,
[data-surface="dark"] .logo-text span {
  color: #00D2FF !important;
}

.step-number-badge {
  width: 40px;
  height: 40px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--primary-dark);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 16px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
}

/* Electric Sapphire Primary Button */
.btn-primary {
  background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 50%, #38BDF8 100%);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.4);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #2563EB 0%, #3B82F6 50%, #60A5FA 100%);
  box-shadow: var(--shadow-blue);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
}

/* Dark Pill Button (Fintech Style) */
.btn-dark {
  background: var(--surface-dark);
  color: #FFFFFF;
  border-color: var(--border-dark);
}
.btn-dark:hover {
  background: var(--surface-2);
  color: var(--primary-dark);
  transform: translateY(-1px);
}

/* Outline Pill Button */
.btn-outline {
  background: var(--surface);
  color: var(--text-main);
  border-color: var(--border);
}
.btn-outline:hover {
  background: var(--surface-2);
  border-color: var(--primary-dark);
  color: #FFFFFF;
}
[data-theme="light"] .btn-outline {
  background: #FFFFFF;
  color: #0F172A;
  border-color: #CBD5E1;
}
[data-theme="light"] .btn-outline:hover {
  background: #EFF6FF;
  border-color: var(--primary);
  color: var(--primary);
}

/* Secondary Button */
.btn-secondary {
  background: var(--surface-3);
  color: var(--text-main);
}
.btn-secondary:hover {
  background: var(--border);
}

/* Danger Button */
.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
  background: var(--danger);
  color: #FFFFFF;
}

/* Button Sizes */
.btn-sm {
  padding: 7px 16px;
  font-size: 0.82rem;
  border-radius: var(--radius-full);
}
.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
}
.btn-full {
  width: 100%;
}
.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ── Badges & Chips ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.badge-mint {
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid rgba(29, 78, 216, 0.2);
  font-weight: 700;
}
[data-theme="dark"] .badge-mint {
  background: rgba(37, 99, 235, 0.2);
  color: #60A5FA;
  border-color: rgba(96, 165, 250, 0.3);
}
.badge-dark {
  background: var(--surface-2);
  color: var(--text-main);
  border: 1px solid var(--border);
  font-weight: 700;
}
[data-theme="dark"] .badge-dark {
  background: var(--surface-dark);
  color: #93C5FD;
  border-color: var(--border-dark);
}
.badge-warning {
  background: var(--warning-light);
  color: #B45309;
}
[data-theme="dark"] .badge-warning {
  color: #FBBF24;
}
.badge-danger {
  background: var(--danger-light);
  color: #DC2626;
}
[data-theme="dark"] .badge-danger {
  color: #F87171;
}
.badge-neutral {
  background: var(--surface-2);
  color: var(--text-muted);
}

/* Trend Pill from Reference Image */
.trend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #E2E8F0;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.trend-dot {
  width: 6px;
  height: 6px;
  background: #38BDF8;
  border-radius: 50%;
  box-shadow: 0 0 8px #38BDF8;
}

/* ── Form Inputs ──────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.form-label {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  color: var(--text-main);
  outline: none;
  transition: var(--transition-fast);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

/* ── Universal Modern Fintech Checkbox ──────────────────── */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 19px;
  height: 19px;
  min-width: 19px;
  border-radius: 5px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin: 0;
  vertical-align: middle;
  position: relative;
  flex-shrink: 0;
}
input[type="checkbox"]:hover {
  border-color: var(--primary);
}
input[type="checkbox"]::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid #FFFFFF;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 2px;
}
input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 82, 255, 0.35);
}
input[type="checkbox"]:checked::after {
  transform: rotate(45deg) scale(1);
}
[data-theme="dark"] input[type="checkbox"] {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}
[data-theme="dark"] input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-color: var(--primary);
}

.input-pill {
  border-radius: var(--radius-full);
  padding: 10px 20px;
}
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}
.input-with-icon .input-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.input-with-icon input {
  padding-left: 44px;
}

/* ── Cards & Surfaces ─────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--border-dark);
}

/* Dark Hero Card (Exact aesthetic of phone balance card) */
.hero-balance-card {
  background: linear-gradient(135deg, #0A1633 0%, #0F224D 50%, #17326E 100%);
  color: #FFFFFF;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 16px 36px rgba(10, 22, 51, 0.35);
  position: relative;
  overflow: hidden;
}
[data-theme="light"] .hero-balance-card {
  background: linear-gradient(135deg, #0F2042 0%, #173060 60%, #1E408A 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 32px rgba(15, 32, 66, 0.22);
}
.hero-balance-card::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, transparent 70%);
  pointer-events: none;
}
.hero-balance-label {
  font-size: 0.8rem;
  color: #94A3B8;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.hero-balance-value {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #FFFFFF;
}

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

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ── Tables ───────────────────────────────────────────────── */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.table-wrap::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.data-table th {
  background: var(--surface-2);
  padding: 14px 18px;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.88rem;
  color: var(--text-main);
}
.data-table tr:last-child td {
  border-bottom: none;
}
.data-table tr:hover td {
  background: var(--surface-2);
}

/* ── Modal & Overlays ─────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 17, 19, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity var(--transition);
}
.modal-overlay.hidden {
  display: none;
}
.modal-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  max-width: 540px;
  width: 100%;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(16, 23, 25, 0.25);
  position: relative;
  animation: modalEnter 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes modalEnter {
  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: 20px;
}
.modal-title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 800;
}
.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}
.modal-close-btn:hover {
  background: var(--border);
  color: var(--text-main);
}

/* ── Toast Notifications (No Emojis) ──────────────────────── */
#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-dark);
  color: #FFFFFF;
  padding: 14px 20px;
  border-radius: var(--radius-full);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  font-size: 0.88rem;
  font-weight: 600;
  animation: toastSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-dark);
}
@keyframes toastSlide {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
.toast.success { border-color: rgba(0, 229, 153, 0.3); }
.toast.success .toast-icon { color: var(--primary); }
.toast.error { border-color: rgba(255, 77, 94, 0.3); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning { border-color: rgba(255, 159, 46, 0.3); }
.toast.warning .toast-icon { color: var(--warning); }
