/* =========================================================
   RESIDE GLOBAL — CLIENT PORTAL STYLES  v1
   client.resideglobal.ae
   ========================================================= */

:root {
  --rg-vault-base:      #0B0E14;
  --rg-vault-surface:   #13181F;
  --rg-vault-card:      #1A2030;
  --rg-vault-border:    #252D3D;
  --rg-vault-hover:     #1E2840;

  --rg-ivory-base:      #FAFAF8;
  --rg-ivory-surface:   #F4F2EC;
  --rg-ivory-card:      #FFFFFF;
  --rg-ivory-border:    #E2DECC;

  --rg-navy:            #0A1628;
  --rg-navy-mid:        #0D1E35;

  --rg-gold:            #C9A227;
  --rg-gold-light:      #E2B84A;
  --rg-gold-pale:       #F0D090;
  --rg-champagne:       #D4AF6A;
  --rg-gold-dim:        rgba(201,162,39,0.10);
  --rg-gold-glow:       rgba(201,162,39,0.22);

  --rg-text-dark:       #EEF0F4;
  --rg-muted-dark:      #6B7A94;
  --rg-text-light:      #1A1A2E;
  --rg-muted-light:     #6B7280;

  --rg-success:         #22C55E;
  --rg-warning:         #F59E0B;
  --rg-danger:          #EF4444;
  --rg-info:            #3B82F6;

  --rg-font-display:    'DM Serif Display', Georgia, serif;
  --rg-font-body:       'Inter Tight', system-ui, sans-serif;

  --rg-radius-sm:       6px;
  --rg-radius-md:       10px;
  --rg-radius-lg:       16px;
  --rg-radius-xl:       24px;

  --rg-shadow-card:     0 2px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --rg-shadow-gold:     0 0 0 1px rgba(201,162,39,0.25), 0 8px 32px rgba(201,162,39,0.08);
  --rg-focus-ring:      0 0 0 3px rgba(201,162,39,0.25);

  --rg-client-nav-height: 64px;
}

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

body {
  font-family: var(--rg-font-body);
  background: var(--rg-ivory-base);
  color: var(--rg-text-light);
  min-height: 100vh;
}

/* ─── VIEWS ──────────────────────────────────────────── */
.view { display: none; min-height: 100vh; }
.view.active { display: block; }

/* ══════════════════════════════════════════════════════
   LOGIN VIEW
══════════════════════════════════════════════════════ */
#view-login {
  display: none;
  background: var(--rg-vault-base);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}
#view-login.active { display: flex; align-items: center; justify-content: center; }

.login-orbs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.l-orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0.07;
  animation: ldrift 18s ease-in-out infinite;
}
.l-orb-1 { width: 500px; height: 500px; background: var(--rg-gold); top: -150px; right: -100px; }
.l-orb-2 { width: 350px; height: 350px; background: #3B82F6; bottom: -100px; left: -80px; animation-delay: -9s; }

@keyframes ldrift {
  0%,100% { transform: translate(0,0); }
  50%      { transform: translate(20px,-20px); }
}

.login-card {
  position: relative; z-index: 1;
  width: 420px;
  background: var(--rg-vault-surface);
  border: 1px solid var(--rg-vault-border);
  border-radius: var(--rg-radius-xl);
  padding: 44px 40px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
  animation: slideUp 0.5s cubic-bezier(0.34,1.1,0.64,1) both;
}

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

.login-logo {
  display: flex; align-items: center; gap: 12px; margin-bottom: 32px;
}
.login-logomark {
  width: 42px; height: 42px; border-radius: 10px;
  background: linear-gradient(135deg, var(--rg-gold), #7A5C10);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--rg-font-display); font-size: 15px; color: #000;
  box-shadow: 0 4px 16px rgba(201,162,39,0.4);
  flex-shrink: 0;
}
.login-logotext strong { display: block; font-size: 15px; font-weight: 700; color: var(--rg-text-dark); }
.login-logotext span { font-size: 10px; color: var(--rg-muted-dark); letter-spacing: 0.08em; text-transform: uppercase; }

.login-heading {
  font-family: var(--rg-font-display); font-size: 26px; font-weight: 400;
  color: var(--rg-text-dark); margin-bottom: 6px;
}
.login-sub { font-size: 13px; color: var(--rg-muted-dark); margin-bottom: 28px; line-height: 1.5; }

.field-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--rg-muted-dark);
  margin-bottom: 6px; display: block;
}

