@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0d0f16;
  --surface: #171a24;
  --surface-2: #1f2330;
  --indigo-500: #756ff5;
  --indigo-glow: #4338ca;
  --lime: #c6f24a;
  --lime-dim: #2a3418;
  --ink: #eef0f6;
  --ink-soft: #9297ab;
  --ink-faint: #6b7086;
  --rule: #2a2e3d;
  --danger: #ff6b5e;
  --danger-dim: #3a2020;
  --success: #4ade80;
  --teal: #4fd1c5;
  --teal-dim: #142c2a;
  --gold: #f2c14e;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes floaty-slow {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(1deg); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-card, .hero-chip, .hero-orb { animation: none !important; }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

h1, h2, h3, .display {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
}

a { color: var(--lime); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand .mark {
  width: 34px;
  height: 34px;
  background: var(--lime);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bg);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 16px;
}

.brand .name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
}

.brand .tagline {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.topbar nav a {
  margin-left: 26px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
}
.topbar nav a:hover { color: var(--ink); }

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--surface-2); color: var(--ink); border-color: var(--rule); }
.btn-primary:hover { background: var(--rule); }

.btn-accent { background: var(--lime); color: #0d0f16; }
.btn-accent:hover { background: #d4fa63; }

.btn-outline { background: transparent; border-color: var(--rule); color: var(--ink); }
.btn-outline:hover { border-color: var(--lime); color: var(--lime); }

.btn-danger { background: var(--danger); color: #1a0f0d; }
.btn-block { display: block; width: 100%; }

.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
  font-weight: 600;
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 6px;
  font-weight: 500;
}

.field input, .field select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  background: var(--surface-2);
  color: var(--ink);
}

.field input::placeholder { color: var(--ink-faint); }

.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--lime);
}

.auth-shell {
  max-width: 420px;
  margin: 60px auto;
  padding: 0 20px;
}

.error-banner {
  background: var(--danger-dim);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 18px;
  display: none;
}

.balance-card {
  background: linear-gradient(135deg, #191c4d 0%, #100f2b 100%);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 30px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.balance-card::after {
  content: '';
  position: absolute;
  width: 260px;
  height: 260px;
  right: -90px;
  top: -110px;
  background: radial-gradient(circle, var(--lime) 0%, transparent 70%);
  opacity: 0.25;
}
.balance-card .eyebrow { color: var(--lime); }
.balance-figure {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 42px;
  font-weight: 600;
  position: relative;
  z-index: 1;
  color: #fff;
}
.account-chip {
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.06em;
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  position: relative;
  z-index: 1;
}

.status-pill {
  display: inline-block;
  font-size: 11px;
  padding: 4px 11px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.status-pill.active { background: var(--lime-dim); color: var(--lime); }
.status-pill.frozen { background: var(--danger-dim); color: var(--danger); }

.ledger { margin-top: 6px; }
.ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.ledger-row:last-child { border-bottom: none; }
.ledger-row .desc { font-size: 14px; font-weight: 500; color: var(--ink); }
.ledger-row .date { font-size: 12px; color: var(--ink-faint); }
.ledger-row .amt { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 500; }
.amt.credit { color: var(--success); }
.amt.debit { color: var(--danger); }

.grid-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }

table.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.admin-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  padding: 10px 8px;
  border-bottom: 1px solid var(--rule);
}
table.admin-table td { padding: 12px 8px; border-bottom: 1px solid var(--rule); color: var(--ink); }

.container { max-width: 1040px; margin: 0 auto; padding: 40px 20px; }

.hero-badge {
  display: inline-block;
  background: var(--lime-dim);
  color: var(--lime);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
  .topbar { padding: 16px 20px; }
}

/* ---------- Landing hero visual ---------- */
.hero-wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 50px;
  align-items: center;
}
.hero-copy h1 { font-size: 46px; line-height: 1.08; }
.hero-copy .lede { color: var(--ink-soft); font-size: 17px; margin-top: 18px; max-width: 480px; }
.trust-row { display: flex; gap: 22px; margin-top: 30px; flex-wrap: wrap; }
.trust-row .item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); }
.trust-row svg { flex-shrink: 0; }

.hero-stage {
  position: relative;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-orb {
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(198,242,74,0.16) 0%, transparent 70%);
  animation: floaty-slow 9s ease-in-out infinite;
}
.hero-card {
  position: relative;
  width: 300px;
  padding: 26px;
  border-radius: 20px;
  background: linear-gradient(150deg, #1c2140 0%, #0e1024 100%);
  border: 1px solid var(--rule);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
  animation: floaty 7s ease-in-out infinite;
  z-index: 2;
}
.hero-card .row1 { display: flex; justify-content: space-between; align-items: center; }
.hero-card .chipline { width: 38px; height: 26px; border-radius: 6px; background: linear-gradient(135deg, var(--lime), var(--teal)); }
.hero-card .cardnum { font-family: 'JetBrains Mono', monospace; letter-spacing: 0.14em; color: rgba(255,255,255,0.6); font-size: 14px; margin-top: 34px; }
.hero-card .cardname { margin-top: 18px; font-size: 13px; color: rgba(255,255,255,0.85); font-family: 'Space Grotesk', sans-serif; }
.hero-card .cardbrand { position:absolute; bottom: 22px; right: 26px; font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: var(--lime); font-size: 13px; letter-spacing: 0.04em; }

.hero-chip {
  position: absolute;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--rule);
  box-shadow: 0 18px 30px -14px rgba(0,0,0,0.55);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 9px;
  z-index: 3;
}
.hero-chip.a { top: 6%; left: -4%; animation: floaty 6s ease-in-out infinite; }
.hero-chip.b { bottom: 10%; right: -6%; animation: floaty 8s ease-in-out infinite 0.6s; }
.hero-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex-shrink:0; }
.hero-chip strong { font-family: 'JetBrains Mono', monospace; color: var(--ink); }

