/* ============================================================
   Industrial Development Bank — Design System
   Palette: Navy / White / Gray / Deep Gold
   Display: Fraunces · Body: Inter · Data: IBM Plex Mono
   ============================================================ */

:root {
  --navy-950: #060f22;
  --navy-900: #0a1a35;
  --navy-800: #0f2447;
  --navy-700: #16305c;
  --navy-600: #1f3f74;
  --gold-700: #96721f;
  --gold-600: #b1872b;
  --gold-500: #c9a034;
  --gold-400: #dcb85a;
  --gold-300: #e9d18f;
  --white: #ffffff;
  --gray-050: #f6f7f9;
  --gray-100: #eceef2;
  --gray-200: #dde1e8;
  --gray-300: #c3c9d4;
  --gray-500: #6b7280;
  --gray-600: #565d6b;
  --gray-700: #3c4250;

  --success: #1e7d4f;
  --success-bg: #e6f4ec;
  --danger: #b3402c;
  --danger-bg: #fbe9e6;
  --warn: #93650f;
  --warn-bg: #faf0dc;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 2px rgba(10,26,53,0.06), 0 8px 24px -12px rgba(10,26,53,0.18);
  --shadow-pop: 0 20px 60px -20px rgba(6,15,34,0.45);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

  --max-width: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--navy-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy-900);
  margin: 0 0 0.5em;
  line-height: 1.15;
  font-weight: 600;
}

p { margin: 0 0 1em; color: var(--gray-700); }
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Skyline rule — signature divider echoing the logo's ascending bars ---------- */
.skyline-rule {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 22px;
  margin: 28px 0;
}
.skyline-rule span {
  display: block;
  width: 100%;
  background: linear-gradient(180deg, var(--gold-400), var(--gold-600));
  border-radius: 2px 2px 0 0;
}
.skyline-rule span:nth-child(1) { height: 40%; }
.skyline-rule span:nth-child(2) { height: 65%; }
.skyline-rule span:nth-child(3) { height: 85%; }
.skyline-rule span:nth-child(4) { height: 100%; }
.skyline-rule span:nth-child(5) { height: 70%; }
.skyline-rule.center { max-width: 160px; margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: var(--navy-950);
}
.btn-gold:hover { box-shadow: 0 8px 20px -8px rgba(177,135,43,0.55); }
.btn-navy {
  background: var(--navy-900);
  color: var(--white);
}
.btn-navy:hover { background: var(--navy-800); }
.btn-outline {
  background: transparent;
  border-color: var(--gray-300);
  color: var(--navy-900);
}
.btn-outline:hover { border-color: var(--navy-700); }
.btn-outline-light {
  background: transparent;
  border-color: rgba(255,255,255,0.35);
  color: var(--white);
}
.btn-outline-light:hover { border-color: var(--gold-400); color: var(--gold-300); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Top navigation (marketing pages) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(6,15,34,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img { height: 40px; width: auto; }
.brand span {
  font-family: var(--font-display);
  color: var(--white);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--gold-400); }
.nav-cta { display: flex; gap: 12px; align-items: center; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
}

/* ---------- Back link ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gray-600);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.back-link:hover { color: var(--navy-900); }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(1200px 600px at 15% -10%, #12294f 0%, var(--navy-950) 55%);
  color: var(--white);
  padding: 96px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero .container { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-400);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 { font-size: 3rem; color: var(--white); max-width: 620px; }
.hero p.lead { color: rgba(255,255,255,0.72); font-size: 1.1rem; max-width: 520px; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

/* Live-rate ticker — grounded signature element (real product feature, not decoration) */
.rate-panel {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.rate-panel h4 { color: var(--white); font-family: var(--font-body); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.55); margin-bottom: 16px; }
.rate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-family: var(--font-mono);
  font-size: 0.95rem;
}
.rate-row:last-child { border-bottom: none; }
.rate-pair { color: rgba(255,255,255,0.85); }
.rate-value { color: var(--gold-300); font-weight: 600; }
.rate-updated { margin-top: 14px; font-size: 0.72rem; color: rgba(255,255,255,0.4); }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--gray-050); }
.section-navy { background: var(--navy-950); color: var(--white); }
.section-navy p { color: rgba(255,255,255,0.66); }
.section-navy h2, .section-navy h3 { color: var(--white); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head .eyebrow { color: var(--gold-600); }
.section-navy .section-head .eyebrow { color: var(--gold-400); }
.section-head h2 { font-size: 2.1rem; }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
}
.card h3 { font-size: 1.15rem; }
.icon-badge {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-950));
  color: var(--gold-400);
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.account-type-card {
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}
.account-type-card:hover { box-shadow: var(--shadow-card); border-color: var(--gold-400); }
.account-type-card.selected { border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(201,160,52,0.18); }
.account-type-card ul { padding-left: 18px; margin: 12px 0 0; color: var(--gray-600); font-size: 0.9rem; }
.account-type-card li { margin-bottom: 6px; }
.account-type-card .tag {
  position: absolute; top: 20px; right: 20px;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--gold-700); background: var(--gold-300);
  padding: 4px 10px; border-radius: 999px;
}

