/* ==========================================================================
   Where Next - Exact Design Stylesheet (Matching school-assessment.html)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

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

:root {
  --cream: #f2ede6;
  --gold: #b8943f;
  --red: #c0392b;
  --red-light: #fdf0ee;
  --text: #1a1a1a;
  --text-mid: #333;
  --muted: #888;
  --border: #d8d2c8;
  --navy: #1c2b3a;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Navigation Bar */
nav {
  display: flex;
  align-items: center;
  padding: 0 40px;
  height: 56px;
  border-bottom: 1px solid var(--border);
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-box {
  width: auto;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
}

.logo-box img {
  max-height: 44px;
  max-width: 180px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.logo-text-fallback {
  font-family: 'EB Garamond', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-tag {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: var(--navy);
  color: #fff;
  padding: 2px 8px;
  border-radius: 12px;
}

.nav-brand {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
  margin-left: 12px;
  flex-shrink: 0;
}

.nav-bar {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin: 0 32px;
  position: relative;
  overflow: hidden;
}

.nav-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--text);
  transition: width 0.5s ease;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.nav-section {
  font-size: 12px;
  color: var(--text);
}

.nav-pct {
  font-size: 12px;
  color: var(--gold);
  font-weight: 500;
}

/* Page Layout */
.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 64px 24px 120px;
}

.step {
  display: none;
}

.step.active {
  display: block;
  animation: up 0.4s ease forwards;
}

@keyframes up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sec-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.sec-title {
  font-family: 'EB Garamond', serif;
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 20px;
}

.sec-intro {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-mid);
  margin-bottom: 8px;
}

.sec-intro strong {
  font-weight: 600;
  color: var(--text);
}

.sec-intro em {
  font-style: italic;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}

.q-block {
  margin-bottom: 48px;
}

.q-title {
  font-family: 'EB Garamond', serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.35;
}

.q-hint {
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 20px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.grid.col1 {
  grid-template-columns: 1fr;
}

.opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: white;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  user-select: none;
}

.opt:hover {
  background: #faf8f5;
  border-color: #c0b9ae;
}

.opt input {
  display: none;
}

.box {
  width: 18px;
  height: 18px;
  border: 1.5px solid #bbb;
  border-radius: 3px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  background: white;
}

.box.circle {
  border-radius: 50%;
}

.box.small {
  width: 16px;
  height: 16px;
}

.box svg {
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.15s;
}

.opt input:checked ~ .box {
  background: var(--navy);
  border-color: var(--navy);
}

.opt input:checked ~ .box svg {
  opacity: 1;
  transform: scale(1);
}

.opt input:checked ~ .opt-txt {
  color: var(--text);
}

.opt-txt {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.4;
}

.opt-txt strong {
  font-weight: 600;
  color: var(--text);
}

/* Callout Box */
.callout {
  border-left: 3px solid var(--red);
  background: var(--red-light);
  padding: 20px 24px;
  margin-top: 40px;
}

.callout-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.callout-body {
  font-size: 15px;
  color: var(--red);
  line-height: 1.7;
}

.callout-body strong {
  font-weight: 700;
}

/* Matrix Table for Program Design */
.matrix-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  background: white;
  margin-top: 1rem;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.matrix-table th {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: #faf8f5;
  color: var(--navy);
  font-weight: 600;
  text-align: center;
}

.matrix-table th.text-left {
  text-align: left;
}

.matrix-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.matrix-table td.group-label {
  font-weight: 600;
  color: var(--text);
  background: #faf8f5;
}

.radio-opt {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
}

.radio-opt input {
  display: none;
}

.radio-opt input:checked ~ .box {
  background: var(--navy);
  border-color: var(--navy);
}

.radio-opt input:checked ~ .box svg {
  opacity: 1;
  transform: scale(1);
}

/* Textarea & Inputs */
.mq-textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  background: white;
  border: 1px solid var(--border);
  outline: none;
  color: var(--text);
  transition: border-color 0.2s;
  resize: vertical;
}

.mq-textarea:focus {
  border-color: var(--navy);
}

/* Slot & Field Inputs */
.slot-block {
  margin-bottom: 28px;
}

.slot-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.slot-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fw {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fw label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.fw input,
.fw select,
.fw textarea {
  background: white;
  border: 1px solid var(--border);
  padding: 12px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text);
  outline: none;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s;
}

.fw input:focus,
.fw select:focus,
.fw textarea:focus {
  border-color: var(--text);
}

/* Buttons & Navigation Rows */
.cta-row {
  margin-top: 56px;
  display: flex;
  align-items: center;
}

.btn-continue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--navy);
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 18px 36px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.btn-continue:hover {
  background: #111;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 18px 0;
  border: none;
  cursor: pointer;
  margin-right: 24px;
  transition: color 0.2s;
}

.btn-back:hover {
  color: var(--text);
}

