/* ===================================
   NPGH TECH — Booking Page Styles
   Phase 1 v2 — Week View Layout
   =================================== */

/* ---------- TOKENS ---------- */
:root {
  --bg-base:        #060d1a;
  --bg-surface:     #0b1628;
  --bg-card:        #0f1e35;
  --bg-card-hover:  #132340;
  --border:         rgba(56, 120, 200, 0.18);
  --border-bright:  rgba(56, 160, 255, 0.38);

  --txt-primary:    #e8f0fe;
  --txt-secondary:  #8ba3c4;
  --txt-muted:      #3d5470;

  --accent:         #3b9eff;
  --accent-dim:     rgba(59, 158, 255, 0.12);
  --accent-glow:    rgba(59, 158, 255, 0.35);
  --teal:           #0ed2c8;
  --teal-dim:       rgba(14, 210, 200, 0.1);

  --success:        #0ed2a0;
  --error:          #ff5c6a;

  --slot-bg:        rgba(59, 158, 255, 0.08);
  --slot-border:    rgba(59, 158, 255, 0.28);
  --slot-hover-bg:  rgba(59, 158, 255, 0.2);
  --slot-booked-bg: rgba(255,255,255,0.03);

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.03) inset;
  --shadow-glow: 0 0 60px rgba(59,158,255,0.15);
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-base);
  color: var(--txt-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6,13,26,0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1300px; margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 17px; color: #fff;
}
.logo-text { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: 0.04em; }
.logo-accent { color: var(--teal); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--txt-secondary); font-size: 14px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--txt-primary); }
.nav-cta {
  background: var(--accent-dim) !important;
  border: 1px solid var(--border-bright) !important;
  color: var(--accent) !important;
  padding: 7px 18px; border-radius: var(--radius-sm);
  font-weight: 600; transition: background 0.2s, box-shadow 0.2s !important;
  display: inline-block;
}
.nav-cta:hover { background: rgba(59,158,255,0.2) !important; box-shadow: 0 0 18px var(--accent-glow); }

/* Mobile nav — hidden by default on desktop */
.nav-burger { display: none; }
.nav-mobile { display: none; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 36px; height: 36px; padding: 6px;
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm);
  }
  .nav-burger span {
    display: block; width: 100%; height: 2px;
    background: var(--txt-secondary); border-radius: 2px;
    transition: background 0.2s;
  }
  .nav-burger:hover span { background: var(--accent); }
  .nav-mobile {
    display: flex; flex-direction: column;
    border-top: 1px solid var(--border);
    padding: 12px 24px 16px;
    gap: 4px;
    /* Hidden until toggled open */
    max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding-top: 0; padding-bottom: 0;
  }
  .nav-mobile.open {
    max-height: 300px;
    padding-top: 12px; padding-bottom: 16px;
  }
  .nav-mobile a {
    color: var(--txt-secondary); font-size: 15px; font-weight: 500;
    padding: 10px 0; border-bottom: 1px solid var(--border);
    transition: color 0.2s;
  }
  .nav-mobile a:last-child { border-bottom: none; }
  .nav-mobile a:hover { color: var(--accent); }
  .nav-mobile .nav-cta {
    margin-top: 8px; text-align: center;
    border-bottom: none !important;
  }
}

/* ---------- HERO ---------- */
.hero { position: relative; padding: 72px 24px 52px; text-align: center; overflow: hidden; }
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(59,158,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,158,255,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  pointer-events: none;
}
.hero-glow {
  position: absolute; top: -40px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 320px;
  background: radial-gradient(ellipse at center, rgba(59,158,255,0.16) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(14,210,160,0.08); border: 1px solid rgba(14,210,160,0.25);
  color: var(--teal); font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 100px; margin-bottom: 24px;
}
.badge-dot {
  width: 7px; height: 7px; background: var(--teal); border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.8)} }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 56px); font-weight: 800;
  line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 18px;
}
.gradient-text {
  background: linear-gradient(90deg, var(--accent) 0%, var(--teal) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub { color: var(--txt-secondary); font-size: 16px; max-width: 400px; margin: 0 auto; }

/* ---------- BOOKING SECTION ---------- */
.booking-section { padding: 0 16px 80px; max-width: 1300px; margin: 0 auto; }
.booking-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: stretch;
}
@media (max-width: 860px) {
  .booking-shell { grid-template-columns: 1fr; }
}

/* ---------- SIDEBAR ---------- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 12px;
  box-shadow: var(--shadow-card); transition: border-color 0.2s;
}
.info-card:hover { border-color: var(--border-bright); }
.info-icon { font-size: 18px; margin-top: 2px; flex-shrink: 0; }
.info-card h4 {
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  color: var(--txt-primary); margin-bottom: 2px; letter-spacing: 0.02em;
}
.info-card p { font-size: 12px; color: var(--txt-secondary); line-height: 1.5; }

/* Mini calendar */
.mini-cal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px;
  box-shadow: var(--shadow-card);
}
.mini-cal-nav {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.mini-month-label {
  font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--txt-primary);
}
.mini-nav-btn {
  background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--txt-secondary); width: 28px; height: 28px; border-radius: 6px;
  font-size: 13px; display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}
