* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: #1f2933;
  background:
    radial-gradient(circle at top left, rgba(11, 114, 133, 0.14), transparent 32rem),
    linear-gradient(135deg, #f8fbff 0%, #eef6f4 46%, #fff7ed 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.page {
  min-height: 100vh;
  padding: 44px 16px;
}

.centered {
  display: grid;
  place-items: center;
}

.form-shell {
  max-width: 980px;
  margin: 0 auto;
}

.title-block {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  border-radius: 8px;
  padding: 34px;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(12, 74, 110, 0.94), rgba(15, 118, 110, 0.9)),
    url("https://images.unsplash.com/photo-1523240795612-9a054b0db644?auto=format&fit=crop&w=1800&q=80") center/cover;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.title-block p,
.admin-head p,
.done-card p {
  margin: 0 0 6px;
  color: #52606d;
  font-size: 14px;
}

.title-block p {
  color: #ccfbf1;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.25;
}

.title-block span {
  display: block;
  margin-top: 12px;
  max-width: 620px;
  color: #e0f2fe;
  font-size: 15px;
}

h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.form-card,
.login-card,
.done-card {
  background: #fff;
  border: 1px solid rgba(203, 213, 225, 0.78);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 18px 44px rgba(31, 41, 51, 0.1);
}

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

.grid {
  display: grid;
  gap: 16px;
}

.form-group {
  margin-bottom: 12px;
}

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

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

label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: #334e68;
  font-size: 14px;
  font-weight: 600;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #bcccdc;
  border-radius: 6px;
  padding: 10px 12px;
  color: #1f2933;
  background: #fbfdff;
  font: inherit;
  font-weight: 400;
}

input:focus,
select:focus {
  outline: 3px solid rgba(20, 184, 166, 0.18);
  border-color: #0f766e;
  background: #fff;
}

input.invalid,
select.invalid {
  border-color: #e03131;
  background: #fff5f5;
}

.field-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.optional-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
}

.optional-badge {
  color: #52606d;
  background: #f0f4f8;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 14px;
  padding-top: 10px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 99px;
  background: #0f766e;
}

.address-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: #52606d;
  font-size: 14px;
}

.address-search-wrap {
  position: relative;
  margin-bottom: 6px;
}

.address-search-panel {
  margin: -8px 0 16px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
  box-shadow: 0 12px 24px rgba(31, 41, 51, 0.08);
}

.address-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 10px;
}

