@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --ink: #0b1f1a;
  --ink-2: #16352c;
  --parchment: #e8e2d6;
  --parchment-2: #f3eee4;
  --mint: #3ddc97;
  --mint-dim: #2bb87a;
  --clay: #c45c26;
  --line: rgba(11, 31, 26, 0.14);
  --muted: rgba(11, 31, 26, 0.62);
  --danger: #a33b2b;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(61, 220, 151, 0.18), transparent 55%),
    linear-gradient(160deg, var(--parchment-2), var(--parchment) 40%, #d9d2c3);
  min-height: 100vh;
}

a { color: var(--ink-2); }
a:hover { color: var(--mint-dim); }
button, input, select, textarea { font: inherit; }

.shell { max-width: 1100px; margin: 0 auto; padding: 1.25rem 1.5rem 3rem; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.75rem 0 1.25rem; border-bottom: 1px solid var(--line);
  margin-bottom: 1.75rem;
}
.brand { display: flex; align-items: baseline; gap: 0.65rem; text-decoration: none; color: inherit; }
.brand-mark {
  width: 1.65rem; height: 1.65rem; border: 2px solid var(--ink);
  border-radius: 0.2rem; background:
    linear-gradient(135deg, var(--mint) 50%, transparent 50%),
    linear-gradient(315deg, var(--clay) 50%, transparent 50%);
}
.brand-name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.brand-tag { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.nav { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; }
.nav a { text-decoration: none; font-size: 0.92rem; font-weight: 500; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.nav a.btn,
.nav a.btn:hover {
  color: var(--parchment-2);
  background: var(--ink);
  border-color: var(--ink);
}

.hero {
  display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 2rem; align-items: end;
  padding: 1rem 0 2rem;
}
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } }

.hero h1 {
  font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.05; margin: 0 0 0.85rem; letter-spacing: -0.03em;
}
.hero p { margin: 0; color: var(--muted); max-width: 36rem; font-size: 1.05rem; line-height: 1.55; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.4rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--ink); background: var(--ink); color: var(--parchment-2);
  padding: 0.7rem 1.15rem; text-decoration: none; font-weight: 600; font-size: 0.92rem;
  border-radius: 0.15rem; cursor: pointer; transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--ink-2); color: var(--parchment-2); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: rgba(11, 31, 26, 0.06); color: var(--ink); }
.btn.sm { padding: 0.45rem 0.85rem; font-size: 0.85rem; }
.btn.block { width: 100%; }

.panel {
  border: 1px solid var(--line); background: rgba(243, 238, 228, 0.72);
  padding: 1.1rem 1.2rem; border-radius: 0.2rem;
}
.panel h2, .panel h3 {
  font-family: var(--font-display); margin: 0 0 0.75rem; letter-spacing: -0.02em;
}

