:root {
  --bg: #141819;
  --surface: rgba(31, 36, 38, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.06);
  --text: #f4f1ec;
  --muted: #b8aaa1;
  --primary: #5f8796;
  --primary-dark: #4f7483;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(95, 135, 150, 0.22), transparent 34rem),
    linear-gradient(180deg, rgba(20, 24, 25, 0.72), rgba(20, 24, 25, 0.98)),
    var(--bg);
  font-family: "Segoe UI", "Microsoft JhengHei", Arial, sans-serif;
}

.customer-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 18px 16px 34px;
}

.customer-home {
  display: grid;
  gap: 22px;
}

.hero-frame {
  overflow: hidden;
  border-radius: 0 0 28px 28px;
  box-shadow: var(--shadow);
  background: #22282a;
}

.hero-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.studio-panel {
  padding: 4px 4px 0;
  text-align: center;
}

.studio-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 8vw, 52px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0;
}

.studio-intro {
  width: min(100%, 560px);
  max-height: 15.5em;
  margin: 18px auto 0;
  padding: 12px 14px;
  overflow-y: auto;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
  text-align: left;
  white-space: pre-wrap;
}

.customer-actions {
  display: grid;
  gap: 12px;
  margin: 26px auto 0;
  width: min(100%, 420px);
}

.customer-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 12px 16px;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 12px 30px rgba(95, 135, 150, 0.26);
  text-decoration: none;
  font-size: 17px;
  font-weight: 800;
}

.customer-button.primary,
.customer-button.secondary {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.customer-button.primary:active,
.customer-button.primary:hover,
.customer-button.secondary:active,
.customer-button.secondary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.customer-actions .customer-button:nth-child(3) {
  grid-column: 1 / -1;
}

.closed-message {
  width: min(100%, 420px);
  margin: 22px auto 0;
  padding: 12px 14px;
  border-radius: 10px;
  color: #f0c7bb;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(240, 199, 187, 0.18);
  font-weight: 700;
}

.customer-form-shell {
  width: min(100%, 980px);
  padding-top: 22px;
}

.customer-card {
  padding: 22px 16px 30px;
  border-radius: 22px;
  background: rgba(31, 36, 38, 0.82);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
}

.customer-card h1 {
  margin-bottom: 18px;
  font-size: clamp(28px, 6vw, 42px);
  text-align: center;
}

.customer-link {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--primary-dark);
  font-weight: 800;
  text-decoration: none;
}

.customer-link:hover {
  text-decoration: underline;
}

.customer-card form {
  display: grid;
  gap: 14px;
  width: min(100%, 760px);
  margin: 0 auto 22px;
}

.customer-card label {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 800;
}

.customer-card input,
.customer-card select {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 13px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font: inherit;
}

.customer-card select option {
  background: #ffffff;
  color: #12201b;
}

.customer-card select option:checked {
  background: var(--primary);
  color: #ffffff;
}

.customer-card button,
.customer-card .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 38px;
  border: 1px solid var(--primary);
  border-radius: 10px;
  padding: 8px 14px;
  background: var(--primary);
  color: #fff;
  font-size: .95rem;
  line-height: 1.25;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.customer-card form > button {
  margin-left: 132px;
}

.customer-card form.inline {
  display: inline-flex;
  width: auto;
  margin: 0 0 0 6px;
  gap: 0;
}

.customer-card form.inline button,
.customer-card td .button,
.customer-card td button {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 14px;
}

.customer-card table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 15px;
}

.customer-card th,
.customer-card td {
  min-height: 48px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.customer-card th {
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
}

.alert {
  min-height: 22px;
  margin: 0 auto 14px;
  width: min(100%, 760px);
  color: #f0a58e;
  font-weight: 800;
}

.availability-calendar {
  width: 100%;
  overflow-x: auto;
}

.availability-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.availability-toolbar .studio-name {
  color: var(--muted);
  font-weight: 900;
}

.availability-toolbar .month-title {
  margin-top: 4px;
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 900;
}

.month-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.availability-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.availability-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.availability-legend i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}

.legend-open {
  background: #2f8d62;
}

.legend-full {
  background: #d48b39;
}

.legend-closed {
  background: rgba(255, 111, 111, 0.26);
}

.legend-special {
  background: rgba(229, 183, 79, 0.36);
}

.availability-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(108px, 1fr));
  min-width: 760px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.availability-weekday,
.availability-day {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.availability-weekday:nth-child(7n),
.availability-day:nth-child(7n) {
  border-right: 0;
}

.availability-weekday {
  min-height: 48px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: clamp(26px, 5vw, 38px);
  line-height: 1;
  font-weight: 900;
}

.availability-weekday.sun {
  color: #ff8080;
}

.availability-weekday.sat {
  color: #82aaff;
}

.availability-day {
  min-height: 124px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.availability-day.outside-month {
  opacity: .48;
}

.availability-day.special-day {
  background: rgba(180, 132, 39, 0.2);
}

.availability-day.closed-day {
  background: rgba(128, 54, 48, 0.42);
}

.availability-day.today {
  outline: 2px solid rgba(122, 213, 190, 0.9);
  outline-offset: -2px;
}

.availability-date {
  margin-bottom: 9px;
  color: #fffdf5;
  font-size: clamp(30px, 6vw, 42px);
  line-height: 1;
  font-weight: 900;
}

.availability-slots {
  display: grid;
  gap: 7px;
}

.availability-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
}

.availability-slot.open {
  background: #2f8d62;
}

.availability-slot.bookable {
  cursor: pointer;
}

.availability-slot.bookable:hover,
.availability-slot.bookable:focus-visible {
  background: #37a875;
  text-decoration: none;
  outline: 2px solid rgba(255, 255, 255, 0.58);
  outline-offset: 2px;
}

.availability-slot.full {
  background: #d48b39;
}

.availability-slot.closed {
  gap: 6px;
  background: rgba(255, 255, 255, 0.11);
  color: var(--muted);
}

.availability-slot em {
  font-style: normal;
}

.availability-closed {
  display: grid;
  place-items: center;
  min-height: 62px;
  color: #ff8585;
  font-size: clamp(32px, 7vw, 48px);
  font-weight: 900;
}

@media (min-width: 720px) {
  .customer-shell {
    padding-top: 34px;
  }

  .hero-frame {
    border-radius: 28px;
  }

  .customer-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(100%, 760px);
  }

  .customer-actions .customer-button:nth-child(3) {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .customer-card table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (max-width: 359px) {
  .customer-card label {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .customer-card form > button {
    margin-left: 0;
  }
}