footer.site-footer {
  background: var(--navy-950);
  color: rgba(255,255,255,0.55);
  padding: 56px 0 28px;
}
footer.site-footer .container { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
footer.site-footer h5 { color: var(--white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }
footer.site-footer a { color: rgba(255,255,255,0.55); text-decoration: none; font-size: 0.9rem; display: block; margin-bottom: 10px; }
footer.site-footer a:hover { color: var(--gold-400); }
.footer-bottom {
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; font-size: 0.8rem; flex-wrap: wrap; gap: 10px;
}

/* ---------- Forms (auth + everything else) ---------- */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-visual {
  background: radial-gradient(1000px 700px at 20% 10%, #142c53 0%, var(--navy-950) 60%);
  color: var(--white);
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-visual .quote { font-family: var(--font-display); font-size: 1.6rem; max-width: 420px; line-height: 1.35; }
.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.auth-form-card { width: 100%; max-width: 440px; }
.auth-form-card .top-logo { margin-bottom: 28px; }
.auth-form-card .top-logo img { height: 36px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--navy-800); margin-bottom: 6px; }
.field .hint { font-size: 0.78rem; color: var(--gray-500); margin-top: 4px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  background: var(--white);
  font-size: 0.95rem;
  color: var(--navy-900);
  font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(201,160,52,0.18);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
fieldset { border: none; padding: 0; margin: 0; }

.form-error, .form-success {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 16px;
  display: none;
}
.form-error { background: var(--danger-bg); color: var(--danger); }
.form-success { background: var(--success-bg); color: var(--success); }
.form-error.show, .form-success.show { display: block; }

.step-dots { display: flex; gap: 8px; margin-bottom: 24px; }
.step-dots span { height: 4px; flex: 1; border-radius: 2px; background: var(--gray-200); }
.step-dots span.active { background: var(--gold-500); }

/* ---------- App shell (dashboard + admin) ---------- */
.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; background: var(--gray-050); }
.app-sidebar {
  background: var(--navy-950);
  color: rgba(255,255,255,0.75);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.app-sidebar .brand { padding: 8px 10px 20px; }
.app-sidebar .brand span { font-size: 0.95rem; }
.side-nav { list-style: none; margin: 0; padding: 0; flex: 1; overflow-y: auto; }
.side-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; margin-bottom: 4px;
  border-radius: var(--radius-sm);
  text-decoration: none; color: rgba(255,255,255,0.7);
  font-size: 0.92rem; font-weight: 500;
  cursor: pointer;
}
.side-nav a:hover { background: rgba(255,255,255,0.06); color: var(--white); }
.side-nav a.active { background: rgba(201,160,52,0.15); color: var(--gold-300); }
.side-nav .icon { width: 18px; text-align: center; }
.side-foot { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 14px; font-size: 0.8rem; }
.side-foot .logout { color: rgba(255,255,255,0.55); cursor: pointer; text-decoration: none; }
.side-foot .logout:hover { color: var(--gold-400); }

.app-main { padding: 28px 32px 60px; max-width: 1180px; }
.app-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; gap: 20px; flex-wrap: wrap;
}
.greeting h1 { font-size: 1.5rem; margin-bottom: 2px; }
.greeting p { margin: 0; font-size: 0.9rem; }
.mobile-topbar { display: none; }

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

/* Balance cards */
.balance-card {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-950));
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 26px;
  position: relative;
  overflow: hidden;
}
.balance-card .label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.55); }
.balance-card .amount { font-family: var(--font-mono); font-size: 1.9rem; margin: 10px 0 6px; }
.balance-card .acct-no { font-family: var(--font-mono); font-size: 0.8rem; color: rgba(255,255,255,0.5); }
.balance-card .badge-type {
  position: absolute; top: 22px; right: 22px;
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--navy-950); background: var(--gold-400); padding: 4px 9px; border-radius: 999px; font-weight: 700;
}

