:root {
  --maroon: #5c1622;
  --maroon-deep: #390d15;
  --maroon-soft: #7d2433;
  --gold: #c99a3f;
  --gold-light: #e8c97a;
  --gold-pale: #f6e8c5;
  --cream: #fbf6ea;
  --paper: #fffdf8;
  --ink: #2a1a18;
  --muted: #7f6d63;
  --line: rgba(92, 22, 34, 0.12);
  --danger: #b23a3a;
  --green: #2f7a5c;
  --blue: #3b6ea5;
  --sidebar-w: 272px;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow: 0 18px 50px -30px rgba(57, 13, 21, 0.35);
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: #f6f0e4;
  background-image:
    radial-gradient(circle at 10% 0%, rgba(201, 154, 63, 0.08), transparent 34%),
    radial-gradient(circle at 95% 8%, rgba(92, 22, 34, 0.05), transparent 30%);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, figure, blockquote {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

svg {
  display: block;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: rgba(92, 22, 34, 0.07);
  padding: 0.12em 0.4em;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--maroon-soft);
  margin-bottom: 10px;
}

.eyebrow--gold {
  color: var(--gold-light);
}

/* ---------- Login ---------- */

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
}

.login-brand {
  position: relative;
  overflow: hidden;
  padding: 64px;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 75% 20%, rgba(201, 154, 63, 0.22), transparent 34%),
    linear-gradient(150deg, #711d2c 0%, #4b101b 48%, #2b080e 100%);
  color: var(--gold-pale);
  isolation: isolate;
}

.login-brand__texture {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(45deg, transparent 45%, rgba(232, 201, 122, 0.09) 46%, rgba(232, 201, 122, 0.09) 54%, transparent 55%),
    linear-gradient(-45deg, transparent 45%, rgba(232, 201, 122, 0.09) 46%, rgba(232, 201, 122, 0.09) 54%, transparent 55%);
  background-size: 34px 34px;
  opacity: 0.55;
  z-index: -1;
}

.login-brand::after {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(232, 201, 122, 0.24);
  pointer-events: none;
}

.login-brand__content {
  position: relative;
  z-index: 2;
  max-width: 480px;
}

.login-brand__title {
  font-family: var(--serif);
  font-size: clamp(4.5rem, 9vw, 7.5rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--gold-pale);
}

.login-brand__lead {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(251, 246, 234, 0.82);
  margin-top: 26px;
}

.login-brand__quote {
  margin-top: 42px;
  padding-left: 22px;
  border-left: 2px solid var(--gold);
  font-family: var(--serif);
  font-size: 1.4rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--gold-light);
  max-width: 380px;
}

.login-brand__skyline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 230px;
  z-index: 1;
  opacity: 0.9;
}

.login-brand__seal {
  position: absolute;
  right: 42px;
  bottom: 34px;
  z-index: 2;
  writing-mode: vertical-rl;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 0.64rem;
  color: rgba(232, 201, 122, 0.65);
}

.marawa {
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(
    to right,
    var(--maroon-soft) 0 33.33%,
    #17110f 33.33% 66.66%,
    var(--gold) 66.66% 100%
  );
  z-index: 3;
}

.marawa--login {
  top: 0;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 48px;
  background:
    radial-gradient(circle at 70% 20%, rgba(201, 154, 63, 0.1), transparent 30%),
    var(--paper);
}

.login-panel__inner {
  width: min(100%, 420px);
}

.login-mobile-brand {
  display: none;
}

.login-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-card__head h2 {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--maroon-deep);
  margin-top: 14px;
}

.login-card__head p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-top: 8px;
}

.login-card__foot {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}

.login-hint {
  margin-top: 28px;
  padding: 14px 16px;
  border: 1px dashed rgba(201, 154, 63, 0.5);
  border-radius: 12px;
  background: rgba(246, 232, 197, 0.35);
  font-size: 0.78rem;
  line-height: 1.6;
  color: #6d5732;
}

.ornament-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0;
  color: var(--gold);
}

