/* OrbitPay Customer Portal — Custom styles layered on top of the design's CSS */

* { -webkit-tap-highlight-color: transparent; }
html, body { overflow-x: hidden; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: linear-gradient(180deg, #f4fbf8 0%, #eaf5f2 100%);
  min-height: 100vh;
  padding-bottom: 88px; /* Space for bottom nav */
  margin: 0;
}

/* Auth pages get no bottom nav padding */
body.auth-mode { padding-bottom: 0; }

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(6, 50, 32, 0.06);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 50;
  box-shadow: 0 -4px 20px rgba(6, 50, 32, 0.04);
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 8px 12px;
  color: #6b7c75;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
  min-width: 60px;
  text-decoration: none;
}

.nav-btn.active { color: #0D6B52; }
.nav-btn.active .nav-icon { background: rgba(13, 107, 82, 0.1); }
.nav-btn:hover { color: #0D6B52; }

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  transition: all 0.2s;
}

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

/* Page container */
.page { padding: 16px; padding-top: 12px; animation: fadeUp 0.3s ease-out; }
.page-with-header { padding-top: 0; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Page header (non-home) */
.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(6, 50, 32, 0.06);
  position: sticky;
  top: 0;
  z-index: 30;
}

.back-btn {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(13, 107, 82, 0.06);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #063220;
}

.page-title { font-size: 18px; font-weight: 700; color: #063220; flex: 1; margin: 0; }

/* Header (home page) */
.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #063220, #0D6B52);
  color: #f4fbf8;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px;
  box-shadow: 0 4px 12px rgba(13, 107, 82, 0.2);
}

.brand-text { font-size: 16px; font-weight: 700; color: #063220; line-height: 1.1; }
.brand-sub { font-size: 11px; color: #6b7c75; font-weight: 500; }

.header-actions { display: flex; gap: 8px; }
.header-icon-btn {
  width: 44px; height: 44px;
  border-radius: 22px;
  background: rgba(13, 107, 82, 0.06);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #063220;
  position: relative;
}
.notification-dot {
  position: absolute; top: 10px; right: 10px;
  width: 8px; height: 8px;
  background: #ef4444;
  border: 2px solid white;
  border-radius: 50%;
}

/* Welcome section */
.welcome {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  margin: 8px 0;
}

.avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #063220, #0D6B52);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(13, 107, 82, 0.2);
}

.welcome-text { flex: 1; }
.welcome-greeting { font-size: 13px; color: #6b7c75; font-weight: 500; }
.welcome-name { font-size: 24px; font-weight: 800; color: #063220; line-height: 1.1; margin: 2px 0; }

.badge-premium {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #063220, #0D6B52);
  color: #f4fbf8;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-left: 8px;
  vertical-align: middle;
}

/* Balance card */
.balance-card {
  margin: 8px 16px 16px;
  padding: 20px;
  background: linear-gradient(135deg, #f4fbf8 0%, #ffffff 100%);
  border: 1px solid rgba(13, 107, 82, 0.1);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(6, 50, 32, 0.04);
}

.currency-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.currency-pill {
  background: rgba(13, 107, 82, 0.1);
  color: #0D6B52;
  font-size: 12px; font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
}
.fx-rate { flex: 1; font-size: 13px; color: #6b7c75; }
.fx-rate b { color: #063220; }
.eye-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: none;
  border: none;
  color: #6b7c75;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

.balance-label {
  font-size: 12px; font-weight: 600;
  color: #6b7c75;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.balance-amount {
  font-size: 44px; font-weight: 800;
  color: #063220;
  letter-spacing: -0.02em;
  line-height: 1;
  font-feature-settings: "tnum";
}

.week-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px;
}
.week-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(13, 107, 82, 0.1);
  color: #0D6B52;
  font-size: 13px; font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.week-text { font-size: 13px; color: #6b7c75; }

.currency-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(6, 50, 32, 0.06);
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.currency-tabs::-webkit-scrollbar { display: none; }

.tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7c75;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  text-decoration: none;
}
.tab.active {
  background: #063220;
  color: #f4fbf8;
}
.tab:hover:not(.active) { background: rgba(6, 50, 32, 0.06); color: #063220; }
.tab-all { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }

/* Action grid */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px;
}

.action-btn {
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 0;
  text-decoration: none;
  color: inherit;
}

.action-icon {
  width: 56px; height: 56px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(13, 107, 82, 0.08);
  display: flex; align-items: center; justify-content: center;
  color: #0D6B52;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(6, 50, 32, 0.04);
}
.action-btn:hover .action-icon {
  background: rgba(13, 107, 82, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13, 107, 82, 0.12);
}
.action-icon svg { width: 24px; height: 24px; }
.action-label { font-size: 12px; font-weight: 600; color: #063220; }

/* Horizontal cards row */
.cards-row {
  display: flex;
  gap: 12px;
  padding: 8px 16px 16px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.cards-row::-webkit-scrollbar { display: none; }

.mini-card {
  flex: 0 0 130px;
  background: white;
  border: 1px solid rgba(13, 107, 82, 0.06);
  border-radius: 20px;
  padding: 14px;
  display: flex; flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}
.mini-card:hover {
  border-color: rgba(13, 107, 82, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 50, 32, 0.06);
}
.mini-card-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(13, 107, 82, 0.08);
  display: flex; align-items: center; justify-content: center;
  color: #0D6B52;
}
.mini-card-icon svg { width: 18px; height: 18px; }
.mini-card-label { font-size: 13px; font-weight: 600; color: #063220; }

/* Section header */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px 12px;
}
.section-title { font-size: 18px; font-weight: 800; color: #063220; margin: 0; }
.section-link {
  font-size: 13px; font-weight: 600;
  color: #0D6B52;
  text-decoration: none;
  cursor: pointer;
}

/* Account list */
.account-list { padding: 0 16px; }
.account-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(6, 50, 32, 0.06);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.account-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: rgba(13, 107, 82, 0.08);
  display: flex; align-items: center; justify-content: center;
  color: #0D6B52;
}
.account-icon svg { width: 22px; height: 22px; }
.account-info { flex: 1; }
.account-name { font-size: 15px; font-weight: 600; color: #063220; }
.account-num { font-size: 12px; color: #6b7c75; font-family: ui-monospace, monospace; }
.account-balance { font-size: 16px; font-weight: 700; color: #063220; font-feature-settings: "tnum"; }

/* Auth pages */
.auth-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #f4fbf8 0%, #eaf5f2 100%);
}
.auth-card {
  background: white;
  border-radius: 24px;
  padding: 32px 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(6, 50, 32, 0.06);
}
.auth-title { font-size: 28px; font-weight: 800; color: #063220; margin: 0 0 4px; font-family: 'Playfair Display', serif; }
.auth-sub { font-size: 14px; color: #6b7c75; margin: 0 0 24px; }
.auth-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(244, 251, 248, 0.5);
  border: 1px solid rgba(13, 107, 82, 0.1);
  border-radius: 14px;
  font-size: 15px;
  color: #063220;
  margin-bottom: 12px;
  font-family: inherit;
  box-sizing: border-box;
}
.auth-input:focus { outline: none; border-color: #0D6B52; background: white; }
.auth-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #063220, #0D6B52);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  font-family: inherit;
}
.auth-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  color: #0D6B52;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

/* More menu grid */
.more-tabs {
  display: flex; gap: 4px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(6, 50, 32, 0.06);
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.more-tabs::-webkit-scrollbar { display: none; }
.more-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px;
  background: none;
  border: none;
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  color: #6b7c75;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.more-tab.active { background: #063220; color: #f4fbf8; }
.more-tab:hover:not(.active) { background: rgba(6, 50, 32, 0.06); color: #063220; }

.more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 16px;
}

.more-tile {
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  padding: 16px 8px;
  background: white;
  border: 1px solid rgba(13, 107, 82, 0.06);
  border-radius: 20px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  min-height: 100px;
  justify-content: center;
}
.more-tile:hover {
  border-color: rgba(13, 107, 82, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 50, 32, 0.06);
}
.more-tile-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: rgba(13, 107, 82, 0.08);
  display: flex; align-items: center; justify-content: center;
  color: #0D6B52;
}
.more-tile-icon svg { width: 22px; height: 22px; }
.more-tile-label {
  font-size: 11px; font-weight: 600;
  color: #063220;
  text-align: center;
  line-height: 1.2;
}

/* Form fields */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: #063220; margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(244, 251, 248, 0.5);
  border: 1px solid rgba(13, 107, 82, 0.1);
  border-radius: 14px;
  font-size: 15px;
  color: #063220;
  font-family: inherit;
  box-sizing: border-box;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: #0D6B52;
  background: white;
}

.btn-primary {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #063220, #0D6B52);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(13, 107, 82, 0.25); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: rgba(13, 107, 82, 0.1);
  color: #0D6B52;
  border: 1px solid rgba(13, 107, 82, 0.15);
}

.btn-ghost {
  background: none;
  color: #0D6B52;
  border: 1px solid rgba(13, 107, 82, 0.15);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: #6b7c75;
}
.empty-state-icon {
  width: 64px; height: 64px;
  border-radius: 20px;
  background: rgba(13, 107, 82, 0.08);
  color: #0D6B52;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.empty-state-title { font-size: 18px; font-weight: 700; color: #063220; margin: 0 0 8px; }
.empty-state-text { font-size: 14px; margin: 0 0 16px; }

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid rgba(13, 107, 82, 0.2);
  border-top-color: #0D6B52;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: #063220;
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  animation: slideDown 0.3s ease-out;
  max-width: 90%;
}
@keyframes slideDown {
  from { opacity: 0; transform: translate(-50%, -20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Tab pills (Send/Receive/QR/Split) */
.tab-pills {
  display: flex; gap: 8px;
  padding: 0 16px 16px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.tab-pills::-webkit-scrollbar { display: none; }
.tab-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px;
  background: white;
  border: 1px solid rgba(13, 107, 82, 0.1);
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  color: #063220;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.tab-pill.active { background: #063220; color: white; border-color: #063220; }

/* Card display */
.card-display {
  background: linear-gradient(135deg, #063220, #0D6B52, #3A7A66);
  border-radius: 20px;
  padding: 20px;
  color: white;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.card-display::after {
  content: '';
  position: absolute;
  top: -50%; right: -30%;
  width: 200px; height: 200px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}
.card-type { font-size: 11px; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.1em; }
.card-num { font-size: 18px; font-weight: 600; margin: 12px 0; letter-spacing: 0.05em; font-family: ui-monospace, monospace; }
.card-row { display: flex; justify-content: space-between; align-items: flex-end; }
.card-holder-label, .card-exp-label { font-size: 10px; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.1em; }
.card-holder, .card-exp { font-size: 14px; font-weight: 600; }

/* Financial Health */
.health-card {
  margin: 16px;
  padding: 20px;
  background: white;
  border: 1px solid rgba(13, 107, 82, 0.06);
  border-radius: 24px;
  text-align: center;
}
.health-score {
  font-size: 48px; font-weight: 800;
  color: #0D6B52;
  font-feature-settings: "tnum";
  letter-spacing: -0.02em;
}
.health-ring {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: conic-gradient(#0D6B52 0deg, rgba(13, 107, 82, 0.1) 0deg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  position: relative;
}
.health-ring::before {
  content: '';
  position: absolute; inset: 8px;
  background: white;
  border-radius: 50%;
}
.health-ring > div { position: relative; z-index: 1; }

/* Notification icon badge */
.notif-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(13, 107, 82, 0.1);
  color: #0D6B52;
  font-size: 11px; font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

/* Mobile-only */
@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .bottom-nav { display: none; }
  .page { max-width: 480px; margin: 0 auto; }
}
