:root {
  color-scheme: light;
  --ink: #123e48;
  --muted: #5c7174;
  --line: #d7e3df;
  --paper: #ffffff;
  --wash: #f4f8f4;
  --green: #0f6b5b;
  --gold: #d39132;
  --red: #bf4f32;
  --sky: #d9edf2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: #f6f8f3;
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 178px;
  gap: 24px;
  align-items: stretch;
  padding: 30px;
  border: 1px solid rgba(18, 62, 72, 0.12);
  background:
    linear-gradient(120deg, rgba(255,255,255,0.96), rgba(255,255,255,0.78)),
    linear-gradient(145deg, var(--sky), #fff3dc 54%, #e9f4e5);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 15px;
  font-weight: 700;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.08;
  letter-spacing: 0;
}

.subhead {
  max-width: 760px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.price {
  min-height: 150px;
  padding: 22px;
  color: #fff;
  background: var(--red);
  display: grid;
  align-content: center;
  justify-items: start;
}

.price span,
.price small {
  font-size: 16px;
  font-weight: 700;
}

.price strong {
  line-height: 0.95;
  font-family: Arial, sans-serif;
  font-size: 66px;
}

.price .admin-token-hint {
  font-size: 26px;
  line-height: 1.2;
}

.materials-section {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
}

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

.section-title h2 {
  margin: 0;
  font-size: 24px;
}

.materials {
  display: grid;
  grid-template-columns: 0.82fr 1fr 1fr;
  gap: 18px;
  margin: 0;
}

.material {
  display: grid;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.material img {
  width: 100%;
  height: 238px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px;
}

.poster-material img {
  height: 310px;
}

.material span {
  font-weight: 800;
}

.workspace {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 22px;
}

.customer-workspace {
  grid-template-columns: minmax(420px, 1.08fr) minmax(300px, 0.72fr);
  align-items: start;
  margin-top: 22px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 22px;
  margin-top: 22px;
}

.panel {
  padding: 26px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

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

.left-actions {
  justify-content: flex-start;
  margin-top: 16px;
}

.panel-title h2 {
  font-size: 23px;
}

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

label,
fieldset {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  padding: 0 0 8px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fbfdfc;
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(15, 107, 91, 0.14);
}

.form-grid,
.people {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.availability {
  display: grid;
  gap: 10px;
}

.availability-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.slot-card {
  min-height: 78px;
  padding: 12px;
  color: var(--ink);
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
}

.slot-card strong,
.slot-card span {
  display: block;
}

.slot-card strong {
  margin-bottom: 7px;
  font-size: 18px;
}

.slot-card span {
  color: var(--green);
  font-size: 14px;
}

.slot-card:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.warning {
  padding: 12px;
  color: #8a3d22;
  border: 1px solid #f0c7b4;
  background: #fff1ea;
  font-weight: 700;
}

.success {
  display: grid;
  gap: 8px;
  padding: 16px;
  color: #174e40;
  border: 1px solid #b7d9cc;
  background: #edf7f1;
}

.success strong {
  font-size: 20px;
}

.success span {
  color: var(--muted);
  line-height: 1.6;
}

button {
  min-height: 44px;
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.primary {
  color: #fff;
  background: var(--green);
  min-height: 50px;
}

.secondary {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  padding: 0 14px;
  color: var(--green);
  border: 1px solid var(--line);
  background: #fff;
}

.link-button {
  text-decoration: none;
}

.icon-button {
  width: 44px;
  color: var(--green);
  border: 1px solid var(--line);
  background: #fff;
  font-size: 24px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.system-note {
  margin: -8px 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.stat {
  padding: 14px;
  background: var(--wash);
  border: 1px solid var(--line);
}

.stat strong {
  display: block;
  font-size: 25px;
  line-height: 1.1;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
}

.booking-list {
  display: grid;
  gap: 12px;
}

.booking {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #fff;
}

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

.booking h3 {
  margin: 0;
  font-size: 19px;
}

.booking p {
  color: var(--muted);
  line-height: 1.55;
}

.tag {
  flex: 0 0 auto;
  padding: 6px 9px;
  color: #81510d;
  background: #fff3d8;
  font-size: 13px;
  font-weight: 800;
}

.empty {
  padding: 34px 18px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  background: #fff;
}

.notice-list {
  display: grid;
  gap: 12px;
}

.notice-item {
  padding: 15px;
  border: 1px solid var(--line);
  background: #fff;
}

.notice-item strong,
.notice-item span {
  display: block;
}

.notice-item strong {
  margin-bottom: 7px;
}

.notice-item span {
  color: var(--muted);
  line-height: 1.6;
}

.submission-result {
  margin-top: 16px;
}

@media (max-width: 860px) {
  .masthead,
  .workspace,
  .admin-layout {
    grid-template-columns: 1fr;
  }

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

  .material img,
  .poster-material img {
    height: auto;
    max-height: none;
    aspect-ratio: auto;
  }

  .price {
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 22px, 1180px);
    padding-top: 16px;
  }

  .masthead,
  .panel,
  .materials-section {
    padding: 18px;
  }

  .form-grid,
  .people,
  .stats,
  .availability-grid {
    grid-template-columns: 1fr;
  }
}
