:root {
  color-scheme: light;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
  --swipe-duration: 140ms;
  --content-enter-duration: 220ms;
  --nav-highlight-duration: 300ms;
  --page-bg: #fffaf5;
  --panel-bg: #ffffff;
  --text: #624a44;
  --muted: #6f6473;
  --accent: #b15252;
  --accent-2: #5b6e7f;
  --border: #efe3d4;
}
/* Card colour: #f8f6f2 */

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--text);
}
a { color: var(--accent-2); }
main { width: min(1100px, calc(100% - 2rem)); margin: 0 auto; }

body.page-leaving-forward .admin-shell > :not(.admin-nav),
body.page-leaving-forward .design-shell > :not(.admin-nav),
body.page-leaving-forward .page-shell > :not(.admin-nav) {
  opacity: 0;
  transform: translateX(-34px);
  transition: opacity var(--swipe-duration) ease, transform var(--swipe-duration) ease;
}

body.page-leaving-backward .admin-shell > :not(.admin-nav),
body.page-leaving-backward .design-shell > :not(.admin-nav),
body.page-leaving-backward .page-shell > :not(.admin-nav) {
  opacity: 0;
  transform: translateX(34px);
  transition: opacity var(--swipe-duration) ease, transform var(--swipe-duration) ease;
}

