/* =========================================================
   Konsultasi Pak Har — Glass-morphism UI
   Palette:
     --bg-deep:    #0b1220 (base)
     --bg-mid:     #12213b
     --accent:     #2dd4bf (teal - CTA / tersedia)
     --accent-2:   #f5b942 (amber - highlight waktu)
     --text:       #eef2f7
     --text-muted: #9fb0c3
   ========================================================= */

:root {
  --bg-deep: #0b1220;
  --bg-mid: #12213b;
  --accent: #2dd4bf;
  --accent-2: #f5b942;
  --text: #eef2f7;
  --text-muted: #9fb0c3;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.14);
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg-deep);
  color: var(--text);
  font-family: 'Segoe UI', 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(45, 212, 191, 0.12), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(245, 185, 66, 0.10), transparent 55%),
    linear-gradient(180deg, var(--bg-deep), var(--bg-mid));
  position: relative;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.15) 0, transparent 50%),
    radial-gradient(2px 2px at 80% 60%, rgba(255,255,255,0.10) 0, transparent 50%),
    radial-gradient(2px 2px at 60% 85%, rgba(255,255,255,0.08) 0, transparent 50%);
  z-index: 0;
}

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: 20px 24px 8px;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #14b8a6);
  color: #06251f;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
}

.brand-text strong { display: block; font-size: 15px; }
.brand-text small { color: var(--text-muted); font-size: 12px; }

.container {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 20px 80px;
}

.hero { padding: 24px 4px 8px; }
.hero h1 {
  font-size: 26px;
  line-height: 1.3;
  margin: 0 0 8px;
  font-weight: 700;
}
.hero p {
  color: var(--text-muted);
  font-size: 14.5px;
  margin: 0;
  max-width: 46ch;
}

/* ---------- Kalender Bulanan ---------- */

.calendar {
  margin-top: 20px;
  padding: 18px 16px 20px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.cal-month-label {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cal-nav {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--glass-border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  text-decoration: none;
  line-height: 1;
}

.cal-nav:hover { background: rgba(45,212,191,0.15); }

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  position: relative;
  gap: 3px;
}

.cal-cell.empty { visibility: hidden; }

.cal-cell.disabled { opacity: 0.35; }

.cal-cell.is-today .cal-daynum {
  font-weight: 700;
  color: var(--accent-2);
}

.cal-cell.has-slot {
  color: var(--text);
  background: rgba(45, 212, 191, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.25);
  cursor: pointer;
}

.cal-cell.has-slot:hover,
.cal-cell.has-slot:focus-visible {
  background: rgba(45, 212, 191, 0.18);
  outline: none;
}

.cal-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.day-group { margin-top: 28px; scroll-margin-top: 16px; }
.day-heading {
  font-size: 14px;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 12px 4px;
  font-weight: 600;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.slot-card {
  cursor: pointer;
  padding: 16px 14px;
  text-align: left;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.slot-card:hover,
.slot-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(45, 212, 191, 0.55);
  background: rgba(45, 212, 191, 0.10);
  outline: none;
}

.slot-time {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.slot-label {
  font-size: 11.5px;
  color: var(--text-muted);
}

.empty-state {
  padding: 28px 20px;
  text-align: center;
}
.empty-state .muted { color: var(--text-muted); font-size: 13.5px; margin-top: 6px; }

/* ---------- Modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(4, 8, 16, 0.55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 480px;
  padding: 24px 22px 28px;
  position: relative;
  animation: slideUp 0.22s ease-out;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

@media (min-width: 560px) {
  .modal-overlay { align-items: center; padding: 20px; }
  .modal { border-radius: var(--radius); }
}

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

.modal h3 { margin: 4px 0 6px; font-size: 19px; }
.modal-slot-display {
  color: var(--accent);
  font-weight: 600;
  font-size: 14.5px;
  margin: 0 0 18px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,0.08);
  border: none;
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

#bookingForm { display: flex; flex-direction: column; gap: 6px; }

#bookingForm label {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 10px;
}

#bookingForm input,
#bookingForm textarea {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--text);
  font-size: 14.5px;
  font-family: inherit;
  resize: vertical;
}

#bookingForm input:focus,
#bookingForm textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.btn-primary {
  margin-top: 20px;
  padding: 13px 16px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #14b8a6);
  color: #06251f;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
}

.btn-primary:active { transform: scale(0.98); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .slot-card, .modal { transition: none; animation: none; }
}
