/* SecureWallet v2 — Modern Banking UI */
:root {
  --sw-primary: #0d9488;
  --sw-primary-dark: #0f766e;
  --sw-secondary: #1e3a5f;
  --sw-dark: #0f172a;
  --sw-sidebar: #0f172a;
  --sw-button: #0d9488;
  --sw-header: #ffffff;
  --sw-bg: #f1f5f9;
  --sw-text: #1e293b;
  --sw-success: #10b981;
  --sw-danger: #ef4444;
  --sw-warning: #f59e0b;
  --sw-card-shadow: 0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -2px rgba(0,0,0,.06);
  --sw-radius: 1rem;
}
* { box-sizing: border-box; }
body { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; background: var(--sw-bg); color: var(--sw-text); margin: 0; }
a { text-decoration: none; }
.bg-gradient-primary { background: linear-gradient(135deg, var(--sw-dark) 0%, var(--sw-secondary) 50%, var(--sw-primary-dark) 100%); }
.btn-primary { background: var(--sw-button); border-color: var(--sw-button); }
.btn-primary:hover, .btn-primary:focus { background: var(--sw-primary-dark); border-color: var(--sw-primary-dark); }
.text-primary { color: var(--sw-primary) !important; }
.bg-primary { background-color: var(--sw-primary) !important; }
.card { border: none; border-radius: var(--sw-radius); box-shadow: var(--sw-card-shadow); background: #fff; }
.card-stat { border-left: 4px solid var(--sw-primary); }
.navbar-brand { font-weight: 700; letter-spacing: -0.5px; }
.hero-section { min-height: 85vh; display: flex; align-items: center; }
.feature-icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; background: color-mix(in srgb, var(--sw-primary) 12%, transparent); color: var(--sw-primary); }

