*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
.hidden { display: none !important; }

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --accent: #06b6d4;
  --success: #10b981;
  --danger: #ef4444;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Nav ── */
nav {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3.2rem;
  height: 77px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.nav-brand {
  font-size: 1.66rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -.5px;
}
.nav-links { display: flex; gap: .8rem; }
.nav-btn {
  background: none;
  border: none;
  padding: .58rem 1.28rem;
  border-radius: 8px;
  font-size: 1.15rem;
  cursor: pointer;
  color: var(--muted);
  font-weight: 500;
  transition: all .15s;
}
.nav-btn:hover { background: var(--bg); color: var(--text); }
.nav-btn.active { background: var(--primary); color: #fff; }

/* ── Views ── */
.view { display: none; }
.view.active { display: block; }

/* ── Hero ── */
.hero {
  background: var(--bg);
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.6rem 2rem 5rem;
  position: relative;
  overflow: hidden;
}

/* Animated background blobs */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
.hero-blob-1 {
  width: 560px; height: 560px;
  background: rgba(79,70,229,.13);
  top: -180px; left: -120px;
  animation: blobdrift 11s ease-in-out infinite alternate;
}
.hero-blob-2 {
  width: 460px; height: 460px;
  background: rgba(6,182,212,.1);
  bottom: -120px; right: -80px;
  animation: blobdrift 14s ease-in-out infinite alternate-reverse;
}
.hero-blob-3 {
  width: 320px; height: 320px;
  background: rgba(167,139,250,.09);
  top: 40%; left: 55%;
  animation: blobdrift 8s ease-in-out infinite alternate;
}
@keyframes blobdrift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(45px, 35px) scale(1.18); }
}

/* Hero text */
.hero-content { position: relative; z-index: 1; max-width: 1066px; }

.hero-eyebrow {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: .14em;
  text-transform: uppercase;
  background: rgba(79,70,229,.08);
  padding: .35rem .9rem;
  border-radius: 99px;
  margin-bottom: 2.45rem;
  opacity: 0;
  animation: herofade .7s .1s forwards;
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -3px;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: herofade .7s .25s forwards;
}
.hero-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
  opacity: 0;
  animation: herofade .7s .4s forwards;
}

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

/* Subject bubbles */
.subject-bubbles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

.subject-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  padding: 1.1rem 1.5rem;
  min-width: 88px;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(79,70,229,.1);
  border-radius: 22px;
  cursor: pointer;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1),
              box-shadow .35s ease,
              border-color .2s ease,
              background .2s ease;
  opacity: 0;
  animation: bubblepop .55s calc(.55s + var(--i) * .08s) cubic-bezier(.34,1.56,.64,1) forwards;
}
@keyframes bubblepop {
  from { opacity: 0; transform: scale(.6) translateY(14px); }
  to   { opacity: 1; transform: scale(1)  translateY(0); }
}
.subject-bubble:hover {
  transform: translateY(-6px) scale(1.07);
  border-color: rgba(79,70,229,.35);
  box-shadow: 0 16px 40px rgba(79,70,229,.16);
}
.subject-bubble.active {
  background: linear-gradient(135deg, var(--primary), #818cf8);
  border-color: transparent;
  transform: translateY(-6px) scale(1.07);
  box-shadow: 0 16px 40px rgba(79,70,229,.32);
}
.subject-bubble.active .bubble-label { color: #fff; }

.bubble-icon { font-size: 1.7rem; line-height: 1; }
.bubble-label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.2px;
}

.show-all-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  padding: .4rem .8rem;
  border-radius: 8px;
  transition: color .15s;
  opacity: 0;
  animation: herofade .7s 1.2s forwards;
}
.show-all-btn:hover { color: var(--primary); }

/* ── Container / Grid ── */
.container { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }

