/* ============================================================
   BrokerPay — Global Styles
   Mobile-first, dark navy + white + green accent fintech theme
   ============================================================ */

:root {
  --navy:       #0f1f3d;
  --navy-mid:   #1a3a6b;
  --navy-light: #1e4080;
  --navy-card:  #152c57;
  --navy-border:#1f3d70;
  --green:      #22c55e;
  --green-dark: #16a34a;
  --green-light:#bbf7d0;
  --white:      #ffffff;
  --gray-50:    #f8fafc;
  --gray-100:   #f1f5f9;
  --gray-200:   #e2e8f0;
  --gray-400:   #94a3b8;
  --gray-500:   #64748b;
  --gray-600:   #475569;
  --red:        #ef4444;
  --red-dark:   #dc2626;
  --red-light:  #fee2e2;
  --amber:      #f59e0b;
  --amber-light:#fef3c7;
  --blue:       #3b82f6;
  --blue-light: #dbeafe;
  --text:       #ffffff;
  --text-muted: #94a3b8;
  --text-dim:   #64748b;

  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --shadow:     0 4px 24px rgba(0,0,0,0.25);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.15);
  --transition: 0.18s ease;
  --font:       -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  font-family: var(--font);
  background: var(--navy);
  color: var(--text);
  min-height: 100%;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#app {
  min-height: 100vh;
  position: relative;
}

.view {
  min-height: 100vh;
  width: 100%;
}

.hidden { display: none !important; }

/* ── Loading Screen ────────────────────────────────────── */
.loading-screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  gap: 32px;
  z-index: 9999;
}

.loading-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--white);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ── Typography ─────────────────────────────────────────── */
h1 { font-size: 1.75rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.5px; }
h2 { font-size: 1.375rem; font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
h4 { font-size: 1rem;     font-weight: 600; }
p  { color: var(--text-muted); line-height: 1.6; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: none;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  line-height: 1;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

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

.btn-primary {
  background: var(--green);
  color: #052e16;
}
.btn-primary:hover:not(:disabled) { background: var(--green-dark); }
.btn-primary:active:not(:disabled) { transform: scale(0.98); }

.btn-secondary {
  background: var(--navy-card);
  color: var(--white);
  border: 1px solid var(--navy-border);
}
.btn-secondary:hover:not(:disabled) { background: var(--navy-light); }

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

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--navy-border);
}
.btn-ghost:hover:not(:disabled) {
  background: rgba(255,255,255,0.05);
  color: var(--white);
}

.btn-full { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.875rem; }
.btn-lg { padding: 15px 28px; font-size: 1rem; border-radius: var(--radius-lg); }

.btn-loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ── Form Elements ──────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

input, select, textarea {
  background: rgba(255,255,255,0.06);
  border: 1.5px solid var(--navy-border);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 1rem;
  font-family: var(--font);
  padding: 12px 14px;
  width: 100%;
  transition: border-color var(--transition), background var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

input::placeholder, textarea::placeholder { color: var(--text-dim); }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green);
  background: rgba(255,255,255,0.08);
}

select option {
  background: var(--navy-card);
  color: var(--white);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.form-error {
  font-size: 0.8125rem;
  color: var(--red);
  margin-top: 2px;
}

/* ── Checkbox ───────────────────────────────────────────── */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  padding: 0;
  border-radius: 5px;
  cursor: pointer;
  accent-color: var(--green);
}

.checkbox-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

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

.card-sm {
  padding: 14px 16px;
  border-radius: var(--radius);
}

/* ── Status Badges ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-pending  { background: var(--amber-light); color: #92400e; }
.badge-approved { background: var(--green-light); color: #14532d; }
.badge-denied   { background: var(--red-light);   color: #991b1b; }
.badge-processing { background: var(--blue-light); color: #1e3a8a; }
.badge-completed  { background: var(--green-light); color: #14532d; }
.badge-failed     { background: var(--red-light);   color: #991b1b; }
.badge-admin    { background: rgba(59,130,246,0.2); color: #93c5fd; }
.badge-agent    { background: rgba(34,197,94,0.15); color: #86efac; }

/* ── Alert/Toast ─────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.5;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.alert-error   { background: rgba(239,68,68,0.12);  color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.alert-success { background: rgba(34,197,94,0.12);  color: #86efac; border: 1px solid rgba(34,197,94,0.3); }
.alert-info    { background: rgba(59,130,246,0.12); color: #93c5fd; border: 1px solid rgba(59,130,246,0.3); }
.alert-warning { background: rgba(245,158,11,0.12); color: #fcd34d; border: 1px solid rgba(245,158,11,0.3); }

/* ── Toast Notifications ─────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  left: 16px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  pointer-events: auto;
  animation: toastIn 0.25s ease;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-success { background: #052e16; color: #86efac; border: 1px solid #166534; }
.toast-error   { background: #450a0a; color: #fca5a5; border: 1px solid #991b1b; }
.toast-info    { background: #0c1a3a; color: #93c5fd; border: 1px solid #1e40af; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--navy-border);
  margin: 16px 0;
}

/* ── Amount display ──────────────────────────────────────── */
.amount {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
  font-weight: 600;
}

