:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --border: #e4e7ec;
  --text: #1a1d24;
  --text-2: #6b7280;
  --accent: #2f6f4f;
  --warn: #b3540a;
  --danger: #b3261e;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.container { max-width: 960px; margin: 0 auto; padding: 32px 20px 80px; }
header.top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 24px; }
header.top h1 { font-size: 20px; margin: 0; }
header.top .period { color: var(--text-2); font-size: 14px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
@media (max-width: 700px) { .grid { grid-template-columns: 1fr; } }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.card h2 { font-size: 15px; margin: 0 0 12px; color: var(--text-2); text-transform: uppercase; letter-spacing: .02em; }
.row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.row.total { font-weight: 700; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 10px; font-size: 16px; }
.amount { font-variant-numeric: tabular-nums; }
.notes { margin-top: 12px; font-size: 13px; color: var(--warn); }
.notes div { margin-bottom: 4px; }
ul.deadlines { list-style: none; padding: 0; margin: 0; }
ul.deadlines li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
ul.deadlines li:last-child { border-bottom: none; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.red { background: #fbe9e7; color: var(--danger); }
.badge.yellow { background: #fff4e0; color: var(--warn); }
.badge.green { background: #e8f3ec; color: var(--accent); }
.pending-banner {
  background: #fff4e0; border: 1px solid #f0c987; border-radius: 10px;
  padding: 12px 16px; margin-bottom: 20px; font-size: 14px;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
table th, table td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--border); }
footer.disclaimer { margin-top: 40px; font-size: 12px; color: var(--text-2); line-height: 1.5; }

/* --- Nav (user menu) --- */
.user-nav { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--text-2); }
.user-nav a { color: var(--text-2); text-decoration: none; }
.user-nav a:hover { color: var(--text); text-decoration: underline; }
.user-nav form { display: inline; margin: 0; }
.user-nav button.link-btn {
  background: none; border: none; padding: 0; font: inherit; color: var(--text-2);
  cursor: pointer; text-decoration: none;
}
.user-nav button.link-btn:hover { color: var(--text); text-decoration: underline; }

/* --- Auth pages (login / setup / forgot / reset password) --- */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: var(--bg);
}
.auth-card {
  width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 36px 32px; box-shadow: 0 1px 3px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.auth-brand .logo-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.auth-brand span { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.auth-card h1 { font-size: 20px; margin: 0 0 6px; }
.auth-card p.subtitle { color: var(--text-2); font-size: 14px; margin: 0 0 24px; line-height: 1.5; }
.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.auth-field input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; background: var(--bg); color: var(--text); box-sizing: border-box;
}
.auth-field input:focus { outline: none; border-color: var(--accent); background: var(--card); }
.auth-submit {
  width: 100%; padding: 11px; background: var(--accent); color: #fff; border: none;
  border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; margin-top: 4px;
}
.auth-submit:hover { opacity: .92; }
.auth-links { margin-top: 20px; font-size: 13px; text-align: center; color: var(--text-2); }
.auth-links a { color: var(--accent); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.auth-error {
  background: #fbe9e7; border: 1px solid #e5a49c; color: var(--danger);
  border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-bottom: 18px;
}
.auth-success {
  background: #e8f3ec; border: 1px solid #b7dcc4; color: var(--accent);
  border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-bottom: 18px;
}
