/* ============================================================
   RJB TRANZ CLIENT PORTAL - Shared Styles
   Brand: Navy #160c85, Blue #192bc2, Gold #ffc107, Emerald #0a6e4f
   Fonts: Bricolage Grotesque (display) + Manrope (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@400;600;700;800&family=Manrope:wght@400;500;600;700&display=swap');

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:      #160c85;
  --blue:      #192bc2;
  --blue-lt:   #3b4fd8;
  --gold:      #ffc107;
  --gold-dk:   #c8960c;
  --emerald:   #0a6e4f;
  --ink:       #0f0f1a;
  --slate:     #3a3a5c;
  --muted:     #6a6a85;
  --line:      #e6e6f0;
  --surface:   #f4f4fb;
  --white:     #ffffff;
  --danger:    #c0392b;
  --success:   #0a6e4f;
  --warning:   #c8960c;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;
  --shadow:    0 4px 24px rgba(22,12,133,.10);
  --shadow-lg: 0 12px 48px rgba(22,12,133,.18);

  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body:    'Manrope', sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── TYPOGRAPHY ───────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  color: var(--navy);
}
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p  { color: var(--slate); }
a  { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: none; }
* { -webkit-tap-highlight-color: transparent; }
*:focus { outline: none; outline-offset: 0; }

/* ── NAV ──────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.15);
  padding: 3px;
  object-fit: contain;
}
.nav-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--white);
  letter-spacing: -.3px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  color: rgba(255,255,255,.75);
  font-size: .9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
  text-decoration: none;
}
.nav-link:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.nav-link.active { color: var(--gold); }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, opacity .12s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover  { transform: translateY(-1px); box-shadow: var(--shadow); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-primary  { background: var(--gold); color: var(--navy); }
.btn-navy     { background: var(--navy); color: var(--white); }
.btn-blue     { background: var(--blue); color: var(--white); }
.btn-emerald  { background: var(--emerald); color: var(--white); }
.btn-outline  { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-ghost    { background: var(--surface); color: var(--slate); }
.btn-danger   { background: var(--danger); color: var(--white); }
.btn-sm       { padding: 7px 16px; font-size: .82rem; }
.btn-lg       { padding: 14px 32px; font-size: 1rem; }
.btn-full     { width: 100%; }

/* ── CARDS ────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px;
}
.card-sm { padding: 18px 22px; border-radius: var(--radius); }
.card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 4px;
}
.card-subtitle { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }

/* ── FORM ELEMENTS ────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--ink);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(25,43,194,.12);
}
.form-control::placeholder { color: var(--muted); }
.form-control.error { border-color: var(--danger); }
.form-hint { font-size: .78rem; color: var(--muted); margin-top: 5px; }
.form-error { font-size: .78rem; color: var(--danger); margin-top: 5px; font-weight: 600; }

/* ── ALERTS ───────────────────────────────────────────────── */
.alert {
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  margin-bottom: 18px;
  border-left: 4px solid;
}
.alert-success { background: #eafaf1; border-color: var(--emerald); color: #0a4a35; }
.alert-error   { background: #fdf0f0; border-color: var(--danger);  color: #7a1f1f; }
.alert-warning { background: #fffbea; border-color: var(--gold);    color: #7a5800; }
.alert-info    { background: #eef1ff; border-color: var(--blue);    color: #111e6c; }

/* ── BADGE ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.badge-pending  { background: #fff8e1; color: #8a6500; }
.badge-approved { background: #eafaf1; color: #0a4a35; }
.badge-declined { background: #fdf0f0; color: #7a1f1f; }
.badge-soon     { background: var(--surface); color: var(--muted); }
.badge-active   { background: #eafaf1; color: var(--emerald); }

/* ── LAYOUT CONTAINERS ────────────────────────────────────── */
.container    { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 480px;  margin: 0 auto; padding: 0 20px; }
.container-md { max-width: 720px;  margin: 0 auto; padding: 0 20px; }

/* ── AUTH PAGES (login, register) ─────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
}
.auth-box {
  width: 100%;
  max-width: 440px;
  margin: auto;
  padding: 20px;
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
}
.auth-header {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  margin: 0 auto 12px;
  display: block;
}
.auth-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}
.auth-subtitle { font-size: .9rem; color: var(--muted); }
.auth-divider {
  text-align: center;
  position: relative;
  margin: 20px 0;
  color: var(--muted);
  font-size: .82rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--line);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }
.auth-footer { text-align: center; margin-top: 20px; font-size: .88rem; color: var(--muted); }
.auth-footer a { color: var(--blue); font-weight: 600; }

/* ── DASHBOARD LAYOUT ─────────────────────────────────────── */
.dashboard-wrap { display: flex; min-height: calc(100vh - 64px); }

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--line);
  padding: 24px 12px;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}
.sidebar-section { margin-bottom: 24px; }
.sidebar-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  padding: 0 12px;
  margin-bottom: 6px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  color: var(--slate);
  text-decoration: none;
  transition: background .12s, color .12s;
  margin-bottom: 2px;
}
.sidebar-link:hover { background: var(--surface); color: var(--navy); text-decoration: none; }
.sidebar-link.active { background: #eef1ff; color: var(--navy); }
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }

.main-content { flex: 1; padding: 28px 24px; }

/* ── STATUS STEPS (transfer flow) ─────────────────────────── */
.steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--line);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s, color .2s;
}
.step.active   .step-num { background: var(--navy);  color: var(--white); }
.step.done     .step-num { background: var(--emerald); color: var(--white); }
.step-label { font-size: .8rem; font-weight: 600; color: var(--muted); }
.step.active .step-label { color: var(--navy); }
.step.done   .step-label { color: var(--emerald); }
.step-line { flex: 1; height: 2px; background: var(--line); min-width: 20px; }
.step.done + .step .step-line,
.step.done ~ .step-line { background: var(--emerald); }