.mini-nav-btn:hover { border-color: var(--border-bright); color: var(--accent); }
.mini-cal-dow {
  display: grid; grid-template-columns: repeat(7,1fr); margin-bottom: 4px;
}
.mini-cal-dow span {
  text-align: center; font-size: 10px; font-weight: 600;
  letter-spacing: 0.06em; color: var(--txt-muted); padding: 3px 0;
}
.mini-cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; }
.mini-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 6px; font-size: 11px; font-weight: 500; color: var(--txt-muted);
  position: relative; transition: background 0.15s, color 0.15s;
}
.mini-day.has-slots { color: var(--txt-secondary); cursor: pointer; }
.mini-day.has-slots::after {
  content: ''; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 3px; background: var(--accent); border-radius: 50%;
}
.mini-day.has-slots:hover { background: var(--accent-dim); color: var(--accent); }
.mini-day.in-week { background: rgba(59,158,255,0.07); color: var(--txt-secondary); }
.mini-day.today { border: 1px solid var(--border-bright); color: var(--txt-primary); }
.mini-day.today.in-week { background: rgba(59,158,255,0.12); }
.mini-day.past { opacity: 0.2; cursor: default; }
.mini-day.selected-week-start { background: var(--accent); color: #fff; border-radius: 6px 0 0 6px; }

/* Services */
.services-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px; box-shadow: var(--shadow-card);
}
.services-title {
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  color: var(--txt-primary); letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.services-card ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.services-card li {
  display: flex; align-items: flex-start; gap: 10px;
}
.svc-icon {
  font-size: 15px; flex-shrink: 0; margin-top: 1px;
  width: 26px; height: 26px;
  background: var(--accent-dim); border: 1px solid var(--border);
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
}
.services-card li div { display: flex; flex-direction: column; gap: 1px; }
.services-card li strong {
  font-size: 12px; font-weight: 600; color: var(--txt-primary); line-height: 1.3;
}
.services-card li span {
  font-size: 11px; color: var(--txt-muted); line-height: 1.4;
}

/* ---------- WEEK PANEL ---------- */
.week-panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

/* Week nav bar */
.week-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 10px;
  border-bottom: 1px solid var(--border);
}
.week-label {
  font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--txt-primary);
}
.week-nav-btn {
  background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--txt-secondary); width: 34px; height: 34px; border-radius: 8px;
  font-size: 15px; display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}
.week-nav-btn:hover { border-color: var(--border-bright); color: var(--accent); }
.tz-badge {
  padding: 6px 20px; font-size: 11px; color: var(--txt-muted);
  letter-spacing: 0.04em; border-bottom: 1px solid var(--border);
}

/* Day column headers */
.week-header {
  display: grid; padding: 0 8px;
  border-bottom: 1px solid var(--border);
}
.day-header {
  padding: 10px 4px 8px;
  text-align: center;
}
.day-header .dow {
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--txt-muted); margin-bottom: 4px;
}
.day-header .dom {
  font-family: var(--font-display); font-size: 20px; font-weight: 700;
  color: var(--txt-secondary); line-height: 1;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin: 0 auto;
  transition: background 0.15s, color 0.15s;
}
.day-header.today .dom {
  background: var(--accent); color: #fff;
}
.day-header.has-slots .dom { color: var(--txt-primary); }
.day-header.no-slots .dow,
.day-header.no-slots .dom { opacity: 0.3; }

/* Scrollable body */
.week-body-wrap {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  scrollbar-width: thin; scrollbar-color: var(--border-bright) transparent;
}
.week-body-wrap::-webkit-scrollbar { width: 5px; }
.week-body-wrap::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }

.week-body { display: grid; padding: 10px 8px; gap: 6px; }

