/* Northstar Digital Banking Lab — FICTIONAL BANKING DEMONSTRATION
   Navy / white / gold theme with dark-mode support. Mobile-first. */

:root {
  --navy: #072540;
  --blue: #0f4c81;
  --gold: #c9a227;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --text: #15202b;
  --muted: #5b6b7b;
  --border: #e2e8f0;
  --ok: #1a7f52;
  --warn: #b4690e;
  --danger: #b42318;
  --shadow: 0 1px 3px rgba(7,37,64,.08), 0 8px 24px rgba(7,37,64,.06);
  --radius: 14px;
}
html[data-theme="dark"] {
  --navy: #0a2c4d;
  --blue: #3b82c4;
  --gold: #e0ba3d;
  --bg: #0b1622;
  --surface: #122133;
  --text: #e8eef5;
  --muted: #9fb0c3;
  --border: #243546;
  --shadow: 0 1px 3px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.demo-banner {
  background: repeating-linear-gradient(45deg, var(--gold), var(--gold) 14px, #d8b64a 14px, #d8b64a 28px);
  color: #2a2300;
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .04em;
  text-align: center;
  padding: 6px 10px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .7rem 1.1rem;
  background: var(--navy); color: #fff;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .55rem; color: #fff; font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--gold); font-size: 1.3rem; }
.brand-text small {
  color: var(--gold); font-size: .6rem; text-transform: uppercase;
  border: 1px solid var(--gold); border-radius: 6px; padding: 1px 5px; margin-left: 4px; vertical-align: middle;
}
.topnav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.topnav a { color: #dce6f1; font-size: .92rem; }
.topnav a:hover { color: #fff; }
.theme-toggle {
  background: transparent; border: 1px solid rgba(255,255,255,.4); color: #fff;
  border-radius: 8px; width: 34px; height: 30px; cursor: pointer; font-size: .95rem;
}
.btn-ghost { border: 1px solid rgba(255,255,255,.4); border-radius: 8px; padding: .25rem .7rem; }

.container { max-width: 1040px; margin: 1.4rem auto; padding: 0 1.1rem; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.2rem 1.3rem; margin-bottom: 1.1rem;
}
.card h2, .card h3 { margin-top: 0; }

.grid { display: grid; gap: 1.1rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.stat {
  background: linear-gradient(135deg, var(--blue), var(--navy));
  color: #fff; border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow);
}
.stat .label { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; opacity: .85; }
.stat .value { font-size: 1.7rem; font-weight: 700; margin-top: .25rem; }
.stat .value small { font-size: .9rem; font-weight: 500; opacity: .85; }
.stat.gold { background: linear-gradient(135deg, var(--gold), #a8851c); color: #221c00; }

h1 { font-size: 1.6rem; }
.muted { color: var(--muted); }
.pill { display: inline-block; font-size: .72rem; padding: 2px 9px; border-radius: 999px; font-weight: 600; }
.pill.active, .pill.posted { background: rgba(26,127,82,.14); color: var(--ok); }
.pill.inactive, .pill.reversed { background: rgba(180,35,24,.12); color: var(--danger); }

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--border); }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.amt-pos { color: var(--ok); font-weight: 600; }
.amt-neg { color: var(--danger); font-weight: 600; }
.table-wrap { overflow-x: auto; }

label { display: block; font-size: .85rem; font-weight: 600; margin: .7rem 0 .25rem; }
input, select, textarea {
  width: 100%; padding: .6rem .7rem; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface); color: var(--text); font-size: .95rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
.btn {
  display: inline-block; background: var(--blue); color: #fff; border: 0;
  padding: .65rem 1.3rem; border-radius: 10px; font-weight: 600; font-size: .95rem; cursor: pointer;
}
.btn:hover { background: var(--navy); text-decoration: none; }
.btn.gold { background: var(--gold); color: #221c00; }
.btn.danger { background: var(--danger); }
.btn-row { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }

.flash { padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: .92rem; }
.flash-success { background: rgba(26,127,82,.12); color: var(--ok); }
.flash-error { background: rgba(180,35,24,.12); color: var(--danger); }
.flash-info { background: rgba(15,76,129,.1); color: var(--blue); }

.auth-wrap { max-width: 410px; margin: 2.2rem auto; }
.footer { max-width: 1040px; margin: 2rem auto; padding: 1.2rem 1.1rem; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--border); }

/* Homepage */
.hero {
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: #fff; border-radius: 20px; padding: 2.6rem 1.8rem; box-shadow: var(--shadow);
}
.hero h1 { font-size: 2.1rem; margin: 0 0 .5rem; }
.hero p { font-size: 1.05rem; max-width: 46ch; opacity: .92; }
.hero .btn-row { margin-top: 1.4rem; }
.hero .tagline { color: var(--gold); font-weight: 600; letter-spacing: .03em; }
.feature { text-align: left; }
.feature .ico { font-size: 1.5rem; color: var(--gold); }
.section-title { margin: 2rem 0 1rem; }
