﻿:root {
  /* VowCraft soft-pink theme. Variable NAMES are kept stable (gold/orange
     included) so every existing template reference keeps working - only
     the colour VALUES changed, and every one of them now resolves to a
     shade of pink, burgundy, white, green or red. No orange/gold hue
     remains anywhere in the rendered page. */
  --cream: #fceef3;           /* main page background */
  --section-bg: #fff7fa;      /* light section background (insets within white cards) */
  --burgundy: #8a1f40;        /* primary buttons + active navigation */
  --burgundy-dark: #6f1833;   /* button/link hover */
  --gold: #e8afc1;            /* soft-pink borders and highlights */
  --gold-light: #fbe0ea;      /* soft-pink tint for highlight backgrounds */
  --white: #ffffff;           /* cards */
  --text: #391923;            /* main text */
  --text-muted: #7a4a5a;      /* muted/secondary text, still readable on white and cream */
  --green: #2e7d4f;           /* success / delivered - unchanged */
  --green-bg: #e5f3ea;
  --orange: #8a1f40;          /* "needs attention" tone - now soft pink/burgundy, no orange hue */
  --orange-bg: #fbe0ea;
  --red: #a3312a;             /* failed / error - unchanged */
  --red-bg: #fbe6e4;
  /* SMS Fallback page only (app/templates/sms_fallback.html) - genuinely
     distinct amber/blue/purple hues, deliberately outside the rest of
     the pink/burgundy/green/red theme above, so WhatsApp "Unconfirmed"
     and every SMS-in-progress/SMS-delivered status stays visually
     unambiguous and never blends with an existing badge colour. */
  --amber: #9c6b0f;
  --amber-bg: #fbf0dc;
  --blue: #2a5fa3;
  --blue-bg: #e6eef8;
  --purple: #6a3fa0;
  --purple-bg: #efe6f8;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 6px 20px rgba(138, 31, 64, 0.08);
  --shadow-lg: 0 12px 34px rgba(138, 31, 64, 0.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--burgundy); }

code {
  background: var(--section-bg);
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 13px;
}

#app { min-height: 100vh; display: flex; flex-direction: column; }

button { font-family: inherit; cursor: pointer; }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--white);
  border-bottom: 1px solid rgba(138, 31, 64, 0.08);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.brand { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.brand-name { font-size: 28px; font-weight: 700; color: var(--burgundy); letter-spacing: 0.5px; }
.brand-subtitle { font-size: 15px; color: var(--text-muted); font-weight: 500; }
.demo-badge {
  background: var(--gold-light);
  color: var(--burgundy-dark);
  border: 1px solid var(--gold);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
}

/* ---------- Layout ---------- */
.body-layout { display: flex; flex: 1; min-height: 0; }
.sidebar {
  width: 250px;
  flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid rgba(138, 31, 64, 0.08);
  padding: 24px 14px;
}
.nav-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: var(--section-bg); }
.nav-item.active { background: var(--burgundy); color: var(--white); }

.main { flex: 1; padding: 32px 40px 60px; overflow-x: hidden; min-width: 0; }

.page-title { font-size: 24px; font-weight: 700; color: var(--burgundy); margin: 0 0 6px; }
.page-subtitle { font-size: 15px; color: var(--text-muted); max-width: 720px; line-height: 1.5; margin: 0 0 28px; }

/* ---------- Cards ---------- */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  border-top: 4px solid var(--gold);
  display: block;
  text-decoration: none;
  color: inherit;
}
.stat-card .stat-value { font-size: 30px; font-weight: 700; color: var(--burgundy); }
.stat-card .stat-label { margin-top: 6px; font-size: 14px; color: var(--text-muted); font-weight: 500; }
.stat-card-clickable {
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.stat-card-clickable:hover, .stat-card-clickable:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--burgundy);
  outline: none;
}
.stat-card-hint { margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--burgundy); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  border: none;
  text-decoration: none;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--burgundy); color: var(--white); box-shadow: 0 4px 12px rgba(138, 31, 64, 0.25); }
.btn-primary:hover { background: var(--burgundy-dark); }
.btn-secondary { background: var(--white); color: var(--burgundy); border: 1.5px solid var(--burgundy); }
.btn-secondary:hover { background: var(--section-bg); }
.btn-danger { background: var(--red); color: var(--white); box-shadow: 0 4px 12px rgba(163, 49, 42, 0.25); margin-top: 6px; }
.btn-danger:hover { background: #862621; }
.btn-sm { padding: 8px 16px; font-size: 13.5px; }
.btn-link { background: transparent; border: none; color: var(--burgundy); font-weight: 600; text-decoration: underline; padding: 6px 4px; font-size: 14px; }

/* ---------- Forms ---------- */
.field-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
select, input[type="text"], input[type="tel"], input[type="date"], textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gold);
  background: var(--white);
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
}
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--burgundy); }

