/* ═══════════════════════════════════════════════════════
   Moizze Banking App — Global Styles
   Primary: #1a472a | Secondary: #2d6a4f | Accent: #40916c
   Light: #d8f3dc | Background: #0f2318
═══════════════════════════════════════════════════════ */

:root {
  --primary: #1a472a;
  --primary-dark: #122e1c;
  --secondary: #2d6a4f;
  --accent: #40916c;
  --light: #d8f3dc;
  --light-2: #b7e4c7;
  --bg: #0d1f12;
  --surface: #152318;
  --surface-2: #1e3325;
  --surface-3: #253d2c;
  --text: #e8f5e9;
  --text-muted: #8ab49a;
  --text-dim: #5a8a6a;
  --border: #2a4a35;
  --red: #e74c3c;
  --red-bg: #2d1515;
  --green: #2ecc71;
  --green-bg: #152318;
  --yellow: #f1c40f;
  --yellow-bg: #2d2510;
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, '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(--light-2); }

/* ─── Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
  text-align: center;
  justify-content: center;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  color: white;
  box-shadow: 0 4px 15px rgba(64, 145, 108, 0.3);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(64, 145, 108, 0.4);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-outline:hover:not(:disabled) {
  background: var(--accent);
  color: white;
}

.btn-danger {
  background: var(--red);
  color: white;
}
.btn-danger:hover:not(:disabled) { background: #c0392b; }

.btn-success {
  background: var(--green);
  color: var(--primary-dark);
}
.btn-success:hover:not(:disabled) { background: #27ae60; }

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-full { width: 100%; }

.btn-loading {
  position: relative;
  color: transparent !important;
}
.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Forms ─────────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  padding: 13px 16px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.15);
}

.form-control::placeholder { color: var(--text-dim); }

select.form-control option { background: var(--surface-2); }

/* ─── Cards ─────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

/* ─── App Layout ─────────────────────────────────────── */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────────── */
.sidebar {
  width: 260px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo-text {
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--light-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.sidebar-logo-sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

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

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 12px 12px 6px;
}

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

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

.nav-item.active {
  background: linear-gradient(135deg, rgba(45,106,79,0.4), rgba(64,145,108,0.2));
  color: var(--light-2);
  border: 1px solid rgba(64, 145, 108, 0.3);
}

.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

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

/* ─── Main Content ───────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 32px;
  max-width: 100%;
  min-height: 100vh;
}

.page-header {
  margin-bottom: 32px;
}

.page-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 15px;
}

/* ─── Balance Card ───────────────────────────────────── */
.balance-card {
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(64, 145, 108, 0.3);
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.balance-card::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: 10%;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}

.balance-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.balance-amount {
  font-size: 48px;
  font-weight: 900;
  color: white;
  letter-spacing: -1px;
  margin-bottom: 4px;
}

.balance-amount span {
  font-size: 28px;
  opacity: 0.8;
  margin-right: 4px;
}

.balance-account {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-top: 8px;
}

/* ─── Quick Actions ──────────────────────────────────── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.action-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text);
}

.action-btn:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  transform: translateY(-2px);
  color: var(--text);
}

.action-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.action-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ─── Transaction Items ──────────────────────────────── */
.txn-list { display: flex; flex-direction: column; gap: 2px; }

.txn-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.txn-item:hover { background: var(--surface-2); }

.txn-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.txn-icon.credit { background: rgba(46,204,113,0.15); color: var(--green); }
.txn-icon.debit { background: rgba(231,76,60,0.15); color: var(--red); }
.txn-icon.pending { background: rgba(241,196,15,0.15); color: var(--yellow); }

.txn-info { flex: 1; min-width: 0; }
.txn-name { font-weight: 600; font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txn-date { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.txn-ref { font-size: 11px; color: var(--text-dim); }

.txn-amount {
  font-weight: 700;
  font-size: 15px;
  text-align: right;
}
.txn-amount.credit { color: var(--green); }
.txn-amount.debit { color: var(--red); }

/* ─── Stats Cards ────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.stat-label { font-size: 12px; color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 800; color: var(--text); }
.stat-value.green { color: var(--green); }
.stat-value.yellow { color: var(--yellow); }
.stat-value.accent { color: var(--accent); }

/* ─── Tables ─────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(42,74,53,0.5);
  color: var(--text);
  vertical-align: middle;
}

tr:hover td { background: var(--surface-2); }
tr:last-child td { border-bottom: none; }

/* ─── Badges ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success { background: rgba(46,204,113,0.15); color: var(--green); }
.badge-danger { background: rgba(231,76,60,0.15); color: var(--red); }
.badge-warning { background: rgba(241,196,15,0.15); color: var(--yellow); }
.badge-info { background: rgba(64,145,108,0.15); color: var(--accent); }

/* ─── Toast Notifications ────────────────────────────── */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
}

.toast {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease;
  font-size: 14px;
}

.toast.success { border-left: 4px solid var(--green); }
.toast.error { border-left: 4px solid var(--red); }
.toast.info { border-left: 4px solid var(--accent); }
.toast.warning { border-left: 4px solid var(--yellow); }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

/* ─── Modal ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

/* ─── Empty States ───────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}

.empty-state-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state-text { font-size: 16px; margin-bottom: 8px; color: var(--text-muted); }
.empty-state-sub { font-size: 14px; }

/* ─── Loading ────────────────────────────────────────── */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ─── User Avatar ────────────────────────────────────── */
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: white;
  flex-shrink: 0;
}

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

/* ─── Pagination ─────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
}

.page-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}

.page-btn:hover, .page-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ─── Mobile Bottom Nav ──────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 100;
  padding: 8px 0 env(safe-area-inset-bottom, 8px);
}

.bottom-nav-items {
  display: flex;
  justify-content: space-around;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  flex: 1;
}

.bottom-nav-item svg { width: 22px; height: 22px; }

.bottom-nav-item.active, .bottom-nav-item:hover {
  color: var(--accent);
}

/* ─── Landing Page ───────────────────────────────────── */
.landing-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #1e3325 0%, var(--bg) 70%);
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
}

.landing-hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(64,145,108,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo-text {
  font-size: 36px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--light-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-logo-sub {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
}

.auth-tabs {
  display: flex;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 28px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-dim);
  transition: var(--transition);
}

.auth-tab.active {
  background: var(--accent);
  color: white;
}

/* ─── Profile ─────────────────────────────────────────── */
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 700;
  color: white;
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 20px 16px 100px; }
  .bottom-nav { display: block; }
  .balance-amount { font-size: 36px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: repeat(4, 1fr); }
  .page-title { font-size: 22px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .auth-card { padding: 24px 20px; }
  .balance-card { padding: 24px 20px; }
  .balance-amount { font-size: 30px; }
}

/* ─── Helpers ────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-accent { color: var(--accent); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.font-bold { font-weight: 700; }
.font-mono { font-family: 'Courier New', monospace; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

/* ─── Input with Icon ────────────────────────────────── */
.input-group {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 16px;
  pointer-events: none;
}

.input-group .form-control {
  padding-left: 42px;
}

/* ─── Search Bar ─────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.search-bar .form-control {
  max-width: 340px;
}

/* ─── Vouch Symbol ───────────────────────────────────── */
.vouch-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  color: white;
}

/* ─── Sidebar Overlay (mobile) ───────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

.sidebar-overlay.open { display: block; }

/* ─── Menu Toggle ────────────────────────────────────── */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
}

.menu-toggle:hover { background: var(--surface-2); }

@media (max-width: 768px) {
  .menu-toggle { display: flex; align-items: center; }
}

/* ─── Top Bar ────────────────────────────────────────── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.top-bar-left { display: flex; align-items: center; gap: 12px; }
.top-bar-right { display: flex; align-items: center; gap: 12px; }

/* ─── Notification Bell ──────────────────────────────── */
.notif-bell {
  position: relative;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: var(--transition);
}

.notif-bell:hover { color: var(--text); border-color: var(--accent); }

.notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background: var(--red);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}
