/* Pocket Ledger — the customer's billing pages.
 *
 * Bootstrap 5 does the grid and the form reset; this is the brand on top, and
 * the tokens are the same ones `portal.css` uses so the two never drift into
 * being different greens. The difference is the shape: the portal is a desk
 * with a sidebar, this is one column on a phone, because that is where
 * somebody pays.
 */

:root {
  --forest: #1f4d3d;
  --forest-light: #2e6b54;
  --cream: #faf8f3;
  --ink: #2b2b2b;
  --gold: #c9a227;

  --safe: #4c9a6a;
  --caution: #d9a441;
  --risk: #c4573e;

  --line: #e6e2d8;
  --muted: #6b7c74;
  --card: #ffffff;

  --radius: 16px;
  --shadow: 0 1px 2px rgba(31, 77, 61, .06), 0 8px 24px rgba(31, 77, 61, .05);
}

* { -webkit-tap-highlight-color: transparent; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  letter-spacing: -0.1px;
}

a { text-decoration: none; }

/* ── shell ─────────────────────────────────────────────────────────────── */

.topbar {
  background: var(--forest);
  color: var(--cream);
  padding: 14px 0;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--cream);
  font-weight: 700;
  font-size: 16px;
}

.topbar .brand .leaf {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(250, 248, 243, .12);
  color: var(--gold);
}

.topbar .who {
  color: rgba(250, 248, 243, .75);
  font-size: 13px;
}

.shell { max-width: 720px; }

/* ── cards ─────────────────────────────────────────────────────────────── */

.card-lite {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

/* The plan they're on. Green because it is the one piece of state on the page
 * — everything else is a choice, and choices should not shout louder. */
.plan-now {
  background: var(--forest);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 22px;
}

.plan-now .name { font-size: 24px; font-weight: 700; line-height: 1.1; }
.plan-now .meta { color: rgba(250, 248, 243, .72); font-size: 14px; }

.plan-card { position: relative; }

.plan-card.popular { border-color: var(--gold); }

.pill-popular {
  position: absolute;
  top: -10px;
  right: 18px;
  background: var(--gold);
  color: #3a2f05;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}

.price { font-size: 28px; font-weight: 700; line-height: 1; }
.price small { font-size: 14px; font-weight: 500; color: var(--muted); }

.feature-list { list-style: none; margin: 14px 0 0; padding: 0; }

.feature-list li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 5px 0;
  font-size: 14px;
}

.feature-list i { color: var(--safe); margin-top: 2px; }

/* ── buttons ───────────────────────────────────────────────────────────── */

.btn-forest {
  background: var(--forest);
  border: 1px solid var(--forest);
  color: var(--cream);
  font-weight: 600;
  border-radius: 12px;
  padding: 11px 18px;
}

.btn-forest:hover, .btn-forest:focus { background: var(--forest-light); color: var(--cream); }

.btn-outline-forest {
  border: 1px solid var(--forest);
  color: var(--forest);
  font-weight: 600;
  border-radius: 12px;
  padding: 11px 18px;
  background: transparent;
}

.btn-outline-forest:hover { background: var(--forest); color: var(--cream); }

/* The monthly/annual switch. A segmented control, not a Bootstrap tab strip:
 * it is picking a price, and it has to read as one control with two halves. */
.period-switch {
  display: inline-flex;
  background: #efece3;
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}

.period-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  padding: 7px 16px;
  border-radius: 999px;
}

.period-switch button.on {
  background: var(--card);
  color: var(--forest);
  box-shadow: 0 1px 3px rgba(31, 77, 61, .12);
}

.save-note { color: var(--safe); font-size: 13px; font-weight: 600; }

/* ── credits ───────────────────────────────────────────────────────────── */

.pack-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.pack-row:last-child { border-bottom: 0; }

.pack-row .credits { font-weight: 700; }

.balance-figure { font-size: 30px; font-weight: 700; color: var(--forest); line-height: 1; }

/* ── status ────────────────────────────────────────────────────────────── */

.status { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.status.completed { background: rgba(76, 154, 106, .14); color: #2f6b47; }
.status.pending   { background: rgba(217, 164, 65, .16); color: #8a6412; }
.status.failed,
.status.invalid,
.status.reversed  { background: rgba(196, 87, 62, .14); color: #a03f29; }

.verdict {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  color: #fff;
  font-size: 28px;
  margin: 0 auto 14px;
}

.verdict.completed { background: var(--safe); }
.verdict.pending   { background: var(--caution); }
.verdict.failed,
.verdict.invalid,
.verdict.reversed  { background: var(--risk); }

.history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.history-row:last-child { border-bottom: 0; }

.muted { color: var(--muted); }

/* ── auth ──────────────────────────────────────────────────────────────── */

.auth-wrap { max-width: 400px; margin: 0 auto; }

.form-control {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 15px;
}

.form-control:focus {
  border-color: var(--forest-light);
  box-shadow: 0 0 0 3px rgba(46, 107, 84, .12);
}

.form-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }

/* ── the account tabs ──────────────────────────────────────────────────────
   Under the green bar, not inside it: the bar is identity, this is where you
   are. Scrolls sideways on a narrow phone rather than wrapping to two rows,
   which would push the page content down by a whole line on every load. */

.account-nav {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.account-nav::-webkit-scrollbar { display: none; }

.account-nav a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 2px;
  margin-right: 22px;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  border-bottom: 2px solid transparent;
}

.account-nav a:hover { color: var(--forest); }

.account-nav a.on {
  color: var(--forest);
  border-bottom-color: var(--forest);
}
