/* Magnet — minimal, accessible stylesheet (adapted from DebitSafe's design system) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg: #d1fae5;
  --color-surface: #ffffff;
  --color-primary: #1a56db;
  --color-primary-hover: #1344b6;
  --color-danger: #e02424;
  --color-success: #057a55;
  --color-border: #d1d5db;
  --color-text: #111827;
  --color-muted: #6b7280;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
}

/* ── Layout ── */
.container { max-width: 960px; margin: 0 auto; padding: 0 1rem; }
.page { display: none; min-height: 100vh; align-items: center; justify-content: center; }
.page.active { display: flex; }

/* ── Card / Panel ── */
.panel {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  width: 100%;
}
.panel--narrow { max-width: 420px; }
.panel--wide   { max-width: 860px; }

/* ── Typography ── */
h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: .25rem; }
h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 1rem; }
.subtitle { color: var(--color-muted); font-size: .875rem; margin-bottom: 1.5rem; }

/* ── Forms ── */
.form-group { margin-bottom: 1rem; }
label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: .375rem; }
input, select {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: .5rem .75rem;
  font-size: 1rem;
  outline: none;
  transition: border-color .15s;
}
input:focus, select:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(26,86,219,.15); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: .9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, opacity .15s;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--primary  { background: var(--color-primary); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--color-primary-hover); }
.btn--outline  { background: transparent; border: 1px solid var(--color-border); }
.btn--full     { width: 100%; justify-content: center; }
.btn--sm       { padding: .3rem .65rem; font-size: .8125rem; }

/* ── Alerts ── */
.alert {
  padding: .75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: .875rem;
}
.alert--error   { background: #fdf2f2; color: var(--color-danger); border: 1px solid #fbd5d5; }
.alert--success { background: #f3faf7; color: var(--color-success); border: 1px solid #bcf0da; }
.alert--info    { background: #ebf5ff; color: var(--color-primary); border: 1px solid #c3ddfd; }
.alert--hidden  { display: none; }

/* ── Logo ── */
.page-logo { text-align: center; margin-bottom: 1.25rem; }
.page-logo img { height: 56px; width: auto; }
.navbar__logo { height: 36px; width: auto; }

/* ── Navbar ── */
.navbar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: .75rem 0;
  box-shadow: var(--shadow);
}
.navbar__inner { display: flex; align-items: center; justify-content: space-between; }
.navbar__user  { display: flex; align-items: center; gap: .75rem; font-size: .875rem; color: var(--color-muted); }

/* ── Search bar ── */
.search-row { display: flex; gap: .5rem; margin-bottom: 1.5rem; }
.search-row input { flex: 1; }

/* ── Balance results ── */
.accounts-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.accounts-table th {
  text-align: left;
  padding: .5rem .75rem;
  border-bottom: 2px solid var(--color-border);
  font-weight: 600;
  color: var(--color-muted);
}
.accounts-table td { padding: .6rem .75rem; border-bottom: 1px solid var(--color-border); }
.accounts-table tr:last-child td { border-bottom: none; }
.accounts-table .amount { font-variant-numeric: tabular-nums; font-weight: 600; }

.result-meta {
  background: #ebf5ff;
  border: 1px solid #1e3a5f;
  border-radius: 6px;
  padding: .75rem 1rem;
  margin-bottom: 1.5rem;
  font-size: .9rem;
}

/* ── Spinner ── */
.spinner {
  display: inline-block;
  width: 1rem; height: 1rem;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 600px) {
  .panel { padding: 1.25rem; }
}
