@import url('https://fonts.googleapis.com/css2?family=Fraunces:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --teal: #013a4c;
  --teal-deep: #012631;
  --lime: #b3cc42;
  --sage: #738e5c;
  --cream: #faf6ee;
  --beige: #e8dfc9;
  --rust: #7a3b1e;
  --rust-light: #c4622d;
  --ink: #2a2a2a;
  --ink-soft: #4a4a4a;
  --paper: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  margin: 0;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--teal-deep);
  font-weight: 700;
  margin: 0 0 0.4em;
}

h1 { font-size: 1.85rem; }
h2 { font-size: 1.3rem; margin-top: 2.2rem; }

p { color: var(--ink-soft); line-height: 1.5; }

a { color: var(--teal); }

/* ---- Header / brand bar ---- */

.site-header {
  background: var(--beige);
  border-bottom: 1px solid #ddd0af;
}

.brand-bar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-bar img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.brand-text .eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: var(--sage);
  font-weight: 600;
  text-transform: uppercase;
}

.brand-text .wordmark {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--teal-deep);
  line-height: 1.15;
}

/* ---- Nav tabs ---- */

nav.tabs {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 0.25rem;
}

nav.tabs a {
  display: inline-block;
  padding: 0.7rem 0.9rem;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
}

nav.tabs a:hover {
  color: var(--teal-deep);
}

nav.tabs a.active {
  color: var(--teal-deep);
  border-bottom-color: var(--rust-light);
}

/* ---- Layout ---- */

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.eyebrow-rule {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.eyebrow-rule .line {
  width: 28px;
  height: 1px;
  background: var(--sage);
}

.eyebrow-rule .label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 600;
}

.subtitle {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  color: var(--sage);
  font-size: 1.05rem;
  margin: -0.3rem 0 1rem;
}

/* ---- Cards / tables ---- */

.card {
  background: var(--paper);
  border: 1px solid #e7e1d3;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(1, 38, 49, 0.06);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(1, 38, 49, 0.06);
  margin-top: 1rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  background: var(--paper);
}

th, td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid #eee6d3;
  font-size: 0.92rem;
}

th {
  background: var(--teal-deep);
  color: var(--cream);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tr:last-child td { border-bottom: none; }

tr:hover td { background: #fbf9f2; }

.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px dashed #d9cfb0;
  border-radius: 10px;
}

/* ---- Badges ---- */

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-grace { background: #eaf0e5; color: var(--sage); }
.badge-warning { background: #f7e6da; color: var(--rust-light); }
.badge-fee { background: #f4dbd2; color: var(--rust); }
.badge-zero { background: #eee; color: #888; }

/* ---- Buttons ---- */

button, .btn {
  font-family: inherit;
  background: var(--teal);
  color: var(--cream);
  border: none;
  border-radius: 6px;
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

button:hover, .btn:hover { background: var(--teal-deep); }

button.secondary { background: var(--beige); color: var(--teal-deep); }
button.secondary:hover { background: #ddd0af; }

/* ---- Forms ---- */

input[type="text"], input[type="password"] {
  font-family: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid #d9cfb0;
  border-radius: 6px;
  font-size: 0.92rem;
  width: 100%;
  max-width: 280px;
}

label { font-weight: 600; font-size: 0.85rem; color: var(--ink); }

/* ---- Login page ---- */

.login-wrap {
  min-height: calc(100vh - 90px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: var(--paper);
  border: 1px solid #e7e1d3;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(1, 38, 49, 0.1);
  padding: 2.2rem 2.4rem;
  width: 320px;
}

.login-card h1 { font-size: 1.4rem; margin-bottom: 1.2rem; }
.login-card label { display: block; margin-bottom: 1rem; }
.login-card input { margin-top: 0.35rem; max-width: none; }
.login-card button { width: 100%; margin-top: 0.4rem; }

.error-text { color: var(--rust); font-size: 0.88rem; }
