:root {
  color-scheme: light;
  --ink: #231f20;
  --muted: #766d70;
  --line: rgba(35, 31, 32, 0.14);
  --paper: #fffafa;
  --panel: rgba(255, 250, 250, 0.9);
  --blush: #f2c9c4;
  --rose: #b96b74;
  --sage: #66786c;
  --charcoal: #2b2929;
  --shadow: 0 24px 70px rgba(41, 35, 36, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 250, 250, 0.94), rgba(255, 250, 250, 0.72)),
    url("assets/studio-hero.png") center / cover fixed;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.shell {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
}

.brand,
.nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(35, 31, 32, 0.16);
  font-weight: 800;
}

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

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
}

.nav {
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
}

.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
}

.nav a.is-active {
  color: #fff;
  background: var(--charcoal);
}

.view {
  display: none;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.view.is-active {
  display: block;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 480px);
  align-items: center;
  gap: clamp(26px, 5vw, 72px);
  min-height: calc(100vh - 110px);
}

.hero-copy {
  max-width: 650px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--rose);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.02;
  letter-spacing: 0;
}

h1 {
  max-width: 11ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.2rem, 10vw, 6.9rem);
  font-weight: 500;
}

h2 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
}

.intro {
  max-width: 520px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.65;
}

.booking-card,
.success-card,
.settings-panel,
.appointments-panel {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.booking-card {
  padding: clamp(18px, 3vw, 28px);
}

.booking-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}

.booking-progress span {
  height: 4px;
  border-radius: 999px;
  background: rgba(35, 31, 32, 0.14);
}

.booking-progress .is-current {
  background: var(--sage);
}

fieldset {
  min-width: 0;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 10px;
  font-weight: 800;
}

.service-grid,
.promotion-grid,
.date-strip,
.time-grid {
  display: grid;
  gap: 10px;
}

