/* ===========================
   Reserve Page — Niai Cleaning
   =========================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Noto+Sans+JP:wght@300;400;500;600;700;900&display=swap');

:root {
  --blue:        #3b82f6;
  --teal:        #14b8a6;
  --teal-light:  #2dd4bf;
  --indigo:      #818cf8;
  --gradient-accent: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%);
  --gradient-text:   linear-gradient(135deg, #3b82f6 0%, #14b8a6 100%);

  --white:    #ffffff;
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  --font-ja: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  --font-en: 'Inter', sans-serif;
  --ease-out: cubic-bezier(.25,.46,.45,.94);
  --ease-bounce: cubic-bezier(.34,1.56,.64,1);

  --danger:  #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-ja);
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.7;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

/* ===========================
   Page Header
   =========================== */
.page-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 clamp(16px, 4vw, 40px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.page-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1100px;
  margin: 0 auto;
}

.page-header .logo {
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 18px;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-500);
  transition: color .2s;
}
.back-link:hover { color: var(--gray-800); }

/* ===========================
   Main Container
   =========================== */
.reserve-container {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 40px);
}

.page-title {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 32px;
}

/* ===========================
   Flow Selector Tabs
   =========================== */
.flow-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 36px;
  background: var(--gray-100);
  border-radius: 12px;
  padding: 4px;
}

.flow-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--gray-500);
  font-family: var(--font-ja);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .3s var(--ease-out);
  text-align: center;
  line-height: 1.4;
}

.flow-tab.active {
  background: var(--white);
  color: var(--gray-800);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.flow-tab:hover:not(.active) {
  color: var(--gray-700);
}

/* ===========================
   Stepper
   =========================== */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
  padding: 0 16px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 700;
  border: 2px solid var(--gray-300);
  color: var(--gray-400);
  background: var(--white);
  transition: all .4s var(--ease-out);
  flex-shrink: 0;
}

.step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-400);
  white-space: nowrap;
  transition: color .3s;
}

.step-line {
  width: 40px;
  height: 2px;
  background: var(--gray-200);
  margin: 0 8px;
  border-radius: 2px;
  transition: background .4s;
  flex-shrink: 0;
}

/* Active step */
.step-item.active .step-circle {
  background: var(--gradient-accent);
  border-color: transparent;
  color: var(--white);
  box-shadow: 0 4px 16px rgba(59,130,246,.3);
}
.step-item.active .step-label { color: var(--gray-800); }

/* Completed step */
.step-item.completed .step-circle {
  background: var(--success);
  border-color: transparent;
  color: var(--white);
}
.step-item.completed .step-label { color: var(--gray-600); }
.step-line.completed { background: var(--success); }

/* ===========================
   Step Panels
   =========================== */
.step-panel {
  display: none;
  animation: fadeUp .4s var(--ease-out);
}
.step-panel.active { display: block; }

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

.step-panel-title {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 6px;
}

.step-panel-sub {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 28px;
}

/* ===========================
   Option Cards
   =========================== */
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.option-card {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: 16px;
  padding: 24px 20px;
  cursor: pointer;
  transition: all .3s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.option-card:hover {
  border-color: rgba(59,130,246,.3);
  box-shadow: 0 8px 24px rgba(59,130,246,.08);
  transform: translateY(-2px);
}

.option-card.selected {
  border-color: var(--blue);
  background: linear-gradient(135deg, rgba(59,130,246,.04), rgba(20,184,166,.04));
  box-shadow: 0 8px 32px rgba(59,130,246,.12);
}

.option-card.selected::after {
  content: '✓';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: var(--gradient-accent);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.option-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 6px;
}

.option-desc {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 12px;
  line-height: 1.6;
}

.option-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.option-price {
  font-family: var(--font-en);
  font-size: 20px;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.option-duration {
  font-size: 11px;
  color: var(--gray-400);
}

/* ===========================
   Calendar
   =========================== */
.calendar-wrapper {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 32px;
}

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

.calendar-month {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-800);
}

.calendar-nav {
  display: flex;
  gap: 8px;
}

.calendar-nav button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  font-size: 16px;
}
.calendar-nav button:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

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

.calendar-day-label {
  text-align: center;
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  padding: 8px 0;
  text-transform: uppercase;
}
.calendar-day-label:first-child { color: var(--danger); }
.calendar-day-label:last-child { color: var(--blue); }

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s var(--ease-out);
  color: var(--gray-700);
  position: relative;
}

.calendar-day:hover:not(.disabled):not(.empty) {
  background: var(--gray-100);
}

.calendar-day.today {
  font-weight: 700;
  color: var(--blue);
}
.calendar-day.today::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--blue);
}