/* Auth pages — same palette, denser layout */
.auth-page { min-height: calc(100vh - 8rem); display: flex; flex-direction: column; }
.auth-split {
  flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  max-width: 1100px; width: 100%; margin: 1.25rem auto 0; padding: 0 1.5rem;
  min-height: 560px;
}
@media (max-width: 860px) {
  .auth-split { grid-template-columns: 1fr; min-height: 0; }
  .auth-aside { display: none; }
}
.auth-aside {
  background: var(--ink); color: var(--parchment-2);
  border: 1px solid var(--ink); border-right: 0; border-radius: 0.2rem 0 0 0.2rem;
  padding: 2.25rem 2rem; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-aside::before {
  content: ""; position: absolute; width: 280px; height: 280px; border-radius: 50%;
  right: -80px; top: -60px;
  background: radial-gradient(circle, rgba(61, 220, 151, 0.28), transparent 70%);
  pointer-events: none;
}
.auth-aside::after {
  content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%;
  left: -60px; bottom: -40px;
  background: radial-gradient(circle, rgba(196, 92, 38, 0.22), transparent 70%);
  pointer-events: none;
}
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside h2 {
  font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.35rem);
  line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 0.85rem;
  color: var(--parchment-2);
}
.auth-aside p { margin: 0; color: rgba(243, 238, 228, 0.72); line-height: 1.55; max-width: 22rem; }
.auth-points { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.auth-points li {
  display: grid; grid-template-columns: 1.1rem 1fr; gap: 0.65rem; align-items: start;
  font-size: 0.92rem; color: rgba(243, 238, 228, 0.85);
}
.auth-points li::before {
  content: ""; width: 0.55rem; height: 0.55rem; margin-top: 0.35rem;
  background: var(--mint); border-radius: 0.05rem;
}
.auth-card-mock {
  margin-top: 2rem; background: linear-gradient(145deg, #16352c, #0b1f1a 60%, #1a4a38);
  border: 1px solid rgba(61, 220, 151, 0.25); border-radius: 0.35rem; padding: 1.25rem 1.35rem;
  max-width: 280px;
}
.auth-card-mock .lbl { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.55; }
.auth-card-mock .bal { font-family: var(--font-mono); font-size: 1.55rem; margin: 0.85rem 0 1rem; }
.auth-card-mock .num { font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.12em; opacity: 0.65; }

.auth-main {
  background: rgba(255, 253, 248, 0.92); border: 1px solid var(--line);
  border-radius: 0 0.2rem 0.2rem 0; padding: 2.25rem 2rem;
  display: flex; flex-direction: column; justify-content: center;
}
@media (max-width: 860px) {
  .auth-main { border-radius: 0.2rem; }
}
.auth-main h1 {
  font-family: var(--font-display); font-size: 2rem; margin: 0 0 0.35rem; letter-spacing: -0.02em;
}
.auth-main .lead { margin: 0 0 1.35rem; color: var(--muted); font-size: 0.95rem; }
.auth-main form.stack { max-width: none; gap: 0.9rem; }
.auth-main input, .auth-main select, .auth-main textarea {
  padding: 0.75rem 0.85rem; border-width: 1.5px;
}
.auth-main input:focus, .auth-main select:focus, .auth-main textarea:focus {
  outline: none; border-color: var(--mint-dim);
  box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.22);
}
.auth-meta {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 1.15rem; font-size: 0.9rem;
}
.auth-trust {
  display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: 1.5rem; padding-top: 1.15rem;
  border-top: 1px solid var(--line); font-size: 0.78rem; color: var(--muted);
}
.auth-trust span { display: inline-flex; align-items: center; gap: 0.35rem; }
.auth-trust span::before {
  content: ""; width: 0.4rem; height: 0.4rem; background: var(--mint-dim); border-radius: 50%;
}

.debit-visual {
  background: linear-gradient(145deg, #16352c 0%, #0b1f1a 55%, #1faa74 160%);
  color: var(--parchment-2); border-radius: 0.35rem; padding: 1.5rem 1.4rem;
  min-height: 200px; display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid rgba(11, 31, 26, 0.3); box-shadow: 0 18px 40px rgba(11, 31, 26, 0.18);
  transform: rotate(-2deg);
}
.debit-visual .chip {
  width: 2rem; height: 1.45rem; border-radius: 0.2rem;
  background: linear-gradient(135deg, #d4a84b, #f0d78c 45%, #b8892f);
}
.debit-visual .bal { font-family: var(--font-mono); font-size: 1.75rem; letter-spacing: -0.02em; }
.debit-visual .row { display: flex; justify-content: space-between; font-size: 0.75rem; opacity: 0.7; }

.ledger { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.ledger th, .ledger td {
  text-align: left; padding: 0.55rem 0.35rem; border-bottom: 1px solid var(--line);
}
.ledger th {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
}
.mono { font-family: var(--font-mono); font-size: 0.88rem; }
.muted { color: var(--muted); }
.err { color: var(--danger); font-size: 0.9rem; }
.alert {
  display: flex; gap: 0.65rem; align-items: flex-start;
  margin: 0 0 1rem; padding: 0.75rem 0.9rem;
  border: 1px solid rgba(163, 59, 43, 0.35);
  background: rgba(163, 59, 43, 0.1);
  color: var(--danger); border-radius: 0.15rem; font-size: 0.92rem; font-weight: 500;
}
.alert.ok {
  border-color: rgba(43, 184, 122, 0.35);
  background: rgba(61, 220, 151, 0.14);
  color: var(--ink-2);
}
.alert-mark {
  flex: 0 0 auto; width: 1.1rem; height: 1.1rem; margin-top: 0.1rem;
  border-radius: 50%; background: var(--danger); color: #fff;
  font-size: 0.75rem; font-weight: 700; display: inline-flex;
  align-items: center; justify-content: center; line-height: 1;
}
.alert.ok .alert-mark { background: var(--mint-dim); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

form.stack { display: grid; gap: 0.75rem; max-width: 24rem; }
label { display: grid; gap: 0.3rem; font-size: 0.85rem; font-weight: 500; }
input, select, textarea {
  font: inherit; padding: 0.55rem 0.65rem; border: 1px solid var(--line);
  background: #fffdf8; border-radius: 0.15rem; color: var(--ink);
}

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  margin: 1.5rem 0; padding: 1.25rem 0; border-block: 1px solid var(--line);
}
@media (max-width: 720px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat strong {
  display: block; font-family: var(--font-display); font-size: 1.6rem; letter-spacing: -0.02em;
}
.stat span { color: var(--muted); font-size: 0.82rem; }

.footer {
  margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line);
  font-size: 0.8rem; color: var(--muted);
}
.footer a { color: var(--muted); margin-right: 0.85rem; text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* Dashboard layout — same palette */
.dash {
  display: grid; grid-template-columns: 220px 1fr; min-height: 100vh;
  background: transparent;
}
@media (max-width: 900px) { .dash { grid-template-columns: 1fr; } }
.sidebar {
  background: var(--ink); color: var(--parchment-2);
  padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 0.25rem;
}
.sidebar .brand { color: var(--parchment-2); margin-bottom: 1rem; }
.sidebar .brand-name { color: var(--parchment-2); font-size: 1.1rem; }
.sidebar .nav-label {
  margin: 0.9rem 0.55rem 0.3rem; font-size: 0.68rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: rgba(243, 238, 228, 0.45);
}
.sidebar a {
  display: block; padding: 0.55rem 0.65rem; border-radius: 0.15rem;
  color: rgba(243, 238, 228, 0.72); text-decoration: none; font-size: 0.9rem; font-weight: 500;
}
.sidebar a:hover, .sidebar a.active {
  background: rgba(61, 220, 151, 0.12); color: var(--parchment-2);
}
.dash-main { padding: 1.25rem 1.5rem 2.5rem; }
.acct-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
@media (max-width: 900px) { .acct-row { grid-template-columns: 1fr; } }
.acct {
  border: 1px solid var(--line); border-radius: 0.2rem; padding: 1.1rem;
  background: rgba(243, 238, 228, 0.72); min-height: 120px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.acct.accent {
  background: var(--ink); color: var(--parchment-2); border-color: var(--ink);
}
.acct .lbl {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
}
.acct.accent .lbl { color: rgba(243, 238, 228, 0.55); }
.acct .bal {
  font-family: var(--font-mono); font-size: 1.55rem; margin-top: 0.4rem;
}
.quick { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-bottom: 1.25rem; }
.pill {
  border: 1px solid var(--line); background: rgba(243, 238, 228, 0.72);
  border-radius: 0.15rem; padding: 0.45rem 0.75rem; cursor: pointer;
  font-size: 0.85rem; font-weight: 600; color: var(--ink);
}
.pill:hover { border-color: var(--mint-dim); }
.dash-section { display: none; }
.dash-section.active { display: block; }
.msg {
  display: none; margin: 0.75rem 0; padding: 0.55rem 0.75rem;
  border: 1px solid var(--line); background: rgba(61, 220, 151, 0.12); font-size: 0.9rem;
}
.msg.show { display: block; }
.msg.bad { background: rgba(163, 59, 43, 0.1); color: var(--danger); }
.acct-number-row {
  display: flex; align-items: center; gap: 0.5rem; margin-top: 0.35rem; flex-wrap: wrap;
}
.acct.accent .copy-btn {
  color: var(--parchment-2); border-color: rgba(243, 238, 228, 0.35); font-size: 0.75rem; padding: 0.2rem 0.5rem;
}
.xfer-hint {
  margin: -0.35rem 0 0.5rem; padding: 0.55rem 0.7rem; border: 1px solid var(--mint-dim);
  background: rgba(61, 220, 151, 0.1); font-size: 0.88rem;
}
.xfer-hint.bad { border-color: var(--danger); background: rgba(163, 59, 43, 0.08); color: var(--danger); }
.transfer-form { max-width: 28rem; }
.btn.block { width: 100%; }
