/* EveryDue — minimalist, mobile-first styling for the server-rendered web UI. */

:root {
  --color-bg: #fbfaf8;
  --color-text: #1f2421;
  --color-muted: #6b7570;
  --color-border: #dedad3;
  --color-accent: #1f6f54;
  --color-accent-dark: #164f3c;
  --color-danger: #9a3b2e;
  --color-danger-bg: #fbe9e6;
  --color-success: #1f6f54;
  --color-success-bg: #e7f3ee;
  --radius: 8px;
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
}

a { color: var(--color-accent-dark); }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
  background: #fff;
}

.site-header .brand {
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--color-text);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
}

.site-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

.site-footer {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--color-border);
}

h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin: 1.75rem 0 0.5rem; }

.stacked-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 420px;
}

.stacked-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.stacked-form input,
.stacked-form select {
  font-size: 1rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--color-text);
}

.stacked-form small { color: var(--color-muted); }

button,
.button-link {
  display: inline-block;
  font-size: 1rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-accent);
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}

button:hover,
.button-link:hover { background: var(--color-accent-dark); border-color: var(--color-accent-dark); }

.link-button {
  border: none;
  background: none;
  color: var(--color-accent-dark);
  padding: 0;
  text-decoration: underline;
  font-size: 0.95rem;
}

.inline-form { display: inline; }

.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.flash-error { background: var(--color-danger-bg); color: var(--color-danger); }
.flash-success { background: var(--color-success-bg); color: var(--color-success); }

.form-footer-link { margin-top: 1.5rem; font-size: 0.9rem; }

.dashboard-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.5rem; }

.bill-list, .account-list { list-style: none; margin: 0; padding: 0; }

.bill-row {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.6rem;
  background: #fff;
}

.bill-row a {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: var(--color-text);
}

.bill-amount { font-weight: 700; font-size: 1.1rem; }
.bill-due { color: var(--color-muted); font-size: 0.9rem; }

.badge {
  margin-left: auto;
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.badge-due { background: var(--color-success-bg); color: var(--color-success); }
.badge-overdue { background: var(--color-danger-bg); color: var(--color-danger); }
.badge-paid { background: #e6e6e6; color: var(--color-muted); }

.account-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border);
}

.pay-amount-big { font-size: 2.5rem; font-weight: 700; margin: 0.5rem 0 0; }
.pay-fee-line { color: var(--color-muted); margin: 0.15rem 0 1.25rem; }
.pay-copy-row { display: flex; align-items: center; gap: 0.75rem; }
.copy-feedback { color: var(--color-success); font-size: 0.9rem; min-height: 1.2em; }

.hero { text-align: center; padding: 1rem 0 0.5rem; }
.hero h1 { font-size: 1.9rem; margin-bottom: 0.75rem; }
.hero-sub { color: var(--color-muted); font-size: 1.05rem; max-width: 480px; margin: 0 auto 1.25rem; }
.hero-cta { margin: 0; }

.landing-section { margin-top: 2.25rem; }
.landing-section h2 { margin-top: 0; }
.landing-cta { text-align: center; }

.steps-list { list-style: decimal; margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }

.faq-list dt { font-weight: 700; margin-top: 1rem; }
.faq-list dt:first-child { margin-top: 0; }
.faq-list dd { margin: 0.25rem 0 0; color: var(--color-muted); }

@media (max-width: 480px) {
  .site-main { padding: 1rem 0.85rem 2.5rem; }
  .pay-amount-big { font-size: 2rem; }
  .hero h1 { font-size: 1.6rem; }
}