/* ---------- Feature / stat sections ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card { padding: 26px; }
.feature-card .icon-badge {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--lime-dim); color: var(--lime); margin-bottom: 16px;
}
.feature-card:nth-child(2) .icon-badge { background: var(--teal-dim); color: var(--teal); }
.feature-card:nth-child(3) .icon-badge { background: rgba(242,193,78,0.12); color: var(--gold); }

.stat-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat-band .stat { background: var(--surface); padding: 26px 22px; }
.stat-band .stat .num { font-family: 'Space Grotesk', sans-serif; font-size: 28px; font-weight: 700; color: var(--lime); }
.stat-band .stat .label { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; }

/* ---------- Dashboard: quick actions + snapshot ---------- */
.greeting-row { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }
.greeting-row .sub { color: var(--ink-soft); font-size: 14px; margin-top: 4px; }

.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.quick-action {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.12s ease;
  color: var(--ink);
  text-decoration: none;
  display: block;
}
.quick-action:hover { border-color: var(--lime); transform: translateY(-2px); }
.quick-action .qa-icon {
  width: 38px; height: 38px; margin: 0 auto 10px;
  border-radius: 10px; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; color: var(--lime);
}
.quick-action .qa-label { font-size: 12.5px; font-weight: 600; }

.snapshot-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.snapshot-box { padding: 18px 20px; }
.snapshot-box .eyebrow { margin-bottom: 6px; }
.snapshot-box .val { font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 600; }
.snapshot-box .val.in { color: var(--success); }
.snapshot-box .val.out { color: var(--danger); }

.spend-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; display: flex; margin-top: 10px; }
.spend-bar span { height: 100%; }

@media (max-width: 900px) {
  .hero-wrap { grid-template-columns: 1fr; }
  .hero-stage { height: 320px; margin-top: 10px; }
  .feature-grid { grid-template-columns: 1fr; }
  .stat-band { grid-template-columns: repeat(2, 1fr); }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .snapshot-row { grid-template-columns: 1fr; }
}

/* ---------- Move money: tabs, methods, forms ---------- */
.tab-row { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tab-btn {
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--rule);
  background: transparent; color: var(--ink-soft); font-size: 13px;
  cursor: pointer; font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  transition: all 0.15s ease;
}
.tab-btn.active { background: var(--lime); color: #0d0f16; border-color: var(--lime); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.method-row { display: flex; gap: 8px; margin-bottom: 18px; }
.method-btn {
  flex: 1; padding: 12px 8px; border-radius: 10px; border: 1px solid var(--rule);
  background: var(--surface-2); color: var(--ink-soft); font-size: 12px;
  cursor: pointer; text-align: center; font-family: 'Inter', sans-serif;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: all 0.15s ease;
}
.method-btn.active { border-color: var(--teal); color: var(--teal); background: var(--teal-dim); }
.method-panel { display: none; }
.method-panel.active { display: block; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-grid .field.full { grid-column: 1 / -1; }

.dropzone {
  border: 1.5px dashed var(--rule); border-radius: 12px; padding: 20px;
  text-align: center; color: var(--ink-soft); font-size: 12.5px;
  margin-bottom: 16px; cursor: pointer; transition: all 0.15s ease;
}
.dropzone:hover { border-color: var(--lime); color: var(--ink); }
.dropzone svg { display: block; margin: 0 auto 8px; }

.contact-notice {
  display: none; padding: 16px 18px; border-radius: 12px;
  background: rgba(242, 193, 78, 0.1); border: 1px solid rgba(242, 193, 78, 0.35);
  color: var(--gold); font-size: 13.5px; line-height: 1.55; margin-top: 16px;
}
.contact-notice.show { display: block; }
.contact-notice strong { color: var(--ink); }

.tx-edit-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.tx-edit-row:last-child { border-bottom: none; }
.tx-edit-row .tx-meta { flex: 1; min-width: 160px; }
.tx-edit-row .tx-meta .type { font-size: 13px; font-weight: 600; }
.tx-edit-row .tx-meta .amt { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: var(--ink-soft); }
.tx-edit-row input[type="datetime-local"] {
  background: var(--surface-2); border: 1px solid var(--rule); border-radius: 8px;
  color: var(--ink); padding: 7px 10px; font-size: 12.5px; font-family: 'JetBrains Mono', monospace;
}