/* Each row = one time band */
.time-row { display: grid; align-items: start; gap: 4px; }
.time-label {
  font-size: 11px; color: var(--txt-muted); text-align: right;
  padding-right: 8px; padding-top: 8px; user-select: none; white-space: nowrap;
}

/* Slot button */
.slot-btn {
  width: 100%; padding: 8px 4px;
  background: var(--slot-bg); border: 1px solid var(--slot-border);
  border-radius: var(--radius-sm); color: var(--accent);
  font-size: 12px; font-weight: 600; text-align: center;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s, border-color 0.15s;
  white-space: nowrap;
}
.slot-btn:hover {
  background: var(--slot-hover-bg);
  box-shadow: 0 0 10px var(--accent-glow);
  transform: translateY(-1px);
  border-color: var(--accent);
}
.slot-btn.booked {
  background: var(--slot-booked-bg);
  border-color: rgba(255,255,255,0.04);
  color: var(--txt-muted);
  cursor: not-allowed;
  font-size: 18px; /* renders as — */
  transform: none !important; box-shadow: none !important;
}
.slot-btn.empty-cell {
  background: transparent; border-color: transparent;
  color: transparent; cursor: default; pointer-events: none;
}

/* ---------- MOBILE SLOTS (shown only on small screens) ---------- */
.mobile-slots { display: none; padding: 16px 20px; border-top: 1px solid var(--border); }
.mobile-slots-heading {
  font-family: var(--font-display); font-size: 14px; font-weight: 600;
  color: var(--txt-secondary); margin-bottom: 12px;
}
.mobile-slots-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px;
}
.mobile-slot-btn {
  padding: 10px; background: var(--slot-bg); border: 1px solid var(--slot-border);
  border-radius: var(--radius-sm); color: var(--accent);
  font-size: 13px; font-weight: 600; text-align: center;
  transition: background 0.15s, box-shadow 0.15s;
}
.mobile-slot-btn:hover {
  background: var(--slot-hover-bg); box-shadow: 0 0 10px var(--accent-glow);
}
.mobile-slot-btn.booked {
  color: var(--txt-muted); cursor: not-allowed;
  background: var(--slot-booked-bg); border-color: rgba(255,255,255,0.04);
  text-decoration: line-through;
}
@media (max-width: 640px) {
  .week-body-wrap { display: none; }
  .week-header { display: none; }
  .mobile-slots { display: block; }
  /* On mobile: show day header as horizontal scrollable row */
  .week-header-mobile { display: flex; overflow-x: auto; padding: 8px 12px; gap: 6px; border-bottom: 1px solid var(--border); }
  .mobile-day-chip {
    flex-shrink: 0; padding: 8px 14px; border-radius: 100px;
    background: var(--bg-surface); border: 1px solid var(--border);
    text-align: center; cursor: pointer; transition: background 0.15s, border-color 0.15s;
  }
  .mobile-day-chip .dow { font-size: 10px; color: var(--txt-muted); letter-spacing: 0.06em; text-transform: uppercase; }
  .mobile-day-chip .dom { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--txt-secondary); }
  .mobile-day-chip.today { border-color: var(--border-bright); }
  .mobile-day-chip.today .dom { color: var(--accent); }
  .mobile-day-chip.selected { background: var(--accent); border-color: var(--accent); }
  .mobile-day-chip.selected .dow,
  .mobile-day-chip.selected .dom { color: #fff; }
  .mobile-day-chip.no-slots { opacity: 0.3; cursor: default; }
}
@media (min-width: 641px) {
  .week-header-mobile { display: none; }
}

