/* Centered dashboard header */
.dashboard-title {
  text-align: center;
  margin: 0 0 1rem 0;
}
:root {
  --bg: #eef0f4;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --brand: #6474b6;
  --accent: #6474b6;
  --gold: #f59e0b;
  --danger: #7a1a1a;
  --border: #d9dee8;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  line-height: 1.5;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.site-header, .site-footer {
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}
.site-header::after {
  content: "";
  display: none;
  height: 0;
  background: none;
}
.site-header .container {
  /* Position nav close to header bottom with 5px gap */
  display: flex;
  flex-direction: column;
  align-items: stretch; /* keep brand aligned to the left */
  justify-content: flex-end;
  min-height: 120px;
  padding: 0 1rem 5px; /* bottom padding = 5px */
}
.site-header .brand {
  margin-bottom: 12px; /* space between brand and nav */
  align-self: flex-start; /* ensure brand/logo stays on the left */
}
.site-footer { border-top: 1px solid var(--border); border-bottom: none; margin-top: 2rem; background: #ffffff; padding: 0; }
.footer-band {
  width: 100%;
  background: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}
.footer-img {
  display: block;
  max-width: 100%;
  max-height: 240px;
  height: auto;
  width: auto;
}

.brand {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  margin-right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.brand-text { font-family: "Dancing Script", cursive; font-size: 2.2rem; line-height: 1; }
.brand-logo { height: 44px; width: auto; display: block; }
.site-header nav a, .site-header .linklike {
  color: var(--text);
  text-decoration: none;
  margin-right: 1rem;
}
.site-header nav .inline { display: inline; }
.site-header .linklike {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

/* Center and typewriter style for top navigation */
.site-header nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  font-family: "Courier New", Courier, "SFMono-Regular", Menlo, "Liberation Mono", monospace;
  font-size: 0.9rem;
  margin-top: 0; /* now controlled by brand margin and container padding */
  line-height: 1.2;
}
/* Remove extra right margins in centered layout */
.site-header nav a,
.site-header .linklike {
  margin-right: 0;
}

.hero {
  padding: 2rem 0;
  text-align: center;
}
.hero h1 { font-size: 2rem; margin: 0 0 0.5rem 0; }
.script-title {
  font-family: "Dancing Script", cursive;
  font-size: 2.2rem;
  line-height: 1.1;
  margin: 0 0 0.5rem 0;
}
.hero .start-illustration {
  display: block;
  margin: 0 auto 1rem auto;
  max-width: min(420px, 70vw);
  height: auto;
}
.stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted);
}
.cta { margin-top: 1rem; display: flex; gap: 0.75rem; justify-content: center; align-items: center; }

.page--home .site-header { display: none; }

.page--home {
  /* Add decorative corners: stars/wreaths */
  background:
    url("/static/corner-left.png") left 0 top 0 / 140px auto no-repeat,
    url("/static/corner-right.png") right 0 top 0 / 140px auto no-repeat,
    var(--bg);
}

.home-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
  min-height: calc(100vh - 4rem);
}
.home-left {
  background: var(--danger);
  color: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  display: grid;
  justify-items: center;
  place-content: center;
  gap: 0.6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.home-left .start-illustration {
  max-width: min(460px, 80%);
  height: auto;
  margin-bottom: 0.75rem;
}
.home-left .stats {
  color: #ffe4e4;
  margin-top: 0.25rem;
}
.home-left h1 { margin: 0 0 0.4rem 0; }
.home-left p { margin: 0 0 0.5rem 0; }
.home-left::before,
.home-left::after {
  content: "";
  position: absolute;
  left: 0;
  top: -100%;
  width: 100%;
  height: 300%;
  pointer-events: none;
  background-repeat: repeat;
}
/* Fine snow layer */
.home-left::before {
  opacity: 0.35;
  background-image:
    radial-gradient(rgba(255,255,255,0.9) 1px, rgba(255,255,255,0) 1px),
    radial-gradient(rgba(255,255,255,0.7) 1px, rgba(255,255,255,0) 1px);
  background-size: 24px 24px, 40px 40px;
  animation: snowfallA 30s linear infinite;
}
/* Bigger, slower flakes */
.home-left::after {
  opacity: 0.45;
  background-image:
    radial-gradient(rgba(255,255,255,0.9) 1.5px, rgba(255,255,255,0) 1.5px),
    radial-gradient(rgba(255,255,255,0.85) 2px, rgba(255,255,255,0) 2px);
  background-size: 44px 44px, 72px 72px;
  animation: snowfallB 45s linear infinite;
}
@keyframes snowfallA {
  0%   { background-position:   0px   0px,    0px   0px; transform: translateY(0) translateX(0); }
  25%  { background-position:  15px 100px,  -10px  80px; transform: translateY(8%) translateX(2%); }
  50%  { background-position:  30px 200px,  -20px 150px; transform: translateY(16%) translateX(-1%); }
  75%  { background-position:  45px 300px,  -30px 220px; transform: translateY(24%) translateX(1%); }
  100% { background-position:  60px 400px,  -40px 300px; transform: translateY(32%) translateX(0); }
}
@keyframes snowfallB {
  0%   { background-position:    0px   0px,     0px   0px; transform: translateY(0) translateX(0); }
  25%  { background-position:   20px 130px,   -15px 110px; transform: translateY(9%) translateX(-1%); }
  50%  { background-position:   40px 260px,   -30px 220px; transform: translateY(18%) translateX(2%); }
  75%  { background-position:   60px 390px,   -45px 330px; transform: translateY(27%) translateX(-1%); }
  100% { background-position:   80px 520px,   -60px 440px; transform: translateY(33%) translateX(0); }
}
.home-right {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  display: grid;
  justify-items: center;
  align-content: center;
}
.home-right .right-logo {
  display: block;
  margin: 0 auto 0.75rem auto;
  max-width: 180px;
  height: auto;
}
.tabs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.tab-button {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--danger);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
}
.tab-button.active {
  background: var(--danger);
  color: #fff;
}

