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

:root {
  --primary: #0d6efd;
  --primary-dark: #0a58ca;
  --primary-light: #e8f0fe;
  --secondary: #6c757d;
  --success: #198754;
  --danger: #dc3545;
  --warning: #ffc107;
  --info: #0dcaf0;
  --dark: #1a1a2e;
  --sidebar-bg: #0f172a;
  --sidebar-text: #cbd5e1;
  --sidebar-active: #0d6efd;
  --navbar-height: 60px;
  --sidebar-width: 260px;
  --card-border: #e2e8f0;
  --body-bg: #f0f4f8;
  --text-muted: #64748b;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Sora', sans-serif;
  background: var(--body-bg);
  color: #1e293b;
  font-size: 14px;
  overflow-x: hidden;
}

/* =========================================
   TYPOGRAPHY HELPERS
   ========================================= */
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 13px; }

/* =========================================
   NAVBAR
   ========================================= */
.trendly-navbar {
  background: #fff;
  border-bottom: 1px solid var(--card-border);
  height: var(--navbar-height);
  z-index: 1040;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.trendly-navbar .navbar-brand { color: var(--dark); font-size: 18px; text-decoration: none; }
.brand-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px;
}
.btn-icon {
  width: 36px; height: 36px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: var(--dark);
  position: relative;
  padding: 0;
}
.btn-icon:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.badge-dot {
  position: absolute; top: -4px; right: -4px;
  background: var(--danger);
  color: #fff; font-size: 9px;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; border: 2px solid #fff;
}
.user-avatar-btn {
  background: none; border: none; padding: 4px 8px;
  border-radius: 10px; transition: background .2s;
}
.user-avatar-btn:hover { background: var(--primary-light); }
.avatar-circle {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  border-radius: 50%;
  color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}

/* =========================================
   SIDEBAR
   ========================================= */
.sidebar {
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--navbar-height));
  background: var(--sidebar-bg);
  z-index: 1030;
  overflow-y: auto;
  transition: transform .3s ease;
  display: flex; flex-direction: column;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.sidebar-inner { display: flex; flex-direction: column; height: 100%; }

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-avatar {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  border-radius: 10px;
  color: #fff; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-user-info { flex: 1; overflow: hidden; }
.sidebar-user-info .fw-600 { color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-wallets {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.wallet-mini {
  background: rgba(255,255,255,.05);
  border-radius: 8px; padding: 8px 10px;
  display: flex; flex-direction: column; gap: 3px;
}
.wallet-mini span { color: #fff; }
.wallet-mini .text-xs { opacity: .6; }

.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: rgba(255,255,255,.3);
  padding: 8px 20px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: 0;
  transition: all .2s;
  font-size: 13.5px;
  border-left: 3px solid transparent;
}
.nav-item i { font-size: 16px; width: 20px; text-align: center; }
.nav-item:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
  border-left-color: rgba(255,255,255,.2);
}
.nav-item.active {
  background: rgba(13,110,253,.2);
  color: #fff;
  border-left-color: var(--primary);
  font-weight: 600;
}
.nav-coming-soon { opacity: .6; }
.nav-coming-soon:hover { opacity: .9; }

.sidebar-footer {
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 1020;
}

/* KYC badge styles */
.badge-verified { background: rgba(25,135,84,.2); color: #0f5132; font-size: 10px; padding: 2px 8px; border-radius: 20px; }
.badge-pending  { background: rgba(255,193,7,.2); color: #664d03; font-size: 10px; padding: 2px 8px; border-radius: 20px; }
.badge-unverified { background: rgba(220,53,69,.15); color: #842029; font-size: 10px; padding: 2px 8px; border-radius: 20px; }

/* =========================================
   MAIN CONTENT
   ========================================= */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--navbar-height);
  min-height: calc(100vh - var(--navbar-height));
  transition: margin-left .3s ease;
  padding-bottom: 40px;
}
.page-header {
  padding: 20px 24px 0;
  margin-bottom: 20px;
}
.page-title { font-size: 20px; font-weight: 700; color: var(--dark); margin: 0; }

/* =========================================
   CARDS
   ========================================= */
.card {
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,.04);
  background: #fff;
}
.card-header {
  background: #fff; border-bottom: 1px solid var(--card-border);
  padding: 16px 20px; font-weight: 600; border-radius: 14px 14px 0 0 !important;
}
.card-body { padding: 20px; }

/* Stat Cards */
.stat-card {
  border-radius: 14px; padding: 20px;
  position: relative; overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,.1); }
.stat-card .stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 16px;
}
.stat-card .stat-value { font-size: 24px; font-weight: 700; }
.stat-card .stat-label { font-size: 12px; opacity: .8; margin-top: 2px; }
.stat-card .stat-change { font-size: 12px; margin-top: 8px; }