.login-input {
  width: 100%; padding: 12px 16px;
  background: var(--rg-vault-base);
  border: 1px solid var(--rg-vault-border);
  border-radius: var(--rg-radius-sm);
  font-family: var(--rg-font-body); font-size: 14px;
  color: var(--rg-text-dark); outline: none;
  transition: all 0.18s; margin-bottom: 16px;
}
.login-input:focus { border-color: var(--rg-gold); box-shadow: var(--rg-focus-ring); }
.login-input::placeholder { color: var(--rg-muted-dark); }

.login-error {
  font-size: 12px; color: var(--rg-danger);
  margin-bottom: 12px; display: none; padding: 10px 14px;
  background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--rg-radius-sm);
}
.login-error.show { display: block; }

.login-btn {
  width: 100%; padding: 14px;
  background: var(--rg-gold); color: #000;
  border: none; border-radius: var(--rg-radius-sm);
  font-family: var(--rg-font-body); font-size: 13px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer; transition: all 0.18s;
  box-shadow: 0 4px 20px rgba(201,162,39,0.35);
  margin-top: 4px;
}
.login-btn:hover { background: var(--rg-gold-light); box-shadow: 0 6px 28px rgba(201,162,39,0.5); transform: translateY(-1px); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.login-help { text-align: center; margin-top: 20px; font-size: 12px; color: var(--rg-muted-dark); }
.login-help a { color: var(--rg-gold); text-decoration: none; font-weight: 600; cursor: pointer; }

/* ══════════════════════════════════════════════════════
   PORTAL LAYOUT
══════════════════════════════════════════════════════ */
#view-portal {
  display: none; flex-direction: column; min-height: 100vh;
}
#view-portal.active { display: flex; }

/* ─── TOPNAV ──────────────────────────────────────── */
.topnav {
  background: var(--rg-navy);
  height: var(--rg-client-nav-height);
  padding: 0 32px;
  display: flex; align-items: center; gap: 0;
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid rgba(201,162,39,0.15);
}

.topnav-logo {
  display: flex; align-items: center; gap: 10px; margin-right: 40px;
}
.topnav-mark {
  width: 32px; height: 32px; border-radius: 7px;
  background: linear-gradient(135deg, var(--rg-gold), #7A5C10);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--rg-font-display); font-size: 12px; color: #000;
  flex-shrink: 0;
}
.topnav-name { font-size: 14px; font-weight: 700; color: var(--rg-text-dark); }
.topnav-name span { color: var(--rg-gold); }

.topnav-links {
  display: flex; align-items: stretch;
  height: var(--rg-client-nav-height); gap: 0;
}
.topnav-link {
  display: flex; align-items: center; padding: 0 18px;
  font-size: 13px; font-weight: 600; color: var(--rg-muted-dark);
  cursor: pointer; transition: color 0.18s;
  border-bottom: 2px solid transparent;
  letter-spacing: 0.01em;
}
.topnav-link:hover { color: var(--rg-text-dark); }
.topnav-link.active { color: var(--rg-gold); border-bottom-color: var(--rg-gold); }

.topnav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.notif-bell {
  width: 34px; height: 34px; border-radius: var(--rg-radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer; position: relative;
  color: var(--rg-muted-dark); transition: color 0.18s;
}
.notif-bell:hover { color: var(--rg-text-dark); }
.notif-pip {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--rg-gold); border: 2px solid var(--rg-navy);
}

.topnav-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--rg-gold), #5C4209);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #000; cursor: pointer;
  border: 2px solid rgba(201,162,39,0.3);
}

