/* Bayside Tutoring — warm, trustworthy, education-flavored. */
:root {
  --navy: #1c2b3a;
  --navy-soft: #2e4257;
  --amber: #f4b942;
  --amber-dark: #d99a1b;
  --cream: #f4f1ea;
  --white: #ffffff;
  --ink: #22303e;
  --muted: #5b6b7a;
  --line: #e3ddd0;
  --radius: 12px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}

h1, h2, h3, .brand, .btn, button, input, select, textarea, label {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

h2 { font-size: 1.75rem; margin: 0 0 1.25rem; }

section { padding: 3.5rem 1.5rem; max-width: 960px; margin: 0 auto; }

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--navy);
}
.brand { font-size: 1.3rem; font-weight: 700; color: var(--white); }
.brand-accent { color: var(--amber); }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--amber);
  color: var(--navy);
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 999px;
  text-decoration: none;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s;
}
.btn:hover { background: var(--amber-dark); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-small { padding: 0.5rem 1.1rem; font-size: 0.9rem; }

/* Hero */
.hero { text-align: center; padding-top: 4.5rem; }
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 1rem;
  color: var(--navy);
  line-height: 1.25;
}
.hero p { max-width: 620px; margin: 0 auto 1.75rem; color: var(--muted); font-size: 1.1rem; }

/* Services */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.service-card h3 { margin: 0 0 0.25rem; font-size: 1.05rem; color: var(--navy); }
.service-card .rate { margin: 0 0 0.5rem; font-weight: 700; color: var(--amber-dark); font-family: inherit; }
.service-card .blurb { margin: 0; font-size: 0.92rem; color: var(--muted); }

/* Steps */
.step-list { margin: 0; padding-left: 1.25rem; max-width: 640px; }
.step-list li { margin-bottom: 0.75rem; }

/* Booking */
.booking { background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); }

.week-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-weight: 700;
}
.btn-nav {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1rem;
  cursor: pointer;
}
.btn-nav:disabled { opacity: 0.4; cursor: default; }

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  overflow-x: auto;
}
.day-col { display: flex; flex-direction: column; gap: 0.4rem; min-width: 74px; }
.day-head { text-align: center; padding-bottom: 0.4rem; border-bottom: 2px solid var(--line); }
.day-name { display: block; font-weight: 700; font-size: 0.85rem; color: var(--navy); }
.day-date { display: block; font-size: 0.75rem; color: var(--muted); }
.no-slots { text-align: center; color: var(--line); padding-top: 0.5rem; }

.slot {
  border: 1px solid var(--navy-soft);
  background: var(--white);
  color: var(--navy);
  border-radius: 8px;
  padding: 0.45rem 0.25rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.1s;
}
.slot:hover { background: var(--cream); }
.slot-selected { background: var(--navy); color: var(--amber); border-color: var(--navy); }
.slot-usual { border-color: var(--amber-dark); box-shadow: inset 0 0 0 1px var(--amber-dark); }
.slot-usual::after { content: ' ★'; }

/* Referral Twin Pages */
.ref-banner {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  background: #fffaf0;
  border: 1px solid var(--amber);
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.9rem;
  color: var(--navy);
}
.refer-facts { margin: 0 0 1.5rem; padding-left: 1.25rem; color: var(--muted); text-align: left; }
.refer-facts li { margin-bottom: 0.3rem; }
.refer-share-box { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.refer-share-box input {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.85rem;
  background: var(--cream);
  color: var(--muted);
}

/* Booking form */
.booking-form {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 460px;
}
.booking-form h3 { margin: 0; color: var(--navy); }
.booking-form label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 600; font-size: 0.9rem; }
.optional { font-weight: 400; color: var(--muted); }
.booking-form input, .booking-form select, .booking-form textarea {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--cream);
}
.form-error { color: #b3261e; font-weight: 600; margin: 0; }

/* Confirmation */
.confirmation {
  background: var(--cream);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.confirmation h3 { margin-top: 0; color: var(--navy); }
.confirmation-links a { color: var(--navy); font-weight: 700; }

/* Footer */
.site-footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.demo-note { font-size: 0.8rem; opacity: 0.8; }

/* Checkout page */
.checkout-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}
.checkout-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 420px;
  width: 100%;
}
.checkout-badge {
  display: inline-block;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 1rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.checkout-card h1 { font-size: 1.35rem; margin: 0 0 0.75rem; color: var(--navy); }
.checkout-detail { color: var(--muted); margin: 0 0 1.5rem; }
.checkout-card form { display: flex; flex-direction: column; gap: 0.9rem; }
.checkout-card label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 600; font-size: 0.85rem; }
.checkout-card input {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--cream);
  color: var(--muted);
}
.checkout-row { display: flex; gap: 0.9rem; }
.checkout-row label { flex: 1; }
.checkout-card button {
  background: var(--amber);
  color: var(--navy);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.8rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}
.checkout-card button:hover { background: var(--amber-dark); }
.checkout-fine { font-size: 0.78rem; color: var(--muted); margin: 0; text-align: center; }

@media (max-width: 640px) {
  .calendar { grid-template-columns: repeat(7, minmax(72px, 1fr)); }
  section { padding: 2.5rem 1rem; }
}