.address-results {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.address-result {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  padding: 10px;
  color: #1f2933;
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.address-result:hover {
  border-color: #0f766e;
  background: #ecfdf5;
}

.address-result strong {
  color: #0f172a;
  font-size: 14px;
}

.address-result span,
.address-empty {
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.checks,
.mode-row,
.slots {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.checks {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 2px;
}

.checks.invalid-group {
  border-color: #e03131;
  background: #fff5f5;
}

.check,
.radio-card {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.check input,
.radio-card input {
  width: auto;
  min-height: auto;
}

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

.radio-card {
  align-items: flex-start;
}

.check:has(input:checked),
.radio-card:has(input:checked) {
  border-color: #0f766e;
  background: #ecfdf5;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.12);
}

.radio-card span {
  flex: 1;
}

.radio-card strong {
  color: #0b7285;
}

.calendar-card {
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  padding: 16px;
  background: #fbfdff;
}

.calendar-section {
  margin: -6px 0 18px;
}

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

.calendar-head strong,
.calendar-head span {
  display: block;
  text-align: center;
}

.calendar-head strong {
  color: #0f172a;
  font-size: 18px;
}

.calendar-head span {
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid #99e9f2;
  border-radius: 8px;
  color: #0f766e;
  background: #ecfeff;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

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

.week-row {
  margin-bottom: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.calendar-day {
  min-height: 92px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 9px;
  color: #1e293b;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.calendar-day:not(:disabled):hover {
  border-color: #0f766e;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.12);
  transform: translateY(-1px);
}

.calendar-day strong,
.calendar-day span,
.calendar-day em,
.calendar-day b {
  display: block;
}

.calendar-day strong {
  font-size: 18px;
}

.calendar-day span {
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
}

.calendar-day em {
  margin-top: 8px;
  color: #0f766e;
  font-size: 13px;
  font-style: normal;
}

.calendar-day b {
  margin-top: 2px;
  color: #c2410c;
  font-size: 14px;
}

.calendar-day.active {
  border-color: #0f766e;
  background: #ccfbf1;
  box-shadow: inset 0 0 0 1px #0f766e, 0 12px 26px rgba(15, 118, 110, 0.16);
}

.calendar-day:disabled,
.calendar-day.soldout {
  color: #94a3b8;
  background: #f1f5f9;
  cursor: not-allowed;
}

.calendar-day.blank {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.selected-date {
  margin: 0 0 18px;
  border-radius: 8px;
  padding: 12px 14px;
  color: #0f766e;
  background: #ecfdf5;
  font-size: 14px;
  font-weight: 700;
}

.selected-date:empty {
  display: none;
}

.primary,
.secondary,
.button-link {
  border: 0;
  border-radius: 6px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.primary {
  width: 100%;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #0e7490);
  box-shadow: 0 12px 24px rgba(14, 116, 144, 0.22);
}

.secondary,
.button-link {
  color: #0f766e;
  background: #e6fffa;
  border: 1px solid #99e9f2;
}

.small {
  padding: 6px 10px;
}

.hint {
  margin: -6px 0 18px;
  color: #627d98;
  font-size: 13px;
}

.alert {
  margin-bottom: 16px;
  border: 1px solid #ffc9c9;
  border-radius: 8px;
  padding: 12px;
  color: #c92a2a;
  background: #fff5f5;
}

.hidden {
  display: none;
}

.success-meta {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  color: #334e68;
}

.admin-page {
  min-height: 100vh;
  padding: 28px;
  background: #f4f7fb;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto 22px;
  max-width: 1400px;
}

.admin-head h1 {
  font-size: 28px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 1400px;
  margin: 0 auto 22px;
}

.stat-card {
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(31, 41, 51, 0.06);
}

.stat-card span,
.stat-card em,
.section-head p,
.section-head span,
.muted {
  color: #64748b;
}

.stat-card span,
.section-head p,
.section-head span {
  font-size: 13px;
}

.stat-card strong {
  display: block;
  margin: 8px 0 3px;
  color: #0f172a;
  font-size: 28px;
  line-height: 1;
}

.stat-card em {
  font-size: 12px;
  font-style: normal;
}

.admin-section {
  max-width: 1400px;
  margin: 24px auto 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.section-head p,
.section-head h2 {
  margin: 0;
}

.section-head h2 {
  margin-top: 4px;
  color: #0f172a;
  font-size: 20px;
}

.admin-table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(31, 41, 51, 0.06);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.admin-table {
  min-width: 1120px;
}

.booking-table {
  min-width: 1180px;
}

.submissions-table {
  min-width: 1280px;
}

th,
td {
  border-bottom: 1px solid #e6eef7;
  padding: 12px;
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  color: #334e68;
  background: #f8fbff;
  font-weight: 700;
  white-space: nowrap;
}

thead tr:first-child th {
  border-bottom-color: #d9e2ec;
}

tbody tr:hover {
  background: #fbfdff;
}

.date-cell strong {
  color: #0f172a;
  white-space: nowrap;
}

.mini {
  width: 88px;
  min-height: 34px;
  padding: 6px 8px;
}

.count-badge,
.remain-badge,
.mode-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 700;
}

.count-badge {
  color: #334155;
  background: #f1f5f9;
}

.remain-badge {
  color: #0f766e;
  background: #ccfbf1;
}

.mode-badge {
  margin-right: 6px;
  color: #0e7490;
  background: #ecfeff;
}

.switch {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

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

.switch span {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
  transition: background 0.16s ease;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.22);
  transition: transform 0.16s ease;
}

.switch input:checked + span {
  background: #0f766e;
}

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

@media (max-width: 760px) {
  .two,
  .three,
  .checks,
  .mode-row {
    grid-template-columns: 1fr;
  }

  .address-head,
  .admin-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-page {
    padding: 18px 14px;
  }

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

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .address-search-row {
    grid-template-columns: 1fr;
  }

  .page {
    padding: 20px 16px;
  }

  .title-block,
  .form-card {
    padding: 18px;
  }

  h1 {
    font-size: 26px;
  }

  .calendar-card {
    padding: 12px;
  }

  .week-row,
  .calendar-grid {
    gap: 5px;
  }

  .calendar-day {
    min-height: 78px;
    padding: 7px;
  }

  .calendar-day strong {
    font-size: 15px;
  }

  .calendar-day em,
  .calendar-day b {
    font-size: 11px;
  }
}