@keyframes page-enter-from-right {
  from {
    opacity: 0;
    transform: translateX(34px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes page-enter-from-left {
  from {
    opacity: 0;
    transform: translateX(-34px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

body.page-enter-forward .admin-shell > :not(.admin-nav),
body.page-enter-forward .design-shell > :not(.admin-nav),
body.page-enter-forward .page-shell > :not(.admin-nav) {
  animation: page-enter-from-right var(--content-enter-duration) ease;
}

body.page-enter-backward .admin-shell > :not(.admin-nav),
body.page-enter-backward .design-shell > :not(.admin-nav),
body.page-enter-backward .page-shell > :not(.admin-nav) {
  animation: page-enter-from-left var(--content-enter-duration) ease;
}

@media (prefers-reduced-motion: reduce) {
  body.page-leaving-forward .admin-shell > :not(.admin-nav),
  body.page-leaving-forward .design-shell > :not(.admin-nav),
  body.page-leaving-forward .page-shell > :not(.admin-nav),
  body.page-leaving-backward .admin-shell > :not(.admin-nav),
  body.page-leaving-backward .design-shell > :not(.admin-nav),
  body.page-leaving-backward .page-shell > :not(.admin-nav),
  body.page-enter-forward .admin-shell > :not(.admin-nav),
  body.page-enter-forward .design-shell > :not(.admin-nav),
  body.page-enter-forward .page-shell > :not(.admin-nav),
  body.page-enter-backward .admin-shell > :not(.admin-nav),
  body.page-enter-backward .design-shell > :not(.admin-nav),
  body.page-enter-backward .page-shell > :not(.admin-nav),
  body.page-enter-forward .admin-nav a.active,
  body.page-enter-backward .admin-nav a.active {
    transition: none;
    animation: none;
  }
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
}
.admin-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  border: 1px solid #e7d6c6;
  border-radius: 999px;
  padding: 0.75rem 1.05rem;
  background: #f7e8df;
  color: var(--text);
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(91, 110, 127, 0.14);
  transition: background-color var(--nav-highlight-duration) ease, transform 120ms ease, box-shadow var(--nav-highlight-duration) ease, border-color var(--nav-highlight-duration) ease, color var(--nav-highlight-duration) ease, opacity var(--nav-highlight-duration) ease;
}
.admin-nav a:hover {
  transform: translateY(-1px);
  border-color: #dcc5ad;
  background: #eed9cc;
}
.admin-nav a:active {
  transform: translateY(0);
}
.admin-nav a.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(177, 82, 82, 0.22);
}

body.page-leaving-forward .admin-nav a.active,
body.page-leaving-backward .admin-nav a.active {
  background: #f7e8df;
  border-color: #e7d6c6;
  color: var(--text);
  box-shadow: 0 8px 18px rgba(91, 110, 127, 0.14);
  opacity: 0.72;
}

@keyframes nav-active-fade-in {
  from {
    background: #f7e8df;
    border-color: #e7d6c6;
    color: var(--text);
    box-shadow: 0 8px 18px rgba(91, 110, 127, 0.14);
    opacity: 0.72;
  }
  to {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 8px 18px rgba(177, 82, 82, 0.22);
    opacity: 1;
  }
}

body.page-enter-forward .admin-nav a.active,
body.page-enter-backward .admin-nav a.active {
  animation: nav-active-fade-in var(--nav-highlight-duration) ease;
}
.page-shell {
  display: grid;
  gap: 1.5rem;
  padding: 2rem 0 3rem;
  min-height: calc(100vh - 2rem);
}
.card {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  box-shadow: 0 16px 40px rgba(47, 35, 54, 0.08);
  padding: 1.5rem;
}
.eyebrow {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 0.4rem;
}
h1, h2, h3 { margin-top: 0; }
.intro { color: var(--muted); line-height: 1.65; }

.save-date-landing {
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  background: var(--panel-bg);
}

.hero {
  display: grid;
  gap: 1rem;
  padding: 3rem 0 2rem;
  align-items: center;
}
.hero-card {
  display: grid;
  gap: 1.25rem;
  padding: 2rem;
  text-align: center;
}
.hero-image {
  width: min(100%, 480px);
  margin: 0 auto;
  display: block;
  border-radius: 1rem;
  box-shadow: 0 12px 30px rgba(47, 35, 54, 0.12);
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.button-row a,
button:not(.envelope) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.8rem 1.1rem;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  line-height: 1;
  transition: background-color 160ms ease, transform 120ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

button:not(.envelope) {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(177, 82, 82, 0.22);
}

button:not(.envelope):hover {
  transform: translateY(-1px);
  background: #994545;
}

button:not(.envelope):active {
  transform: translateY(0);
}

button:not(.envelope):disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.button-row a.primary,
button.primary {
  background: var(--accent);
  color: #fff;
}
.button-row a.secondary {
  background: #f7e8df;
  color: var(--text);
}

.admin-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 0 3rem;
  min-height: calc(100vh - 2rem);
}
.admin-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 2rem;
}
.admin-card {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(64, 42, 24, 0.12);
  text-decoration: none;
  color: inherit;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.admin-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(64, 42, 24, 0.16);
}
.admin-card .badge {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #f8e5d0;
  color: #8a4f17;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: var(--panel-bg);
}
.dashboard-table th,
.dashboard-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.dashboard-table .status { font-weight: 700; }
.dashboard-table .status.opened { color: #2f7d32; }
.dashboard-table .status.pending { color: var(--accent); }

.design-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 0 3rem;
  min-height: calc(100vh - 2rem);
}
.design-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1.1fr 0.9fr;
}
.design-panel {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(64, 42, 24, 0.1);
}
.design-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 320px;
  padding: 1rem;
  background: linear-gradient(135deg, #fff3e8, #f7e2cd);
  border-radius: 1rem;
}
.design-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 0.6rem;
}
.upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
}
.upload-row input {
  flex: 1 1 220px;
  padding: 0.7rem 0.8rem;
}
.upload-row button {
  background: var(--accent);
  color: white;
}
.status-pill {
  margin-top: 0.75rem;
  color: var(--muted);
}
.details-stack {
  display: grid;
  gap: 0.8rem;
}
.details-stack div {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.8rem 1rem;
  background: #fffdfb;
}
.details-stack strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #7a4a1a;
}
@media (max-width: 760px) {
  .design-layout { grid-template-columns: 1fr; }
}
