/* ==========================================================================
   Green Animals Bank design system — modern fintech, hand-built.
   One accent (deep green), generous whitespace, restrained shadows,
   tabular figures for money. System font stack on purpose (feels like a real
   product, not a template).
   ========================================================================== */

:root {
  --accent:        #0e7a5f;   /* primary deep green */
  --accent-700:    #0b5e49;
  --accent-600:    #0d6e54;
  --accent-tint:   #e8f4ef;
  --accent-ring:   rgba(14, 122, 95, 0.28);

  --ink:           #121821;   /* near-black text */
  --ink-2:         #36424f;
  --muted:         #6a7886;
  --line:          #e6e9ee;
  --line-2:        #eef1f4;
  --surface:       #ffffff;
  --canvas:        #f4f6f8;
  --canvas-2:      #eef1f5;

  --pos:           #0e7a5f;   /* credit */
  --neg:           #c2433a;   /* debit */
  --warn:          #b7791f;
  --info:          #2c6fb3;

  --radius:        12px;
  --radius-sm:     8px;
  --shadow-sm:     0 1px 2px rgba(18,24,33,.06), 0 1px 3px rgba(18,24,33,.04);
  --shadow-md:     0 4px 16px rgba(18,24,33,.08);

  --maxw:          1180px;
  --sidebar-w:     244px;

  --f-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --ink: #e7ecf2; --ink-2: #c2cdd9; --muted: #8a98a6;
  --line: #2a323c; --line-2: #232a33;
  --surface: #161b22; --canvas: #0e1217; --canvas-2: #11161d;
  --accent-tint: #11241e;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--f-sans);
  color: var(--ink);
  background: var(--canvas);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.01em; font-weight: 650; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1rem; }
small, .small { font-size: .82rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--f-mono); }
.num  { font-variant-numeric: tabular-nums; }

/* ---- layout helpers ---- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.page { padding: 32px 0 64px; }
.page--narrow { max-width: 880px; margin: 0 auto; padding: 40px 22px 64px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px){ .grid-3,.grid-2 { grid-template-columns: 1fr; } }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.right { text-align: right; }

/* ---- public top bar ---- */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  height: 64px; display: flex; align-items: center;
}
.topbar .container { display: flex; align-items: center; gap: 24px; width: 100%; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.15rem; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: .82rem; font-weight: 800; letter-spacing: -.04em;
}
.nav-links { display: flex; gap: 22px; margin-left: 8px; }
.nav-links a { color: var(--ink-2); font-weight: 550; font-size: .92rem; }
.nav-links a:hover { color: var(--accent-700); text-decoration: none; }
.topbar .spacer { flex: 1; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .92rem;
  padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-700); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--canvas-2); }
.btn-light { background: var(--accent-tint); color: var(--accent-700); }
.btn-danger { background: var(--neg); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 11px; font-size: .85rem; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }

