:root {
  --bg: #f6f4f1;
  --surface: #ffffff;
  --ink: #26221e;
  --muted: #746c64;
  --accent: #a8792f;
  --accent-dark: #7c5a20;
  --border: #e7e0d6;
  --success: #2f7a4f;
  --warn: #c98a2c;
  --danger: #a33c3c;
  --radius: 14px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
a { color: var(--accent-dark); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar .brand { font-weight: 700; font-size: 1.2rem; color: var(--accent-dark); text-decoration: none; }
.topbar nav a { margin-left: 18px; text-decoration: none; color: var(--ink); font-size: 0.95rem; }
.topbar form { display: inline; }

.container { max-width: 1080px; margin: 0 auto; padding: 28px 20px 60px; }
.container.narrow { max-width: 480px; }

.card-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

h1 { font-size: 1.7rem; margin: 0 0 6px; }
h2 { font-size: 1.25rem; margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.btn {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--accent-dark);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: none;
}
.btn:hover { background: var(--accent-dark); }
.btn.secondary { background: transparent; color: var(--accent-dark); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn.danger { background: var(--danger); border-color: #7c2a2a; }
.btn.sm { padding: 5px 10px; font-size: 0.8rem; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

input, select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fffdfb;
  font-family: inherit;
}
label { display: block; font-size: 0.85rem; color: var(--muted); margin: 12px 0 5px; }
.field-row { display: flex; gap: 14px; flex-wrap: wrap; }
.field-row > div { flex: 1; min-width: 180px; }

.error-box { background: #fbe9e9; border: 1px solid #e7b8b8; color: #8a2f2f; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.notice-box { background: #eaf3ec; border: 1px solid #bcdcc4; color: #295c3c; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
tr:hover td { background: #faf8f4; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; color: #fff; }

.progress { background: var(--border); border-radius: 999px; height: 10px; overflow: hidden; }
.progress > div { background: var(--success); height: 100%; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

.event-tile { display: block; text-decoration: none; color: inherit; }
.event-tile:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }

/* ---------- Invitation Card Themes ---------- */
.invite-wrap { display: flex; justify-content: center; padding: 40px 16px; min-height: 100vh; background: #efe9e0; }
.invite-card {
  width: 100%;
  max-width: 460px;
  border-radius: 18px;
  padding: 46px 32px;
  text-align: center;
  position: relative;
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
  color: #fff;
}
.invite-card .eyebrow { text-transform: uppercase; letter-spacing: 0.25em; font-size: 0.72rem; opacity: 0.85; }
.invite-card h1 { font-family: Georgia, 'Times New Roman', serif; font-size: 2rem; margin: 14px 0; }
.invite-card .divider { width: 60px; height: 2px; background: rgba(255,255,255,0.6); margin: 18px auto; }
.invite-card .guest-name { font-size: 1.3rem; font-weight: 600; margin-bottom: 4px; }
.invite-card .details { margin: 18px 0; font-size: 0.98rem; opacity: 0.95; }
.invite-card .details div { margin: 4px 0; }
.invite-card .status-pill { display: inline-block; margin-top: 20px; padding: 6px 16px; border-radius: 999px; background: rgba(255,255,255,0.18); font-size: 0.85rem; }
.invite-card .rsvp-row { margin-top: 26px; display: flex; gap: 10px; justify-content: center; }
.invite-card .rsvp-row button {
  padding: 10px 22px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,0.8);
  background: transparent; color: #fff; font-weight: 600; cursor: pointer;
}
.invite-card .rsvp-row button.active, .invite-card .rsvp-row button:hover { background: rgba(255,255,255,0.9); color: #26221e; }

.theme-classic-gold { background: linear-gradient(160deg, #7c5a20, #a8792f 55%, #c9a659); }
.theme-elegant-navy { background: linear-gradient(160deg, #12213d, #1f3a63 55%, #35578c); }
.theme-floral-blush { background: linear-gradient(160deg, #7a3b52, #a8546f 55%, #d086a0); }
.theme-modern-mono { background: linear-gradient(160deg, #1c1c1c, #333333 55%, #4d4d4d); }
.theme-garden-green { background: linear-gradient(160deg, #1f4a34, #2f7a4f 55%, #5fa87d); }

.thankyou-note {
  margin-top: 26px; padding: 16px; border-radius: 12px; background: rgba(255,255,255,0.14);
  font-size: 0.92rem; font-style: italic;
}

.pending-link-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.pending-link-item:last-child { border-bottom: none; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.stat-box { margin-bottom: 0; }
.role-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--accent-dark); color: #fff; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; margin-left: 4px; }
.check-label { display: inline-flex !important; align-items: center; gap: 6px; font-size: 0.88rem; color: var(--ink); text-transform: none; margin: 0 !important; white-space: nowrap; }
.check-label input[type=checkbox] { width: auto; }
.num { font-variant-numeric: tabular-nums; }

.directions-btn {
  display: inline-block; margin-top: 16px; padding: 9px 18px; border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,.85); color: #fff; text-decoration: none; font-weight: 600; font-size: 0.86rem;
}
.directions-btn:hover { background: rgba(255,255,255,.92); color: #26221e; }

.entrance-pass { margin-top: 28px; padding: 18px; border-radius: 14px; background: rgba(255,255,255,.92); color: #26221e; text-align: center; }
.entrance-pass-label { font-size: 0.72rem; font-weight: 700; letter-spacing: .08em; color: #6b6258; margin-bottom: 10px; }
.entrance-pass img { border-radius: 8px; }
.entrance-pass p { margin: 10px 0 4px; }
.entrance-pass a { display: inline-block; margin-top: 4px; }