/* Sidebar */
.sidebar { width: 260px; min-height: 100vh; background: var(--sw-sidebar); position: fixed; left: 0; top: 0; z-index: 1040; transition: transform .3s; overflow-y: auto; }
.sidebar .nav-link { color: rgba(255,255,255,.72); border-radius: .65rem; margin: 2px 10px; padding: .55rem .9rem; font-size: .9rem; }
.sidebar .nav-link:hover, .sidebar .nav-link.active { background: color-mix(in srgb, var(--sw-primary) 25%, transparent); color: #fff; }
.sidebar .nav-link i { width: 22px; margin-right: 4px; }
.sidebar-brand { padding: 1.1rem 1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.main-content { margin-left: 260px; min-height: 100vh; background: var(--sw-bg); }
.topbar { background: var(--sw-header); border-bottom: 1px solid #e2e8f0; padding: .7rem 1.25rem; position: sticky; top: 0; z-index: 100; }

/* Balance / fintech cards */
.balance-card {
  background: linear-gradient(135deg, var(--sw-primary), var(--sw-primary-dark));
  color: #fff; border-radius: 1.25rem; position: relative; overflow: hidden;
}
.balance-card::after {
  content: ''; position: absolute; right: -30px; top: -30px; width: 140px; height: 140px;
  background: rgba(255,255,255,.1); border-radius: 50%;
}
.balance-card h2 { font-weight: 700; letter-spacing: -1px; font-size: 1.85rem; }
.stat-card { border-radius: 1rem; padding: 1.1rem; background: #fff; box-shadow: var(--sw-card-shadow); height: 100%; }
.stat-card .stat-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; }
.stat-card .stat-label { font-size: .75rem; color: #64748b; text-transform: uppercase; letter-spacing: .03em; }
.stat-card .stat-value { font-weight: 700; font-size: 1.15rem; }

.quick-action {
  text-align: center; padding: 1.1rem .5rem; border-radius: 1rem; background: #fff;
  box-shadow: var(--sw-card-shadow); transition: transform .15s, box-shadow .15s;
  text-decoration: none; color: inherit; display: block; height: 100%;
}
.quick-action:hover { transform: translateY(-3px); box-shadow: 0 12px 20px -5px rgba(0,0,0,.12); color: var(--sw-primary); }
.quick-action .qa-icon {
  width: 48px; height: 48px; margin: 0 auto 8px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 1.35rem;
  background: color-mix(in srgb, var(--sw-primary) 12%, transparent); color: var(--sw-primary);
}
.quick-action span { font-size: .8rem; font-weight: 500; }

/* Badges */
.badge-status-pending, .badge-status-unpaid, .badge-status-under_review { background: #fef3c7; color: #92400e; }
.badge-status-completed, .badge-status-approved, .badge-status-paid, .badge-status-active, .badge-status-delivered { background: #d1fae5; color: #065f46; }
.badge-status-rejected, .badge-status-failed, .badge-status-cancelled, .badge-status-defaulted { background: #fee2e2; color: #991b1b; }
.badge-status-processing, .badge-status-shipped, .badge-status-in_transit, .badge-status-card_prepared { background: #dbeafe; color: #1e40af; }

/* Tables */
.table-responsive { border-radius: .75rem; }
.table > :not(caption) > * > * { padding: .7rem .9rem; }

/* Auth */
.auth-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--sw-dark) 0%, var(--sw-secondary) 50%, var(--sw-primary-dark) 100%); }
.auth-card { max-width: 440px; width: 100%; border-radius: 1.25rem; }
.form-control:focus, .form-select:focus { border-color: var(--sw-primary); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--sw-primary) 25%, transparent); }

/* PIN keypad */
.pin-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 280px; margin: 0 auto; }
.pin-key {
  aspect-ratio: 1; border: none; border-radius: 50%; background: #f1f5f9; font-size: 1.4rem; font-weight: 600;
  color: var(--sw-text); cursor: pointer; transition: background .15s, transform .1s;
  display: flex; align-items: center; justify-content: center; min-height: 64px;
}
.pin-key:active { transform: scale(.95); background: #e2e8f0; }
.pin-key.action { background: #e2e8f0; font-size: .85rem; }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin-bottom: 1.5rem; }
.pin-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--sw-primary); background: transparent; transition: background .15s; }
.pin-dot.filled { background: var(--sw-primary); }

/* Credit card visual */
.cc-visual {
  background: linear-gradient(135deg, #1e293b, #334155); color: #fff; border-radius: 16px;
  padding: 1.5rem; aspect-ratio: 1.586; max-width: 360px; position: relative; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.cc-visual.gold { background: linear-gradient(135deg, #b45309, #f59e0b); }
.cc-visual.platinum { background: linear-gradient(135deg, #475569, #94a3b8); }
.cc-chip { width: 42px; height: 32px; background: linear-gradient(135deg, #fbbf24, #d97706); border-radius: 6px; margin-bottom: 1.5rem; }
.cc-number { font-size: 1.2rem; letter-spacing: 3px; font-family: monospace; margin-bottom: 1rem; }
.cc-label { font-size: .65rem; opacity: .7; text-transform: uppercase; }

/* Shipping timeline */
.ship-timeline { list-style: none; padding: 0; margin: 0; }
.ship-timeline li { position: relative; padding: 0 0 1.25rem 1.75rem; border-left: 2px solid #e2e8f0; margin-left: 8px; }
.ship-timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.ship-timeline li::before {
  content: ''; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px;
  border-radius: 50%; background: #e2e8f0; border: 2px solid #fff;
}
.ship-timeline li.done::before { background: var(--sw-success); }
.ship-timeline li.active::before { background: var(--sw-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sw-primary) 25%, transparent); }

/* Mobile bottom nav */
.mobile-bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #fff;
  border-top: 1px solid #e2e8f0; z-index: 1050; padding: .4rem 0 env(safe-area-inset-bottom);
}
.mobile-bottom-nav a {
  flex: 1; text-align: center; color: #64748b; font-size: .65rem; padding: .35rem 0; text-decoration: none;
}
.mobile-bottom-nav a.active, .mobile-bottom-nav a:hover { color: var(--sw-primary); }
.mobile-bottom-nav i { display: block; font-size: 1.25rem; margin-bottom: 2px; }

.toast-container { z-index: 1090; }
.page-header { margin-bottom: 1.25rem; }
.page-header h5 { font-weight: 700; margin: 0; }

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
  .main-content { margin-left: 0; padding-bottom: 70px; }
  .mobile-bottom-nav { display: flex; }
}
@media (max-width: 575.98px) {
  .balance-card h2 { font-size: 1.5rem; }
  .quick-action { padding: .9rem .35rem; }
  .quick-action .qa-icon { width: 40px; height: 40px; font-size: 1.15rem; }
}


/* Quick actions v2 */
.quick-action {
  text-align: center;
  padding: 1rem 0.4rem;
  border-radius: 1rem;
  background: #fff;
  box-shadow: var(--sw-card-shadow);
  transition: transform .15s ease, box-shadow .15s ease;
  text-decoration: none;
  color: var(--sw-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  border: 1px solid rgba(15,23,42,.04);
}
.quick-action:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -8px rgba(0,0,0,.12);
  color: var(--sw-primary);
}
.quick-action .qa-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}
.quick-action span {
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.2;
}
@media (max-width: 575.98px) {
  .quick-action { min-height: 88px; padding: .75rem .25rem; }
  .quick-action .qa-icon { width: 40px; height: 40px; font-size: 1.15rem; }
  .quick-action span { font-size: .7rem; }
}
