@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap");

:root {
  --page-bg: #f6f3ec;
  --card-bg: #ffffff;
  --card-border: #e4dccd;
  --text-main: #111827;
  --text-soft: #4b5563;
  --text-faint: #6b7280;
  --accent: #1f6b92;
  --danger: #9f1d1d;
  --danger-soft: #fdecec;
  --success: #059669;
  --success-soft: #ecfdf5;
  --shadow: 0 18px 46px rgba(17, 24, 39, 0.08);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--text-main);
  font-family: "Poppins", "Segoe UI", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 20px 110px;
}

.hero {
  text-align: center;
  margin-bottom: 28px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 780px;
  margin: 0 auto;
  color: var(--text-soft);
  font-size: 1.12rem;
  line-height: 1.55;
}

.info-card,
.main-card,
.side-card,
.panel-card,
.confirm-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.info-card {
  max-width: 780px;
  margin: 0 auto 36px;
  padding: 24px;
}

.info-card h2 {
  margin: 0 0 18px;
  font-size: 1.85rem;
  line-height: 1.1;
}

.info-block + .info-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #ede6da;
}

.info-block h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.info-block p,
.info-block li {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.info-block ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.side-card {
  padding: 22px;
  min-height: 260px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.brand-mark {
  width: 50px;
  height: 50px;
  color: #111827;
  flex: 0 0 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
  overflow: visible;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.brand-name {
  font-size: 1.42rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.side-card h2 {
  margin: 0 0 14px;
  font-size: 1.65rem;
  line-height: 1.12;
}

.side-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.main-card,
.panel-card {
  padding: 24px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.card-head h2,
.panel-card h3 {
  margin: 0;
  font-size: clamp(1.85rem, 3vw, 2.35rem);
  line-height: 1.08;
}

.card-head p,
.panel-card p {
  margin: 8px 0 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.chip {
  white-space: nowrap;
  border-radius: 999px;
  background: #f4efe6;
  color: var(--text-soft);
  padding: 10px 14px;
  font-size: 0.9rem;
}

.back-btn {
  border: 0;
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  font-weight: 700;
  padding: 0 0 12px;
}

.lookup-grid,
.form-grid {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-weight: 800;
}

.field input {
  width: 100%;
  min-height: 54px;
  border: 1px solid #d8cbb9;
  border-radius: 12px;
  background: #fffdf9;
  padding: 12px 14px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.btn-primary,
.btn-secondary,
.btn-danger,
.btn-soft-danger {
  min-height: 50px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: #0f172a;
  color: #ffffff;
}

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.btn-secondary {
  background: #ffffff;
  color: #0f172a;
  border-color: #d8cbb9;
}

.btn-danger {
  background: #9f1d1d;
  color: #ffffff;
}

.btn-soft-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #f3cdcd;
}

.status-box {
  display: none;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  line-height: 1.55;
}

.status-box.is-visible {
  display: block;
}

.status-info {
  background: #eff6fb;
  border: 1px solid #d7eaf5;
  color: #1f4d67;
}

.status-success {
  background: var(--success-soft);
  border: 1px solid #9ee7bf;
  color: #064e3b;
}

.status-error {
  background: var(--danger-soft);
  border: 1px solid #f3cdcd;
  color: var(--danger);
}

.current-grid,
.change-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-card,
.change-card {
  border: 1px solid #ede6da;
  border-radius: var(--radius-md);
  background: #fffdf9;
  padding: 15px;
}

.detail-card small,
.change-card small {
  display: block;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  margin-bottom: 5px;
}

.detail-card strong,
.change-card strong {
  display: block;
  line-height: 1.35;
}

.old-value {
  color: var(--text-faint);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.new-value {
  color: #064e3b;
}

.flow-panel {
  display: none;
  margin-top: 22px;
}

.flow-panel.is-visible {
  display: block;
}

.appointment-options,
.payment-options,
.slot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.option-card,
.slot-button {
  min-height: 88px;
  border: 1px solid #e3d7c7;
  border-radius: 15px;
  background: #fffdf9;
  padding: 14px;
  cursor: pointer;
  text-align: left;
}

.option-card.selected,
.slot-button.selected {
  border-color: #1f6b92;
  box-shadow: 0 0 0 2px rgba(31, 107, 146, 0.12);
}

.option-card strong,
.option-card small,
.slot-button strong,
.slot-button small {
  display: block;
}

.option-card small,
.slot-button small {
  margin-top: 5px;
  color: var(--text-soft);
  line-height: 1.45;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

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

.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid #d8cbb9;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  font-weight: 800;
}

.weekday-row,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.weekday-row {
  margin-top: 18px;
  color: var(--text-soft);
  font-size: 0.9rem;
  text-align: center;
}

.calendar-grid {
  margin-top: 10px;
}

.day-button {
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  border: 1px solid #edf0f2;
  background: #fffdf9;
  color: #c9c1b8;
  font-weight: 800;
}

.day-button.bookable {
  border-color: #bdd7e5;
  color: #0f172a;
  cursor: pointer;
}

.day-button.selected {
  border-color: #1f6b92;
  box-shadow: 0 0 0 2px rgba(31, 107, 146, 0.12);
}

.slot-button {
  text-align: center;
}

.slot-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.final-card,
.success-card {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid #9ee7bf;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ecfdf5 0%, #e7fbf1 100%);
  box-shadow: 0 22px 58px rgba(5, 150, 105, 0.18);
}

.success-card.centered-only {
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-top: clamp(24px, 8vh, 72px);
}

.success-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--success);
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 18px;
}

.success-card h2,
.final-card h2 {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 4vw, 2.65rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.white-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: #ffffff;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  padding: 22px;
  background: rgba(15, 23, 42, 0.52);
}

.modal-backdrop.is-visible {
  display: flex;
}

.modal-card {
  width: min(560px, 100%);
  padding: 26px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.modal-card h3 {
  margin: 0 0 10px;
  font-size: 1.8rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .side-card {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 28px 12px 80px;
  }

  .main-card,
  .panel-card,
  .side-card,
  .info-card {
    padding: 18px;
  }

  .card-head,
  .calendar-head {
    display: block;
  }

  .chip {
    display: inline-block;
    margin-top: 12px;
  }

  .current-grid,
  .change-grid,
  .appointment-options,
  .payment-options,
  .slot-grid {
    grid-template-columns: 1fr;
  }

  .weekday-row,
  .calendar-grid {
    gap: 6px;
  }

  .day-button {
    font-size: 0.88rem;
  }
}
