:root {
  color-scheme: light;
  --bg: #f4efe6;
  --panel: #fffdf9;
  --panel-strong: #f8f1e5;
  --ink: #2f2a26;
  --muted: #6c6257;
  --accent: #f0cac5;
  --accent-soft: #d8c3a5;
  --line: #e1d4c2;
  --danger: #a64141;
  --shadow: 0 18px 48px rgba(59, 39, 16, 0.12);
  font-family: "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(216, 195, 165, 0.5), transparent 28%),
    linear-gradient(180deg, #f6f1e9, #f1ebe2 35%, #f7f3ec);
  color: var(--ink);
}

body.invitation-theme {
  background: radial-gradient(circle at top, #f7f1e6 0%, #ece3d4 100%);
}

a {
  color: inherit;
}

.table-link {
  display: inline-block;
  margin-top: 6px;
  color: #7c715f;
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.row-actions form {
  display: inline-flex;
}

.inline-delete-form {
  display: inline;
}

.button-link {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  min-height: 0;
}

.danger-link {
  color: var(--danger);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  background: linear-gradient(135deg, rgba(255, 250, 244, 0.96), rgba(244, 231, 214, 0.96));
}

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

.status-banner h2 {
  margin-bottom: 4px;
}

.status-banner p:last-child {
  margin-bottom: 0;
}

.hero {
  display: grid;
  gap: 20px;
  grid-template-columns: 1.2fr 0.8fr;
  margin-bottom: 24px;
}

.card,
.stat,
.panel {
  background: rgba(255, 253, 249, 0.92);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.card {
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(240, 202, 197, 0.38), transparent 28%),
    linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(247, 239, 229, 0.98));
}

.card .inline-actions {
  margin-top: 22px;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 4.3rem);
  line-height: 0.95;
  margin-bottom: 18px;
  font-family: Georgia, serif;
}

.hero p,
.lede {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
}

.stats {
  display: grid;
  gap: 16px;
}

.stat {
  padding: 20px 22px;
}

.stat strong {
  display: block;
  font-size: 2.2rem;
  font-family: Georgia, serif;
  margin-top: 8px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.panel {
  padding: 24px;
}

.panel > :last-child {
  margin-bottom: 0;
}

.form-panel {
  max-width: 760px;
  margin: 0 auto;
}

.auth-panel {
  max-width: 520px;
  margin-top: 48px;
}

.danger-zone {
  margin-top: 14px;
}

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

.panel form + form {
  margin-top: 18px;
}

.divider {
  height: 1px;
  margin: 24px 0;
  background: linear-gradient(90deg, transparent, rgba(160, 137, 110, 0.45), transparent);
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.95rem;
}

.label-title {
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}

.checkbox-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  border: 1px solid #d8c8b3;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.checkbox-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #cdbca7;
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  background: white;
  color: var(--ink);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: rgb(0, 0, 0);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  background: #efe2d0;
  color: var(--ink);
}

.button.danger {
  background: #b55252;
  color: white;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

tbody tr:hover {
  background: rgba(244, 236, 226, 0.45);
}

th,
td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.pill.ok {
  background: #dceedd;
  color: #1d5d2c;
}

.pill.warn {
  background: #f5e6b8;
  color: #7a5a00;
}

.pill.no {
  background: #f3d8d8;
  color: var(--danger);
}

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

.flash {
  padding: 14px 18px;
  border-radius: 18px;
  margin-bottom: 18px;
  background: #f0eadf;
  border: 1px solid var(--line);
}

.layout-rsvp {
  width: min(760px, calc(100% - 32px));
  margin: 32px auto;
}

body.invitation-theme .shell {
  width: min(760px, calc(100% - 20px));
  padding: 26px 0 34px;
}

body.invitation-theme .flash {
  max-width: 760px;
  margin: 0 auto 18px;
  background: rgba(246, 238, 223, 0.92);
  border: 1px solid #ddd1bc;
}

body.invitation-theme .layout-rsvp .panel {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.8), transparent 30%),
    radial-gradient(circle at 80% 72%, rgba(223, 212, 190, 0.24), transparent 24%),
    linear-gradient(180deg, #f7f1e6, #f1eadc 100%);
  border: 1px solid #e2d7c1;
  border-radius: 0;
  box-shadow: 0 26px 60px rgba(92, 74, 40, 0.12);
  padding: 42px 54px 52px;
}

body.invitation-theme .layout-rsvp h1 {
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.02;
  color: #6e6b5b;
  text-align: center;
  margin-bottom: 14px;
}

body.invitation-theme .layout-rsvp .eyebrow {
  text-align: center;
  color: #8d8679;
}

body.invitation-theme .layout-rsvp .lede {
  max-width: 34rem;
  margin: 0 auto 28px;
  text-align: center;
  color: #726b60;
}

body.invitation-theme .layout-rsvp form {
  gap: 16px;
}

body.invitation-theme .layout-rsvp label {
  color: #666253;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
}

body.invitation-theme .layout-rsvp input,
body.invitation-theme .layout-rsvp textarea,
body.invitation-theme .layout-rsvp select {
  background: rgba(255, 252, 245, 0.88);
  border: 1px solid #d5c7ae;
  border-radius: 10px;
  color: #4e493f;
}

body.invitation-theme .layout-rsvp button {
  margin-top: 10px;
  background: #74725f;
  color: #fffdf6;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.84rem;
}

.template-preview {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  min-height: 420px;
  background: white;
}

.template-preview iframe {
  width: 100%;
  min-height: 700px;
  border: 0;
}

code {
  background: #efe7dc;
  padding: 2px 6px;
  border-radius: 8px;
}

@media (max-width: 900px) {
  .hero,
  .grid {
    grid-template-columns: 1fr;
  }

  .status-banner {
    display: block;
  }

  .shell {
    width: min(100% - 20px, 1180px);
  }

  th:nth-child(4),
  td:nth-child(4),
  th:nth-child(5),
  td:nth-child(5) {
    display: none;
  }
}