.service-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.promotion-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.offer-note {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.promotion-choice span {
  border-color: rgba(160, 109, 19, 0.3);
  background: rgba(255, 253, 248, 0.86);
}

.promotion-choice input:checked + span {
  border-color: rgba(139, 47, 67, 0.66);
  box-shadow: inset 0 0 0 2px rgba(139, 47, 67, 0.14);
}

.service-category {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  color: var(--rose);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.date-strip {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.booking-calendar-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.booking-calendar-head strong {
  min-width: 0;
  color: var(--ink);
  font-size: 1.02rem;
  text-align: center;
}

.date-weekday {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
}

.date-pad {
  min-height: 68px;
}

.time-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.choice {
  display: flex;
  min-height: 68px;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  display: grid;
  width: 100%;
  align-content: center;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.choice b,
.choice small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.choice small {
  color: var(--muted);
}

.choice input:checked + span {
  border-color: rgba(102, 120, 108, 0.72);
  box-shadow: inset 0 0 0 2px rgba(102, 120, 108, 0.2);
}

.choice:hover span {
  transform: translateY(-1px);
}

.choice.is-unavailable {
  cursor: not-allowed;
}

.choice.is-unavailable span {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.42);
  opacity: 0.62;
}

.choice.is-unavailable:hover span {
  transform: none;
}

.choice.is-full {
  cursor: not-allowed;
}

.choice.is-full span {
  border-color: rgba(143, 47, 62, 0.34);
  color: #8f2f3e;
  background: rgba(255, 232, 235, 0.72);
}

.choice.is-full:hover span {
  transform: none;
}

.choice.is-off {
  cursor: not-allowed;
}

.choice.is-off span {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.38);
  opacity: 0.58;
}

.choice.is-off:hover span {
  transform: none;
}

.date-choice.has-free-slots span {
  border-color: rgba(102, 120, 108, 0.38);
  background: rgba(238, 246, 235, 0.78);
}

.date-choice.has-free-slots small:last-child {
  color: #3f5f4a;
  font-weight: 900;
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.settings-group {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.settings-group .eyebrow {
  margin-bottom: 0;
}

.helper-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.wide {
  grid-column: 1 / -1;
}

.is-hidden {
  display: none !important;
}

.customer-account {
  min-height: calc(100vh - 82px);
  padding: 52px clamp(18px, 5vw, 72px);
  background: rgba(251, 248, 247, 0.9);
}

.customer-account-shell {
  width: min(920px, 100%);
  margin: 0 auto;
}

.account-heading {
  max-width: 720px;
  margin-bottom: 30px;
}

.account-heading h1 {
  margin: 0 0 12px;
  font-size: clamp(3rem, 7vw, 5.8rem);
}

.account-heading > p:last-child {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.account-login {
  display: grid;
  max-width: 560px;
  gap: 14px;
}

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

.account-form-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.text-button {
  width: auto;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #713f49;
  font: inherit;
  font-weight: 750;
  text-decoration: underline;
  cursor: pointer;
}

.account-form h2,
.reschedule-card h2 {
  margin: 0;
  font-size: 2rem;
}

.form-message {
  min-height: 22px;
  margin: 4px 0 0;
  color: var(--rose);
  font-weight: 700;
}

.customer-bookings {
  display: grid;
  gap: 12px;
}

.customer-booking {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.customer-booking h3 {
  margin: 0 0 5px;
  font-size: 1.2rem;
}

.customer-booking p,
.customer-booking small {
  display: block;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.customer-booking-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.modal-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  place-items: center;
  padding: 20px;
  background: rgba(35, 31, 32, 0.56);
}

.modal-backdrop:not(.is-hidden) {
  display: grid;
}

.reschedule-card {
  display: grid;
  width: min(520px, 100%);
  gap: 16px;
  border: 1px solid rgba(180, 126, 27, 0.35);
  border-radius: 8px;
  padding: 26px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(35, 31, 32, 0.28);
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  outline: none;
}

input:focus,
textarea:focus {
  border-color: rgba(102, 120, 108, 0.78);
  box-shadow: 0 0 0 4px rgba(102, 120, 108, 0.16);
}

.primary-button,
.secondary-button,
.appointment button,
.appointment .sms-button,
.file-picker span {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 800;
}

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

.primary-button {
  width: 100%;
  margin-top: 16px;
  color: #fff;
  background: var(--charcoal);
}

.primary-button.compact {
  width: auto;
  margin: 0;
}

.secondary-button,
.appointment button,
.appointment .sms-button,
.file-picker span {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
}

.fine-print {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.confirmation {
  min-height: calc(100vh - 110px);
  align-content: center;
}

.success-card {
  max-width: 620px;
  padding: clamp(24px, 5vw, 48px);
}

.success-card p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.studio-layout {
  display: grid;
  grid-template-columns: minmax(260px, 350px) 1fr;
  gap: 18px;
  align-items: start;
}

.admin-gate {
  min-height: calc(100vh - 140px);
  display: grid;
  place-items: center;
}

.admin-login {
  width: min(460px, 100%);
}

.settings-panel,
.appointments-panel {
  padding: 22px;
}

.settings-panel {
  display: grid;
  gap: 14px;
}

.availability-calendar {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

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

.icon-button {
  width: 44px;
  padding: 0;
  font-size: 1.35rem;
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

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

.calendar-weekdays span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.calendar-day {
  display: grid;
  min-height: 82px;
  align-content: start;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  text-align: left;
}

.calendar-day strong,
.calendar-day span,
.calendar-day small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.calendar-day strong {
  color: var(--ink);
  font-size: 1rem;
}

.calendar-day span,
.calendar-day small {
  font-size: 0.76rem;
}

.calendar-day.is-working {
  border-color: rgba(102, 120, 108, 0.45);
  color: var(--sage);
  background: rgba(238, 246, 235, 0.78);
}

.calendar-day.is-full {
  border-color: rgba(143, 47, 62, 0.55);
  color: #8f2f3e;
  background: rgba(255, 232, 235, 0.82);
}

.calendar-day.is-full strong {
  color: #8f2f3e;
}

.calendar-day.is-selected {
  border-color: var(--charcoal);
  box-shadow: inset 0 0 0 2px rgba(35, 31, 32, 0.18);
}

.day-editor {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.day-editor h3 {
  margin: 0;
  font-size: 1.3rem;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle-row input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  accent-color: var(--sage);
}

.toggle-row span {
  display: grid;
  gap: 2px;
}

.toggle-row small {
  color: var(--muted);
  font-size: 0.78rem;
}

.time-add-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.slot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.slot-pill {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(102, 120, 108, 0.38);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--sage);
  background: rgba(238, 246, 235, 0.78);
  cursor: pointer;
  font-weight: 800;
}

.slot-pill b {
  color: var(--rose);
  font-size: 1rem;
}

.danger-button {
  color: #8f2f3e;
}

.danger-action {
  background: #8f2f3e;
}

.compact-empty {
  width: 100%;
  padding: 14px;
}

.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.file-picker span {
  width: fit-content;
}

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

.appointments {
  display: grid;
  gap: 12px;
}

.history-heading {
  margin-top: 28px;
}

.appointment {
  display: grid;
  grid-template-columns: 1.1fr 1fr repeat(4, auto);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.appointment.is-upcoming {
  border-color: rgba(102, 120, 108, 0.38);
  background: rgba(238, 246, 235, 0.82);
}

.appointment.is-history {
  border-color: rgba(143, 47, 62, 0.3);
  background: rgba(255, 232, 235, 0.62);
}

.appointment strong,
.appointment span,
.appointment small {
  display: block;
}

.appointment small,
.appointment p {
  color: var(--muted);
}

.appointment p {
  grid-column: 1 / -1;
  margin: 0;
}

.appointment .ghost-button {
  color: var(--muted);
  font-weight: 700;
}

.appointment .sms-button.is-done {
  border-color: rgba(102, 120, 108, 0.45);
  color: #3f5f4a;
  background: rgba(102, 120, 108, 0.12);
}

.appointment .danger-sms {
  border-color: rgba(143, 47, 62, 0.34);
  color: #8f2f3e;
  background: rgba(255, 232, 235, 0.72);
}

.empty {
  padding: 26px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.58);
}

@media (max-width: 860px) {
  body {
    background-attachment: scroll;
  }

  .topbar {
    align-items: flex-start;
  }

  .hero-panel,
  .studio-layout {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    align-items: start;
    min-height: 0;
    padding-top: 14px;
  }

  h1 {
    max-width: 10ch;
  }

  .studio-layout {
    gap: 14px;
  }
}

@media (max-width: 560px) {
  .topbar {
    width: min(100% - 22px, 1160px);
  }

  .view {
    width: min(100% - 22px, 1160px);
    padding-bottom: 32px;
  }

  .brand {
    gap: 9px;
  }

  .brand-mark {
    width: 52px;
    height: 52px;
  }

  .brand small {
    display: none;
  }

  .nav a {
    padding: 9px 10px;
  }

  h1 {
    font-size: 3rem;
  }

  .service-grid,
  .promotion-grid,
  .client-grid,
  .appointment,
  .customer-booking {
    grid-template-columns: 1fr;
  }

  .customer-booking-actions {
    justify-content: stretch;
  }

  .customer-booking-actions > * {
    flex: 1;
  }

  .date-strip {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
  }

  .date-choice {
    min-height: 62px;
  }

  .date-choice span {
    padding: 7px 4px;
    text-align: center;
  }

  .date-choice b,
  .date-choice small {
    font-size: 0.68rem;
  }

  .time-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-heading {
    display: grid;
  }
}