/* Admin dashboard */
.admin-body { background: var(--cream); }
.admin-tag {
  color: var(--cream);
  opacity: 0.8;
  font-size: 0.8rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.admin-tag a { color: var(--amber); }
.admin-main { max-width: 960px; margin: 0 auto; padding: 2rem 1.5rem 4rem; display: flex; flex-direction: column; gap: 2.5rem; }
.admin-section h2 { margin: 0 0 0.75rem; color: var(--navy); }
.admin-hint { color: var(--muted); font-size: 0.9rem; }

.admin-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.admin-table th, .admin-table td { text-align: left; padding: 0.6rem 0.9rem; font-size: 0.9rem; border-bottom: 1px solid var(--line); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table th {
  background: var(--cream);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.admin-cancel {
  background: var(--white);
  border: 1px solid #b3261e;
  color: #b3261e;
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.admin-cancel:hover { background: #b3261e; color: var(--white); }

.status-pill {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.status-confirmed, .status-recovered, .status-converted { background: #dff3e3; color: #1c6b34; }
.status-pending, .status-active, .status-sent, .status-claimed { background: #fdf1d6; color: #8a5c00; }
.status-cancelled, .status-exhausted, .status-expired, .status-dismissed { background: #f2e1e0; color: #8a2f26; }
.status-open, .status-draft { background: #e2ecf7; color: #1c4b7a; }
.pill-salvage { background: var(--amber); color: var(--navy); }

/* Cadence Radar */
.radar-draft-preview { margin: 0.5rem 0; font-size: 0.85rem; color: var(--ink); }
.radar-draft-preview strong { display: block; margin-bottom: 0.15rem; }
.radar-nudge-actions { display: flex; gap: 0.6rem; margin-top: 0.6rem; }
.radar-skipped { margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--line); font-size: 0.88rem; color: var(--muted); }
.radar-skipped ul { margin: 0.4rem 0 0; }

.admin-notice {
  background: #e2ecf7;
  color: #1c4b7a;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  margin: 0 0 0.9rem;
}

.salvage-case { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.salvage-case-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.salvage-case-head h3 { margin: 0; font-size: 1.05rem; color: var(--navy); }
.salvage-candidates { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1rem; }
.salvage-candidate { border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 0.8rem; font-size: 0.85rem; }
.salvage-candidate-active { border-color: var(--amber); background: #fffaf0; }
.salvage-candidate-head { display: flex; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.3rem; }
.salvage-score { color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
.salvage-reasons { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.salvage-offers { display: flex; flex-direction: column; gap: 0.4rem; }
.salvage-offer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  background: var(--cream);
}
.salvage-offer-status { font-weight: 700; text-transform: capitalize; }
.salvage-offer-active .salvage-offer-status { color: var(--amber-dark); }
.salvage-offer-lapsed .salvage-offer-status { color: var(--muted); }
.salvage-offer-accepted .salvage-offer-status { color: #1c6b34; }
.salvage-offer-mode {
  color: var(--muted);
  font-size: 0.72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
}
.salvage-countdown { font-variant-numeric: tabular-nums; color: var(--navy); font-weight: 700; }
.salvage-offer a { margin-left: auto; color: var(--navy); font-weight: 600; }

/* Inquiry-to-Proposal Agent */
.proposal-textarea {
  display: block;
  width: 100%;
  max-width: 640px;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
  resize: vertical;
}
.proposal-inquiry { margin: 0.75rem 0; font-size: 0.85rem; color: var(--muted); }
.proposal-inquiry summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.proposal-inquiry pre { white-space: pre-wrap; margin: 0.5rem 0 0; font-family: inherit; }
.proposal-form { display: flex; flex-direction: column; gap: 0.6rem; margin: 0.75rem 0; }
.proposal-form label { display: flex; flex-direction: column; gap: 0.25rem; font-weight: 600; font-size: 0.82rem; color: var(--navy); }
.proposal-form input, .proposal-form select, .proposal-form textarea {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.88rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--cream);
}
.proposal-hints { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }
.proposal-weekday { flex-direction: row !important; align-items: center; gap: 0.3rem !important; font-weight: 400 !important; }
.proposal-schedule { margin-top: 0.5rem; }
.proposal-sent-info { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.75rem; }

/* Business Analyst Agent */
.analyst-diff {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.85rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  margin: 0.5rem 0;
  color: var(--navy);
}
.analyst-rationale { margin: 0.5rem 0; font-size: 0.88rem; color: var(--ink); }
.analyst-rationale p { margin: 0 0 0.3rem; }
.analyst-line { margin: 0.35rem 0; font-size: 0.85rem; color: var(--muted); }
.analyst-line strong { color: var(--navy); }
/* Uncertainty is a first-class element on the card, not fine print — the
   grader flag on camera: the agent states its own honesty limits plainly. */
.analyst-uncertainty {
  margin: 0.6rem 0;
  padding: 0.5rem 0.75rem;
  background: #fffaf0;
  border: 1px solid var(--amber);
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--navy);
}
.analyst-audit { font-size: 0.85rem; color: var(--muted); margin-top: 0.4rem; }
.analyst-audit-insufficient { font-style: italic; }