.logout-btn {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--rg-vault-border);
  border-radius: var(--rg-radius-sm);
  font-family: var(--rg-font-body); font-size: 11px; font-weight: 700;
  color: var(--rg-muted-dark); cursor: pointer;
  letter-spacing: 0.04em; text-transform: uppercase;
  transition: all 0.18s;
}
.logout-btn:hover { border-color: var(--rg-danger); color: var(--rg-danger); }

/* ─── HERO WELCOME ────────────────────────────────── */
.portal-hero {
  background: linear-gradient(135deg, var(--rg-navy) 0%, var(--rg-vault-card) 100%);
  padding: 36px 32px;
  border-bottom: 1px solid var(--rg-vault-border);
}
.hero-inner {
  max-width: 960px; margin: 0 auto;
  display: flex; align-items: center; gap: 0;
}
.hero-eyebrow {
  font-size: 9px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--rg-gold);
  border-left: 2px solid var(--rg-gold); padding-left: 8px; margin-bottom: 10px;
}
.hero-name {
  font-family: var(--rg-font-display); font-size: 30px;
  color: var(--rg-text-dark); line-height: 1.1;
}
.hero-name em { color: var(--rg-gold); font-style: normal; }
.hero-tagline { font-size: 13px; color: var(--rg-muted-dark); margin-top: 6px; line-height: 1.5; }

.hero-ref {
  margin-left: auto;
  background: rgba(201,162,39,0.08);
  border: 1px solid rgba(201,162,39,0.2);
  border-radius: var(--rg-radius-lg);
  padding: 16px 24px; text-align: right;
}
.hero-ref-label {
  font-size: 9px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--rg-muted-dark); margin-bottom: 4px;
}
.hero-ref-value {
  font-family: var(--rg-font-display); font-size: 20px; color: var(--rg-gold);
}
.hero-ref-type { font-size: 11px; color: var(--rg-muted-dark); margin-top: 4px; }

/* ─── PORTAL BODY ─────────────────────────────────── */
.portal-body {
  flex: 1; padding: 36px 32px;
  max-width: 960px; margin: 0 auto; width: 100%;
}

/* ─── PAGE SECTIONS ───────────────────────────────── */
.portal-section { display: none; }
.portal-section.active { display: block; }

/* ─── SECTION HEADER ──────────────────────────────── */
.sec-head { margin-bottom: 24px; }
.sec-eyebrow {
  font-size: 9px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--rg-gold);
  border-left: 2px solid var(--rg-gold); padding-left: 8px; margin-bottom: 8px;
}
.sec-title {
  font-family: var(--rg-font-display); font-size: 22px; color: var(--rg-text-light);
}

/* ─── APPLICATION STATUS CARD ─────────────────────── */
.status-card {
  background: var(--rg-ivory-card);
  border: 1px solid var(--rg-ivory-border);
  border-radius: var(--rg-radius-xl);
  box-shadow: var(--rg-shadow-card);
  overflow: hidden; margin-bottom: 24px;
}
.status-card-header {
  padding: 24px 28px;
  background: linear-gradient(135deg, var(--rg-navy), var(--rg-vault-surface));
  display: flex; align-items: center; gap: 16px;
}
.visa-icon {
  width: 52px; height: 52px; border-radius: var(--rg-radius-md);
  background: var(--rg-gold-dim); border: 1px solid rgba(201,162,39,0.25);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.visa-type {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--rg-gold); margin-bottom: 2px;
}
.visa-name {
  font-family: var(--rg-font-display); font-size: 20px; color: var(--rg-text-dark);
}
.visa-meta { font-size: 11px; color: var(--rg-muted-dark); margin-top: 3px; }

.status-pill {
  margin-left: auto;
  padding: 6px 14px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(34,197,94,0.12); color: var(--rg-success);
  border: 1px solid rgba(34,197,94,0.25);
  animation: pulse-badge 2.5s ease-in-out infinite;
}
.status-pill.warning { background: rgba(245,158,11,0.12); color: var(--rg-warning); border-color: rgba(245,158,11,0.25); }
.status-pill.danger { background: rgba(239,68,68,0.12); color: var(--rg-danger); border-color: rgba(239,68,68,0.25); }