/* ---- cards / panels ---- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-pad { padding: 22px; }
.card-hd { padding: 16px 22px; border-bottom: 1px solid var(--line-2); display:flex; align-items:center; justify-content:space-between; }
.card-hd h3 { margin: 0; }
.card-bd { padding: 22px; }

/* ---- stat tiles (dashboard) ---- */
.stat { padding: 20px 22px; }
.stat .label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.stat .value { font-size: 1.75rem; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat .sub { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.stat--accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.stat--accent .label, .stat--accent .sub { color: rgba(255,255,255,.82); }

/* ---- tables ---- */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--canvas); }
.amount { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.amount.pos { color: var(--pos); }
.amount.neg { color: var(--neg); }

/* ---- forms ---- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 6px; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.textarea { min-height: 110px; resize: vertical; }
.hint { color: var(--muted); font-size: .82rem; margin-top: 6px; }

/* ---- badges / pills ---- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--canvas-2); color: var(--ink-2); }
.badge.pos { background: var(--accent-tint); color: var(--accent-700); }
.badge.neg { background: #fbeae8; color: var(--neg); }
.badge.warn { background: #fdf3e2; color: var(--warn); }

/* ---- flash / alerts ---- */
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: .92rem; border: 1px solid transparent; }
.flash.error { background: #fbeae8; border-color: #f3cfca; color: #8f2b23; }
.flash.notice { background: var(--accent-tint); border-color: #c5e4d8; color: var(--accent-700); }
.flash.warn { background: #fdf3e2; border-color: #f0dcb4; color: var(--warn); }

/* ---- app shell (authenticated) ---- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--surface); border-right: 1px solid var(--line);
  padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { padding: 4px 8px 18px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--ink-2); font-weight: 550; font-size: .92rem;
}
.side-nav a:hover { background: var(--canvas); text-decoration: none; }
.side-nav a.active { background: var(--accent-tint); color: var(--accent-700); font-weight: 650; }
.side-nav .ico { width: 18px; height: 18px; flex: 0 0 18px; opacity: .85; }
.side-sep { margin: 14px 12px 8px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-main .topbar { padding: 0 26px; }
.app-main .page { padding: 28px 26px 64px; }
.acct-chip { display: inline-flex; align-items: center; gap: 9px; padding: 5px 6px 5px 12px; border: 1px solid var(--line); border-radius: 999px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .82rem; }

@media (max-width: 820px){
  .sidebar { position: fixed; transform: translateX(-100%); z-index: 40; transition: transform .2s; }
  .sidebar.open { transform: none; }
  .app-main .page { padding: 20px 16px 56px; }
}

/* ---- hero (landing) ---- */
.hero { padding: 72px 0 56px; }
.hero h1 { font-size: 2.6rem; max-width: 14ch; }
.hero p { font-size: 1.12rem; color: var(--ink-2); max-width: 52ch; }
.hero .cta { display: flex; gap: 12px; margin-top: 26px; }
.feature-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--accent-tint); color: var(--accent-700); display: grid; place-items: center; margin-bottom: 12px; }

/* ---- site footer ---- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); padding: 28px 0; margin-top: 48px; font-size: .88rem; }
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---- misc ---- */
.kvs { display: grid; grid-template-columns: max-content 1fr; gap: 10px 22px; }
.kvs dt { color: var(--muted); font-size: .86rem; }
.kvs dd { margin: 0; font-weight: 550; }
.list-reset { list-style: none; margin: 0; padding: 0; }
.divider { height: 1px; background: var(--line-2); margin: 18px 0; border: 0; }
.tag-cloud { display: inline-block; padding: 5px 11px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-700); font-size: .82rem; margin: 0 6px 6px 0; }
pre.trace { background: #0e1217; color: #e7ecf2; padding: 16px; border-radius: var(--radius-sm); overflow:auto; font: 12.5px/1.5 var(--f-mono); }
.lab-note { border-left: 3px solid var(--warn); background: #fdf8ee; padding: 10px 14px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .85rem; color: #6b5320; margin-top: 14px; }

/* ==========================================================================
   Marketing / image-rich components (landing + content pages)
   ========================================================================== */
img { max-width: 100%; height: auto; display: block; }

/* hero split: copy on the left, illustration on the right */
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero-grid .hero { padding: 40px 0; }
.hero-media { display: flex; justify-content: center; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-700); background: var(--accent-tint); padding: 5px 11px; border-radius: 999px; margin-bottom: 16px; }
@media (max-width: 880px){ .hero-grid { grid-template-columns: 1fr; } .hero-media { order: -1; } .hero h1 { font-size: 2.05rem; } }

/* page sections */
.section { padding: 56px 0; }
.section--tint { background: var(--accent-tint); }
.section--surface { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin: 0 auto 36px; text-align: center; }
.section-head p { color: var(--ink-2); font-size: 1.05rem; }

/* feature tiles with an icon/illustration */
.feature { padding: 24px; }
.feature h3 { margin: 4px 0 6px; }
.feature p { color: var(--ink-2); margin: 0; font-size: .95rem; }

/* split content + image (e.g. security / savings) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.split--reverse .split-media { order: 2; }
@media (max-width: 880px){ .split { grid-template-columns: 1fr; gap: 28px; } .split--reverse .split-media { order: 0; } }
.checklist { list-style: none; margin: 18px 0 0; padding: 0; }
.checklist li { position: relative; padding: 7px 0 7px 30px; color: var(--ink-2); }
.checklist li::before { content: ""; position: absolute; left: 0; top: 10px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-tint); }
.checklist li::after { content: ""; position: absolute; left: 6px; top: 13px; width: 6px; height: 9px; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* stats band */
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stats-band .n { font-size: 2rem; font-weight: 750; letter-spacing: -.02em; color: var(--ink); }
.stats-band .k { color: var(--muted); font-size: .9rem; margin-top: 2px; }
@media (max-width: 700px){ .stats-band { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; } }

/* CTA strip */
.cta-band { background: var(--accent); color: #fff; border-radius: var(--radius); padding: 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0; }
.cta-band .btn-light { background: #fff; color: var(--accent-700); }

/* auth split (login / apply): form + brand panel */
.auth-split { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 64px); }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-form { width: 100%; max-width: 400px; }
.auth-aside { background: var(--accent); color: #fff; padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; gap: 18px; position: relative; overflow: hidden; }
.auth-aside h2 { color: #fff; font-size: 1.7rem; }
.auth-aside p { color: rgba(255,255,255,.85); }
.auth-aside .checklist li { color: rgba(255,255,255,.92); }
.auth-aside .checklist li::before { background: rgba(255,255,255,.18); }
.auth-aside .checklist li::after { border-color: #fff; }
@media (max-width: 820px){ .auth-split { grid-template-columns: 1fr; min-height: 0; } .auth-aside { display: none; } }

/* payment-card artwork wrapper */
.card-art { max-width: 360px; }

/* footer columns */
.footer-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 24px; }
.footer-brand p { margin-top: 12px; max-width: 30ch; }
.footer-col h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); margin: 0 0 12px; }
.footer-col a { display: block; color: var(--muted); padding: 4px 0; font-size: .9rem; }
.footer-col a:hover { color: var(--accent-700); text-decoration: none; }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--line-2); }
@media (max-width: 820px){ .footer-cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px){ .footer-cols { grid-template-columns: 1fr; } }