/* ---------- Upload area ---------- */
.upload-area {
  border: 2.5px dashed var(--gold);
  border-radius: var(--radius);
  background: var(--section-bg);
  padding: 34px 24px;
  text-align: center;
  margin-bottom: 20px;
}
.upload-area p { font-size: 16px; color: var(--text-muted); margin: 0 0 14px; font-weight: 500; }
.upload-icon { font-size: 34px; margin-bottom: 10px; }
.upload-area input[type="file"] { max-width: 360px; margin: 0 auto; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--white); }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { text-align: left; padding: 14px 18px; font-size: 14.5px; border-bottom: 1px solid #f6dce6; }
th { color: var(--text-muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.3px; background: var(--section-bg); }
tr:last-child td { border-bottom: none; }

.badge { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.badge-ready { background: var(--green-bg); color: var(--green); }
.badge-attention { background: var(--orange-bg); color: var(--orange); }
.badge-failed { background: var(--red-bg); color: var(--red); }
.badge-neutral { background: var(--section-bg); color: var(--text-muted); border: 1px solid var(--gold); }
.badge-pending { background: var(--section-bg); color: var(--text-muted); border: 1px solid var(--gold); }
.badge-retrying { background: var(--gold-light); color: var(--burgundy-dark); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-sms-progress { background: var(--blue-bg); color: var(--blue); }
.badge-sms-delivered { background: var(--purple-bg); color: var(--purple); }

/* ---------- SMS Fallback page ---------- */
.filter-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
dialog.confirm-modal {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 26px;
  max-width: 440px;
  width: 90%;
}
dialog.confirm-modal::backdrop { background: rgba(57, 25, 35, 0.45); }

/* ---------- Summary bar ---------- */
.summary-bar { display: flex; gap: 24px; margin: 16px 0 20px; flex-wrap: wrap; }
.summary-pill { background: var(--white); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 14px 20px; font-size: 14.5px; font-weight: 600; }
.summary-pill.good { color: var(--green); }
.summary-pill.warn { color: var(--orange); }

.info-note {
  background: var(--gold-light);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 14px;
  color: var(--burgundy-dark);
  margin: 18px 0;
  line-height: 1.5;
}

.success-banner { background: var(--green-bg); color: var(--green); border-radius: var(--radius-sm); padding: 14px 18px; font-weight: 600; margin: 18px 0; font-size: 14.5px; }

/* ---------- Step actions ---------- */
.step-actions { display: flex; gap: 14px; margin-top: 22px; flex-wrap: wrap; }

/* ---------- Weddings grid ---------- */
.wedding-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.wedding-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; border-top: 4px solid var(--burgundy); }
.wedding-card h3 { margin: 0 0 10px; color: var(--burgundy); }
.wedding-card p { margin: 4px 0; font-size: 14px; }

/* ---------- WhatsApp-style preview ---------- */
.wa-preview {
  background: var(--gold-light);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  justify-content: flex-start;
  margin-bottom: 22px;
}
.wa-bubble {
  background: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  max-width: 420px;
  box-shadow: 0 2px 8px rgba(138, 31, 64, 0.1);
  white-space: pre-wrap;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text);
}
.wa-button {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: 8px;
  background: #075e54;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.3px;
}

/* ---------- Progress / checkbox ---------- */
.progress-track {
  width: 100%;
  height: 18px;
  background: var(--section-bg);
  border-radius: 999px;
  overflow: hidden;
  margin: 16px 0 10px;
  border: 1px solid var(--gold);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--burgundy));
  border-radius: 999px;
  transition: width 0.6s ease;
}
.progress-label { font-size: 14px; font-weight: 600; color: var(--text-muted); }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0;
  font-size: 14.5px;
  font-weight: 600;
}
.checkbox-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--burgundy); flex-shrink: 0; }

.filter-bar { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 20px; }
.filter-bar > div { min-width: 180px; }

/* ---------- Login page ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--cream);
}
.login-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 36px 32px;
  width: 100%;
  max-width: 380px;
  border-top: 4px solid var(--burgundy);
}
.logged-in-as { font-size: 12.5px; color: var(--text-muted); margin-right: 10px; }
.logout-form { display: inline; }
.logout-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}
.logout-link:hover { color: var(--burgundy); }
.topbar-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ---------- Public legal pages ---------- */
.legal-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 40px 24px 60px;
  background: var(--cream);
}
.legal-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 36px 44px 44px;
  width: 100%;
  max-width: 760px;
  border-top: 4px solid var(--burgundy);
  line-height: 1.6;
}
.legal-nav { display: flex; gap: 18px; flex-wrap: wrap; margin: 4px 0 26px; padding-bottom: 18px; border-bottom: 1px solid var(--gold); }
.legal-nav a { font-weight: 600; font-size: 14px; text-decoration: none; }
.legal-nav a:hover { text-decoration: underline; }
.legal-card h2 { color: var(--burgundy); font-size: 18px; margin: 28px 0 10px; }
.legal-card p, .legal-card li { color: var(--text); font-size: 14.5px; }
.legal-card ul { margin: 8px 0 8px 20px; padding: 0; }
.legal-footer { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--gold); font-size: 12.5px; color: var(--text-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .wedding-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { width: 200px; }
  .main { padding: 26px 22px 50px; }
}
@media (max-width: 720px) {
  .body-layout { flex-direction: column; }
  .sidebar { width: 100%; display: flex; overflow-x: auto; padding: 12px; gap: 6px; }
  .nav-item { margin-bottom: 0; white-space: nowrap; }
  .stat-grid { grid-template-columns: 1fr; }
}