.amount-lg {
  font-size: 2rem;
  letter-spacing: -1px;
  font-weight: 700;
}

/* ──────────────────────────────────────────────────────────
   LOGIN PAGE
   ────────────────────────────────────────────────────────── */

.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--navy);
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(26,58,107,0.7) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(34,197,94,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.login-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 32px;
  position: relative;
  z-index: 1;
  max-width: 440px;
  margin: 0 auto;
  width: 100%;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.login-logo-icon {
  width: 52px;
  height: 52px;
  background: var(--navy-mid);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--navy-border);
}

.login-logo-text {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--white);
}

.login-tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  text-align: center;
}

.login-tabs {
  display: flex;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 28px;
  width: 100%;
}

.login-tab {
  flex: 1;
  padding: 9px;
  text-align: center;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
  border: none;
  background: transparent;
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
}

.login-tab.active {
  background: var(--navy-mid);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-form-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}

.login-form-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.login-footer {
  margin-top: 32px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-dim);
  padding: 0 16px;
}

/* ──────────────────────────────────────────────────────────
   ONBOARDING — DISCLOSURE
   ────────────────────────────────────────────────────────── */

.onboarding-page {
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
}

.onboarding-header {
  width: 100%;
  background: var(--navy-card);
  border-bottom: 1px solid var(--navy-border);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.onboarding-header .logo-mark {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--white);
}

.onboarding-body {
  flex: 1;
  width: 100%;
  max-width: 600px;
  padding: 28px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.onboarding-step-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--navy-border);
}

.step-dot.active { background: var(--green); }
.step-dot.done   { background: var(--green); opacity: 0.5; }

.disclosure-box {
  background: rgba(255,255,255,0.04);
  border: 1.5px solid var(--navy-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--navy-border) transparent;
}

.disclosure-box::-webkit-scrollbar {
  width: 5px;
}
.disclosure-box::-webkit-scrollbar-track { background: transparent; }
.disclosure-box::-webkit-scrollbar-thumb {
  background: var(--navy-border);
  border-radius: 99px;
}

.disclosure-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.disclosure-text {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--gray-100);
}

.timestamp-note {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 8px;
}

/* ──────────────────────────────────────────────────────────
   APP SHELL — SHARED LAYOUT
   ────────────────────────────────────────────────────────── */

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--navy);
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy-card);
  border-bottom: 1px solid var(--navy-border);
  padding: 0 16px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.top-bar-logo {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--white);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-bar-logo svg { flex-shrink: 0; }

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

.notif-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--navy-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.notif-btn:hover { background: rgba(255,255,255,0.1); color: var(--white); }

.notif-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--navy-card);
}

.avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy-mid);
  border: 2px solid var(--navy-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--green);
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.avatar-btn:hover { border-color: var(--green); }

/* Bottom nav (mobile) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--navy-card);
  border-top: 1px solid var(--navy-border);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  gap: 4px;
  cursor: pointer;
  color: var(--text-dim);
  border: none;
  background: transparent;
  font-family: var(--font);
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
  min-height: 56px;
}

.nav-item.active { color: var(--green); }
.nav-item:hover:not(.active) { color: var(--text-muted); }

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.nav-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav-dot {
  position: absolute;
  top: -2px;
  right: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  border: 1.5px solid var(--navy-card);
}

/* Content area */
.content-area {
  flex: 1;
  padding: 20px 16px 88px;  /* 88px = bottom nav height */
  overflow-y: auto;
}

/* ──────────────────────────────────────────────────────────
   DASHBOARD PANELS
   ────────────────────────────────────────────────────────── */

.panel { display: none; }
.panel.active { display: block; }

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.stat-value {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.5px;
  line-height: 1;
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.stat-icon-green { background: rgba(34,197,94,0.15); }
.stat-icon-blue  { background: rgba(59,130,246,0.15); }
.stat-icon-amber { background: rgba(245,158,11,0.15); }
.stat-icon-red   { background: rgba(239,68,68,0.15); }

/* Section header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
}

.section-action {
  font-size: 0.8125rem;
  color: var(--green);
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font);
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/* Transfer list items */
.transfer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.transfer-item {
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.transfer-item:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--navy-light);
}

