:root {
  --navy: #071A2E;
  --navy-soft: #10304F;
  --gold: #D4A84F;
  --gold-soft: #F5E8CB;
  --white: #FFFFFF;
  --ink: #1B2230;
  --slate: #6B7385;
  --line: #E4E2DA;
  --danger: #A8473D;
  --danger-soft: #F3E2DF;
  --success: #2F6E3F;
  --success-soft: #E7F1E5;
  --font-display: Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #F3EFE2;
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100vh;
}

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

/* Top brand bar, shared across all pages */
header.brand-bar {
  background: var(--navy);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header.brand-bar .brand-title {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}
header.brand-bar .brand-title span { color: var(--gold); }
header.brand-bar nav a {
  color: #CBD3E0;
  text-decoration: none;
  font-size: 14px;
  margin-left: 20px;
}
header.brand-bar nav a:hover { color: var(--white); }

/* Centered auth-card layout (login/register/reset) */
.auth-wrap {
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 36px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 24px rgba(7, 26, 46, 0.08);
}
.auth-card h1 {
  font-family: var(--font-display);
  font-size: 24px;
  margin: 0 0 6px;
  color: var(--navy);
}
.auth-card p.sub {
  color: var(--slate);
  font-size: 14px;
  margin: 0 0 24px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  color: var(--slate);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 15px;
  font-family: var(--font-body);
}
.field input:focus { outline: none; border-color: var(--gold); }

.btn-primary {
  width: 100%;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}
.btn-primary:hover { background: var(--navy-soft); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-gold {
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn-gold:hover { background: #C79A3A; }

.btn-outline {
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.btn-outline:hover { border-color: var(--navy); }

.auth-links {
  text-align: center;
  margin-top: 18px;
  font-size: 14px;
}
.auth-links a { text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

.alert {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13.5px;
  margin-bottom: 16px;
  display: none;
}
.alert.error { background: var(--danger-soft); color: var(--danger); display: block; }
.alert.success { background: var(--success-soft); color: var(--success); display: block; }

/* Dashboard / account shell */
.page-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}
.page-title {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--navy);
  margin: 0 0 6px;
}
.page-sub { color: var(--slate); font-size: 14.5px; margin: 0 0 28px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.product-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.product-card h3 {
  font-family: var(--font-display);
  color: var(--navy);
  font-size: 17px;
  margin: 0;
}
.product-card p.desc { color: var(--slate); font-size: 13.5px; line-height: 1.5; margin: 0; flex: 1; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  width: fit-content;
}
.status-pill.owned { background: var(--success-soft); color: var(--success); }
.status-pill.locked { background: var(--gold-soft); color: #8A6A1A; }

.loading-note { color: var(--slate); font-size: 14px; padding: 20px 0; }

/* Public homepage hero */
.hero {
  background: var(--navy);
  padding: 64px 24px 56px;
  text-align: center;
}
.hero-title {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 36px;
  margin: 0 0 14px;
}
.hero-title span { color: var(--gold); }
.hero-sub {
  color: #CBD3E0;
  font-size: 16px;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

.price-tag {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--navy);
  font-weight: 700;
}
.price-tag .period { font-size: 12px; color: var(--slate); font-weight: 400; }

.card-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
.btn-outline:hover { border-color: var(--navy); }

/* Inline auth box embedded on product pages */
.inline-auth-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  margin-top: 18px;
  background: #FBFAF7;
}
.inline-auth-box h4 {
  font-family: var(--font-display);
  color: var(--navy);
  font-size: 15px;
  margin: 0 0 14px;
}

/* Site-wide footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 24px 32px;
  text-align: center;
  color: var(--slate);
  font-size: 12.5px;
  line-height: 1.7;
}
.site-footer p { margin: 0; }
.site-footer .footer-note { margin-top: 4px; }
