:root {
  --shine: #2563eb;
  --shine-dark: #1d4fb8;
  --ink: #17263b;
  --ink-deep: #101c2e;
  --bg: #eef2f7;
  --surface: #ffffff;
  --line: #d3dde8;
  --text: #243447;
  --muted: #63748a;
  --ok: #1e7d46;
  --ok-bg: #e6f4ec;
  --gold: #c9a227;
  --radius: 14px;
  --shadow: 0 12px 28px rgba(23, 38, 59, 0.12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner {
  max-width: 1100px; margin: 0 auto; padding: 16px 20px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}
.brand { color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: 0.05em; }
.brand span { color: var(--shine); }
.header-owner { margin: 0 0 0 auto; color: var(--muted); }
.header-owner strong { color: var(--ink); }

.hero { background: linear-gradient(135deg, var(--ink-deep), var(--ink) 60%, #274b73); color: #fff; padding: 42px 0 36px; }
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 26px; align-items: start; }
.eyebrow { color: #9db9e8; text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.78rem; font-weight: 700; margin: 0; }
.hero h1 { font-size: 2.1rem; margin: 10px 0 12px; line-height: 1.18; }
.hero-lede { color: #c6d4e4; max-width: 620px; }
.hero-instruction { color: #eef4fa; max-width: 620px; }

.tally-card { background: var(--surface); color: var(--text); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card-kicker { color: var(--shine-dark); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.76rem; font-weight: 700; margin: 0 0 10px; }
.tally-facts { margin: 0; display: grid; gap: 9px; }
.tally-facts div { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.tally-facts dt { color: var(--muted); }
.tally-facts dd { margin: 0; font-size: 1.35rem; font-weight: 800; color: var(--ink); }
.price-line { border-top: 1px solid var(--line); margin: 14px 0 0; padding-top: 12px; color: var(--muted); }
.price-line strong { color: var(--shine-dark); }

.list-section { padding: 30px 0 6px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-head h2, .messages-section h2, .replies-section h2, .notes-grid h2 { color: var(--ink); }
.campaign-status { color: var(--muted); margin: 8px 0 14px; }
.button {
  border: 0; cursor: pointer; border-radius: 9px; padding: 12px 18px;
  font-size: 0.98rem; font-weight: 700;
}
.button:disabled { opacity: 0.55; cursor: not-allowed; }
.button-primary { background: var(--shine); color: #fff; }
.button-primary:hover:not(:disabled) { background: var(--shine-dark); }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.dead-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.dead-table th, .dead-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.dead-table th { background: #f4f7fb; color: var(--ink); font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.05em; }
.dead-table tr:last-child td { border-bottom: 0; }
.status-cell { font-weight: 700; color: var(--shine-dark); }

.messages-section { padding: 26px 0 6px; }
.section-sub { color: var(--muted); max-width: 720px; }
.message-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 16px 0 18px; }
.message-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.message-to { margin: 0 0 6px; font-weight: 700; color: var(--ink); font-size: 0.92rem; }
.message-body { margin: 0; color: var(--muted); }

.replies-section { padding: 26px 0 6px; }
.replies-grid-layout { display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px; align-items: start; }
.reply-list { display: flex; flex-direction: column; gap: 14px; }
.reply-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.reply-rebook { border-left: 5px solid var(--ok); }
.reply-decline { border-left: 5px solid var(--gold); }
.reply-from { margin: 0 0 5px; font-weight: 700; color: var(--ink); font-size: 0.92rem; }
.reply-text { margin: 0; color: var(--muted); font-style: italic; }
.slot-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 12px; }
.slot-row span { font-weight: 600; color: var(--text); font-size: 0.93rem; }
.slot-btn {
  border: 1.5px solid var(--shine); background: var(--surface); color: var(--shine-dark);
  border-radius: 999px; padding: 7px 14px; font-weight: 700; cursor: pointer; font-size: 0.92rem;
}
.slot-btn:hover:not(:disabled) { background: var(--shine); color: #fff; }
.slot-btn.is-chosen { background: var(--ok); border-color: var(--ok); color: #fff; }
.slot-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.booked-line { margin: 12px 0 0; background: var(--ok-bg); color: var(--ok); border-radius: 8px; padding: 9px 12px; font-weight: 700; }
.no-reply-note { color: var(--muted); }

.owner-alert { background: var(--surface); border: 1.5px solid var(--ok); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.demo-label { color: var(--ok); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.11em; margin: 0; }
.owner-alert h2 { margin: 6px 0 14px; font-size: 1.2rem; }
.alert-details { margin: 0; display: grid; gap: 7px; }
.alert-details div { display: flex; gap: 12px; }
.alert-details dt { color: var(--muted); min-width: 110px; }
.alert-details dd { margin: 0; font-weight: 600; }
.mock-note { color: var(--muted); font-size: 0.86rem; margin: 12px 0 0; }

.notes-section { padding: 34px 0 46px; }
.notes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.notes-grid li { margin-bottom: 8px; color: var(--muted); }
.notes-grid li strong { color: var(--text); }
.notes-grid p { color: var(--muted); }

.site-footer { background: var(--ink-deep); padding: 20px 0 28px; color: #aec0d4; font-size: 0.9rem; }

@media (max-width: 860px) {
  .hero-grid, .message-grid, .replies-grid-layout, .notes-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.7rem; }
  .header-owner { margin-left: 0; }
}

/* $249 Audit line in the price card */
.audit-line { border-top: 1px dashed var(--line); margin: 10px 0 0; padding-top: 10px; color: var(--muted); font-size: 0.92rem; }

/* View toggle + reset bar */
.view-bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.view-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.view-toggle { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; }
.view-btn { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: 0.95rem; padding: 8px 18px; border-radius: 999px; cursor: pointer; }
.view-btn:hover { color: var(--ink); }
.view-btn.is-active { background: var(--shine); color: #fff; }
.button-reset { background: var(--surface); color: var(--shine-dark); border: 1.5px solid var(--shine); }
.button-reset:hover { background: var(--shine); color: #fff; }

button:focus-visible, a:focus-visible { outline: 3px solid var(--shine); outline-offset: 2px; }

/* Owner Admin — the campaign book */
.admin-panel { padding: 30px 0 8px; }
.admin-panel h2 { color: var(--ink); margin: 4px 0 6px; }
.admin-sub { color: var(--muted); max-width: 720px; margin: 0 0 18px; }
.admin-money { background: linear-gradient(135deg, var(--ink-deep), var(--ink) 60%, #274b73); color: #fff; border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.admin-money-label { margin: 0; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.76rem; font-weight: 700; color: #9db9e8; }
.admin-money-value { margin: 4px 0; font-size: 2.6rem; font-weight: 800; line-height: 1.1; }
.admin-money-sub { margin: 0; color: #c6d4e4; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0 0; }
.admin-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.admin-stats dt { color: var(--muted); font-size: 0.88rem; }
.admin-stats dd { margin: 2px 0 0; font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.admin-insight { background: #fbf3d9; border: 1px solid var(--gold); color: var(--ink); border-radius: var(--radius); padding: 14px 18px; font-weight: 600; margin: 16px 0 0; }
.book-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.book-row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); }
.book-row-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.book-name { font-weight: 800; color: var(--ink); }
.book-status { margin-left: auto; font-size: 0.82rem; font-weight: 700; border-radius: 999px; padding: 4px 11px; white-space: nowrap; }
.book-booked { background: var(--ok-bg); color: var(--ok); }
.book-replied { background: #e3ecfd; color: var(--shine-dark); }
.book-declined { background: #f7ecd0; color: #7a5c00; }
.book-noreply, .book-sent, .book-quiet { background: var(--bg); color: var(--muted); }
.badge-yours { background: var(--gold); color: #231d04; font-size: 0.78rem; font-weight: 800; border-radius: 999px; padding: 4px 10px; }
.book-detail { margin: 6px 0 0; color: var(--muted); }
.house-rule { margin-top: 18px; background: var(--surface); border: 1.5px solid var(--shine); border-radius: var(--radius); padding: 18px 20px; }
.house-rule h3 { margin: 0 0 6px; color: var(--ink); }
.house-rule p { margin: 0; color: var(--muted); }
.house-rule strong { color: var(--text); }

@media (max-width: 560px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-money-value { font-size: 2.1rem; }
  .book-status { margin-left: 0; white-space: normal; }
  .view-bar-inner { justify-content: center; }
}