/* Home page tab buttons: gold background, white text, square corners */
.home-right .tab-button {
  background: #cdb081;         /* gold */
  color: #ffffff;
  border: 2px solid #cdb081;
  border-radius: 0;
  padding: 0.5rem 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.home-right .tab-button:hover {
  background: #c3a46f;         /* slightly darker on hover */
  border-color: #c3a46f;
}
.home-right .tab-button.active {
  background: #b8935a;         /* active a bit deeper */
  border-color: #b8935a;
  color: #ffffff;
}
.home-right .tab-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(205, 176, 129, 0.35);
}
.tab-panels .tab-panel { display: none; }
.tab-panels .tab-panel.active { display: block; }
.home-right .tab-panels {
  width: 100%;
  max-width: 520px;
}

/* Smaller form typography on the start page to fit without scrolling */
.home-right .form {
  font-size: 0.9rem;
}
.home-right .form label {
  font-size: 0.9rem;
}
.home-right .form input,
.home-right .form textarea,
.home-right .form select {
  font-size: 0.9rem;
  padding: 0.5rem 0.6rem;
}
.home-right .form .button {
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem; /* match form font size */
}

/* Form sizing and typography tweaks */
.form {
  font-size: 0.95rem;
}
.form label {
  font-size: 0.95rem;
}
.form input, .form textarea, .form select {
  font-size: 0.95rem;
}

@media (max-width: 960px) {
  .home-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .page--home, .page--dashboard {
    background-size: 90px auto, 90px auto, auto;
    background-position: left 0 top 0, right 0 top 0, center;
  }
}

/* Profile page split layout */
.profile-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.profile-left {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.profile-card {
  background: #ffffff;
  border: 1px solid #000;
  border-radius: 12px;
  padding: 0.5rem;
  display: inline-block;
}
.profile-illustration {
  max-width: 320px;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}
.profile-right h1 { margin-top: 0; }
.profile-form {
  max-width: 460px;
}
/* Align image top with first form field (offset heading height + margin) */
.profile-right h1 {
  margin: 0 0 0.75rem 0;
  font-size: 1.5rem;
}
.profile-card {
  margin-top: calc(1.5rem + 0.75rem);
}
@media (max-width: 900px) {
  .profile-split {
    grid-template-columns: 1fr;
  }
  .profile-left { order: 2; }
  .profile-right { order: 1; }
}
.button {
  display: inline-block;
  background: var(--danger);
  color: #ffffff;
  border: 2px solid var(--danger);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}
.button.secondary {
  background: var(--danger);
  color: #ffffff;
  border: 2px solid var(--danger);
}
.button.danger {
  background: var(--danger);
  color: #ffffff;
  border: 2px solid var(--danger);
}
.button[disabled] { opacity: 0.5; cursor: not-allowed; }

.form {
  display: grid;
  gap: 0.75rem;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 12px;
}
.form label { display: grid; gap: 0.25rem; }
.form input, .form textarea, .form select {
  background: #ffffff;
  color: #111827;
  border: 2px solid var(--danger);
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
}
.form input::placeholder, .form textarea::placeholder { color: #6b7280; opacity: 0.9; }
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none;
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}

/* Signup page: full-page background image using user's drawing */
.page--signup {
  background: url("/static/cover.jpg") center center / cover no-repeat fixed, var(--bg);
}
.signup-centered {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 140px);
}
.signup-centered .panel {
  width: 100%;
  max-width: 520px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  backdrop-filter: saturate(120%) blur(2px);
}