.ornament-rule span {
  height: 1px;
  flex: 1;
  max-width: 90px;
  background: currentColor;
  opacity: 0.55;
}

.ornament-rule i {
  width: 9px;
  height: 9px;
  transform: rotate(45deg);
  border: 1px solid currentColor;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(92, 22, 34, 0.08);
  color: var(--maroon);
}

.badge--gold {
  background: rgba(201, 154, 63, 0.16);
  color: #8a651d;
}

.badge--hadir {
  background: rgba(47, 122, 92, 0.12);
  color: var(--green);
}

.badge--tidak {
  background: rgba(178, 58, 58, 0.12);
  color: var(--danger);
}

.badge--ragu {
  background: rgba(201, 154, 63, 0.16);
  color: #8a651d;
}

/* ---------- Controls ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #5f4b43;
  letter-spacing: 0.01em;
}

.field__label em {
  color: var(--danger);
  font-style: normal;
}

.field input,
.field textarea,
.field select,
.search-box input {
  width: 100%;
  border: 1px solid rgba(92, 22, 34, 0.18);
  background: #fffefb;
  border-radius: 11px;
  padding: 11px 13px;
  font-size: 0.9rem;
  color: var(--ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field textarea {
  resize: vertical;
  min-height: 74px;
  line-height: 1.6;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.search-box input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 154, 63, 0.16);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #b5a79e;
}

.field__hint {
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--muted);
}

.field__error {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--danger);
}

.field--error input,
.field--error textarea {
  border-color: rgba(178, 58, 58, 0.65);
  background: #fffafa;
}

.field__control {
  position: relative;
}

.field__control svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #9d887d;
  pointer-events: none;
}

.field__control input {
  padding-left: 42px;
}

.input-prefix {
  display: flex;
  align-items: stretch;
  border: 1px solid rgba(92, 22, 34, 0.18);
  border-radius: 11px;
  overflow: hidden;
  background: #fffefb;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.input-prefix:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 154, 63, 0.16);
}

.input-prefix > span {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: rgba(92, 22, 34, 0.05);
  border-right: 1px solid rgba(92, 22, 34, 0.1);
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.input-prefix input {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
}

.input-prefix--at > span {
  font-weight: 700;
  color: var(--maroon-soft);
  background: transparent;
  border-right: 0;
  padding-right: 0;
}

.input-prefix--at input {
  padding-left: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 11px 18px;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
  transition: transform 0.16s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.btn svg {
  width: 17px;
  height: 17px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: linear-gradient(140deg, var(--maroon-soft), var(--maroon));
  color: var(--gold-pale);
  box-shadow: 0 10px 26px -16px rgba(92, 22, 34, 0.8);
}

.btn--primary:hover {
  background: linear-gradient(140deg, #8a2939, #4c111a);
}

.btn--ghost {
  background: rgba(255, 253, 248, 0.72);
  border-color: rgba(92, 22, 34, 0.16);
  color: #553d36;
}

.btn--ghost:hover {
  background: #fff;
  border-color: rgba(201, 154, 63, 0.6);
}

.btn--danger {
  background: rgba(178, 58, 58, 0.07);
  border-color: rgba(178, 58, 58, 0.2);
  color: var(--danger);
}

.btn--danger:hover {
  background: rgba(178, 58, 58, 0.12);
}

.btn--small {
  padding: 8px 12px;
  font-size: 0.76rem;
  border-radius: 9px;
}

.btn--block {
  width: 100%;
  padding: 13px 18px;
}

.alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 15px;
  border-radius: 11px;
  font-size: 0.84rem;
  line-height: 1.55;
}

.alert svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.alert--error {
  background: #fdf0ef;
  border: 1px solid rgba(178, 58, 58, 0.2);
  color: #8a2f2f;
}

.alert strong {
  display: block;
  margin-bottom: 2px;
}

.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: inline;
}

.htmx-request .btn__label,
.htmx-request > span:not(.htmx-indicator) {
  display: none;
}

/* ---------- Layout ---------- */

