:root {
  color-scheme: light;
  --red: #b51f32;
  --ink: #2d2d2f;
  --muted: #6c6c70;
  --soft: #f6f7f9;
  --page: #dfe6ef;
  --line: #e8ebef;
  --panel: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  overflow: auto;
}

a {
  color: inherit;
}

.booking-alert {
  position: fixed;
  z-index: 100;
  top: 28px;
  left: 50%;
  width: min(680px, calc(100vw - 48px));
  min-height: 104px;
  padding: 20px 28px;
  border: 3px solid var(--red);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 20px 55px rgba(45, 45, 47, 0.28);
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -150%);
  transition: opacity 350ms ease, transform 450ms ease;
}

.booking-alert.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.booking-alert-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--red);
  position: relative;
}

.booking-alert-icon::after {
  content: "\2713";
  position: absolute;
  inset: 0;
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 54px;
  text-align: center;
}

.booking-alert strong,
.booking-alert span {
  display: block;
}

.booking-alert strong {
  color: var(--red);
  font-size: 1.5rem;
  line-height: 1.1;
  text-transform: uppercase;
}

.booking-alert [data-booking-alert-details] {
  margin-top: 7px;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
}

.app-shell {
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  min-height: 720px;
  margin: 0 auto;
  padding: 28px;
  display: grid;
  grid-template-columns: 0.98fr 1fr;
  gap: 34px;
}

@media (prefers-reduced-motion: reduce) {
  .booking-alert {
    transition: none;
  }
}

.reservation-panel,
.calendar-panel,
.form-panel {
  background: var(--panel);
  border-radius: 20px;
  box-shadow: 0 18px 45px rgba(48, 65, 84, 0.12);
}

.reservation-panel {
  min-height: 0;
  padding: 48px 54px;
  display: grid;
  justify-items: center;
  align-content: start;
  text-align: center;
}

.calendar-panel {
  min-height: 0;
  max-height: 100%;
  padding: 58px 62px;
  display: grid;
  align-content: start;
  gap: 34px;
  overflow: hidden;
}

.brand-logo {
  display: block;
  width: 330px;
  height: auto;
  object-fit: contain;
}

.reservation-panel h1 {
  margin: 42px 0 20px;
  max-width: 720px;
  color: var(--red);
  font-size: 3.3rem;
  line-height: 1.13;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.reservation-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 1.22rem;
  font-weight: 700;
  text-transform: uppercase;
}

.reservation-panel h2 {
  margin: 42px 0 32px;
  color: var(--red);
  font-size: 2.35rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.qr-box {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.qr-box img {
  width: 290px;
  aspect-ratio: 1;
  border: 10px solid #050505;
  border-radius: 8px;
  padding: 22px;
  background: #ffffff;
}

.qr-box span {
  font-size: 0.9rem;
  color: transparent;
}

.site-label {
  align-self: end;
  margin-top: 62px;
  color: var(--ink);
  font-size: 1.65rem;
  text-transform: uppercase;
}

.calendar-heading {
  text-align: center;
}

.calendar-heading h1,
.form-heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: 2.7rem;
  line-height: 1.1;
}

.calendar-heading p,
.form-heading p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.65rem;
  font-weight: 600;
}

.schedule-section {
  display: grid;
  gap: 18px;
  min-height: 0;
}

.schedule-section h2 {
  margin: 0;
  padding-bottom: 14px;
  border-bottom: 4px solid var(--red);
  color: var(--red);
  font-size: 2rem;
  line-height: 1.1;
  text-align: center;
}

.empty-state {
  margin: 0;
  border-radius: 10px;
  background: var(--soft);
  color: #969696;
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 500;
  padding: 28px 22px;
  text-align: center;
}

.appointment-list,
.cancellation-list {
  display: grid;
  gap: 10px;
  max-height: 185px;
  overflow: hidden;
}

.appointment-card,
.cancellation-card {
  background: var(--soft);
  border: 1px solid var(--line);
  border-left: 6px solid var(--red);
  border-radius: 10px;
  padding: 12px 16px;
  display: grid;
  gap: 8px;
}

.appointment-card {
  grid-template-columns: minmax(0, 1fr) 92px;
  align-items: center;
}

.appointment-card strong,
.cancellation-card strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
}

.appointment-card span,
.cancellation-card span,
.cancellation-card small {
  display: block;
  color: var(--muted);
}

.cancellation-card p {
  margin: 2px 0 0;
  color: var(--ink);
  line-height: 1.45;
}

.cancel-qr {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
}

.cancel-qr span {
  width: 72px;
}

.cancel-qr img {
  width: 68px;
  aspect-ratio: 1;
  border: 3px solid #050505;
  border-radius: 4px;
  background: #ffffff;
  padding: 4px;
}

.log-section {
  padding-top: 6px;
}

.form-page {
  min-height: 100vh;
  padding: 30px;
  display: grid;
  place-items: center;
}

.form-panel {
  width: min(780px, 100%);
  padding: clamp(28px, 5vw, 56px);
  display: grid;
  gap: 30px;
}

.form-logo {
  width: min(280px, 72%);
  justify-self: center;
}

.form-heading {
  text-align: center;
}

.form-heading h1 {
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-heading p {
  font-size: 1.1rem;
  line-height: 1.55;
}

.booking-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

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

.field.full {
  grid-column: 1 / -1;
}

label {
  color: var(--ink);
  font-weight: 800;
}

input,
textarea,
select,
button,
.button-secondary {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #d6dbe1;
  border-radius: 8px;
  padding: 14px 15px;
  color: var(--ink);
  background: #ffffff;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

button,
.button-secondary {
  border-radius: 8px;
  font-weight: 900;
  padding: 14px 18px;
  text-decoration: none;
}

button {
  border: 0;
  background: var(--red);
  color: #ffffff;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button-secondary {
  border: 1px solid var(--red);
  color: var(--red);
  background: #ffffff;
}

button:hover,
.button-secondary:hover {
  filter: brightness(0.96);
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.form-message {
  margin: 0;
  color: var(--muted);
}

.form-message.error {
  color: #a20e20;
}

.form-message.success {
  color: #176b42;
}

@media (max-width: 900px) {
  .app-shell {
    width: 100%;
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .reservation-panel,
  .calendar-panel {
    min-width: 0;
    min-height: auto;
  }
}

@media (max-width: 680px) {
  .app-shell,
  .form-page {
    padding: 14px;
  }

  .reservation-panel,
  .calendar-panel,
  .form-panel {
    border-radius: 14px;
    padding: 24px;
  }

  .reservation-panel h1 {
    font-size: clamp(2rem, 10vw, 2.7rem);
    letter-spacing: 0.04em;
  }

  .reservation-panel h2 {
    font-size: clamp(1.8rem, 8vw, 2.2rem);
  }

  .brand-logo {
    width: 100%;
    max-width: 330px;
  }

  .booking-form {
    grid-template-columns: 1fr;
  }

  .appointment-card {
    grid-template-columns: 1fr;
  }

  .form-actions > * {
    width: 100%;
    text-align: center;
  }
}
