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

:root {
  color-scheme: light;
  --bg: #f5f1ea;
  --surface: #ffffff;
  --ink: #1c1f24;
  --muted: #5b6372;
  --accent: #1251b4;
  --accent-2: #0b1f3a;
  --highlight: #f0c25a;
  --border: rgba(28, 31, 36, 0.12);
  --shadow: 0 22px 50px rgba(19, 24, 34, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  position: relative;
}

.ambient {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(18, 81, 180, 0.15), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(240, 194, 90, 0.3), transparent 45%),
    radial-gradient(circle at 80% 85%, rgba(15, 42, 80, 0.18), transparent 50%);
  z-index: -1;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 6vw 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  letter-spacing: 0.02em;
}

.tag {
  color: var(--muted);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

body[data-auth="false"] #logout {
  display: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(18, 81, 180, 0.1);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
}

button.primary {
  background: var(--accent);
  color: white;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 18px 30px rgba(18, 81, 180, 0.25);
}

button.primary:hover {
  transform: translateY(-1px);
}

.ghost {
  background: transparent;
  color: var(--accent-2);
  font-weight: 600;
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  padding: 40px 6vw 60px;
  align-items: start;
}

.hero-copy h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
  margin: 12px 0 16px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 12px;
  color: var(--accent-2);
  font-weight: 600;
}

.lead {
  color: var(--muted);
  font-size: 17px;
  max-width: 580px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.info-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.info-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.info-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.feature-strip h4 {
  margin: 0 0 6px;
  font-size: 15px;
}

.feature-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.auth {
  display: flex;
  justify-content: center;
}

.auth-card {
  width: min(380px, 100%);
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 30px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.auth-header h2 {
  margin: 0 0 8px;
  font-family: 'Fraunces', serif;
}

.auth-header p {
  margin: 0 0 18px;
  color: var(--muted);
}

#auth-status {
  min-height: 18px;
}

#auth-status[data-state="error"] {
  color: #b42318;
}

#auth-status[data-state="success"] {
  color: #0f7a43;
}

form {
  display: grid;
  gap: 14px;
}

.auth-links {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.auth-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.auth-links a:hover {
  text-decoration: underline;
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-2);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  color: var(--muted);
}

.checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.checkbox span {
  font-size: 13px;
}

input {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 14px;
  font-family: inherit;
}


.dashboard {
  padding: 0 6vw 80px;
  display: none;
}

body[data-auth="true"] .dashboard {
  display: block;
}

body[data-auth="true"] #login-card {
  display: none;
}

.dashboard-header {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: end;
  gap: 24px;
  margin-bottom: 20px;
}

.dashboard-tabs {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
}

.tab {
  padding: 8px 14px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--accent-2);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.tab.active {
  background: var(--accent-2);
  color: white;
  border-color: transparent;
}

.view {
  display: block;
}

body[data-view="payments"] #transactions-view {
  display: none;
}

body[data-view="transactions"] #payments-view {
  display: none;
}

.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 18px;
  border: 1px solid var(--border);
}

.summary strong {
  font-size: 20px;
}

.summary-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 6px;
}

.transaction-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.transaction-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.transaction-table {
  overflow-x: auto;
}

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

th,
td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid rgba(28, 31, 36, 0.08);
  font-size: 14px;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.amount-free {
  color: #0f7a43;
  font-weight: 600;
}

.amount-paid {
  color: var(--accent-2);
  font-weight: 600;
}

.amount-payment {
  color: #0b6b4b;
  font-weight: 700;
}

.status-paid {
  color: #0b6b4b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
}

footer {
  border-top: 1px solid var(--border);
  padding: 28px 6vw 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

footer strong {
  color: var(--ink);
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
  }

  .tag {
    display: none;
  }
}