.admin-layout {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 30px 22px 24px;
  color: rgba(251, 246, 234, 0.78);
  background:
    radial-gradient(circle at 30% 0%, rgba(201, 154, 63, 0.18), transparent 35%),
    linear-gradient(180deg, #5c1622 0%, #42101a 55%, #2c090f 100%);
  overflow: hidden;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(45deg, transparent 46%, rgba(232, 201, 122, 0.06) 47%, rgba(232, 201, 122, 0.06) 53%, transparent 54%),
    linear-gradient(-45deg, transparent 46%, rgba(232, 201, 122, 0.06) 47%, rgba(232, 201, 122, 0.06) 53%, transparent 54%);
  background-size: 30px 30px;
  pointer-events: none;
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 26px;
}

.brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--gold-light);
  background: rgba(232, 201, 122, 0.1);
  border: 1px solid rgba(232, 201, 122, 0.28);
}

.brand__mark svg {
  width: 26px;
  height: 26px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__text strong {
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--gold-pale);
  letter-spacing: 0.01em;
}

.brand__text small {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(232, 201, 122, 0.7);
  margin-top: 3px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 14px;
}

.side-nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 500;
  color: rgba(251, 246, 234, 0.72);
  transition: background 0.18s ease, color 0.18s ease;
}

.side-nav__item svg {
  width: 19px;
  height: 19px;
  opacity: 0.85;
}

.side-nav__item:hover {
  background: rgba(232, 201, 122, 0.08);
  color: var(--gold-pale);
}

.side-nav__item.is-active {
  background: rgba(232, 201, 122, 0.13);
  color: var(--gold-pale);
  box-shadow: inset 2px 0 0 var(--gold-light);
}

.sidebar__foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar__quote {
  padding: 16px 14px;
  border: 1px solid rgba(232, 201, 122, 0.16);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.12);
}

.sidebar__quote span {
  display: block;
  width: 26px;
  height: 1px;
  background: var(--gold);
  margin-bottom: 10px;
  opacity: 0.65;
}

.sidebar__quote p {
  font-family: var(--serif);
  font-size: 0.96rem;
  font-style: italic;
  line-height: 1.5;
  color: rgba(246, 232, 197, 0.82);
}

.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 0;
  background: transparent;
  color: rgba(251, 246, 234, 0.6);
  font-size: 0.78rem;
  padding: 4px 6px;
  transition: color 0.18s ease;
}

.logout-btn:hover {
  color: var(--gold-light);
}

.logout-btn svg {
  width: 17px;
  height: 17px;
}

.admin-main {
  margin-left: var(--sidebar-w);
  padding: 42px clamp(24px, 4vw, 60px) 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 1500px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}

.page-head h1 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 3.4vw, 3rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--maroon-deep);
}

.page-head h1 em {
  font-style: italic;
  color: var(--gold);
}

.page-head__sub {
  margin-top: 8px;
  max-width: 600px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.page-head__actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.page-head--form,
.page-head--rsvp {
  align-items: flex-end;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 16px;
  transition: color 0.18s ease;
}

.back-link:hover {
  color: var(--maroon);
}

.back-link svg {
  width: 15px;
  height: 15px;
}

.mobile-bar {
  display: none;
}

.notice {
  padding: 14px 17px;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.55;
  margin-bottom: 22px;
}

.notice--success {
  background: rgba(47, 122, 92, 0.08);
  border: 1px solid rgba(47, 122, 92, 0.2);
  color: #285f49;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 36px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px 19px;
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid rgba(92, 22, 34, 0.08);
  box-shadow: 0 8px 24px -24px rgba(57, 13, 21, 0.4);
}

.stat-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.stat-card__icon svg {
  width: 21px;
  height: 21px;
}

.stat-card__icon--maroon {
  background: rgba(92, 22, 34, 0.09);
  color: var(--maroon-soft);
}

.stat-card__icon--gold {
  background: rgba(201, 154, 63, 0.15);
  color: #a57924;
}

.stat-card__icon--green {
  background: rgba(47, 122, 92, 0.1);
  color: var(--green);
}

.stat-card__icon--blue {
  background: rgba(59, 110, 165, 0.1);
  color: var(--blue);
}

.stat-card strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1;
  color: var(--maroon-deep);
}