@keyframes pulse-badge {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.2); }
  50%      { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

/* Progress stepper */
.status-stepper { padding: 28px; }
.stepper { display: flex; align-items: flex-start; gap: 0; margin-bottom: 20px; }
.step {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; position: relative;
}
.step:not(:last-child)::after {
  content: ''; position: absolute;
  top: 16px; left: 50%; width: 100%;
  height: 2px; z-index: 0;
}
.step.done:not(:last-child)::after    { background: var(--rg-gold); }
.step.active:not(:last-child)::after  { background: linear-gradient(90deg, var(--rg-gold), var(--rg-ivory-border)); }
.step.pending:not(:last-child)::after { background: var(--rg-ivory-border); }

.step-dot {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; z-index: 1;
  position: relative; transition: all 0.3s;
}
.step.done .step-dot   { background: var(--rg-gold); color: #000; box-shadow: 0 2px 12px rgba(201,162,39,0.4); }
.step.active .step-dot { background: var(--rg-navy); color: var(--rg-gold); border: 2px solid var(--rg-gold); box-shadow: 0 0 0 4px var(--rg-gold-dim); }
.step.pending .step-dot { background: var(--rg-ivory-surface); color: var(--rg-muted-light); border: 2px solid var(--rg-ivory-border); }

.step-label {
  font-size: 10px; font-weight: 600; margin-top: 8px;
  text-align: center; color: var(--rg-muted-light); line-height: 1.3;
}
.step.done .step-label   { color: var(--rg-text-light); }
.step.active .step-label { color: var(--rg-gold); font-weight: 700; }

.status-note {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--rg-gold-dim); border: 1px solid rgba(201,162,39,0.2);
  border-radius: var(--rg-radius-md); padding: 14px 16px;
  font-size: 12px; color: var(--rg-text-light); line-height: 1.6;
}
.status-note-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ─── INFO GRID ───────────────────────────────────── */
.info-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 16px; margin-bottom: 24px;
}
.info-card {
  background: var(--rg-ivory-card);
  border: 1px solid var(--rg-ivory-border);
  border-radius: var(--rg-radius-lg);
  padding: 20px 22px;
  box-shadow: var(--rg-shadow-card);
  transition: all 0.22s; cursor: default;
}
.info-card:hover { transform: translateY(-2px); box-shadow: var(--rg-shadow-gold); }
.info-card-icon { font-size: 20px; margin-bottom: 10px; }
.info-card-label {
  font-size: 9px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--rg-muted-light); margin-bottom: 4px;
}
.info-card-value { font-size: 18px; font-weight: 700; color: var(--rg-text-light); }
.info-card-value.sm { font-size: 15px; }
.info-card-value.warning { color: var(--rg-warning); }
.info-card-value.success { color: var(--rg-success); }
.info-card-sub { font-size: 11px; color: var(--rg-muted-light); margin-top: 3px; }