/* Auth (login) layout */
.page--login .site-header { display: none; }
.page--signup .site-header { display: none; }
.auth-centered {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 140px);
}
.auth-panel {
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  backdrop-filter: saturate(120%) blur(2px);
}
.auth-header {
  display: grid;
  place-items: center;
  margin: 0.5rem 0 0.75rem 0;
}
.home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}
.home-link img {
  width: 18px;
  height: 18px;
  display: block;
}
.home-link span {
  text-transform: uppercase;
}
.auth-logo {
  display: block;
  margin: 0 auto 0.5rem auto;
  max-width: 187px;
  height: auto;
}
.auth-panel h1 {
  text-align: center;
  margin-top: 0.25rem;
}
.auth-panel .form .button {
  display: inline-block;
  margin: 0.5rem auto 0;
}

.flashes {
  list-style: none;
  padding: 0;
  margin: 0;
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: min(360px, calc(100vw - 2rem));
  z-index: 1000;
}
.flash {
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.flash.error::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 28px;
  background: url("/static/error.png") center center / contain no-repeat;
  flex: 0 0 28px;
}
.flash.success { border-color: #22c55e; }
.flash.error { border-color: #ef4444; }
.flash.info { border-color: #06b6d4; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.row { display: flex; gap: 0.5rem; align-items: center; }

.dashboard-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: center;
  justify-items: center;
  min-height: 60vh;
}
.dashboard-main {
  background: linear-gradient(0deg, rgba(255,255,255,0.86), rgba(255,255,255,0.86));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  text-align: center;
  display: inline-block;
  width: -moz-fit-content;
  width: fit-content;
  max-width: min(90vw, 620px);
  font-size: 1rem;
}
.hello-inline {
  margin: 0 0 0.5rem 0;
  font-weight: 700;
  font-size: 1.25rem;
}
.dashboard-main h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.4rem 0;
}
.dashboard-main p {
  font-size: 1rem;
  margin: 0 0 0.4rem 0;
}
.status-title {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 0.3rem 0;
  font-weight: 700;
}
.status-desc {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 0.5rem 0;
}
.dashboard-main .wishlist pre {
  font-size: 0.95rem;
}
.dashboard-aside {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}
.footer-inline {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 320px;
}
@media (max-width: 900px) {
  .dashboard-wrap {
    grid-template-columns: 1fr;
  }
}

/* Full-page background for the dashboard */
.page--dashboard {
  background:
    url("/static/corner-left.png") left 0 top 0 / 140px auto no-repeat,
    url("/static/corner-right.png") right 0 top 0 / 140px auto no-repeat,
    var(--bg);
}
.page--dashboard main.container {
  background: url("/static/Footer.PNG") center center / contain no-repeat;
  min-height: calc(100vh - 70px); /* ensure full image visible below header */
}
.table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.table th, .table td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.table thead { background: #f3f4f6; }
.table tr:last-child td { border-bottom: none; }

.admin-controls {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 1rem 0;
}

.card {
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 10px;
}
.wishlist pre {
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 0.75rem;
  border-radius: 8px;
  overflow: auto;
}

/* Signup cover hero */
.hero-banner {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1rem;
  min-height: clamp(260px, 55vh, 560px);
  background: var(--cover, none);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
}
.hero-banner.contain {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.hero-banner .hero-content {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
}
.hero-banner h1 {
  margin: 0;
  font-size: 2rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.hero-badges {
  display: inline-flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.badge {
  background: rgba(31, 41, 55, 0.7);
  border: 1px solid var(--border);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text);
}

/* Image that defines its own height (no cropping) */
.hero-image {
  margin: 0 0 0.75rem 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(17, 24, 39, 0.2);
  position: relative;
}
.hero-image img {
  display: block;
  width: 100%;
  height: auto;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.55));
}
.hero-title {
  margin: 0 0 0.5rem 0;
  font-size: 2rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
}
.page-hero {
  margin: 0 0 0.75rem 0;
  font-size: 2rem;
  color: var(--gold);
}

/* Signup split layout: image left, form right */
.signup-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
  align-items: stretch;
}
.signup-split .left .hero-banner {
  height: 100%;
  min-height: 420px;
}
.signup-split .right h1 {
  margin-top: 0;
}
@media (max-width: 900px) {
  .signup-split {
    grid-template-columns: 1fr;
  }
  .signup-split .left .hero-banner {
    min-height: 260px;
  }
}


