/* MT Grand Bank — design system.
   Deliberately a different palette from the casino: deep navy + jade + brass,
   so the two sites never read as the same product. */
:root {
  --ink: #050b1c;
  --ink-2: #0a1430;
  --panel: rgba(13, 24, 52, 0.78);
  --panel-solid: #0d1834;
  --line: rgba(255, 255, 255, 0.10);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #eef2fb;
  --muted: #9aa8c7;
  --faint: #6b7a9c;
  --jade: #2fd6a5;
  --jade-dk: #0f8f6c;
  --brass: #e8c26a;
  --red: #ff6b6b;
  --amber: #ffb648;
  --blue: #6aa8ff;
  --radius: 14px;
  --font: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --nav-h: 62px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--ink);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1100px 600px at 12% -8%, rgba(47, 214, 165, 0.10), transparent 60%),
    radial-gradient(900px 520px at 88% 0%, rgba(232, 194, 106, 0.08), transparent 55%),
    linear-gradient(180deg, #050b1c 0%, #071026 40%, #050b1c 100%);
  background-attachment: fixed;
}
a { color: var(--jade); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.2px; margin: 0 0 6px; }
h1 { font-size: 30px; }
h2 { font-size: 20px; }
h3 { font-size: 15px; font-family: var(--font); font-weight: 700; letter-spacing: 0.4px; }
small, .small { font-size: 12px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.pos { color: var(--jade); }
.neg { color: var(--red); }
.right { text-align: right; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.hidden { display: none !important; }

/* ---------- layout ---------- */
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 18px; }
.page { padding: 24px 0 80px; }
.topnav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(5, 11, 28, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.topnav-in { height: var(--nav-h); display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--jade), var(--jade-dk));
  color: #04231a; font-weight: 800; font-size: 17px;
  box-shadow: 0 4px 14px rgba(47, 214, 165, 0.28);
}
.brand-name { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: 0.4px; }
.brand-name em { font-style: normal; color: var(--jade); }
/* min-width:0 lets the link strip actually shrink and scroll inside the bar instead
   of forcing the whole topnav (and therefore the page) wider than a phone screen. */
.nav-links { display: flex; align-items: center; gap: 4px; flex: 1 1 0; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  color: var(--muted); font-size: 13.5px; font-weight: 600; padding: 8px 11px;
  border-radius: 9px; white-space: nowrap; text-decoration: none; flex: 0 0 auto;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); text-decoration: none; }
.nav-links a.active { color: var(--jade); background: rgba(47, 214, 165, 0.10); }
.nav-user { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.nav-user .nav-who { display: block; }
@media (max-width: 520px) {
  .topnav-in { gap: 10px; }
  .brand-name { display: none; }
  .nav-who { display: none !important; }
}
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #2b3f74, #16224a); font-size: 13px; font-weight: 700; color: #cfe0ff;
}