/* ---------- MODAL ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(4,10,22,0.85);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg); padding: 32px;
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), var(--shadow-glow);
  transform: translateY(24px);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
}
.modal-backdrop.open .modal { transform: translateY(0); }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--txt-secondary); width: 32px; height: 32px; border-radius: 50%;
  font-size: 18px; display: flex; align-items: center; justify-content: center;
  transition: color 0.2s, border-color 0.2s;
}
.modal-close:hover { color: var(--txt-primary); border-color: var(--border-bright); }
.modal-header { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.modal-icon {
  font-size: 26px; background: var(--accent-dim); border: 1px solid var(--border-bright);
  border-radius: var(--radius-md); width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.modal-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.modal-time { font-size: 13px; color: var(--accent); font-weight: 500; margin-top: 2px; }
.modal-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--txt-secondary); letter-spacing: 0.04em; text-transform: uppercase; }
.req { color: var(--accent); }
.optional { color: var(--txt-muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.form-group input, .form-group textarea {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--txt-primary);
  font-family: var(--font-body); font-size: 14px; padding: 10px 14px;
  transition: border-color 0.2s, box-shadow 0.2s; outline: none; resize: vertical;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--txt-muted); }
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,158,255,0.12);
}
.form-group input.invalid, .form-group textarea.invalid {
  border-color: var(--error); box-shadow: 0 0 0 3px rgba(255,92,106,0.12);
}
.char-row { display: flex; justify-content: space-between; align-items: flex-start; min-height: 16px; }
.field-error { font-size: 11px; color: var(--error); display: block; }
.char-count { font-size: 11px; color: var(--txt-muted); flex-shrink: 0; }
.btn-submit {
  background: linear-gradient(135deg, var(--accent), #1a7adb);
  border: none; border-radius: var(--radius-sm);
  color: #fff; font-family: var(--font-display);
  font-size: 15px; font-weight: 700; letter-spacing: 0.03em;
  padding: 14px; margin-top: 4px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: opacity 0.2s, box-shadow 0.2s, transform 0.1s;
  position: relative; overflow: hidden;
}
.btn-submit::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
  pointer-events: none;
}
.btn-submit:hover { box-shadow: 0 4px 24px rgba(59,158,255,0.45); transform: translateY(-1px); }
.btn-submit:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-spinner {
  display: none; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff;
  border-radius: 50%; animation: spin 0.6s linear infinite;
}
.btn-spinner.visible { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- TOAST ---------- */
.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg-card); border: 1px solid rgba(14,210,160,0.4);
  border-radius: 100px; color: var(--success);
  font-size: 14px; font-weight: 600;
  padding: 12px 24px; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 20px rgba(14,210,160,0.2);
  z-index: 300; transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s;
  opacity: 0; white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast-icon {
  background: var(--success); color: var(--bg-base);
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex-shrink: 0;
}

/* ---------- FOOTER ---------- */
.footer { border-top: 1px solid var(--border); text-align: center; padding: 24px; color: var(--txt-muted); font-size: 12px; }
.footer a { color: var(--txt-secondary); }

/* ===================================
   NPGH TECH — Appointment Page Styles
   (appointment.html — view / cancel / reschedule)
   =================================== */

/* Simple two-item nav (logo + back link) — distinct from the main site's
   nav-inner/burger layout, used on appointment.html and admin.html */
.appt-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--teal); text-decoration: none;
}
.nav-back {
  font-size: 13px; color: var(--txt-secondary);
  text-decoration: none; display: flex; align-items: center; gap: 6px;
}
.nav-back:hover { color: var(--txt-primary); }

/* Page wrapper */
.page { max-width: 640px; margin: 48px auto; padding: 0 24px 80px; }

/* States */
.state { display: none; }
.state.active { display: block; }