.sort-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.sort-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  margin-right: .25rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.sort-btn {
  padding: .4rem .9rem;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.sort-btn:hover { border-color: var(--primary); color: var(--primary); }
.sort-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.sort-divider { width: 1px; height: 20px; background: var(--border); margin: 0 .25rem; }
.lang-btn {
  padding: .4rem .9rem;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.lang-btn:hover { border-color: var(--primary); color: var(--primary); }
.lang-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.tutor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* ── Achievement Badges ── */
.achievement-badges {
  position: absolute;
  top: .7rem;
  right: .7rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .3rem;
  z-index: 1;
}
.achievement-badge {
  font-size: .67rem;
  font-weight: 800;
  padding: .22rem .6rem;
  border-radius: 99px;
  white-space: nowrap;
  letter-spacing: .02em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0,0,0,.13);
}
.badge-students {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.25);
}
.badge-hours {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.25);
}
.badge-pro {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  color: #f0c040;
  border: 1.5px solid #f0c04055;
  box-shadow: 0 2px 10px rgba(240,192,64,.3), 0 0 0 1px rgba(240,192,64,.1);
  letter-spacing: .06em;
}
.badge-gpa {
  background: linear-gradient(135deg, #064e3b, #065f46);
  color: #6ee7b7;
  border: 1.5px solid rgba(110,231,183,.25);
  box-shadow: 0 2px 10px rgba(16,185,129,.25), 0 0 0 1px rgba(110,231,183,.1);
  letter-spacing: .04em;
}

/* ── Tutor Card ── */
.tutor-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  padding: 1.4rem;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  border: 1px solid var(--border);
}
.tutor-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0,0,0,.1);
}
.tutor-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}
.tutor-card h3 { font-size: 1rem; font-weight: 700; }
.tutor-card .subject-badge {
  display: inline-block;
  background: #ede9fe;
  color: var(--primary);
  font-size: .75rem;
  font-weight: 600;
  padding: .2rem .65rem;
  border-radius: 99px;
  margin: .35rem 0 .5rem;
}
.tutor-card .bio {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tutor-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}
.tutor-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: .75rem;
}
.tutor-profile-link {
  font-size: .82rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.tutor-profile-link:hover { text-decoration: underline; }
.tutor-card-langs {
  display: flex;
  gap: .2rem;
  align-items: center;
}
.rate { font-weight: 700; color: var(--primary); }
.slots-badge {
  font-size: .8rem;
  color: var(--muted);
}
.slots-badge.has-slots { color: var(--success); font-weight: 600; }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
}
.modal-sm { max-width: 420px; }
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--bg);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.modal-close:hover { background: var(--border); }