/* Wallet Cards */
.wallet-card {
  border-radius: 16px; padding: 24px;
  position: relative; overflow: hidden;
  color: #fff; min-height: 160px;
}
.wallet-card::before {
  content: ''; position: absolute;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  top: -60px; right: -40px;
}
.wallet-card::after {
  content: ''; position: absolute;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  bottom: -40px; left: -20px;
}
.wallet-card .wallet-currency { font-size: 13px; opacity: .8; font-weight: 500; letter-spacing: .5px; }
.wallet-card .wallet-amount { font-size: 32px; font-weight: 700; margin: 8px 0 4px; }
.wallet-card .wallet-actions { margin-top: 20px; position: relative; z-index: 1; }
.wallet-card-usd { background: linear-gradient(135deg, #0d6efd, #6366f1); }
.wallet-card-ngn { background: linear-gradient(135deg, #198754, #20c997); }

/* =========================================
   FORMS
   ========================================= */
.form-label { font-weight: 600; font-size: 13px; color: #374151; margin-bottom: 6px; }
.form-control, .form-select {
  border: 1.5px solid #e2e8f0; border-radius: 10px;
  padding: 10px 14px; font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
  font-family: 'Sora', sans-serif;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13,110,253,.1);
  outline: none;
}
.form-control.is-invalid { border-color: var(--danger); }
.input-group-text {
  border: 1.5px solid #e2e8f0; background: #f8fafc;
  font-size: 14px; border-radius: 10px;
}
.input-group > .form-control { border-radius: 0 10px 10px 0; }
.input-group > .input-group-text:first-child { border-radius: 10px 0 0 10px; }

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  font-family: 'Sora', sans-serif;
  font-weight: 600; border-radius: 10px;
  padding: 10px 20px; font-size: 14px;
  transition: all .2s;
}
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-outline-primary { border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }

/* =========================================
   TABLES
   ========================================= */
.table { font-size: 13.5px; }
.table thead th { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); border-bottom: 2px solid var(--card-border); background: #f8fafc; }
.table tbody tr:hover { background: var(--primary-light); }
.table td { vertical-align: middle; padding: 12px 16px; }
.table th { padding: 12px 16px; }
.table-responsive { border-radius: 12px; overflow: hidden; }

/* Status badges */
.status-badge {
  padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 4px;
}
.status-pending  { background: #fff3cd; color: #664d03; }
.status-completed, .status-approved { background: #d1e7dd; color: #0a3622; }
.status-failed, .status-declined, .status-rejected { background: #f8d7da; color: #58151c; }
.status-processing { background: #cff4fc; color: #055160; }

/* =========================================
   ALERTS
   ========================================= */
.alert { border-radius: 10px; border: none; font-size: 13.5px; }
.alert-primary { background: var(--primary-light); color: #0a3268; }

/* =========================================
   OTP INPUT
   ========================================= */
.otp-inputs { display: flex; gap: 10px; justify-content: center; }
.otp-input {
  width: 52px; height: 58px; text-align: center;
  font-size: 24px; font-weight: 700;
  border: 2px solid #e2e8f0; border-radius: 12px;
  outline: none; transition: border-color .2s;
}
.otp-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,110,253,.1); }

/* =========================================
   STEP INDICATORS
   ========================================= */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 32px; }
.step {
  display: flex; align-items: center; flex: 1;
  position: relative;
}
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: #e2e8f0; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0; z-index: 1;
  transition: all .3s;
}
.step.active .step-num { background: var(--primary); color: #fff; }
.step.done .step-num { background: var(--success); color: #fff; }
.step-label { font-size: 11px; margin-top: 6px; color: var(--text-muted); font-weight: 600; }
.step.active .step-label { color: var(--primary); }
.step-line {
  flex: 1; height: 2px; background: #e2e8f0;
  margin: 0 8px; margin-bottom: 22px;
}
.step.done + .step .step-line,
.step.done .step-line { background: var(--success); }
.step-content { display: flex; flex-direction: column; align-items: center; }

/* =========================================
   AUTH PAGES
   ========================================= */
.auth-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  position: relative; overflow: hidden;
}
.auth-wrapper::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%230d6efd' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.auth-card {
  background: #fff; border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0,0,0,.3);
  width: 100%; max-width: 460px;
  position: relative; z-index: 1;
  overflow: hidden;
}
.auth-card-header {
  background: linear-gradient(135deg, var(--primary), #6366f1);
  padding: 28px 32px; text-align: center; color: #fff;
}
.auth-card-header .logo { font-size: 28px; font-weight: 700; }
.auth-card-header .logo i { margin-right: 8px; }
.auth-card-header p { opacity: .85; margin: 6px 0 0; font-size: 14px; }
.auth-card-body { padding: 28px 32px; }

/* =========================================
   DROPDOWN MENUS
   ========================================= */
.dropdown-menu { border-radius: 12px; padding: 6px; min-width: 200px; }
.dropdown-item { border-radius: 8px; padding: 8px 12px; font-size: 13.5px; }
.dropdown-item:hover { background: var(--primary-light); color: var(--primary); }

/* =========================================
   PROGRESS
   ========================================= */
.progress { border-radius: 10px; height: 8px; }
.progress-bar { border-radius: 10px; }

/* =========================================
   TRANSACTION LIST
   ========================================= */
.txn-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid #f0f4f8;
}
.txn-item:last-child { border-bottom: none; }
.txn-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.txn-info { flex: 1; }
.txn-info .txn-title { font-weight: 600; font-size: 13.5px; }
.txn-info .txn-date  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.txn-amount { font-weight: 700; font-size: 15px; }

/* =========================================
   KYC Video Upload
   ========================================= */
.upload-area {
  border: 2px dashed var(--card-border); border-radius: 14px;
  padding: 30px; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.upload-area:hover { border-color: var(--primary); background: var(--primary-light); }
.upload-area.dragover { border-color: var(--primary); background: var(--primary-light); }

/* =========================================
   MERCHANT CARD
   ========================================= */
.merchant-card {
  border: 1.5px solid var(--card-border); border-radius: 14px;
  padding: 20px; transition: all .2s;
}
.merchant-card:hover { border-color: var(--primary); box-shadow: 0 4px 20px rgba(13,110,253,.1); }
.merchant-logo {
  width: 60px; height: 60px; border-radius: 12px;
  object-fit: contain; border: 1px solid var(--card-border);
}

/* =========================================
   TOAST NOTIFICATIONS
   ========================================= */
.toast-container { position: fixed; top: 70px; right: 20px; z-index: 9999; }
.toast { min-width: 300px; border-radius: 12px; border: none; box-shadow: 0 8px 30px rgba(0,0,0,.15); }

/* =========================================
   MOBILE RESPONSIVE
   ========================================= */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 1035;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.show {
    display: block;
  }
  .main-content {
    margin-left: 0;
  }
}

/* =========================================
   BOTTOM NAV (mobile)
   ========================================= */
.bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 1px solid var(--card-border);
  z-index: 1030; padding: 8px 0 4px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  font-size: 10px; color: var(--text-muted); text-decoration: none; gap: 3px;
}
.bottom-nav a i { font-size: 20px; }
.bottom-nav a.active { color: var(--primary); }
.bottom-nav a.active i { color: var(--primary); }
@media (max-width: 991.98px) {
  .bottom-nav { display: flex; }
  .main-content { padding-bottom: 80px; }
}

/* =========================================
   PAYMENT CODE
   ========================================= */
.code-display {
  background: var(--dark); color: #00ff88;
  border-radius: 12px; padding: 16px 20px;
  font-family: 'Courier New', monospace;
  font-size: 22px; letter-spacing: 4px; font-weight: 700;
  text-align: center; user-select: all;
}

/* =========================================
   COMING SOON PAGE
   ========================================= */
.coming-soon-wrapper {
  min-height: calc(100vh - 120px);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}
.coming-soon-icon {
  width: 100px; height: 100px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  margin: 0 auto 24px; display: flex; align-items: center;
  justify-content: center; font-size: 44px; color: #fff;
  box-shadow: 0 10px 40px rgba(13,110,253,.3);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