/* ── CORRIDOR SELECTOR GRID ───────────────────────────────── */
.corridor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.corridor-card {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
  text-align: center;
  background: var(--white);
  position: relative;
}
.corridor-card:hover:not(.disabled) {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(25,43,194,.08);
}
.corridor-card.selected {
  border-color: var(--navy);
  background: #eef1ff;
}
.corridor-card.disabled {
  opacity: .6;
  cursor: not-allowed;
  background: var(--surface);
}
.corridor-flag  { font-size: 1.8rem; margin-bottom: 6px; display: block; }
.corridor-name  { font-size: .82rem; font-weight: 700; color: var(--navy); line-height: 1.3; }
.corridor-curr  { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.corridor-soon  {
  position: absolute; top: 6px; right: 6px;
  font-size: .62rem; font-weight: 700;
  background: var(--surface); color: var(--muted);
  padding: 2px 6px; border-radius: 50px;
  text-transform: uppercase; letter-spacing: .4px;
}

/* ── RATE DISPLAY ─────────────────────────────────────────── */
.rate-box {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  border-radius: var(--radius);
  padding: 20px 24px;
  color: var(--white);
  margin-bottom: 18px;
}
.rate-label { font-size: .8rem; opacity: .7; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px; }
.rate-value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; }
.rate-sub   { font-size: .82rem; opacity: .75; margin-top: 2px; }

/* ── TRANSFER HISTORY TABLE ───────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.portal-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.portal-table th {
  text-align: left; padding: 10px 14px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .4px; color: var(--muted);
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}
table.portal-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  color: var(--slate); vertical-align: middle;
}
table.portal-table tr:last-child td { border-bottom: none; }
table.portal-table tr:hover td { background: var(--surface); }

/* ── PAYMENT INSTRUCTIONS BOX ─────────────────────────────── */
.pay-box {
  background: #eef1ff;
  border: 1.5px solid #c0ccf5;
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.pay-box-label {
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--blue); margin-bottom: 8px;
}
.pay-box-value {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 700;
  color: var(--navy); line-height: 1.5;
}
.pay-box-note { font-size: .82rem; color: var(--muted); margin-top: 8px; }

/* ── FILE UPLOAD ──────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  background: var(--white);
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--blue);
  background: #eef1ff;
}
.upload-icon { font-size: 2rem; margin-bottom: 8px; }
.upload-text { font-size: .9rem; color: var(--muted); }
.upload-text strong { color: var(--blue); }
.upload-preview { margin-top: 12px; }
.upload-preview img { max-width: 100%; max-height: 200px; border-radius: var(--radius-sm); }

/* ── MOBILE MENU ──────────────────────────────────────────── */
.mob-menu-btn {
  display: none;
  background: rgba(255,255,255,.12);
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
}
.mob-menu-btn:hover { background: rgba(255,255,255,.2); }