/* ---------- cards & panels ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  backdrop-filter: blur(8px);
}
.card.pad-sm { padding: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- account cards ---------- */
.acct {
  position: relative; overflow: hidden;
  border-radius: 16px; padding: 18px; min-height: 132px;
  display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid var(--line-2);
}
.acct.checking { background: linear-gradient(135deg, #123a52, #0b1c33); }
.acct.savings { background: linear-gradient(135deg, #0f3a34, #0a1c2c); }
.acct.credit { background: linear-gradient(135deg, #3a2350, #16122e); }
.acct::after {
  content: ''; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px;
  border-radius: 50%; background: rgba(255, 255, 255, 0.05);
}
.acct-kind { font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: rgba(255, 255, 255, 0.62); font-weight: 700; }
.acct-num { font-size: 13px; color: rgba(255, 255, 255, 0.75); font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.acct-bal { font-family: var(--font-display); font-size: 27px; font-weight: 700; line-height: 1.1; }
.acct-apy { font-size: 11.5px; color: var(--jade); font-weight: 600; }
.acct-owed .acct-bal { color: var(--amber); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.2px; }
.field .hint { font-size: 11.5px; color: var(--faint); }
input, select, textarea {
  font-family: var(--font); font-size: 14px; color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-2); border-radius: 10px;
  padding: 10px 12px; width: 100%; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--jade); box-shadow: 0 0 0 3px rgba(47, 214, 165, 0.14); }
input::placeholder, textarea::placeholder { color: var(--faint); }
select option { background: var(--panel-solid); color: var(--text); }
.money-input { position: relative; }
.money-input::before {
  content: '$'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-weight: 700; pointer-events: none;
}
.money-input input { padding-left: 26px; font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font); font-size: 14px; font-weight: 700; cursor: pointer;
  border: 1px solid transparent; border-radius: 10px; padding: 10px 16px;
  background: rgba(255, 255, 255, 0.07); color: var(--text);
  transition: .14s; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.btn:hover { background: rgba(255, 255, 255, 0.12); text-decoration: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--jade), var(--jade-dk)); color: #04231a; }
.btn-primary:hover { filter: brightness(1.08); background: linear-gradient(135deg, var(--jade), var(--jade-dk)); }
.btn-brass { background: linear-gradient(135deg, var(--brass), #b8912f); color: #2a1f04; }
.btn-danger { background: rgba(255, 107, 107, 0.14); color: var(--red); border-color: rgba(255, 107, 107, 0.35); }
.btn-danger:hover { background: rgba(255, 107, 107, 0.22); }
.btn-ghost { background: transparent; border-color: var(--line-2); }
.btn-lg { padding: 13px 22px; font-size: 15px; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; font-size: 11px; letter-spacing: 0.9px; text-transform: uppercase;
  color: var(--faint); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.table .amt { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }

/* ---------- chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.4px;
  padding: 3px 8px; border-radius: 7px;
  background: rgba(255, 255, 255, 0.07); color: var(--muted);
}
.chip.jade { background: rgba(47, 214, 165, 0.14); color: var(--jade); }
.chip.brass { background: rgba(232, 194, 106, 0.14); color: var(--brass); }
.chip.red { background: rgba(255, 107, 107, 0.14); color: var(--red); }
.chip.blue { background: rgba(106, 168, 255, 0.14); color: var(--blue); }
.chip.amber { background: rgba(255, 182, 72, 0.14); color: var(--amber); }

/* ---------- cards (debit/credit plastic) ---------- */
.plastic {
  position: relative; border-radius: 16px; padding: 18px; min-height: 190px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45); overflow: hidden;
  background: linear-gradient(135deg, #1c3f6e, #0d1e3a);
}
.plastic.credit { background: linear-gradient(135deg, #452a63, #1b1436); }
.plastic.gold { background: linear-gradient(135deg, #7a6224, #3a2c0c); }
.plastic.platinum { background: linear-gradient(135deg, #4a5a72, #1d2532); }
.plastic::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.045) 0 2px, transparent 2px 9px);
}
.plastic > * { position: relative; }
.plastic-top { display: flex; justify-content: space-between; align-items: flex-start; }
.plastic-chip { width: 38px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, #e8c26a, #a8853a); }
.plastic-num { font-size: 16.5px; letter-spacing: 2.4px; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.92); }
.plastic-bot { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.plastic-label { font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); font-weight: 700; }
.plastic-val { font-size: 13px; color: rgba(255, 255, 255, 0.9); font-weight: 600; }

/* ---------- progress + score ---------- */
.bar { height: 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--jade), var(--jade-dk)); }
.bar.warn > span { background: linear-gradient(90deg, var(--amber), #d18616); }
.bar.over > span { background: linear-gradient(90deg, var(--red), #c93b3b); }
.score-ring {
  width: 116px; height: 116px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--jade) var(--pct, 0%), rgba(255, 255, 255, 0.08) 0);
  position: relative;
}
.score-ring::after {
  content: ''; position: absolute; inset: 9px; border-radius: 50%; background: var(--panel-solid);
}
.score-ring > div { position: relative; z-index: 1; text-align: center; }
.score-ring b { font-family: var(--font-display); font-size: 29px; display: block; line-height: 1; }

/* ---------- toast ---------- */
#toast { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--panel-solid); border: 1px solid var(--line-2); border-left: 3px solid var(--jade);
  border-radius: 10px; padding: 11px 15px; font-size: 13.5px; max-width: 340px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); animation: slide-in .22s ease;
}
.toast.err { border-left-color: var(--red); }
@keyframes slide-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

/* ---------- auth ---------- */
.auth-wrap { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; padding: 30px 18px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 18px; background: rgba(255, 255, 255, 0.05); padding: 4px; border-radius: 11px; }
.auth-tabs button {
  flex: 1; border: none; background: transparent; color: var(--muted);
  font-family: var(--font); font-size: 13.5px; font-weight: 700; padding: 9px; border-radius: 8px; cursor: pointer;
}
.auth-tabs button.on { background: rgba(47, 214, 165, 0.14); color: var(--jade); }
.demo-note {
  margin-top: 14px; padding: 11px 13px; border-radius: 10px; font-size: 12px;
  background: rgba(232, 194, 106, 0.08); border: 1px solid rgba(232, 194, 106, 0.22); color: var(--brass);
}
.demo-note b { color: var(--text); }

/* ---------- misc ---------- */
.empty { text-align: center; padding: 30px 16px; color: var(--faint); font-size: 13.5px; }
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: sk 1.1s infinite; border-radius: 8px; height: 15px; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-size: 13.5px; }
.kv:last-child { border-bottom: none; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button {
  background: none; border: none; border-bottom: 2px solid transparent; color: var(--muted);
  font-family: var(--font); font-size: 13.5px; font-weight: 700; padding: 9px 13px; cursor: pointer; white-space: nowrap;
}
.tabs button.on { color: var(--jade); border-bottom-color: var(--jade); }
footer { border-top: 1px solid var(--line); padding: 26px 0 34px; margin-top: 30px; color: var(--faint); font-size: 12.5px; }
footer a { color: var(--muted); }
.sim-note { display: block; margin-top: 6px; color: var(--faint); max-width: 520px; }