.stat-strip { display: flex; gap: 16px; flex-wrap: wrap; margin: 24px 0; }
.stat-pill {
  background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius-md);
  padding: 14px 18px; flex: 1; min-width: 160px;
}
.stat-pill .label { font-size: 0.75rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-pill .value { font-family: var(--font-mono); font-size: 1.2rem; color: var(--navy-900); margin-top: 4px; }

.panel {
  background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius-lg);
  padding: 26px; margin-bottom: 24px;
}
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.panel-head h3 { margin: 0; font-size: 1.05rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; color: var(--gray-500); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 10px 12px; border-bottom: 1px solid var(--gray-100); }
td { padding: 12px; border-bottom: 1px solid var(--gray-100); color: var(--navy-800); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

.badge { display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-navy { background: var(--navy-800); color: var(--white); }

.empty-state { text-align: center; padding: 48px 16px; color: var(--gray-500); }
.empty-state .icon { font-size: 2rem; margin-bottom: 10px; }

/* Virtual card */
.virtual-card {
  width: 100%; max-width: 380px; aspect-ratio: 1.586/1;
  border-radius: 18px;
  background: linear-gradient(135deg, #10254a 0%, #0a1a35 55%, #060f22 100%);
  color: var(--white);
  padding: 24px;
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.virtual-card::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(201,160,52,0.25), transparent 70%);
}
.virtual-card .vc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.virtual-card .vc-top img { height: 22px; }
.virtual-card .vc-chip { width: 42px; height: 32px; border-radius: 6px; background: linear-gradient(135deg, var(--gold-400), var(--gold-600)); }
.virtual-card .vc-number { font-family: var(--font-mono); font-size: 1.25rem; letter-spacing: 0.08em; margin: 18px 0 4px; }
.virtual-card .vc-bottom { display: flex; justify-content: space-between; align-items: flex-end; font-family: var(--font-mono); font-size: 0.8rem; color: rgba(255,255,255,0.75); }
.virtual-card .vc-name { text-transform: uppercase; letter-spacing: 0.04em; }
.blurred { filter: blur(6px); user-select: none; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(6,15,34,0.55);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: var(--white); border-radius: var(--radius-lg); padding: 32px;
  max-width: 460px; width: 100%; box-shadow: var(--shadow-pop); position: relative;
}
.modal-box .close-x { position: absolute; top: 18px; right: 18px; background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--gray-500); }
.modal-box h3 { margin-bottom: 10px; }

/* Toast */
.toast-stack { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--navy-950); color: var(--white); padding: 14px 18px; border-radius: var(--radius-md);
  font-size: 0.88rem; box-shadow: var(--shadow-pop); border-left: 4px solid var(--gold-500);
  max-width: 340px; animation: toast-in 0.2s ease;
}
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* Tabs */
.tab-bar { display: flex; gap: 8px; border-bottom: 1px solid var(--gray-100); margin-bottom: 22px; flex-wrap: wrap; }
.tab-btn {
  background: none; border: none; padding: 10px 4px; margin-right: 18px; font-weight: 600; font-size: 0.92rem;
  color: var(--gray-500); border-bottom: 2px solid transparent; cursor: pointer;
}
.tab-btn.active { color: var(--navy-900); border-color: var(--gold-500); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.help-note { background: var(--gray-050); border: 1px dashed var(--gray-300); border-radius: var(--radius-md); padding: 14px 16px; font-size: 0.85rem; color: var(--gray-600); }

.upload-drop {
  border: 1.5px dashed var(--gray-300); border-radius: var(--radius-md); padding: 22px; text-align: center;
  color: var(--gray-500); font-size: 0.88rem; cursor: pointer;
}
.upload-drop:hover { border-color: var(--gold-500); }
.file-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--gray-100); padding: 6px 12px; border-radius: 999px; font-size: 0.82rem; margin-top: 10px; }

/* Chat launcher fallback (used until tawk.to property ID is added) */
.chat-launcher {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: var(--navy-950); border: none; font-size: 1.3rem; cursor: pointer;
  box-shadow: var(--shadow-pop);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.3rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  footer.site-footer .container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar {
    position: fixed; left: -280px; top: 0; width: 260px; z-index: 80; height: 100vh;
    transition: left 0.2s ease;
  }
  .app-sidebar.open { left: 0; }
  .app-main { padding: 20px 16px 60px; }
  .mobile-topbar {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--navy-950); padding: 14px 16px; margin: -20px -16px 20px;
  }
  .mobile-topbar button { background: none; border: none; color: var(--white); font-size: 1.4rem; }
  .sidebar-scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 70; display: none; }
  .sidebar-scrim.show { display: block; }
}

@media (max-width: 640px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 48px; }
  .hero h1 { font-size: 1.9rem; }
  .section { padding: 56px 0; }
  .nav-links { display: none; }
  .nav-links.mobile-open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 76px; left: 0; right: 0;
    background: var(--navy-950); padding: 10px 24px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .nav-links.mobile-open a { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
  .nav-toggle { display: block; }
  footer.site-footer .container { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