.err {
  display: none;
  font-size: 13px;
  color: var(--red);
  margin-bottom: 16px;
  font-style: italic;
}

.success-icon {
  width: 64px;
  height: 64px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
}

.success-title {
  font-family: 'EB Garamond', serif;
  font-size: 44px;
  font-weight: 400;
  margin-bottom: 20px;
  line-height: 1.1;
}

.success-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-mid);
  max-width: 520px;
  margin-bottom: 36px;
}

.success-note {
  display: inline-block;
  border-left: 3px solid var(--gold);
  padding: 16px 24px;
  font-size: 14px;
  color: var(--text-mid);
  background: white;
}

/* Phone step specific styles */
.phone-hero {
  margin-bottom: 48px;
}

.phone-intro-text {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-mid);
  margin-bottom: 32px;
}

.phone-field-wrap {
  margin-bottom: 32px;
}

.phone-input-row {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  background: white;
  transition: border-color 0.2s;
}

.phone-input-row:focus-within {
  border-color: var(--navy);
}

.phone-code {
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  border-right: 1px solid var(--border);
  background: #f8f6f2;
  white-space: nowrap;
  display: flex;
  align-items: center;
  font-family: 'DM Sans', sans-serif;
  flex-shrink: 0;
}

#phoneInput {
  flex: 1;
  border: none;
  padding: 16px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--text);
  outline: none;
  background: transparent;
  width: 100%;
}

.privacy-panel {
  background: white;
  border: 1px solid var(--border);
  padding: 24px 28px;
  margin-top: 28px;
}

.privacy-panel-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.privacy-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.privacy-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-mid);
}

.privacy-dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 7px;
}

.res-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}

.res-title {
  font-family: 'EB Garamond', serif;
  font-size: 38px;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--navy);
}

.res-title span {
  color: var(--gold);
}

.res-subtitle {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-mid);
  max-width: 520px;
  margin: 0 auto;
}

.res-conv-wrap {
  max-width: 600px;
  margin: 0 auto;
}

.res-conv-title {
  font-family: 'EB Garamond', serif;
  font-size: 30px;
  margin-bottom: 24px;
  color: var(--navy);
}

.res-conv-title span {
  color: var(--gold);
}

.res-conv-intro {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-mid);
  margin-bottom: 32px;
}

.res-conv-intro p {
  margin-bottom: 18px;
}

.res-conv-intro strong {
  color: var(--navy);
  font-weight: 600;
}

.res-disclaimer {
  background: white;
  padding: 24px 28px;
  border: 1px solid var(--border);
  margin-bottom: 36px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-mid);
}

.res-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.res-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.res-field label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
}

.res-field input,
.res-field select,
.res-field textarea {
  background: white;
  border: 1px solid var(--border);
  padding: 14px 16px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  width: 100%;
}

.res-field input:focus,
.res-field select:focus,
.res-field textarea:focus {
  border-color: var(--navy);
}

/* ==========================================================================
   Admin Dashboard Matching Styles
   ========================================================================== */

.admin-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 100px;
}

.admin-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-title {
  font-family: 'EB Garamond', serif;
  font-size: 36px;
  color: var(--navy);
}

.admin-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

.admin-btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-secondary {
  background: white;
  color: var(--navy);
  border: 1px solid var(--border);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover {
  background: #faf8f5;
  border-color: var(--navy);
}

.btn-gold-sm {
  background: var(--gold);
  color: white;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 20px;
  cursor: pointer;
  transition: opacity 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-gold-sm:hover {
  opacity: 0.9;
}

/* Stat Box Grid */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.stat-box {
  background: white;
  border: 1px solid var(--border);
  padding: 24px;
}

.stat-box-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-box-num {
  font-family: 'EB Garamond', serif;
  font-size: 36px;
  font-weight: 600;
  color: var(--navy);
}

/* Admin Table Box */
.table-box {
  background: white;
  border: 1px solid var(--border);
}

.table-filter-bar {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: #faf8f5;
}

.search-input {
  background: white;
  border: 1px solid var(--border);
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--text);
  outline: none;
  min-width: 240px;
}

.search-input:focus {
  border-color: var(--navy);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.admin-table th {
  padding: 14px 20px;
  background: #faf8f5;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table tr.row-hover:hover {
  background: #faf8f5;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
}

.badge-pending { background: #fef3c7; color: #92400e; }
.badge-opened { background: #e0e7ff; color: #3730a3; }
.badge-completed { background: #ecfdf5; color: #065f46; }

/* Modal & Toast */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(28, 43, 58, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-bg.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: white;
  border: 1px solid var(--border);
  width: 100%;
  max-width: 480px;
  padding: 32px;
}

.modal-title {
  font-family: 'EB Garamond', serif;
  font-size: 26px;
  color: var(--navy);
  margin-bottom: 20px;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--navy);
  color: white;
  padding: 14px 24px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  z-index: 300;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}