.stat-card span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
}

.stats-grid--compact {
  margin-bottom: 26px;
}

.dashboard-section {
  margin-bottom: 20px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-heading h2 {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--maroon-deep);
}

.section-heading p {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 3px;
}

.count-pill {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(92, 22, 34, 0.05);
  padding: 6px 12px;
  border-radius: 999px;
}

.invitation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 18px;
}

.inv-card {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px;
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(92, 22, 34, 0.09);
  box-shadow: 0 14px 34px -30px rgba(57, 13, 21, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.inv-card:hover {
  transform: translateY(-2px);
  border-color: rgba(201, 154, 63, 0.35);
  box-shadow: 0 22px 44px -32px rgba(57, 13, 21, 0.5);
}

.inv-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inv-card__views {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  color: var(--muted);
}

.inv-card__views svg {
  width: 15px;
  height: 15px;
}

.inv-card__couple {
  display: flex;
  align-items: center;
  gap: 13px;
}

.avatar-pair {
  display: flex;
  flex: 0 0 auto;
}

.avatar-pair img,
.avatar-pair span {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--paper);
  object-fit: cover;
  background: linear-gradient(145deg, #f2e4c7, #d9bd80);
  color: var(--maroon);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 600;
}

.avatar-pair > :last-child {
  margin-left: -12px;
}

.inv-card__names h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--maroon-deep);
}

.inv-card__names h3 em {
  color: var(--gold);
  font-style: italic;
  font-size: 0.9em;
}

.inv-card__slug {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 2px;
}

.inv-card__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.75rem;
  color: #6b574d;
}

.inv-card__meta span {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-card__meta svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--gold);
}

.inv-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
}

.inv-card__stats > div {
  text-align: center;
  border-right: 1px solid var(--line);
}

.inv-card__stats > div:last-child {
  border-right: 0;
}

.inv-card__stats strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--maroon);
}

.inv-card__stats span {
  font-size: 0.63rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.inv-card__link {
  display: flex;
  gap: 8px;
}

.inv-card__link input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(92, 22, 34, 0.12);
  background: rgba(251, 246, 234, 0.7);
  border-radius: 9px;
  padding: 8px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  color: #6b574d;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(201, 154, 63, 0.35);
  background: rgba(201, 154, 63, 0.1);
  color: #7d5b1c;
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 0.72rem;
  font-weight: 600;
  flex: 0 0 auto;
  transition: background 0.18s ease;
}

.copy-btn:hover {
  background: rgba(201, 154, 63, 0.2);
}

.copy-btn svg {
  width: 15px;
  height: 15px;
}

.inv-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.inv-card__actions .btn {
  flex: 1;
}

.inv-card__actions .btn--danger {
  flex: 0 0 auto;
}

.empty-state {
  border: 1px dashed rgba(92, 22, 34, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.55);
  padding: 54px 24px;
  text-align: center;
}

.empty-state__mark {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(201, 154, 63, 0.12);
  color: var(--gold);
}

.empty-state__mark svg {
  width: 34px;
  height: 34px;
}

.empty-state h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--maroon-deep);
}

.empty-state p {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 7px auto 20px;
  max-width: 340px;
}

.admin-footer {
  margin-top: auto;
  padding-top: 36px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.68rem;
  color: #9a8a80;
  letter-spacing: 0.02em;
}

/* ---------- Form ---------- */

.invitation-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 1080px;
}

.form-card {
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(92, 22, 34, 0.09);
  box-shadow: 0 14px 34px -32px rgba(57, 13, 21, 0.4);
  overflow: hidden;
}

.form-card__head {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(251, 246, 234, 0.7), transparent);
}

.form-card__num {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  padding-top: 3px;
}

.form-card__head h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--maroon-deep);
}

.form-card__head p {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}

.form-card__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
}

.split-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-subcard {
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(92, 22, 34, 0.1);
  border-radius: 13px;
  background: rgba(251, 246, 234, 0.32);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-subcard legend {
  padding: 0 7px;
  margin-left: -4px;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--maroon);
}

