:root {
  --pink: #c94f6d;
  --pink-dark: #a63a55;
  --pink-light: #fbeaee;
  --ink: #3d3438;
  --muted: #8d7f83;
  --bg: #fdf9fa;
  --card: #ffffff;
  --line: #eeddde;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 760px; }

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all .2s;
}
.btn-sm { padding: 8px 18px; font-size: 13.5px; }
.btn-primary { background: var(--pink); color: #fff; }
.btn-primary:hover { background: var(--pink-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--pink); border: 1px solid var(--pink); }
.btn-outline:hover { background: var(--pink); color: #fff; }
.btn-danger { background: #c62828; color: #fff; }
.btn-danger:hover { background: #a31f1f; }
.btn-ghost { background: #f1eaeb; color: var(--ink); }
.btn-ghost:hover { background: #e6dbdd; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.logo em { color: var(--pink); font-style: normal; }
.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav a { color: var(--ink); text-decoration: none; font-size: 14.5px; }
.main-nav a:hover { color: var(--pink); }

/* ===== Hero ===== */
.hero {
  position: relative;
  text-align: center;
  padding: 96px 0 90px;
  background:
    radial-gradient(circle at 15% 20%, var(--pink-light) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, var(--pink-light) 0%, transparent 40%);
  overflow: hidden;
}
.hero-eyebrow {
  font-family: 'Dancing Script', cursive;
  font-size: 28px;
  color: var(--pink);
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.15;
  margin: 8px 0 18px;
}
.hero-title span { color: var(--pink); }
.hero-sub { max-width: 640px; margin: 0 auto 30px; color: var(--muted); font-size: 16px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-hearts {
  position: absolute;
  right: 6%;
  top: 18%;
  font-size: 120px;
  opacity: .07;
  pointer-events: none;
}

/* ===== Sections ===== */
.section { padding: 72px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(26px, 4vw, 36px);
  text-align: center;
  margin-bottom: 36px;
  position: relative;
  padding-bottom: 16px;
}
.section-title::after {
  content: '❦';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -8px;
  color: var(--pink);
  font-size: 18px;
}
.lead { color: var(--muted); font-size: 16px; margin-bottom: 16px; text-align: center; }

/* ===== Features ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.feature {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 20px;
  text-align: center;
  font-size: 14.5px;
  transition: transform .2s, box-shadow .2s;
}
.feature:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,.06); }
.feature-icon { font-size: 34px; margin-bottom: 10px; }

/* ===== Why ===== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}
.why {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--pink);
  border-radius: 12px;
  padding: 24px 24px;
}
.why h3 { font-size: 17px; margin-bottom: 6px; }
.why p { color: var(--muted); font-size: 14.5px; }

/* ===== Invitation cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.invite-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  transition: transform .2s, box-shadow .2s;
}
.invite-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(0,0,0,.1); }
.invite-card-preview {
  aspect-ratio: 4/5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(160deg, var(--cardbg) 0%, var(--c2) 100%);
  position: relative;
}
.invite-card-preview::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid var(--c1);
  border-radius: 10px;
  opacity: .5;
}
.invite-card-orn { font-size: 26px; color: var(--c1); }
.invite-card-names {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  text-align: center;
  color: var(--c3);
  line-height: 1.35;
}
.invite-card-theme {
  font-family: 'Dancing Script', cursive;
  font-size: 18px;
  color: var(--c1);
}
.invite-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 500;
  border-top: 1px solid var(--line);
}

/* ===== Footer ===== */
.site-footer {
  padding: 30px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  border-top: 1px solid var(--line);
}

/* ===== Footer thông tin studio ===== */
.studio-footer {
  background: #2b2226;
  color: #e8dde1;
  padding: 40px 0 20px;
  margin-top: 40px;
}
.studio-footer .studio-name {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}
.studio-footer .studio-name em { color: var(--pink); font-style: normal; }
.studio-footer .studio-site a { color: var(--pink); text-decoration: none; font-weight: 600; }
.studio-footer .studio-site a:hover { text-decoration: underline; }
.studio-footer .studio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px 28px;
  margin: 24px auto 0;
  max-width: 860px;
  text-align: left;
}
.studio-footer .studio-item {
  background: rgba(255,255,255,.05);
  border-radius: 12px;
  padding: 14px 16px;
  line-height: 1.55;
  font-size: 14px;
}
.studio-footer .studio-item strong { color: #fff; display: block; margin-bottom: 3px; }
.studio-footer .studio-item a { color: #e8dde1; text-decoration: none; }
.studio-footer .studio-item a:hover { color: var(--pink); }
.studio-footer .map-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--pink) !important;
  border: 1px solid rgba(233, 30, 99, .35);
  border-radius: 20px;
  padding: 3px 10px;
}
.studio-footer .map-link:hover { background: rgba(233, 30, 99, .12); }
.studio-footer .copyright {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 12.5px;
  color: #a8969c;
}

/* ===== 404 ===== */
.notfound { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.notfound h1 { font-family: 'Playfair Display', serif; font-size: 80px; color: var(--pink); }

/* =====================================================
   Admin
===================================================== */
.admin-body { background: #f6f4f5; }
.admin-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.admin-header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.admin-nav { display: flex; gap: 16px; align-items: center; }
.admin-nav a { color: var(--ink); text-decoration: none; font-size: 14px; }
.admin-nav a:hover { color: var(--pink); }

.admin-main { padding: 32px 0 64px; }
.page-title { font-family: 'Playfair Display', serif; font-size: 28px; margin-bottom: 20px; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
}
.stat .num { font-family: 'Playfair Display', serif; font-size: 32px; color: var(--pink); font-weight: 700; }
.stat .lbl { color: var(--muted); font-size: 13.5px; }

.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.admin-table th, .admin-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table th { background: #faf7f8; font-weight: 600; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.badge.ok { background: #e6f4e7; color: #2e7d32; }
.badge.no { background: #fdeaea; color: #c62828; }
.badge.theme { background: var(--pink-light); color: var(--pink-dark); }

/* Admin forms */
.admin-form { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.form-section { margin-bottom: 30px; }
.form-section h3 {
  font-size: 16px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--pink-light);
  color: var(--pink-dark);
}
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 12px; }
.admin-form label { display: block; font-size: 13px; font-weight: 500; color: var(--ink); }
.admin-form input, .admin-form select, .admin-form textarea {
  width: 100%;
  margin-top: 5px;
  padding: 10px 12px;
  border: 1px solid #ddd0d2;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
}
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(201,79,109,.12);
}
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.repeat-item {
  border: 1px dashed #ddc9cd;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
  background: #fdfbfc;
}
.repeat-remove {
  position: absolute;
  top: 10px; right: 10px;
  background: #fdeaea;
  color: #c62828;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.repeat-remove:hover { background: #f8d7d7; }

.form-footer { display: flex; gap: 12px; align-items: center; margin-top: 8px; flex-wrap: wrap; }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,.07);
}
.login-card h1 { font-family: 'Playfair Display', serif; font-size: 24px; margin-bottom: 6px; }
.login-card p { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.login-card input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd0d2;
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 14px;
  font-family: inherit;
}
.login-card .btn { width: 100%; }
.login-error { color: #c62828; font-size: 13.5px; margin-bottom: 10px; }

.share-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 24px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.share-box code {
  background: #faf4f5;
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  word-break: break-all;
}

.section-gap { margin-top: 34px; }
.subhead { font-size: 18px; margin-bottom: 14px; font-weight: 600; }
.empty { color: var(--muted); font-size: 14px; padding: 18px; text-align: center; }

@media (max-width: 640px) {
  .main-nav a:not(.btn) { display: none; }
  .logo { font-size: 17px; white-space: nowrap; }
  .main-nav { gap: 8px; }
  .main-nav .btn { white-space: nowrap; padding: 8px 12px; }
}
.main-nav .btn { white-space: nowrap; }