/* ─── TIMELINE ────────────────────────────────────── */
.timeline-card {
  background: var(--rg-ivory-card);
  border: 1px solid var(--rg-ivory-border);
  border-radius: var(--rg-radius-xl);
  padding: 28px; box-shadow: var(--rg-shadow-card); margin-bottom: 24px;
}
.timeline-heading {
  font-family: var(--rg-font-display); font-size: 16px;
  color: var(--rg-text-light); margin-bottom: 24px;
}
.tl { display: flex; flex-direction: column; gap: 0; }
.tl-row { display: flex; gap: 16px; padding-bottom: 24px; position: relative; }
.tl-row:last-child { padding-bottom: 0; }
.tl-left {
  display: flex; flex-direction: column; align-items: center;
  flex-shrink: 0; width: 32px;
}
.tl-circle {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0; z-index: 1;
}
.tl-circle.done { background: var(--rg-gold); color: #000; }
.tl-circle.now  {
  background: var(--rg-navy); border: 2px solid var(--rg-gold); color: var(--rg-gold);
  animation: pulse-now 2s ease-in-out infinite;
}
.tl-circle.wait { background: var(--rg-ivory-surface); border: 2px solid var(--rg-ivory-border); color: var(--rg-muted-light); }

@keyframes pulse-now {
  0%,100% { box-shadow: 0 0 0 0 rgba(201,162,39,0.3); }
  50%      { box-shadow: 0 0 0 8px rgba(201,162,39,0); }
}

.tl-line-v { width: 2px; flex: 1; background: var(--rg-ivory-border); margin-top: 4px; }
.tl-row:last-child .tl-line-v { display: none; }
.tl-row.done .tl-line-v { background: var(--rg-gold); opacity: 0.3; }
.tl-right { flex: 1; padding-top: 4px; }
.tl-event-title { font-size: 13px; font-weight: 700; color: var(--rg-text-light); }
.tl-row.wait .tl-event-title { color: var(--rg-muted-light); }
.tl-event-title.current { color: var(--rg-gold); }
.tl-event-desc { font-size: 12px; color: var(--rg-muted-light); margin-top: 3px; line-height: 1.5; }
.tl-event-date { font-size: 10px; font-weight: 600; color: var(--rg-gold); margin-top: 5px; letter-spacing: 0.04em; }
.tl-row.wait .tl-event-date { color: var(--rg-muted-light); }

/* ─── DOCUMENTS ───────────────────────────────────── */
.doc-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.doc-item {
  background: var(--rg-ivory-card);
  border: 1px solid var(--rg-ivory-border);
  border-radius: var(--rg-radius-lg);
  padding: 16px 18px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--rg-shadow-card);
  transition: all 0.18s; cursor: pointer;
}
.doc-item:hover { border-color: var(--rg-gold); box-shadow: var(--rg-shadow-gold); transform: translateY(-1px); }
.doc-item.required {
  border-style: dashed;
  border-color: var(--rg-warning);
  background: rgba(245,158,11,0.03);
}
.doc-icon {
  width: 40px; height: 40px; border-radius: var(--rg-radius-sm);
  background: var(--rg-ivory-surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.doc-icon.warn { background: rgba(245,158,11,0.10); }
.doc-name { font-size: 13px; font-weight: 600; color: var(--rg-text-light); }
.doc-meta { font-size: 11px; color: var(--rg-muted-light); margin-top: 2px; }
.doc-meta.required { color: var(--rg-warning); font-weight: 600; }
.doc-status-icon { margin-left: auto; font-size: 16px; flex-shrink: 0; }

.upload-zone {
  border: 2px dashed var(--rg-ivory-border);
  border-radius: var(--rg-radius-lg);
  padding: 32px; text-align: center;
  transition: all 0.22s; cursor: pointer;
  margin-top: 14px;
  background: var(--rg-ivory-surface);
}
.upload-zone:hover { border-color: var(--rg-gold); background: var(--rg-gold-dim); }
.upload-zone-icon { font-size: 32px; margin-bottom: 10px; }
.upload-zone-text { font-size: 13px; font-weight: 600; color: var(--rg-text-light); }
.upload-zone-sub { font-size: 11px; color: var(--rg-muted-light); margin-top: 4px; }

/* ─── PAYMENTS ────────────────────────────────────── */
.payment-summary {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 16px; margin-bottom: 24px;
}
.pay-sum-card {
  background: var(--rg-ivory-card);
  border: 1px solid var(--rg-ivory-border);
  border-radius: var(--rg-radius-lg);
  padding: 20px 22px; box-shadow: var(--rg-shadow-card);
}
.pay-sum-label {
  font-size: 9px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--rg-muted-light); margin-bottom: 6px;
}
.pay-sum-value {
  font-family: var(--rg-font-display); font-size: 24px; color: var(--rg-text-light);
}
.pay-sum-value.gold { color: var(--rg-gold); }
.pay-sum-value.success { color: var(--rg-success); }
.pay-sum-sub { font-size: 11px; color: var(--rg-muted-light); margin-top: 4px; }

.pay-table {
  background: var(--rg-ivory-card);
  border: 1px solid var(--rg-ivory-border);
  border-radius: var(--rg-radius-xl);
  overflow: hidden; box-shadow: var(--rg-shadow-card);
}
.pay-table-head {
  padding: 16px 22px;
  border-bottom: 1px solid var(--rg-ivory-border);
  font-size: 13px; font-weight: 700; color: var(--rg-text-light);
  display: flex; align-items: center; gap: 10px;
}

table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; padding: 10px 22px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--rg-muted-light); background: var(--rg-ivory-surface);
  border-bottom: 1px solid var(--rg-ivory-border);
}
tbody tr { border-bottom: 1px solid var(--rg-ivory-border); transition: background 0.15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--rg-gold-dim); }
td { padding: 14px 22px; font-size: 13px; color: var(--rg-text-light); vertical-align: middle; }