.transfer-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.transfer-icon-out { background: rgba(239,68,68,0.12); }
.transfer-icon-in  { background: rgba(34,197,94,0.12); }
.transfer-icon-admin { background: rgba(59,130,246,0.12); }

.transfer-info {
  flex: 1;
  min-width: 0;
}

.transfer-parties {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transfer-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.transfer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.transfer-amount {
  font-family: 'SF Mono', monospace;
  font-size: 0.9375rem;
  font-weight: 700;
}

.transfer-amount-out { color: #fca5a5; }
.transfer-amount-in  { color: var(--green); }
.transfer-amount-neutral { color: var(--white); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.empty-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
}

.empty-sub {
  font-size: 0.875rem;
  color: var(--text-dim);
  max-width: 240px;
  margin: 0 auto;
}

/* ──────────────────────────────────────────────────────────
   MODALS
   ────────────────────────────────────────────────────────── */

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

@media (min-width: 480px) {
  .modal-overlay {
    align-items: center;
    padding: 20px;
  }
}

.modal {
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 20px 32px;
  animation: modalUp 0.25s ease;
}

@media (min-width: 480px) {
  .modal {
    border-radius: var(--radius-xl);
  }
}

@keyframes modalUp {
  from { transform: translateY(20px); opacity: 0.8; }
  to   { transform: translateY(0); opacity: 1; }
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--navy-border);
  border-radius: 99px;
  margin: -8px auto 20px;
}

@media (min-width: 480px) {
  .modal-handle { display: none; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--white);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--navy-border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.modal-close:hover { background: rgba(255,255,255,0.1); color: var(--white); }

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ──────────────────────────────────────────────────────────
   SEND TRANSFER FORM
   ────────────────────────────────────────────────────────── */

.amount-input-wrapper {
  position: relative;
}

.amount-input-wrapper .currency-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 1;
}

.amount-input-wrapper input {
  padding-left: 30px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-align: center;
  height: 64px;
}

/* ──────────────────────────────────────────────────────────
   TRANSFER DETAIL VIEW
   ────────────────────────────────────────────────────────── */

.detail-amount-block {
  text-align: center;
  padding: 24px 0 20px;
}

.detail-amount {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--white);
  line-height: 1;
}

.detail-direction {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.9rem;
}

.detail-row:last-child { border-bottom: none; }

.detail-key {
  color: var(--text-muted);
  font-weight: 500;
}

.detail-val {
  color: var(--white);
  font-weight: 600;
  text-align: right;
  max-width: 60%;
}

/* ──────────────────────────────────────────────────────────
   ADMIN SPECIFIC
   ────────────────────────────────────────────────────────── */

.admin-top-tabs {
  display: flex;
  overflow-x: auto;
  gap: 4px;
  padding: 12px 16px 0;
  border-bottom: 1px solid var(--navy-border);
  background: var(--navy-card);
  scrollbar-width: none;
}

.admin-top-tabs::-webkit-scrollbar { display: none; }

.admin-tab {
  flex-shrink: 0;
  padding: 10px 16px;
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: var(--font);
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.admin-tab.active {
  color: var(--green);
  border-bottom-color: var(--green);
  background: rgba(34,197,94,0.06);
}

.admin-tab:hover:not(.active) { color: var(--text-muted); }

/* Approval queue item */
.queue-item {
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 10px;
  transition: border-color var(--transition);
}

.queue-item:hover { border-color: var(--navy-light); }

.queue-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.queue-item-parties {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--white);
}

.queue-item-amount {
  font-family: 'SF Mono', monospace;
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--green);
}

.queue-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.queue-actions {
  display: flex;
  gap: 8px;
}

.notes-input {
  padding: 9px 12px;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--navy-border);
  color: var(--white);
  font-family: var(--font);
  width: 100%;
  margin-bottom: 8px;
  transition: border-color var(--transition);
}

.notes-input:focus {
  outline: none;
  border-color: var(--green);
}

.notes-input::placeholder { color: var(--text-dim); }

/* Ledger table (scrollable horizontally on mobile) */
.ledger-wrap {
  overflow-x: auto;
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-lg);
  -webkit-overflow-scrolling: touch;
}

.ledger-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: 0.8625rem;
}

.ledger-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--navy-border);
  background: rgba(255,255,255,0.03);
  white-space: nowrap;
}

.ledger-table td {
  padding: 12px 14px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}

.ledger-table tr:last-child td { border-bottom: none; }
.ledger-table tr:hover td { background: rgba(255,255,255,0.02); }

.ledger-table .td-name {
  font-weight: 600;
  color: var(--white);
}

.ledger-table .td-amount {
  font-family: 'SF Mono', monospace;
  font-weight: 700;
  color: var(--green);
}