.two-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 12px;
}

.switch-field {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 14px 15px;
  border: 1px solid rgba(92, 22, 34, 0.1);
  border-radius: 12px;
  background: rgba(251, 246, 234, 0.32);
}

.switch-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-field__box {
  position: relative;
  width: 40px;
  height: 23px;
  border-radius: 999px;
  background: #d8cfc4;
  flex: 0 0 auto;
  margin-top: 1px;
  transition: background 0.2s ease;
}

.switch-field__box::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}

.switch-field input:checked + .switch-field__box {
  background: var(--maroon-soft);
}

.switch-field input:checked + .switch-field__box::after {
  transform: translateX(17px);
}

.switch-field input:focus-visible + .switch-field__box {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.switch-field strong {
  display: block;
  font-size: 0.82rem;
  color: var(--ink);
}

.switch-field small {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.5;
}

.form-actions {
  position: sticky;
  bottom: 14px;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 13px;
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.85);
  border: 1px solid rgba(92, 22, 34, 0.1);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 42px -30px rgba(57, 13, 21, 0.5);
}

/* ---------- RSVP page ---------- */

.share-strip {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(92, 22, 34, 0.06), rgba(201, 154, 63, 0.08));
  border: 1px solid rgba(201, 154, 63, 0.22);
  margin-bottom: 20px;
}

.share-strip__label {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.share-strip__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(201, 154, 63, 0.18);
  color: #8a651d;
  flex: 0 0 auto;
}

.share-strip__icon svg {
  width: 19px;
  height: 19px;
}

.share-strip__label strong {
  display: block;
  font-size: 0.8rem;
  color: #5f4630;
}

.share-strip__label span {
  display: block;
  font-size: 0.7rem;
  color: #8b7462;
  margin-top: 1px;
}

.share-strip__input {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
  width: min(100%, 420px);
}

.share-strip__input input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(92, 22, 34, 0.14);
  background: #fffefb;
  border-radius: 9px;
  padding: 9px 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  color: #6b574d;
}

.table-card {
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(92, 22, 34, 0.09);
  overflow: hidden;
  box-shadow: 0 14px 34px -32px rgba(57, 13, 21, 0.4);
}

.table-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 19px 22px;
  border-bottom: 1px solid var(--line);
}

.table-card__head h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--maroon-deep);
}

.table-card__head p {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 2px;
}

.table-tools {
  display: flex;
  align-items: center;
  gap: 9px;
}

.search-box {
  position: relative;
}

.search-box svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #a08d82;
}

.search-box input {
  width: 210px;
  padding: 8px 11px 8px 33px;
  font-size: 0.78rem;
  border-radius: 9px;
  background: #fffefb;
}

.table-wrap {
  overflow-x: auto;
}

.rsvp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.rsvp-table th {
  text-align: left;
  padding: 11px 16px;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  background: rgba(251, 246, 234, 0.55);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.rsvp-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(92, 22, 34, 0.06);
  vertical-align: top;
}

.rsvp-table tbody tr:last-child td {
  border-bottom: 0;
}

.rsvp-table tbody tr:hover {
  background: rgba(251, 246, 234, 0.3);
}

.rsvp-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 170px;
}

.rsvp-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #f2e4c7, #d9bd80);
  color: var(--maroon);
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.rsvp-person strong {
  display: block;
  font-size: 0.82rem;
  color: var(--ink);
}

.rsvp-person time {
  display: block;
  font-size: 0.65rem;
  color: #9a8a80;
  margin-top: 1px;
}

.rsvp-message {
  max-width: 340px;
  min-width: 220px;
  color: #5f4b43;
  line-height: 1.55;
  font-size: 0.78rem;
  white-space: pre-line;
}

.rsvp-actions {
  width: 48px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(92, 22, 34, 0.12);
  background: transparent;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: background 0.18s ease, color 0.18s ease;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.icon-btn--danger:hover {
  background: rgba(178, 58, 58, 0.08);
  color: var(--danger);
  border-color: rgba(178, 58, 58, 0.2);
}

.table-empty {
  text-align: center;
  padding: 46px 20px !important;
  color: var(--muted);
}

.table-empty__icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(201, 154, 63, 0.12);
  color: var(--gold);
  margin: 0 auto 10px;
}