.pay-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
}
.pay-badge.paid  { background: rgba(34,197,94,0.10);  color: #16A34A; }
.pay-badge.due   { background: rgba(245,158,11,0.10); color: #D97706; }
.pay-badge.sched { background: rgba(59,130,246,0.10); color: #2563EB; }
.pay-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.pay-now-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; background: var(--rg-gold); color: #000;
  border: none; border-radius: var(--rg-radius-sm);
  font-family: var(--rg-font-body); font-size: 11px; font-weight: 800;
  letter-spacing: 0.05em; text-transform: uppercase;
  cursor: pointer; transition: all 0.18s;
}
.pay-now-btn:hover { background: var(--rg-gold-light); transform: translateY(-1px); }

/* ─── SUPPORT ─────────────────────────────────────── */
.support-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.support-card {
  background: var(--rg-ivory-card);
  border: 1px solid var(--rg-ivory-border);
  border-radius: var(--rg-radius-xl);
  padding: 28px; box-shadow: var(--rg-shadow-card);
}
.support-card-icon { font-size: 28px; margin-bottom: 12px; }
.support-card-title { font-size: 15px; font-weight: 700; color: var(--rg-text-light); margin-bottom: 6px; }
.support-card-text { font-size: 12px; color: var(--rg-muted-light); line-height: 1.6; margin-bottom: 16px; }

.support-officer {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; background: var(--rg-ivory-surface);
  border-radius: var(--rg-radius-md); margin-bottom: 14px;
}
.officer-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--rg-navy), var(--rg-vault-card));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: var(--rg-gold); flex-shrink: 0;
}
.officer-name { font-size: 12px; font-weight: 700; color: var(--rg-text-light); }
.officer-role { font-size: 10px; color: var(--rg-muted-light); margin-top: 1px; }
.online-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--rg-success); margin-left: auto;
  box-shadow: 0 0 0 2px rgba(34,197,94,0.2);
}

.msg-area {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--rg-ivory-border);
  border-radius: var(--rg-radius-sm);
  font-family: var(--rg-font-body); font-size: 13px;
  color: var(--rg-text-light); background: var(--rg-ivory-base);
  resize: vertical; min-height: 90px; outline: none;
  transition: all 0.18s; margin-bottom: 10px;
}
.msg-area:focus { border-color: var(--rg-gold); box-shadow: var(--rg-focus-ring); }
.msg-area::placeholder { color: var(--rg-muted-light); }

.office-list { font-size: 12px; color: var(--rg-text-light); line-height: 2; }
.office-list strong { color: var(--rg-text-light); }

.notif-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.notif-row:last-child { margin-bottom: 0; }
.notif-label { font-size: 12px; font-weight: 600; color: var(--rg-text-light); }
.notif-sub { font-size: 11px; color: var(--rg-muted-light); margin-top: 1px; }