.mob-menu-dropdown {
  display: none;
  position: fixed;
  top: 56px; left: 0; right: 0;
  background: var(--navy);
  z-index: 999;
  border-bottom: 2px solid rgba(255,255,255,.1);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.mob-menu-dropdown.open { display: block; }
.mob-menu-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  color: rgba(255,255,255,.85);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: background .15s;
}
.mob-menu-link:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.mob-menu-link.active { color: var(--gold); }
.mob-menu-link svg { width: 22px; height: 22px; flex-shrink: 0; }
.mob-menu-link.send-link { background: var(--gold); color: var(--navy) !important; font-weight: 800; }
.mob-menu-link.send-link:hover { background: #e6ac00; }

/* ── MOBILE ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  html, body { overflow-x: hidden; }
  .nav { padding: 0 14px; height: 56px; }
  .nav-links .nav-link:not(.btn) { display: none; }
  .nav-links .btn { display: none; }
  .mob-menu-btn { display: block; }
  .sidebar { display: none; }
  .dashboard-wrap { flex-direction: column; }
  .main-content { padding: 14px 12px; width: 100%; }
  .card { padding: 16px 14px; border-radius: var(--radius); }
  .card-sm { padding: 12px 14px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .quick-send-banner { flex-direction: column !important; align-items: stretch !important; gap: 12px !important; }
  .quick-send-banner .btn { width: 100%; text-align: center; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.portal-table { min-width: 480px; font-size: .82rem; }
  table.portal-table th, table.portal-table td { padding: 9px 10px; }
  .corridor-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .corridor-card { padding: 12px 10px; }
  .corridor-flag { font-size: 1.5rem; }
  .corridor-name { font-size: .78rem; }
  .auth-card { padding: 22px 16px; }
  .auth-box { padding: 14px; }
  .steps { overflow-x: auto; padding-bottom: 6px; }
  .rate-box { padding: 14px 16px; }
  .rate-value { font-size: 1.3rem; }
  .btn-lg { padding: 12px 22px; font-size: .92rem; }
  .profile-grid-2col { grid-template-columns: 1fr !important; }
  h1 { font-size: 1.3rem; }
  h2 { font-size: 1.1rem; }
}

/* ── BOTTOM NAV (mobile) ─ covers all pages ──────────────────
   Suppresses every default browser behaviour: underline,
   tap highlight, focus ring, outline. Active state is purely
   colour-based, matching Revolut / Wise design conventions.
   ──────────────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 9px 5px calc(9px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid #e6e6f0;
  box-shadow: 0 -2px 16px rgba(22,12,133,.07);
}
.bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
}
.bottom-nav-item,
.bn-item,
.bn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: #6a6a85;
  text-decoration: none !important;
  -webkit-tap-highlight-color: transparent !important;
  outline: none !important;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 9px;
  transition: color .2s;
  min-width: 48px;
  text-align: center;
  -webkit-user-select: none;
  user-select: none;
}
.bottom-nav-item:hover,
.bottom-nav-item:focus,
.bottom-nav-item:active,
.bottom-nav-item:visited,
.bn-item:hover,
.bn-item:focus,
.bn-item:active,
.bn-item:visited,
.bn:hover,
.bn:focus,
.bn:active,
.bn:visited {
  text-decoration: none !important;
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
}
.bottom-nav-item.active,
.bn-item.active,
.bn.active {
  color: #160c85;
  text-decoration: none !important;
}
.bottom-nav-send,
.bn-send {
  background: linear-gradient(135deg,#160c85,#192bc2);
  color: #fff !important;
  border-radius: 50px;
  padding: 9px 18px;
  margin-top: -17px;
  box-shadow: 0 4px 16px rgba(22,12,133,.4);
  text-decoration: none !important;
}
.bottom-nav-item svg,
.bn-item svg,
.bn svg {
  display: block;
  flex-shrink: 0;
}
@media (min-width: 769px) {
  .bottom-nav { display: none; }
}