/* tasteful tinted dot background utility */
.dotted { background-image: url('/img/pattern.svg'); background-size: 64px 64px; }

/* ==========================================================================
   Bank card component (CSS-drawn; used to render real card details)
   ========================================================================== */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }
.bank-card {
  position: relative; width: 100%; max-width: 400px; aspect-ratio: 1.586 / 1;
  border-radius: 18px; padding: 24px 26px; color: #fff; overflow: hidden;
  display: flex; flex-direction: column;
  background: linear-gradient(135deg, #14a37f 0%, #0b5e49 100%);
  box-shadow: 0 14px 30px rgba(11,59,46,.28);
  font-family: var(--f-sans);
}
.bank-card.alt { background: linear-gradient(135deg, #2d3a4b 0%, #121821 100%); }
.bank-card::before { content: ""; position: absolute; width: 210px; height: 210px; border-radius: 50%; background: rgba(255,255,255,.07); top: -64px; right: -48px; }
.bank-card::after  { content: ""; position: absolute; width: 170px; height: 170px; border-radius: 50%; background: rgba(255,255,255,.05); bottom: -76px; left: -34px; }
.bank-card > * { position: relative; z-index: 1; }
.bank-card .bc-top { display: flex; align-items: center; justify-content: space-between; }
.bank-card .bc-brand { font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.bank-card .bc-net { display: flex; align-items: center; }
.bank-card .bc-net i { width: 26px; height: 26px; border-radius: 50%; display: block; }
.bank-card .bc-net .o { background: #e6b34d; }
.bank-card .bc-net .w { background: rgba(255,255,255,.55); margin-left: -11px; }
.bank-card .bc-chip { width: 46px; height: 34px; border-radius: 7px; margin: 22px 0 16px; background: linear-gradient(135deg, #f0c267, #cf972f); position: relative; }
.bank-card .bc-chip::before { content: ""; position: absolute; inset: 4px; border-radius: 4px; background:
  repeating-linear-gradient(90deg, transparent 0 12px, rgba(155,108,42,.55) 12px 13px); }
.bank-card .bc-number { font-family: var(--f-mono); font-size: 1.28rem; letter-spacing: 2px; margin: auto 0 0; }
.bank-card .bc-meta { display: flex; gap: 30px; margin-top: 14px; }
.bank-card .bc-label { font-size: .6rem; text-transform: uppercase; letter-spacing: .09em; color: rgba(255,255,255,.72); margin-bottom: 2px; }
.bank-card .bc-val { font-size: .98rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Native form controls — adopt the design-system look automatically so EVERY
   form is consistent even when the explicit .input/.select/.textarea class was
   omitted. (.input etc. still win where present — same look, no conflict.)
   ========================================================================== */
.field input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button]):not([type=range]),
.field select,
.field textarea,
form input[type=text], form input[type=email], form input[type=tel], form input[type=password],
form input[type=number], form input[type=search], form input[type=url], form input[type=date],
form input:not([type]), form select, form textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px;
  transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none;
}
.field input:focus, .field select:focus, .field textarea:focus,
form input:focus, form select:focus, form textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring);
}
.field textarea, form textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.field input::placeholder, form input::placeholder, form textarea::placeholder { color: #9aa6b2; }

/* select chevron */
.field select, form select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236a7886' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px;
}

/* file inputs — styled, branded button */
.field input[type=file], form input[type=file] { width: 100%; font: inherit; color: var(--ink-2); border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 9px 12px; background: var(--canvas); cursor: pointer; }
input[type=file]::file-selector-button {
  font: inherit; font-weight: 600; font-size: .85rem; margin-right: 12px; padding: 7px 13px; cursor: pointer;
  color: var(--accent-700); background: var(--accent-tint); border: 0; border-radius: 7px;
}
input[type=file]::file-selector-button:hover { background: #d7ebe3; }

/* checkboxes / radios pick up the brand accent */
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: auto; height: 16px; }
/* a tidy inline checkbox row */
.check-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; }
.check-row input { margin-top: 3px; }
.check-row label { margin: 0; font-weight: 550; }

/* ==========================================================================
   Homepage live market ticker (dark bar under the public nav)
   ========================================================================== */
.ticker-band { background: #0f141b; border-bottom: 1px solid rgba(255,255,255,.08); }
[data-theme="dark"] .ticker-band { background: #0a0d12; }
.ticker-band .container { display: flex; align-items: center; gap: 18px; height: 44px; }
.ticker-label { flex: 0 0 auto; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.ticker { display: flex; align-items: center; gap: 24px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; -ms-overflow-style: none; }
.ticker::-webkit-scrollbar { display: none; }
.ticker-item { flex: 0 0 auto; display: inline-flex; align-items: baseline; gap: 8px; font-size: .84rem; }
.ticker-item .t-name { color: rgba(255,255,255,.62); font-weight: 600; }
.ticker-item .t-price { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.ticker-item .t-chg { font-size: .78rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.ticker-item .t-chg.pos { color: #2ed3a0; }
.ticker-item .t-chg.neg { color: #ff7d70; }
@media (max-width: 640px){ .ticker-label { display: none; } }
