:root {
  color-scheme: dark;
  --black: #050505;
  --ink: #111;
  --panel: #151515;
  --panel-soft: #1f1f1f;
  --white: #fff;
  --muted: #bdbdbd;
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.24);
  --gold: #d8b45f;
  --green: #22c55e;
  --danger: #ef4444;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--black);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--white);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.1), transparent 34rem),
    linear-gradient(145deg, #000 0%, #151515 48%, #050505 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 980px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px;
}

.developer-signature {
  position: fixed;
  right: 18px;
  bottom: 14px;
  z-index: 19;
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  pointer-events: none;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.hero {
  position: relative;
  min-height: calc(100vh - 36px);
  display: grid;
  align-content: center;
  gap: 34px;
  padding: 56px 12px 40px;
  text-align: center;
}

.admin-link {
  position: absolute;
  top: 0;
  right: 0;
  min-height: 40px;
  padding: 0 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.brand-block {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.logo-ring {
  width: clamp(146px, 46vw, 230px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent),
    #0d0d0d;
  box-shadow: var(--shadow);
}

.brand-logo,
.staff-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 680px;
  margin-bottom: 0;
  font-size: clamp(2.25rem, 11vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.brand-title {
  font-family: "Brush Script MT", "Segoe Script", "Lucida Handwriting", cursive;
  font-size: clamp(3.2rem, 18vw, 7.8rem);
  font-weight: 400;
  line-height: 0.9;
  text-shadow: 0 16px 34px rgba(0, 0, 0, 0.55);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 5vw, 2.1rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 16px;
  font-size: 1rem;
}

.hero-copy {
  max-width: 430px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.hero-actions {
  display: grid;
  gap: 12px;
  width: min(100%, 390px);
  margin: 0 auto;
}

.primary-cta,
.secondary-cta,
.ghost-button {
  min-height: 54px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
}

.primary-cta {
  color: var(--black);
  background: var(--white);
  box-shadow: 0 18px 40px rgba(255, 255, 255, 0.14);
}

.secondary-cta,
.ghost-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line);
}

.booking-panel,
.admin-page {
  min-height: calc(100vh - 36px);
  padding: 18px 0 30px;
  animation: liftIn 420ms ease both;
}

.panel-topbar,
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-topbar h2 {
  text-align: right;
}

.step-label {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.progress-track {
  height: 6px;
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.progress-fill {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: var(--white);
  transition: width 280ms ease;
}

.step-card {
  display: none;
  animation: riseFade 340ms ease both;
}

.step-card.is-active {
  display: block;
}

.staff-grid,
.date-grid,
.time-grid,
.week-list,
.slot-board {
  display: grid;
  gap: 12px;
}

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

.staff-option,
.date-option,
.time-option,
.reservation-card,
.day-card,
.slot-card,
.admin-login-panel,
.admin-add-form {
  color: var(--white);
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.staff-option {
  min-height: 240px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 16px;
  padding: 20px 12px;
}

.staff-avatar {
  width: min(38vw, 160px);
  aspect-ratio: 1;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #0f0f0f;
}

.staff-name {
  margin: 0;
  font-size: clamp(1rem, 4.5vw, 1.28rem);
  font-weight: 900;
  text-align: center;
  line-height: 1.25;
}

.date-option,
.time-option {
  min-height: 70px;
  padding: 14px;
  text-align: left;
}

.date-option strong,
.time-option strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.date-option span,
.time-option span {
  color: var(--muted);
  font-size: 0.9rem;
}

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

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

.time-option {
  min-height: 58px;
  text-align: center;
}

.is-selected,
.staff-option:hover,
.date-option:hover,
.time-option:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

.is-disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.time-option.is-closed {
  opacity: 0.62;
  background: rgba(255, 255, 255, 0.035);
  border-style: dashed;
}

.details-form.is-active,
.stacked-form,
.admin-add-form {
  display: grid;
  gap: 14px;
}

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

input,
select {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  color: var(--white);
  background: #101010;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--white);
}

.booking-summary,
.result-box {
  display: none;
  padding: 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.5;
}

.booking-summary.is-visible,
.result-box.is-visible {
  display: block;
}

.form-submit {
  width: 100%;
  margin-top: 4px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.72);
}

.modal.is-open {
  display: flex;
}

.modal-card {
  position: relative;
  width: min(100%, 760px);
  max-height: 92vh;
  overflow: auto;
  padding: 24px;
  background: #111;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: var(--shadow);
  animation: liftIn 260ms ease both;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
}

.helper-text {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.confirm-card {
  width: min(100%, 520px);
}

.confirm-summary {
  margin: 18px 0;
  padding: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.5;
}

.confirm-summary strong {
  display: block;
  color: var(--white);
  margin-bottom: 4px;
}

.confirm-actions {
  display: grid;
  gap: 10px;
}

.danger-confirm {
  min-height: 54px;
  font-weight: 900;
}

.admin-tools,
.form-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.compact {
  min-height: 48px;
}

.admin-login-panel {
  width: min(100%, 520px);
  margin: 34px auto 0;
  padding: 22px;
  box-shadow: var(--shadow);
}

.admin-dashboard,
.admin-day-view {
  animation: riseFade 260ms ease both;
}

.admin-tools {
  grid-template-columns: 1fr;
}

.day-card {
  width: 100%;
  padding: 14px;
  text-align: left;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.day-card:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-1px);
}

.day-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.day-heading strong {
  font-size: 1.02rem;
}

.day-count {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  min-height: 30px;
  padding: 0 10px;
  color: var(--black);
  background: var(--white);
  border-radius: 999px;
  font-weight: 900;
}

.day-preview {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.day-detail-heading {
  margin: 18px 0 14px;
}

.day-detail-heading h3 {
  margin: 6px 0 0;
  font-size: clamp(1.35rem, 6vw, 2.15rem);
}

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

.slot-card {
  min-height: 142px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 12px;
  text-align: left;
}

.slot-card.is-full {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

.slot-card.is-empty {
  background: rgba(255, 255, 255, 0.045);
}

.slot-card.is-closed-admin {
  background: rgba(255, 255, 255, 0.035);
  border-style: dashed;
}

.slot-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.slot-time {
  font-size: 1.15rem;
  font-weight: 900;
}

.slot-status {
  width: fit-content;
  padding: 4px 8px;
  color: var(--black);
  background: var(--white);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
}

.slot-status.empty {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--line);
}

.slot-status.closed {
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.slot-switch {
  width: 48px;
  height: 28px;
  display: inline-block;
  position: relative;
  flex: 0 0 auto;
}

.slot-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.slot-switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid var(--line-strong);
  transition:
    background 180ms ease,
    border-color 180ms ease;
}

.slot-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 180ms ease;
}

.slot-switch input:checked + span {
  background: rgba(115, 159, 255, 0.38);
  border-color: rgba(172, 198, 255, 0.75);
}

.slot-switch input:checked + span::after {
  transform: translateX(20px);
}

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

.slot-switch.is-disabled input {
  cursor: not-allowed;
}

.slot-customer {
  display: grid;
  gap: 4px;
  line-height: 1.35;
}

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

.slot-action {
  min-height: 38px;
  padding: 0 10px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
}

.reservation-list {
  display: grid;
  gap: 8px;
}

.reservation-card {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.query-reservation-card {
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
}

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

.customer-cancel-button {
  min-height: 42px;
  white-space: nowrap;
}

.reservation-actions {
  display: flex;
  justify-content: flex-end;
}

.danger-button {
  min-height: 36px;
  padding: 0 12px;
  color: var(--white);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-radius: 999px;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.admin-add-form {
  margin-top: 16px;
  padding: 16px;
}

.admin-add-form h3 {
  margin-bottom: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 30;
  width: min(calc(100% - 32px), 440px);
  padding: 14px 16px;
  color: var(--white);
  text-align: center;
  background: #111;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: var(--shadow);
  transform: translate(-50%, calc(100% + 32px));
  transition: transform 220ms ease;
}

.toast.is-visible {
  transform: translate(-50%, 0);
}

.toast.success {
  border-color: rgba(34, 197, 94, 0.72);
}

.success-mark {
  width: 54px;
  height: 54px;
  display: inline-grid;
  place-items: center;
  margin: 0 auto 10px;
  color: var(--black);
  background: var(--green);
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 900;
}

.hidden {
  display: none !important;
}

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

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

@media (min-width: 720px) {
  .app-shell {
    padding: 26px;
  }

  .hero {
    min-height: calc(100vh - 52px);
  }

  .hero-actions {
    grid-template-columns: 1fr 1fr;
    width: min(100%, 520px);
  }

  .modal {
    align-items: center;
  }

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

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

  .admin-tools,
  .form-grid,
  .confirm-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 520px) {
  .app-shell {
    padding: 12px;
  }

  .hero {
    min-height: calc(100vh - 24px);
    padding-top: 62px;
  }

  .admin-link {
    right: 2px;
  }

  .staff-grid {
    grid-template-columns: 1fr;
  }

  .date-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .customer-cancel-button {
    width: 100%;
  }
}

@media (max-width: 719px) {
  .app-shell {
    padding: 16px;
    min-height: calc(100svh - 38px);
  }

  .hero {
    min-height: calc(100svh - 70px);
    gap: 24px;
    padding: 60px 4px 28px;
  }

  .admin-link {
    min-height: 44px;
    padding: 0 14px;
    font-size: 0.875rem;
  }

  .brand-block {
    gap: 16px;
  }

  .logo-ring {
    width: clamp(160px, 45vw, 200px);
    padding: 6px;
  }

  .brand-title {
    max-width: 290px;
    font-size: clamp(3.5rem, 16vw, 4.5rem);
    line-height: 0.98;
  }

  .hero-actions {
    width: min(100%, 350px);
    gap: 10px;
  }

  .primary-cta,
  .secondary-cta,
  .danger-confirm {
    min-height: 50px;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 700;
  }

  .booking-panel,
  .admin-page {
    min-height: calc(100svh - 70px);
    padding: 12px 0 24px;
  }

  .panel-topbar,
  .admin-header {
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
  }

  .ghost-button {
    min-height: 44px;
    padding: 0 16px;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
  }

  .step-label {
    margin-bottom: 5px;
    font-size: 0.75rem;
  }

  h2 {
    font-size: clamp(1.35rem, 5.8vw, 1.75rem);
    line-height: 1.15;
  }

  .progress-track {
    height: 5px;
    margin-bottom: 20px;
  }

  .staff-grid,
  .date-grid,
  .time-grid {
    gap: 10px;
  }

  .staff-grid {
    grid-template-columns: 1fr;
  }

  .staff-option {
    min-height: 112px;
    grid-template-columns: 80px minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    gap: 18px;
    padding: 14px 16px;
    border-radius: 12px;
  }

  .staff-avatar {
    width: 80px;
    padding: 3px;
  }

  .staff-name {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
  }

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

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

  .date-option {
    min-height: 80px;
    padding: 12px;
    border-radius: 10px;
  }

  .time-option {
    min-height: 64px;
    padding: 10px 6px;
    border-radius: 10px;
  }

  .date-option strong,
  .time-option strong {
    font-size: 1rem;
    margin-bottom: 4px;
  }

  .date-option span,
  .time-option span {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  label {
    font-size: 0.875rem;
  }

  input,
  select {
    min-height: 48px;
    padding: 0 14px;
    font-size: 1rem;
  }

  .booking-summary,
  .result-box {
    padding: 12px;
    font-size: 0.9rem;
  }

  .modal-card {
    padding: 22px 18px;
  }

  .modal-card h2 {
    padding-right: 32px;
  }

  .admin-login-panel {
    margin-top: 24px;
    padding: 18px;
  }

  .developer-signature {
    position: static;
    margin: 0 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    text-align: right;
    font-size: 0.625rem;
    font-weight: 400;
  }
}

@media (max-width: 359px) {
  .time-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .staff-option {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .staff-avatar {
    width: 68px;
  }
}
