:root {
  --bg: #0b1220;
  --surface: #131c2e;
  --surface-2: #1b2740;
  --primary: #2f6df6;
  --primary-600: #2257d6;
  --accent: #19c39c;
  --text: #e8eefc;
  --muted: #9fb0cc;
  --border: #263451;
  --danger: #ff6b6b;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 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: radial-gradient(1200px 600px at 70% -10%, #1a2747 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Demo banner */
.demo-banner {
  background: repeating-linear-gradient(45deg, #3a2a00, #3a2a00 12px, #4a3600 12px, #4a3600 24px);
  color: #ffd66b;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 8px 12px;
  border-bottom: 1px solid #5a4400;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  color: var(--accent);
  font-size: 1.4rem;
  filter: drop-shadow(0 0 8px rgba(25, 195, 156, 0.5));
}
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: 0.01em; }
.brand-tag { color: var(--muted); font-size: 0.85rem; }

/* Layout */
.app-main {
  flex: 1;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 20px;
}

.view { animation: fade 0.25s ease; }
.hidden { display: none !important; }
@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
#login-view.card, #signup-view.card {
  max-width: 420px;
  margin: 24px auto;
}

h1 { font-size: 1.5rem; margin: 0 0 6px; }
h2 { font-size: 1.05rem; margin: 0 0 16px; }
.subtitle { color: var(--muted); margin: 0 0 22px; font-size: 0.95rem; }

/* Forms */
.field { display: block; margin-bottom: 16px; }
.field span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 109, 246, 0.25);
}

.btn {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.05s, background 0.15s, opacity 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-600); }
.btn-primary:disabled { opacity: 0.6; cursor: progress; }
.btn-ghost {
  width: auto;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
}
.btn-ghost:hover { background: var(--surface-2); }

.form-msg { min-height: 1.2em; font-size: 0.85rem; margin: 4px 0 14px; }
.form-msg.error { color: var(--danger); }
.form-msg.success { color: var(--accent); }

.switch { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 18px; }
.switch a { color: var(--primary); text-decoration: none; font-weight: 600; }
.switch a:hover { text-decoration: underline; }

/* Dashboard */
.dash-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.account-card {
  background: linear-gradient(135deg, var(--primary) 0%, #6a3df6 100%);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}
.account-label { font-size: 0.85rem; opacity: 0.85; }
.account-balance { font-size: 2.2rem; font-weight: 700; letter-spacing: 0.01em; }
.account-number { font-family: ui-monospace, "SF Mono", Menlo, monospace; opacity: 0.9; margin-top: 8px; }

.dash-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}
@media (max-width: 720px) {
  .dash-grid { grid-template-columns: 1fr; }
}

.txn-list { list-style: none; margin: 0; padding: 0; }
.txn-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.txn-list li:last-child { border-bottom: none; }
.txn-meta { display: flex; flex-direction: column; }
.txn-payee { font-weight: 600; }
.txn-date { font-size: 0.8rem; color: var(--muted); }
.txn-amount.in { color: var(--accent); }
.txn-amount.out { color: var(--text); }

/* Footer */
.app-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 20px;
  border-top: 1px solid var(--border);
}