.calendar-day.selected {
  background: var(--gradient-accent);
  color: var(--white);
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(59,130,246,.3);
}
.calendar-day.selected::after { display: none; }

.calendar-day.disabled {
  color: var(--gray-300);
  cursor: not-allowed;
  text-decoration: line-through;
}

.calendar-day.empty {
  cursor: default;
}

.calendar-day.sunday { color: var(--danger); }
.calendar-day.saturday { color: var(--blue); }
.calendar-day.sunday.disabled,
.calendar-day.saturday.disabled { opacity: .4; }

/* ===========================
   Time Slots
   =========================== */
.time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.time-slot {
  padding: 16px 12px;
  text-align: center;
  border: 2px solid var(--gray-200);
  border-radius: 14px;
  background: var(--white);
  cursor: pointer;
  transition: all .3s var(--ease-out);
  font-family: var(--font-en);
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-700);
}

.time-slot:hover:not(.disabled) {
  border-color: rgba(59,130,246,.3);
  background: rgba(59,130,246,.03);
  transform: translateY(-2px);
}

.time-slot.selected {
  border-color: var(--blue);
  background: linear-gradient(135deg, rgba(59,130,246,.06), rgba(20,184,166,.06));
  color: var(--blue);
  box-shadow: 0 4px 16px rgba(59,130,246,.12);
}

.time-slot.disabled {
  background: var(--gray-100);
  color: var(--gray-300);
  cursor: not-allowed;
  border-color: var(--gray-100);
}

.time-slot-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--gray-400);
  margin-top: 4px;
  font-family: var(--font-ja);
}

.time-slot.disabled .time-slot-label { color: var(--gray-300); }

/* ===========================
   Confirmation / Summary
   =========================== */
.confirm-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 24px;
}

.confirm-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-100);
}
.confirm-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.confirm-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-400);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.confirm-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
}

.confirm-option-list {
  list-style: none;
}
.confirm-option-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  color: var(--gray-700);
}
.confirm-option-list li + li {
  border-top: 1px solid var(--gray-100);
}
.confirm-option-price {
  font-family: var(--font-en);
  font-weight: 700;
  color: var(--gray-800);
}

.confirm-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0 0;
  border-top: 2px solid var(--gray-200);
  margin-top: 16px;
}

.confirm-total-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
}

.confirm-total-price {
  font-family: var(--font-en);
  font-size: 28px;
  font-weight: 900;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===========================
   Customer Info Form
   =========================== */
.form-group {
  margin-bottom: 20px;
}

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

.form-label .required {
  color: var(--danger);
  font-size: 11px;
  margin-left: 4px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  font-family: var(--font-ja);
  font-size: 15px;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(59,130,246,.1);
}

.form-input::placeholder {
  color: var(--gray-400);
}

/* ===========================
   Navigation Buttons
   =========================== */
.step-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border: 2px solid var(--gray-200);
  border-radius: 50px;
  background: var(--white);
  color: var(--gray-600);
  font-family: var(--font-ja);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .3s var(--ease-out);
}
.btn-back:hover {
  border-color: var(--gray-300);
  color: var(--gray-800);
}

.btn-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  background: var(--gradient-accent);
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-family: var(--font-ja);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .3s var(--ease-bounce);
  box-shadow: 0 4px 16px rgba(59,130,246,.2);
}

.btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59,130,246,.3);
}

.btn-next:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-submit {
  padding: 18px 48px;
  font-size: 16px;
  width: 100%;
  justify-content: center;
}

/* ===========================
   Completion
   =========================== */
.completion {
  text-align: center;
  padding: 60px 20px;
}

.completion-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(34,197,94,.1), rgba(34,197,94,.05));
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 36px;
  animation: scaleIn .5s var(--ease-bounce);
}

@keyframes scaleIn {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

.completion h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 12px;
}

.completion p {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 36px;
  line-height: 1.8;
}

.btn-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border: 2px solid var(--gray-200);
  border-radius: 50px;
  background: var(--white);
  color: var(--gray-700);
  font-family: var(--font-ja);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.btn-home:hover { border-color: var(--gray-300); }

/* ===========================
   Empty state
   =========================== */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--gray-400);
  font-size: 14px;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 640px) {
  .option-grid { grid-template-columns: 1fr; }
  .time-grid { grid-template-columns: repeat(3, 1fr); }
  .step-label { display: none; }
  .step-line { width: 24px; }
  .stepper { gap: 0; }
  .calendar-wrapper { padding: 16px; }
  .confirm-card { padding: 20px; }
  .step-nav { flex-direction: column-reverse; }
  .btn-back, .btn-next { width: 100%; justify-content: center; }
}