/* Agent mgmt rows */
.agent-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.agent-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy-mid);
  border: 2px solid var(--navy-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--green);
  flex-shrink: 0;
}

.agent-info { flex: 1; min-width: 0; }

.agent-name {
  font-weight: 600;
  color: var(--white);
  font-size: 0.9375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-email {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-stats {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ──────────────────────────────────────────────────────────
   ACH BANK LINKING PANEL
   ────────────────────────────────────────────────────────── */

.bank-panel {
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.bank-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bank-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(34,197,94,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.bank-info { flex: 1; }

.bank-name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--white);
}

.bank-meta {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ──────────────────────────────────────────────────────────
   FILTER CHIPS
   ────────────────────────────────────────────────────────── */

.filter-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  margin-bottom: 16px;
}

.filter-chips::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1.5px solid var(--navy-border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.chip.active {
  background: var(--navy-mid);
  border-color: var(--navy-light);
  color: var(--white);
}

.chip:hover:not(.active) {
  border-color: var(--navy-light);
  color: var(--white);
}

/* ──────────────────────────────────────────────────────────
   NOTIFICATION PANEL
   ────────────────────────────────────────────────────────── */

.notif-item {
  padding: 14px 16px;
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.notif-item.unread {
  border-color: var(--green);
  background: rgba(34,197,94,0.05);
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  margin-top: 6px;
  flex-shrink: 0;
}

.notif-dot.read {
  background: var(--navy-border);
}

/* ──────────────────────────────────────────────────────────
   PAGE HEADER
   ────────────────────────────────────────────────────────── */

.page-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--navy-border);
}

.page-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--white);
}

.page-sub {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ──────────────────────────────────────────────────────────
   MENU DROPDOWN
   ────────────────────────────────────────────────────────── */

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  z-index: 200;
  overflow: hidden;
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown-item {
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background var(--transition), color var(--transition);
  border: none;
  background: transparent;
  width: 100%;
  font-family: var(--font);
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.dropdown-item:hover { background: rgba(255,255,255,0.06); color: var(--white); }
.dropdown-item.danger:hover { background: rgba(239,68,68,0.1); color: #fca5a5; }

.dropdown-divider { height: 1px; background: var(--navy-border); }

.top-bar-right-wrapper {
  position: relative;
}

/* ──────────────────────────────────────────────────────────
   RESPONSIVE — DESKTOP
   ────────────────────────────────────────────────────────── */

@media (min-width: 768px) {
  .content-area {
    padding: 28px 28px 32px;
    max-width: 900px;
    margin: 0 auto;
  }

  .stats-row {
    grid-template-columns: repeat(4, 1fr);
  }

  .bottom-nav { display: none; }

  .top-bar {
    padding: 0 28px;
    height: 68px;
  }

  .admin-desktop-nav {
    display: flex;
    align-items: center;
    gap: 2px;
  }

  .admin-desktop-tab {
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dim);
    cursor: pointer;
    border: none;
    background: transparent;
    font-family: var(--font);
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
  }

  .admin-desktop-tab.active {
    background: rgba(34,197,94,0.1);
    color: var(--green);
  }

  .admin-desktop-tab:hover:not(.active) { color: var(--text-muted); background: rgba(255,255,255,0.04); }

  .app-shell {
    padding-bottom: 0;
  }

  .content-area {
    padding-bottom: 40px;
  }
}

@media (min-width: 768px) {
  .admin-top-tabs { display: none; }
}

@media (max-width: 767px) {
  .admin-desktop-nav { display: none; }
}

/* ──────────────────────────────────────────────────────────
   UTILITY
   ────────────────────────────────────────────────────────── */

.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }

.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-sm     { font-size: 0.875rem; }
.text-xs     { font-size: 0.75rem; }
.text-muted  { color: var(--text-muted); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-white  { color: var(--white); }
.font-bold   { font-weight: 700; }
.font-mono   { font-family: 'SF Mono', monospace; }

.w-full { width: 100%; }

/* Green glow CTA for primary action */
.btn-primary-glow {
  background: var(--green);
  color: #052e16;
  box-shadow: 0 4px 20px rgba(34,197,94,0.3);
}

.btn-primary-glow:hover:not(:disabled) {
  background: var(--green-dark);
  box-shadow: 0 4px 28px rgba(34,197,94,0.4);
}

/* Stripe verified badge */
.verified-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green);
  padding: 3px 8px;
  background: rgba(34,197,94,0.12);
  border-radius: 99px;
}

/* Scroll top spacing on mobile for content below fixed top bar */
.scroll-top-fix { height: 60px; }

@media (min-width: 768px) {
  .scroll-top-fix { height: 68px; }
}