/* Loading */
.loading-wrap {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; padding: 80px 0; color: var(--txt-secondary); font-size: 14px;
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Error state */
.error-wrap { text-align: center; padding: 80px 0; }
.error-icon { font-size: 48px; margin-bottom: 16px; }
.error-wrap h2 { font-family: var(--font-display); font-size: 22px; margin-bottom: 8px; }
.error-wrap p { color: var(--txt-secondary); font-size: 14px; }

/* Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
}
.card-header {
  background: linear-gradient(135deg, var(--bg-surface), #0f2040);
  padding: 28px 32px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.badge {
  font-size: 11px; font-weight: 700;
  padding: 5px 14px; border-radius: 100px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.badge-confirmed  { background: rgba(14,210,160,0.12); border: 1px solid rgba(14,210,160,0.3); color: var(--success); }
.badge-rescheduled{ background: rgba(59,158,255,0.12); border: 1px solid rgba(59,158,255,0.3); color: var(--accent); }
.badge-cancelled  { background: rgba(255,92,106,0.12); border: 1px solid rgba(255,92,106,0.3); color: var(--error); }

.card-body { padding: 28px 32px; }

/* Detail rows */
.detail-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(56,120,200,0.1);
}
.detail-row:last-child { border-bottom: none; }
.detail-icon { font-size: 18px; width: 28px; text-align: center; flex-shrink: 0; margin-top: 2px; }
.detail-label { font-size: 11px; color: var(--txt-secondary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 3px; }
.detail-value { font-size: 15px; color: var(--txt-primary); font-weight: 500; }

/* Action buttons (used on appointment.html and admin.html) */
.actions { display: flex; gap: 12px; margin-top: 8px; }
.btn {
  flex: 1; padding: 13px 20px;
  border: none; border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: opacity 0.2s;
}
.btn:hover { opacity: 0.85; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, #3b9eff, #1a7adb); color: #fff; }
.btn-danger  { background: rgba(255,92,106,0.12); border: 1px solid rgba(255,92,106,0.3); color: var(--error); }
.btn-ghost   { background: rgba(59,158,255,0.08); border: 1px solid var(--border); color: var(--txt-secondary); }

/* Section headings */
.section-title {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700;
  color: var(--txt-secondary);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 16px;
}

/* Cancel panel */
.cancel-panel {
  background: rgba(255,92,106,0.05);
  border: 1px solid rgba(255,92,106,0.2);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 8px;
  display: none;
}
.cancel-panel.open { display: block; }
.cancel-panel p { font-size: 14px; color: var(--txt-secondary); margin-bottom: 16px; line-height: 1.6; }
.cancel-panel textarea {
  width: 100%; min-height: 100px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--txt-primary);
  font-family: var(--font-body);
  font-size: 14px; padding: 12px 14px;
  resize: vertical; margin-bottom: 14px;
  transition: border-color 0.2s;
}
.cancel-panel textarea:focus { outline: none; border-color: var(--error); }
.cancel-actions { display: flex; gap: 10px; }

/* Reschedule panel */
.reschedule-panel { margin-top: 8px; display: none; }
.reschedule-panel.open { display: block; }
.reschedule-intro { font-size: 14px; color: var(--txt-secondary); margin-bottom: 20px; line-height: 1.6; }

/* Mini week calendar (reschedule picker — distinct from the main booking-page week grid) */
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cal-nav-btn {
  background: rgba(59,158,255,0.08);
  border: 1px solid var(--border);
  color: var(--txt-secondary);
  width: 34px; height: 34px;
  border-radius: 8px; cursor: pointer;
  font-size: 16px; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.cal-nav-btn:hover { background: rgba(59,158,255,0.15); color: var(--txt-primary); }
.cal-week-label { font-size: 13px; color: var(--txt-secondary); font-weight: 500; }

.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 16px; }
.day-col { display: flex; flex-direction: column; gap: 4px; }
.day-head { text-align: center; padding: 8px 4px; background: rgba(255,255,255,0.03); border-radius: 8px; border: 1px solid transparent; }
.day-head.today { border-color: var(--teal); }
.day-head.no-slots { opacity: 0.35; }
.day-head .dow { font-size: 10px; color: var(--txt-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
.day-head .dom { font-size: 14px; font-weight: 600; }

.slot-pill {
  width: 100%; padding: 7px 4px;
  background: rgba(59,158,255,0.08);
  border: 1px solid rgba(59,158,255,0.2);
  border-radius: 6px;
  color: var(--accent);
  font-size: 11px; font-weight: 600;
  cursor: pointer; text-align: center;
  transition: all 0.2s;
  font-family: var(--font-body);
}
.slot-pill:hover { background: rgba(59,158,255,0.18); border-color: var(--accent); }
.slot-pill.selected { background: var(--accent); color: #fff; border-color: var(--accent); }
.no-slots-text { font-size: 12px; color: var(--txt-muted); text-align: center; padding: 4px 0; }

/* Confirm reschedule bar */
.reschedule-confirm {
  background: rgba(59,158,255,0.08);
  border: 1px solid rgba(59,158,255,0.25);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-top: 16px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.reschedule-confirm.open { display: flex; }
.reschedule-confirm-text { font-size: 13px; color: var(--txt-secondary); }
.reschedule-confirm-text strong { color: var(--txt-primary); }

/* Cancelled / done state */
.done-wrap { text-align: center; padding: 60px 20px; }
.done-icon { font-size: 52px; margin-bottom: 16px; }
.done-wrap h2 { font-family: var(--font-display); font-size: 24px; margin-bottom: 10px; }
.done-wrap p { color: var(--txt-secondary); font-size: 15px; line-height: 1.6; margin-bottom: 24px; }

@media (max-width: 600px) {
  .appt-nav { padding: 14px 16px; }
  .page { margin: 24px auto; padding: 0 12px 60px; }
  .card-header, .card-body { padding: 20px 18px; }
  .actions { flex-direction: column; }
  .slot-pill { font-size: 10px; padding: 6px 2px; }
}