.table-empty__icon svg {
  width: 24px;
  height: 24px;
}

.table-empty strong {
  display: block;
  font-size: 0.86rem;
  color: var(--ink);
}

.table-empty p {
  font-size: 0.75rem;
  margin-top: 3px;
}

/* ---------- Errors & toast ---------- */

.error-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 20%, rgba(201, 154, 63, 0.14), transparent 40%),
    linear-gradient(160deg, #5c1622, #2c090f);
}

.error-card {
  max-width: 460px;
  text-align: center;
  padding: 42px 34px;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.6);
}

.error-card h1 {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--maroon-deep);
  margin-bottom: 10px;
}

.error-card p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 22px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  z-index: 100;
  padding: 11px 18px;
  border-radius: 10px;
  background: rgba(42, 26, 24, 0.94);
  color: #fbf6ea;
  font-size: 0.79rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 12px 34px -16px rgba(0, 0, 0, 0.55);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  :root {
    --sidebar-w: 250px;
  }

  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-brand {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    padding: 40px 24px;
    background:
      radial-gradient(circle at 80% 0%, rgba(201, 154, 63, 0.16), transparent 35%),
      linear-gradient(160deg, #fffdf8, #f8f0e2);
  }

  .login-mobile-brand {
    display: block;
    margin-bottom: 34px;
  }

  .login-mobile-brand span {
    display: block;
    font-family: var(--serif);
    font-size: 2.4rem;
    font-weight: 600;
    line-height: 1;
    color: var(--maroon);
  }

  .login-mobile-brand small {
    display: block;
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-top: 5px;
  }

  .share-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 13px;
  }

  .share-strip__input {
    width: 100%;
  }
}

@media (max-width: 880px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    width: min(82vw, 300px);
    box-shadow: 20px 0 50px -30px rgba(0, 0, 0, 0.6);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .admin-main {
    margin-left: 0;
    padding: 26px 20px 34px;
  }

  .mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 12px 18px;
    background: rgba(255, 253, 248, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }

  .menu-toggle {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(92, 22, 34, 0.12);
    background: transparent;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
  }

  .menu-toggle span {
    width: 17px;
    height: 1.6px;
    background: var(--maroon);
    border-radius: 2px;
  }

  .mobile-brand {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--maroon-deep);
  }

  .mobile-brand span {
    color: var(--gold);
  }

  .mobile-new {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--maroon);
    color: var(--gold-pale);
    font-size: 1.3rem;
    line-height: 1;
  }

  .page-head {
    flex-direction: column;
    gap: 16px;
  }

  .page-head__actions {
    width: 100%;
  }

  .page-head__actions .btn {
    flex: 1;
  }

  .admin-footer {
    flex-direction: column;
    gap: 5px;
  }
}

@media (max-width: 720px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 26px;
  }

  .stat-card {
    padding: 14px;
    gap: 11px;
  }

  .stat-card__icon {
    width: 38px;
    height: 38px;
  }

  .stat-card strong {
    font-size: 1.45rem;
  }

  .invitation-grid {
    grid-template-columns: 1fr;
  }

  .split-fields {
    grid-template-columns: 1fr;
  }

  .form-card__body,
  .form-card__head {
    padding: 18px;
  }

  .table-card__head {
    flex-direction: column;
    align-items: stretch;
  }

  .table-tools {
    flex-wrap: wrap;
  }

  .search-box {
    flex: 1;
  }

  .search-box input {
    width: 100%;
  }

  .rsvp-table th:nth-child(3),
  .rsvp-table td:nth-child(3) {
    display: none;
  }

  .form-actions {
    bottom: 8px;
  }

  .form-actions .btn {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .two-fields {
    grid-template-columns: 1fr;
  }

  .inv-card__actions .btn {
    flex: 1 1 40%;
  }

  .share-strip__label span code {
    display: none;
  }
}