/* Modal content */
.modal-tutor-header {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  margin-bottom: 1.2rem;
}
.modal-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.modal-tutor-info h2 { font-size: 1.3rem; }
.modal-tutor-info .subject-badge {
  display: inline-block;
  background: #ede9fe;
  color: var(--primary);
  font-size: .78rem;
  font-weight: 600;
  padding: .2rem .7rem;
  border-radius: 99px;
  margin: .3rem 0;
}
.modal-tutor-info .rate-lg { font-size: 1rem; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.split-rate-badge { font-size: .78rem; font-weight: 600; color: var(--primary); background: #ede9fe; border: 1.5px solid #c4b5fd; border-radius: 99px; padding: .15rem .65rem; white-space: nowrap; }
.modal-bio { color: var(--muted); font-size: .9rem; line-height: 1.6; margin-bottom: 1.4rem; }

.slots-section h3 { font-size: 1rem; font-weight: 600; margin-bottom: .75rem; }
.slot-items { display: flex; flex-direction: column; gap: .5rem; }
.slot-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .7rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.slot-item.booked { opacity: .5; }
.slot-time { font-size: .88rem; font-weight: 600; }
.slot-date { font-size: .78rem; color: var(--muted); }
.btn-book {
  padding: .35rem .9rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-book:hover { background: var(--primary-dark); }

/* Slot action buttons group (Book + Split) */
.slot-btns { display: flex; gap: .4rem; align-items: center; }

.btn-split {
  padding: .35rem .9rem;
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: 7px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.btn-split:hover { background: var(--primary); color: #fff; }

/* Split price info pill */
.split-price-info {
  display: inline-block;
  background: #ede9fe;
  color: #5b21b6;
  font-size: .82rem;
  font-weight: 600;
  padding: .3rem .8rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}

/* Shared session checkbox toggle */
.shared-toggle-label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  font-size: .88rem !important;
  font-weight: 500 !important;
}
.shared-toggle-label input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0;
  display: block !important;
}

.booked-tag {
  font-size: .78rem;
  color: var(--muted);
  font-style: italic;
}
.no-slots { color: var(--muted); font-size: .88rem; }

/* Booking modal */
.slot-info {
  background: #ede9fe;
  color: var(--primary);
  border-radius: 8px;
  padding: .6rem 1rem;
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
}

/* Multi-slot booking */
.btn-add-slot {
  width: 100%;
  padding: .55rem;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  color: #475569;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: .75rem;
  transition: background .12s, border-color .12s;
}
.btn-add-slot:hover { background: #e2e8f0; border-color: #cbd5e1; }
.extra-slot-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ede9fe;
  border-radius: 8px;
  padding: .45rem .75rem;
  font-size: .83rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: .35rem;
}
.extra-slot-remove {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.1rem;
  cursor: pointer;
  opacity: .5;
  line-height: 1;
  padding: 0 2px;
}
.extra-slot-remove:hover { opacity: 1; }
.extra-slot-option {
  width: 100%;
  text-align: left;
  padding: .5rem .75rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
  transition: border-color .12s, background .12s;
}
.extra-slot-option:hover { border-color: var(--primary); background: #ede9fe; color: var(--primary); }

/* ── Dashboard ── */
.dash-card { max-width: 480px; margin: 0 auto; }
.tabs { display: flex; gap: .4rem; margin: 1.2rem 0 1rem; }
.tab-btn {
  flex: 1;
  padding: .5rem;
  border: 2px solid var(--border);
  background: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: .88rem;
  cursor: pointer;
  color: var(--muted);
  transition: all .15s;
}
.tab-btn.active { border-color: var(--primary); color: var(--primary); background: #ede9fe; }

.tab-content { display: flex; flex-direction: column; gap: .7rem; }
.tab-content.hidden { display: none; }

.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.dash-header h2 { font-size: 1.4rem; }
.dash-meta { color: var(--muted); font-size: .9rem; margin-top: .2rem; }

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* ── Shared card ── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border: 1px solid var(--border);
}
.card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }

/* ── Forms ── */
label { font-size: .82rem; font-weight: 600; color: var(--muted); display: block; margin-bottom: .2rem; }
.optional { font-weight: 400; }
input, textarea, select {
  width: 100%;
  padding: .6rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
  outline: none;
  background: var(--bg);
  color: var(--text);
  transition: border-color .15s;
  font-family: inherit;
}
input:focus, textarea:focus { border-color: var(--primary); background: #fff; }
textarea { resize: vertical; }

.btn-primary {
  width: 100%;
  padding: .65rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: .3rem;
  transition: background .15s;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary {
  padding: .45rem 1rem;
  background: none;
  color: var(--muted);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.btn-secondary:hover { border-color: var(--danger); color: var(--danger); }

/* Slot list in dashboard */
.slot-list { display: flex; flex-direction: column; gap: .5rem; max-height: 380px; overflow-y: auto; }
.slot-list .slot-item { justify-content: space-between; }
.slot-item-left { display: flex; flex-direction: column; gap: .1rem; }
.slot-item-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.btn-cancel-booking {
  padding: .3rem .75rem; font-size: .78rem;
  background: none; border: 1px solid #e05252; color: #e05252;
  border-radius: 6px; cursor: pointer; transition: background .15s, color .15s;
}
.btn-cancel-booking:hover { background: #e05252; color: #fff; }
.too-soon-tag { color: #92400e !important; background: #fef3c7; border-radius: 6px; padding: .15rem .5rem; font-size: .75rem; }
.btn-confirm-cancel {
  padding: .3rem .75rem; font-size: .78rem;
  background: #e05252; color: #fff; border: none; border-radius: 6px; cursor: pointer;
}
.btn-confirm-cancel:disabled { opacity: .6; cursor: default; }
.btn-abort-cancel {
  padding: .3rem .75rem; font-size: .78rem;
  background: none; border: 1px solid var(--muted); color: var(--muted);
  border-radius: 6px; cursor: pointer;
}
.pin-confirm-input {
  width: 90px; padding: .3rem .5rem; font-size: .85rem;
  border: 1px solid var(--border); border-radius: 6px;
  text-align: center; letter-spacing: .15em;
}
.btn-delete {
  background: none;
  border: 1.5px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  padding: .2rem .6rem;
  font-size: .78rem;
  cursor: pointer;
  transition: all .15s;
}
.btn-delete:hover { border-color: var(--danger); color: var(--danger); }
.booked-info { font-size: .75rem; color: var(--success); font-weight: 600; }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  padding: .7rem 1.4rem;
  border-radius: 8px;
  font-size: .9rem;
  z-index: 999;
  transition: opacity .3s;
}
.toast.hidden { display: none; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ── Footer ── */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  font-size: .82rem;
  color: var(--muted);
}
.footer-copy { opacity: .7; }
.footer-admin-btn {
  font-size: .78rem;
  color: var(--muted);
  text-decoration: none;
  padding: .25rem .7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: color .15s, border-color .15s;
}
.footer-admin-btn:hover { color: var(--primary); border-color: var(--primary); }

/* ── Avatar upload zone ── */
.avatar-upload-zone {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  cursor: pointer;
  transition: border-color .15s;
  min-height: 90px;
  margin-bottom: 0 !important;
  font-size: unset;
  font-weight: unset;
  color: unset;
  position: relative;
  overflow: hidden;
}
.avatar-upload-zone:hover { border-color: var(--primary); }
.avatar-upload-zone input[type="file"] { display: none !important; }
#avatar-placeholder { font-size: .85rem; color: var(--muted); }
#avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
}

/* Avatar images inside circles */
.tutor-avatar img, .modal-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* ── Multi-select chips ── */
.multi-select { display: flex; flex-wrap: wrap; gap: .4rem; padding: .35rem 0; }
.ms-opt {
  display: inline-flex !important;
  margin-bottom: 0 !important;
  font-size: unset;
  font-weight: unset;
  color: unset;
}
.ms-opt input[type="checkbox"] { display: none !important; }
.ms-opt span {
  display: block;
  padding: .35rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: 99px;
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--muted);
  transition: all .15s;
  user-select: none;
}
.ms-opt span:hover { border-color: var(--primary); color: var(--primary); }
.ms-opt input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Weekly Availability Grid ── */
.avail-card { margin-bottom: 1.25rem; }
.card-hint { font-size: .82rem; color: var(--muted); margin: .15rem 0 1rem; line-height: 1.5; }
.slots-subtitle { font-size: .78rem; font-weight: 400; color: var(--muted); }


.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: .5rem;
  overflow-x: auto;
  padding-bottom: .25rem;
}
.day-col {
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: .6rem .35rem;
  min-width: 90px;
  display: flex;
  flex-direction: column;
}
.day-label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: .4rem;
}
.day-windows { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .4rem; flex: 1; }
.hour-slot-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hour-slot {
  width: 100%;
  padding: .28rem .2rem;
  font-size: .68rem;
  font-weight: 600;
  text-align: center;
  border-radius: 5px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
  line-height: 1.3;
}
.hour-slot:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #ede9fe;
}
.hour-slot.filled {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.hour-slot.filled:hover {
  background: #4338ca;
  border-color: #4338ca;
  color: #fff;
}
.window-chip {
  display: flex;
  align-items: center;
  background: #ede9fe;
  border-radius: 5px;
  padding: .25rem .3rem;
  gap: .15rem;
}
.window-chip-time {
  flex: 1;
  font-size: .68rem;
  font-weight: 600;
  color: var(--primary);
  text-align: center;
  line-height: 1.4;
}
.window-chip-del {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .9rem;
  color: var(--primary);
  opacity: .5;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
}
.window-chip-del:hover { opacity: 1; color: var(--danger); }
.btn-add-window {
  width: 100%;
  background: none;
  border: 1.5px dashed var(--border);
  border-radius: 5px;
  padding: .28rem .2rem;
  font-size: .72rem;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
}
.btn-add-window:hover { border-color: var(--primary); color: var(--primary); }
.btn-add-window.hidden { display: none; }
.window-form { display: flex; flex-direction: column; gap: .25rem; margin-top: .25rem; }
.window-form input[type="time"] { padding: .3rem .4rem; font-size: .74rem; }
.window-form-btns { display: flex; gap: .2rem; }
.btn-save-window {
  flex: 1;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: .28rem .2rem;
  font-size: .7rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-save-window:hover { background: var(--primary-dark); }
.btn-cancel-window {
  flex: 1;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  padding: .28rem .2rem;
  font-size: .7rem;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
}
.btn-cancel-window:hover { border-color: var(--danger); color: var(--danger); }

/* ── Misc ── */
.loading { color: var(--muted); font-size: .9rem; }
.empty { color: var(--muted); font-size: .88rem; text-align: center; padding: 1rem 0; }

/* ── Reviews Section ── */
.reviews-section {
  background: var(--bg);
  padding: 4rem 2rem 5rem;
  border-top: 1px solid var(--border);
}
.reviews-header {
  max-width: 1100px;
  margin: 0 auto 2.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.reviews-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
}
.reviews-sub {
  color: var(--muted);
  font-size: .95rem;
  margin-top: .25rem;
}
.btn-add-review {
  padding: .6rem 1.4rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.btn-add-review:hover { background: var(--primary-dark); }

.reviews-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.review-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  transition: box-shadow .2s;
}
.review-card:hover { box-shadow: 0 6px 20px rgba(79,70,229,.1); }
.review-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.review-subject-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  background: rgba(79,70,229,.08);
  color: var(--primary);
  padding: .15rem .55rem;
  border-radius: 99px;
}
.review-stars { display: flex; gap: 1px; flex-shrink: 0; }
.star-display { font-size: 1rem; color: #d1d5db; }
.star-display.filled { color: #f59e0b; }
.review-comment {
  font-size: .88rem;
  color: var(--text);
  line-height: 1.6;
  font-style: italic;
  flex: 1;
}
.review-reviewer {
  font-size: .88rem;
  color: var(--text);
}
/* Tutor footer strip */
.review-tutor-footer {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.review-tutor-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.review-tutor-avatar img { width: 100%; height: 100%; object-fit: cover; }
.review-tutor-label {
  font-size: .78rem;
  color: var(--muted);
}
.review-tutor-name {
  font-weight: 700;
  color: var(--text);
}

/* Star picker in modal */
.star-rating {
  display: flex;
  gap: .25rem;
  margin-bottom: .25rem;
}
.star-rating .star {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #d1d5db;
  padding: 0;
  line-height: 1;
  transition: color .1s, transform .1s;
}
.star-rating .star:hover,
.star-rating .star.active { color: #f59e0b; transform: scale(1.15); }

/* ── Out of Office ── */
.ooo-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .75rem; }
.ooo-chip {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  background: #fff8ed; border: 1px solid #f6d860;
  border-radius: 8px; padding: .45rem .75rem;
}
.ooo-chip-dates { font-size: .85rem; font-weight: 600; color: #92400e; }
.ooo-chip-label {
  font-size: .75rem; color: #b45309;
  background: #fef3c7; border-radius: 99px;
  padding: .1rem .5rem;
}
.ooo-chip-del {
  margin-left: auto; background: none; border: none;
  color: #b45309; font-size: 1.1rem; cursor: pointer; line-height: 1;
  opacity: .6; transition: opacity .15s;
}
.ooo-chip-del:hover { opacity: 1; }
.ooo-form { display: flex; flex-direction: column; gap: .6rem; }
.ooo-inputs { display: flex; gap: .75rem; flex-wrap: wrap; }
.ooo-field { display: flex; flex-direction: column; gap: .25rem; }
.ooo-field-label { flex: 1; min-width: 160px; }
.ooo-field input { padding: .4rem .6rem; border: 1px solid var(--border); border-radius: 7px; font-size: .88rem; }
.ooo-pin-row { display: flex; gap: .6rem; align-items: center; }
.ooo-pin-row input {
  width: 90px; padding: .45rem .6rem;
  border: 1px solid var(--border); border-radius: 7px;
  font-size: .88rem; text-align: center; letter-spacing: .15em;
}
.slot-ooo { background: #fffbeb !important; border-color: #fde68a !important; }
.ooo-tag { background: #fde68a !important; color: #92400e !important; }

/* ── Booking History ── */
.history-item { opacity: .85; }
.history-item:hover { opacity: 1; }
.history-tag {
  background: #f0fdf4 !important;
  color: #166534 !important;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: .15rem .55rem;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.history-page-btn {
  min-width: 2rem;
  padding: .3rem .6rem;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .12s;
}
.history-page-btn:hover { border-color: var(--primary); color: var(--primary); }
.history-page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── One-off Availability ── */
.one-off-list { display: flex; flex-direction: column; gap: .4rem; margin-bottom: .75rem; }
.ooo-item {
  display: flex; align-items: center; justify-content: space-between;
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 8px; padding: .45rem .75rem;
}
.ooo-item-info { display: flex; flex-direction: column; gap: .1rem; }
.ooo-item-dates { font-size: .85rem; font-weight: 600; color: #166534; }
.ooo-item-label { font-size: .78rem; color: #15803d; }
.ooo-del-btn {
  background: none; border: none; color: #166534;
  font-size: 1.2rem; cursor: pointer; line-height: 1;
  opacity: .5; transition: opacity .15s; padding: 0 4px;
}
.ooo-del-btn:hover { opacity: 1; }
.one-off-form { display: flex; flex-direction: column; }
.one-off-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: .75rem;
}
.one-off-field { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; font-weight: 600; color: var(--text); }
.one-off-field input,
.one-off-field select { padding: .4rem .6rem; border: 1px solid var(--border); border-radius: 7px; font-size: .88rem; width: 100%; box-sizing: border-box; }
@media (max-width: 520px) {
  .one-off-inputs {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.oo-ooo-warning {
  margin: .75rem 0 .25rem;
  background: #fffbeb;
  border: 1.5px solid #f59e0b;
  border-radius: 8px;
  padding: .75rem 1rem;
  font-size: .85rem;
  color: #92400e;
  line-height: 1.5;
}
.oo-ooo-btns { display: flex; gap: .6rem; margin-top: .6rem; }
.oo-ooo-btns .oo-cancel-btn {
  background: none; border: 1.5px solid var(--border);
  border-radius: 7px; padding: .4rem .9rem;
  font-size: .85rem; font-weight: 600; cursor: pointer; color: var(--muted);
}
.oo-ooo-btns .oo-cancel-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ── Mobile overrides (phones only) ── */
@media (max-width: 640px) {
  /* Eyebrow → title gap: 50% smaller (2.45rem → 1.22rem) */
  .hero-eyebrow { margin-bottom: 1.22rem; }

  /* Remove tall min-height + centering that creates huge blank spaces.
     Halve both top (3.6rem→1.8rem) and bottom (5rem→2.5rem) padding. */
  .hero {
    min-height: auto;
    align-items: flex-start;
    padding-top: 3.24rem;
    padding-bottom: 2.5rem;
  }
  .container { padding-top: 1rem; }

  /* Give hero-content full width so the scroll strip has a proper container */
  .hero-content { width: 100%; }
  .hero { justify-content: flex-start; }

  /* Subject bubbles → horizontal scroll strip */
  .subject-bubbles {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    width: 100%;
    padding: .25rem 1.25rem .75rem 1.25rem;
    margin-bottom: 1.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .subject-bubbles::-webkit-scrollbar { display: none; }
  .subject-bubble {
    flex-shrink: 0;
    width: 80px;
    padding: .75rem .5rem;
  }
  .bubble-icon { font-size: 1.4rem; }
  .bubble-label { font-size: .7rem; }
  nav {
    height: 56px;
    padding: 0 1rem;
  }
  .nav-brand {
    font-size: 1.25rem;
  }
  .nav-links {
    gap: .25rem;
  }
  .nav-btn {
    padding: .35rem .7rem;
    font-size: .82rem;
    border-radius: 6px;
  }
}
