/* ── Reset & base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #1a73e8;
  --blue-dark: #1557b0;
  --blue-light: #e8f0fe;
  --green: #1e8e3e;
  --green-light: #e6f4ea;
  --red: #d93025;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f4;
  --gray-200: #e8eaed;
  --gray-400: #bdc1c6;
  --gray-600: #80868b;
  --gray-700: #5f6368;
  --gray-900: #202124;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
}

body {
  font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--gray-900);
  background: var(--gray-50);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
}

/* ── Login page ───────────────────────────────────── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f0fe 0%, #f8f9fa 100%);
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 24px;
}

.login-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 40px;
  text-align: center;
}

.login-logo {
  margin-bottom: 20px;
}

.login-title {
  font-size: 26px;
  font-weight: 600;
  color: #1a3c8e;
  margin-top: 16px;
  margin-bottom: 2px;
}

.login-dg {
  font-size: 15px;
  font-weight: 500;
  color: #f26522;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 28px;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: white;
  color: var(--gray-900);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: box-shadow .15s, background .15s;
  width: 100%;
  justify-content: center;
}

.btn-google:hover {
  box-shadow: var(--shadow);
  background: var(--gray-50);
}

.login-note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--gray-600);
}

/* ── Navbar ───────────────────────────────────────── */
.navbar {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
  color: var(--gray-900);
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

#user-name {
  font-size: 13px;
  color: var(--gray-700);
}

.navbar-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-tab {
  font-size: 14px;
  color: var(--gray-600);
  text-decoration: none;
  padding: 6px 16px;
  border-radius: var(--radius);
  font-weight: 500;
  transition: background .1s, color .1s;
}

.nav-tab:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.nav-tab.active {
  color: var(--blue);
  background: var(--blue-light);
  font-size: 13px;
  color: var(--blue);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  transition: background .15s;
}

.btn-logout:hover {
  background: var(--gray-100);
}

/* ── Main layout ──────────────────────────────────── */
.main {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 100px;
}

/* ── Progress bar ─────────────────────────────────── */
.progress-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  z-index: 100;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--gray-600);
}

.progress-step.active {
  color: var(--blue);
  font-weight: 500;
}

.progress-step.done {
  color: var(--green);
}

.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-400);
  transition: background .2s;
}

.progress-step.active .progress-dot {
  background: var(--blue);
}

.progress-step.done .progress-dot {
  background: var(--green);
}

.progress-line {
  width: 40px;
  height: 1px;
  background: var(--gray-200);
}

/* ── Steps ────────────────────────────────────────── */
.step { display: none; }
.step.active { display: block; }

.step-header {
  margin-bottom: 24px;
}

.step-header h2 {
  font-size: 20px;
  font-weight: 500;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.step-header p {
  font-size: 14px;
  color: var(--gray-600);
}

.step-body {
  margin-bottom: 24px;
}

.step-body.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.step-body.two-col-form {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
}

.step-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ── Section label ────────────────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gray-600);
  margin-bottom: 10px;
}

/* ── Rooms grid ───────────────────────────────────── */
.rooms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.room-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 14px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.room-card:hover {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
}

.room-card.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue);
  background: var(--blue-light);
}

.room-icon {
  font-size: 20px;
  margin-bottom: 8px;
}

.room-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-900);
  margin-bottom: 2px;
}

.room-meta {
  font-size: 12px;
  color: var(--gray-600);
  margin-bottom: 6px;
}

.room-features {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.feature-tag {
  font-size: 11px;
  background: var(--gray-100);
  color: var(--gray-700);
  border-radius: 4px;
  padding: 2px 6px;
}

.room-card.selected .feature-tag {
  background: #c5d8fc;
  color: var(--blue-dark);
}

/* ── Skeleton ─────────────────────────────────────── */
.skeleton-card {
  background: var(--gray-200);
  border-radius: var(--radius-lg);
  height: 100px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

/* ── Calendar ─────────────────────────────────────── */
.calendar-widget {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 16px;
}

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

.cal-month-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-900);
}

.cal-nav {
  background: none;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 16px;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .1s;
}

.cal-nav:hover { background: var(--gray-100); }

.cal-dow-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 6px;
  letter-spacing: .03em;
}

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

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--gray-900);
  transition: background .1s;
  border: none;
  background: none;
}

.cal-day:hover:not(:disabled):not(.empty) { background: var(--gray-100); }
.cal-day:disabled { color: var(--gray-400); cursor: default; }
.cal-day.empty { pointer-events: none; }
.cal-day.today { font-weight: 600; color: var(--blue); }
.cal-day.selected { background: var(--blue); color: white; font-weight: 500; }
.cal-day.selected:hover { background: var(--blue-dark); }