.tgl {
  width: 38px; height: 21px; border-radius: 999px;
  background: var(--rg-ivory-border);
  position: relative; cursor: pointer;
  transition: background 0.2s; flex-shrink: 0;
}
.tgl.on { background: var(--rg-gold); }
.tgl-thumb {
  position: absolute; width: 15px; height: 15px;
  background: white; border-radius: 50%;
  top: 3px; left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.tgl.on .tgl-thumb { transform: translateX(17px); }

/* ─── BUTTONS ─────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; background: var(--rg-gold); color: #000;
  border: none; border-radius: var(--rg-radius-sm);
  font-family: var(--rg-font-body); font-size: 12px; font-weight: 800;
  letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer;
  transition: all 0.18s; box-shadow: 0 2px 10px rgba(201,162,39,0.3);
}
.btn-primary:hover { background: var(--rg-gold-light); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(201,162,39,0.45); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; background: transparent;
  border: 1px solid var(--rg-ivory-border); color: var(--rg-muted-light);
  border-radius: var(--rg-radius-sm);
  font-family: var(--rg-font-body); font-size: 12px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer;
  transition: all 0.18s;
}
.btn-outline:hover { background: var(--rg-ivory-surface); color: var(--rg-text-light); border-color: var(--rg-text-light); }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ─── FOOTER ──────────────────────────────────────── */
.portal-footer {
  background: var(--rg-navy); padding: 20px 32px;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid rgba(201,162,39,0.1);
}
.footer-brand { font-size: 12px; color: var(--rg-muted-dark); }
.footer-brand strong { color: var(--rg-gold); }
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  font-size: 11px; color: var(--rg-muted-dark);
  text-decoration: none; transition: color 0.18s; cursor: pointer;
}
.footer-links a:hover { color: var(--rg-gold); }

/* ─── TOAST ───────────────────────────────────────── */
.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--rg-vault-surface); color: var(--rg-text-dark);
  border: 1px solid var(--rg-gold); border-radius: var(--rg-radius-sm);
  padding: 10px 22px; font-size: 12px; font-weight: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4); z-index: 9999;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ─── LOADING STATE ───────────────────────────────── */
.loading-overlay {
  position: fixed; inset: 0; z-index: 9998;
  background: var(--rg-vault-base);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 16px;
}
.loading-overlay.hidden { display: none; }
.loading-spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--rg-vault-border);
  border-top-color: var(--rg-gold);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 12px; color: var(--rg-muted-dark); }

/* ─── HAMBURGER & MOBILE NAV DRAWER ─────────────────── */
.topnav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  width: 40px;
  height: 40px;
}
.topnav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s;
}
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: var(--rg-navy, #0A1628);
  z-index: 9999;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  box-shadow: 4px 0 24px rgba(0,0,0,.4);
}
.mobile-nav-drawer.open {
  transform: translateX(0);
}
.mobile-nav-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.mobile-nav-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: 18px;
  cursor: pointer;
  margin-left: auto;
  padding: 4px 8px;
}
.mobile-nav-links {
  padding: 12px 0;
}
.mobile-nav-link {
  display: block;
  padding: 14px 20px;
  color: rgba(255,255,255,.8) !important;
  font-size: 14px;
  border-left: 3px solid transparent;
  cursor: pointer;
}
.mobile-nav-link.active, .mobile-nav-link:hover {
  background: rgba(201,162,39,.1);
  border-left-color: var(--rg-gold, #C9A227);
  color: #fff !important;
}
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9998;
}
.mobile-nav-overlay.open { display: block; }

@media (prefers-reduced-motion: reduce) {
  .mobile-nav-drawer { transition: none; }
}

/* ─── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 768px) {
  .topnav-burger { display: flex; }
  .mobile-nav-drawer { display: flex; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .payment-summary { grid-template-columns: 1fr 1fr; }
  .doc-grid { grid-template-columns: 1fr; }
  .support-grid { grid-template-columns: 1fr; }
  .hero-ref { display: none; }
  .topnav-links { display: none; }
  .portal-body { padding: 20px 16px; }
  .portal-hero { padding: 24px 16px; }
  .topnav { padding: 0 16px; }
  .portal-footer { flex-direction: column; gap: 12px; text-align: center; padding: 20px 16px; }
  /* Payment table scrollable on mobile */
  .pay-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pay-table table { min-width: 520px; }
}

@media (max-width: 480px) {
  .login-card { width: calc(100vw - 32px); padding: 32px 24px; }
  .info-grid { grid-template-columns: 1fr; }
  .payment-summary { grid-template-columns: 1fr; }
  .stepper { gap: 0; }
  .step-label { font-size: 8px; }
}

@media (max-width: 375px) {
  .topnav-name { display: none; }
  .portal-hero { padding: 20px 12px; }
  .portal-body { padding: 16px 12px; }
  .step-label { display: none; }
}
