:root {
  --maroon: #8e1737;
  --maroon-dark: #65122a;
  --gold: #d6b05f;
  --cream: #f7f3ee;
  --paper: #fffdfa;
  --ink: #26242a;
  --gray: #67636d;
  --line: #e8ddd7;
  --soft: #f2ece7;
  --shadow: 0 24px 70px rgba(57, 24, 30, .12);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 15%, rgba(214,176,95,.16), transparent 24%),
    radial-gradient(circle at 85% 85%, rgba(142,23,55,.10), transparent 26%),
    linear-gradient(180deg, #fffdfa, #f7f1eb);
}
a { color: inherit; }
button, input { font: inherit; }
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.auth-topbar {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid rgba(142,23,55,.08);
  background: rgba(255,253,250,.88);
  backdrop-filter: blur(14px);
}
.auth-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.auth-brand img { width: 60px; height: 60px; object-fit: contain; }
.auth-brand span { font-family: "Playfair Display", Georgia, serif; font-size: 19px; font-weight: 800; }
.back-home { color: var(--maroon); font-weight: 700; text-decoration: none; }
.auth-main { display: grid; place-items: center; padding: 56px 20px; }
.auth-card {
  width: min(100%, 520px);
  padding: clamp(28px, 5vw, 46px);
  border: 1px solid rgba(142,23,55,.12);
  border-radius: 28px;
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow);
}
.auth-kicker {
  margin: 0 0 8px;
  color: var(--maroon);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.auth-card h1 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(34px, 6vw, 48px);
  line-height: 1.04;
  letter-spacing: -.03em;
}
.auth-intro { margin: 14px 0 28px; color: var(--gray); }
.auth-form { display: grid; gap: 18px; }
.auth-field { display: grid; gap: 7px; }
.auth-field span { font-size: 13px; font-weight: 800; }
.auth-field input {
  width: 100%;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 15px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.auth-field input:focus { border-color: rgba(142,23,55,.58); box-shadow: 0 0 0 4px rgba(142,23,55,.08); }
.auth-button {
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--maroon), #a41f44);
  box-shadow: 0 14px 28px rgba(142,23,55,.18);
  font-weight: 800;
  cursor: pointer;
}
.auth-button:disabled { opacity: .55; cursor: wait; }
.auth-links { margin-top: 18px; display: flex; justify-content: center; text-align: center; }
.auth-links a { color: var(--maroon); font-weight: 700; }
.auth-message {
  display: none;
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
}
.auth-message.show { display: block; }
.auth-message.error { color: #7d1932; background: #fff0f3; border: 1px solid #f4c8d3; }
.auth-message.success { color: #295b3a; background: #effaf3; border: 1px solid #c8e9d3; }
.auth-footer { padding: 20px; text-align: center; color: #857d82; font-size: 12px; }

/* Dashboard */
.dashboard-body { min-height: 100vh; background: #f8f4f0; }
.dashboard-shell { width: min(1220px, calc(100% - 36px)); margin-inline: auto; }
.dashboard-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.dashboard-header-inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.dashboard-brand { display: flex; align-items: center; gap: 12px; }
.dashboard-brand img { width: 62px; height: 62px; object-fit: contain; }
.dashboard-brand strong { display: block; font-family: "Playfair Display", Georgia, serif; font-size: 20px; }
.dashboard-brand span { display: block; color: var(--gray); font-size: 12px; }
.dashboard-user { display: flex; align-items: center; gap: 14px; }
.dashboard-user-email { color: var(--gray); font-size: 13px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout-button { border: 1px solid rgba(142,23,55,.25); color: var(--maroon); background: #fff; min-height: 42px; border-radius: 999px; padding: 0 18px; font-weight: 800; cursor: pointer; }
.dashboard-main { padding: 58px 0 80px; }
.dashboard-welcome { margin-bottom: 30px; }
.dashboard-welcome p { margin: 0 0 7px; color: var(--maroon); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.dashboard-welcome h1 { margin: 0; font-family: "Playfair Display", Georgia, serif; font-size: clamp(38px, 5vw, 60px); line-height: 1; }
.dashboard-welcome .sub { margin-top: 12px; max-width: 700px; color: var(--gray); }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
.dashboard-card { position: relative; min-height: 205px; padding: 26px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: 0 15px 38px rgba(57,24,30,.05); }
.dashboard-card .eyebrow { color: var(--maroon); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.dashboard-card h2 { margin: 10px 0 8px; font-family: "Playfair Display", Georgia, serif; font-size: 27px; }
.dashboard-card p { margin: 0; color: var(--gray); max-width: 46ch; }
.dashboard-card .status-pill { position: absolute; right: 22px; top: 22px; padding: 6px 10px; border-radius: 999px; background: #f3ece7; color: #756d72; font-size: 11px; font-weight: 800; }
.dashboard-card.featured { background: linear-gradient(145deg, #fffdfa, #f7edea); border-color: rgba(142,23,55,.18); }
.dashboard-loading { min-height: 100vh; display: grid; place-items: center; color: var(--maroon); font-weight: 800; }
@media (max-width: 760px) {
  .auth-topbar { min-height: 74px; }
  .auth-brand img { width: 50px; height: 50px; }
  .auth-brand span { display: none; }
  .dashboard-header-inner { align-items: flex-start; padding: 14px 0; }
  .dashboard-user { align-items: flex-end; flex-direction: column; }
  .dashboard-user-email { max-width: 170px; }
  .dashboard-grid { grid-template-columns: 1fr; }
}