/* ── Slots ────────────────────────────────────────── */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
}

.slot {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  font-size: 13px;
  color: var(--gray-900);
  background: white;
  transition: border-color .1s;
}

.slot:hover { border-color: var(--blue); color: var(--blue); }

.slot.selected {
  border: 2px solid var(--blue);
  color: var(--blue);
  font-weight: 500;
  background: var(--blue-light);
}

.slot.busy {
  background: var(--gray-100);
  color: var(--gray-400);
  cursor: default;
  text-decoration: line-through;
  pointer-events: none;
}

.slots-legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--gray-600);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  border: 1px solid var(--gray-200);
}

.legend-dot.free { background: white; }
.legend-dot.taken { background: var(--gray-100); }
.legend-dot.sel { background: var(--blue-light); border-color: var(--blue); }

/* ── Loading ──────────────────────────────────────── */
.loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gray-600);
  font-size: 13px;
  padding: 20px 0;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Form ─────────────────────────────────────────── */
.booking-summary {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  align-self: start;
}

.summary-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.summary-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--gray-700);
  padding: 5px 0;
  border-top: 1px solid var(--gray-200);
}

.summary-row:first-of-type { border-top: none; }

.summary-icon {
  font-size: 16px;
  margin-top: 1px;
  flex-shrink: 0;
}

.summary-label {
  font-size: 11px;
  color: var(--gray-600);
  display: block;
  margin-bottom: 1px;
}

.summary-value {
  font-weight: 500;
  color: var(--gray-900);
}

.booking-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 14px;
  color: var(--gray-900);
  background: white;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,115,232,.12);
}

.form-note {
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.5;
  margin-top: 4px;
}

.error-msg {
  font-size: 13px;
  color: var(--red);
  padding: 8px 12px;
  background: #fce8e6;
  border-radius: var(--radius);
  margin-top: 8px;
}

/* ── Buttons ──────────────────────────────────────── */
.btn-primary {
  background: var(--blue);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 0 20px;
  height: 40px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, opacity .15s;
  font-family: inherit;
}

.btn-primary:hover { background: var(--blue-dark); }
.btn-primary:disabled { opacity: .45; cursor: default; }

.btn-secondary {
  background: white;
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0 16px;
  height: 40px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background .1s;
}

.btn-secondary:hover { background: var(--gray-50); }

/* ── Success ──────────────────────────────────────── */
.success-screen {
  text-align: center;
  padding: 48px 0;
  max-width: 440px;
  margin: 0 auto;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: var(--green-light);
  color: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  margin: 0 auto 20px;
}

.success-screen h2 {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 8px;
}

.success-sub {
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 24px;
}

.success-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: left;
  margin-bottom: 24px;
}

.success-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 700px) {
  .step-body.two-col,
  .step-body.two-col-form {
    grid-template-columns: 1fr;
  }
  .rooms-grid { grid-template-columns: 1fr 1fr; }
  .main { padding: 20px 16px 90px; }
}

/* ── Week picker ──────────────────────────────────── */
.week-label {
  font-size: 12px;
  color: var(--gray-600);
  margin-bottom: 12px;
  font-weight: 500;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.week-day-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 12px 8px;
  background: white;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-family: inherit;
}

.week-day-btn:hover:not(:disabled) {
  border-color: var(--blue);
  background: var(--blue-light);
}

.week-day-btn:disabled {
  opacity: .4;
  cursor: default;
}

.week-day-btn.today .week-num {
  background: var(--blue);
  color: white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.week-day-btn.selected {
  border: 2px solid var(--blue);
  background: var(--blue-light);
}

.week-dow {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.week-num {
  font-size: 18px;
  font-weight: 500;
  color: var(--gray-900);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.week-day-btn.selected .week-dow,
.week-day-btn.selected .week-num { color: var(--blue); }

.slot.past {
  background: var(--gray-50);
  color: var(--gray-400);
  cursor: default;
  pointer-events: none;
  font-style: italic;
}

.cal-day:disabled.today {
  background: none;
  color: var(--gray-400);
  font-weight: 400;
}

/* ── Full day option ──────────────────────────────── */
.slot-fullday {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid #f26522;
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  cursor: pointer;
  background: #fff7f3;
  color: #993c1d;
  transition: background .15s, box-shadow .15s;
}
.slot-fullday:hover { background: #fbe9e0; }
.slot-fullday.selected {
  background: #f26522;
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(242,101,34,.25);
}
.slot-fullday.selected span { color: #ffffff; }
.slot-fullday.disabled {
  border-color: var(--gray-200);
  background: var(--gray-50);
  color: var(--gray-400);
  cursor: default;
  pointer-events: none;
}
