/* 会议预约页商务版主题。所有业务数据仍来自正式 API。 */
:root {
  --ink: #1a1a2e;
  --muted: #7d8292;
  --line: #e2e5eb;
  --soft: #f7f8fa;
  --blue: #1a2b4a;
  --blue-hover: #2d4a7a;
  --blue-accent: #3b6cb4;
  --blue-soft: #e8f0fb;
  --green: #2d8659;
  --green-soft: #eaf6f0;
  --amber: #b97920;
  --amber-soft: #fdf5e6;
  --red: #c0392b;
  --red-soft: #fceae8;
  --shadow: 0 12px 34px rgba(26, 43, 74, .1);
}

html,
body {
  min-width: 0;
  background: var(--soft);
  color: var(--ink);
  letter-spacing: 0;
}

html.embedded-booking,
html.embedded-booking body {
  overflow: hidden;
}

body.drawer-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  letter-spacing: 0;
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(59, 108, 180, .2);
  outline-offset: 2px;
}

.page {
  min-width: 0;
  background: var(--soft);
}

.header {
  min-height: 72px;
  padding: 14px 24px;
  border-color: var(--line);
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(12px);
}

.brand {
  min-width: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--blue);
  font-size: 12px;
}

h1 {
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
}

h2 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

h3 {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.sub,
.hint {
  color: var(--muted);
}

.identity {
  min-height: 34px;
  padding: 6px 10px;
  border-color: var(--line);
  border-radius: 6px;
  background: #fff;
  color: #596073;
}

.btn {
  min-height: 36px;
  padding: 7px 13px;
  border-color: var(--line);
  border-radius: 6px;
  background: #fff;
  color: #4a4a5e;
  font-size: 12px;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}

.btn:hover:not(:disabled) {
  border-color: var(--blue-accent);
  color: var(--blue-accent);
}

.btn.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.btn.primary:hover:not(:disabled) {
  border-color: var(--blue-hover);
  background: var(--blue-hover);
  color: #fff;
}

.btn.soft {
  border-color: #bfd0e8;
  background: var(--blue-soft);
  color: var(--blue-accent);
}

.main {
  gap: 16px;
  padding: 4px 0 32px;
}

.band,
.panel {
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.band {
  padding: 16px 18px;
}

.calendar-top {
  margin-bottom: 14px;
}

.toolbar {
  flex-wrap: wrap;
}

.segmented {
  border-color: var(--line);
  border-radius: 6px;
  background: #f2f3f6;
}

.segmented button {
  border-radius: 4px;
}

.segmented button.active {
  color: var(--blue-accent);
  box-shadow: 0 1px 4px rgba(26, 43, 74, .1);
}

.calendar-grid {
  grid-template-columns: repeat(7, minmax(92px, 1fr));
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.day {
  min-width: 92px;
  min-height: 66px;
  border-color: var(--line);
  border-radius: 6px;
  color: #4b5366;
  transition: border-color .15s ease, background-color .15s ease;
}

.day:hover {
  border-color: #b9c8dc;
  background: #fafbfd;
}

.day.selected {
  border-color: var(--blue);
  background: #f3f7fc;
  box-shadow: inset 0 0 0 1px var(--blue);
  color: var(--blue);
}

.workspace {
  grid-template-columns: minmax(320px, 390px) minmax(520px, 1fr);
  gap: 18px;
  align-items: start;
}

.booking-left {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.panel {
  padding: 20px;
}

.booking-form-card {
  margin: 0;
}

.panel-title {
  margin-bottom: 16px;
}

.form-grid {
  gap: 12px;
}

.field {
  gap: 6px;
}

.field label,
.field-title {
  color: #555b6d;
  font-weight: 600;
}

.field input,
.field select,
.field textarea,
.readonly,
.filter-select {
  min-width: 0;
  border-color: #dfe3ea;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.filter-select:focus {
  border-color: var(--blue-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 108, 180, .1);
}

.readonly {
  background: #f7f8fa;
}

.check {
  position: relative;
  min-height: 34px;
  padding: 7px 12px;
  border-color: var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}

.check:has(input:checked) {
  border-color: var(--blue-accent);
  background: var(--blue-soft);
  color: var(--blue-accent);
}

.check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  accent-color: var(--blue);
}

.equipment-icon {
  color: #7f899a;
  font-size: 12px;
  line-height: 1;
}

.check:has(input:checked) .equipment-icon {
  color: var(--blue-accent);
}

.ai-box {
  margin-top: 0;
  padding: 16px 18px;
  border: 1px solid #bed0e8;
  border-radius: 8px;
  background: #edf4ff;
}

.ai-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.ai-heading h2 {
  color: #245ca8;
  font-size: 14px;
}

.ai-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: #2f78df;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.ai-box .field label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.ai-box textarea {
  min-height: 86px;
  border-color: #c7d7eb;
  resize: none;
}

.btn.ai-submit {
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.btn.ai-submit:hover:not(:disabled) {
  border-color: var(--blue-hover);
  background: var(--blue-hover);
  color: #fff;
}

.ai-result {
  min-height: 0;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #53687f;
}

.ai-result[hidden] {
  display: none;
}

.booking-form-card .readonly {
  min-height: 40px;
  color: #38465a;
  font-weight: 600;
}

.booking-form-card select {
  cursor: pointer;
}

.booking-form-card #startInput,
.booking-form-card #endInput {
  font-variant-numeric: tabular-nums;
}

.filters {
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.filter-select {
  min-height: 36px;
  max-width: 160px;
}

.room-list {
  max-height: none;
  gap: 12px;
  overflow: visible;
  padding-right: 0;
}

.room {
  position: relative;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: 16px;
  min-width: 0;
  min-height: 154px;
  padding: 14px;
  border-color: var(--line);
  border-radius: 8px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.room:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #c5d1e0;
  box-shadow: 0 5px 18px rgba(26, 43, 74, .06);
}

.room.active {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.room:disabled {
  opacity: .62;
  background: #fafbfc;
}

.room-photo-wrap {
  position: relative;
  display: block;
  width: 140px;
  height: 112px;
  align-self: stretch;
}

.room img {
  width: 140px;
  height: 112px;
  border-radius: 7px;
}

.room-photo-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(45, 134, 89, .94);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(16, 32, 51, .16);
}

.room-photo-badge.bad {
  background: rgba(190, 106, 0, .94);
}

.room-body {
  align-self: stretch;
  gap: 8px;
}

.room-name {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.room-foot {
  gap: 5px;
}

.tag {
  min-height: 24px;
  border-color: var(--line);
  border-radius: 4px;
  background: #f7f8fa;
  color: #656b7b;
}

.tag.good {
  border-color: #bedfce;
  background: var(--green-soft);
  color: var(--green);
}

.tag.bad {
  border-color: #efc7c2;
  background: var(--red-soft);
  color: var(--red);
}

.room-select-cta {
  align-self: center;
  min-width: 76px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.room:disabled .room-select-cta {
  background: #eef0f3;
  color: #9095a3;
}

.room-timebar {
  display: grid;
  gap: 7px;
  width: 100%;
  margin-top: 1px;
}

.room-timebar-track {
  position: relative;
  display: block;
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.room-timebar-busy {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: #e98980;
}

.room-timebar-labels {
  display: flex;
  justify-content: space-between;
  color: #91a0b6;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 600;
}

.room-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  margin-top: 12px;
  padding: 0 2px;
  color: #66758b;
  font-size: 12px;
}

.room-pagination[hidden] {
  display: none;
}

.pager-info b {
  color: #42536a;
  font-weight: 700;
}

.pager-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pager-btn,
.pager-ellipsis {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #465a73;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
}

.pager-btn.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.pager-btn:hover:not(:disabled) {
  border-color: var(--blue-accent);
  color: var(--blue-accent);
}

.pager-btn:disabled {
  cursor: not-allowed;
  opacity: .52;
}

.pager-ellipsis {
  border-color: transparent;
  background: transparent;
  color: #91a0b6;
}

.empty {
  border-color: #cad5e4;
  border-radius: 8px;
  background: #fafbfd;
}

.summary-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: block;
  visibility: hidden;
  border: 0;
  background: rgba(16, 30, 51, .42);
  opacity: 0;
  transition: opacity .18s ease, visibility .18s ease;
}

.summary-backdrop.open {
  visibility: visible;
  opacity: 1;
}

.summary {
  position: fixed;
  top: 72px;
  right: 24px;
  z-index: 60;
  width: min(460px, calc(100vw - 48px));
  height: auto;
  max-height: calc(100dvh - 104px);
  overflow: auto;
  padding: 20px;
  border-width: 1px;
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(13, 38, 66, .24);
  visibility: hidden;
  opacity: 0;
  transform: translateX(24px);
  transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
}

.summary.open {
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
}

html.embedded-booking .summary-backdrop {
  position: absolute;
  top: var(--booking-visible-top, 24px);
  height: var(--booking-visible-height, 640px);
  inset-inline: 0;
}

html.embedded-booking .summary {
  position: absolute;
  top: calc(var(--booking-visible-top, 24px) + 24px);
  right: 24px;
  max-height: calc(var(--booking-visible-height, 640px) - 48px);
}

.summary .panel-title {
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.drawer-close {
  display: block;
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f7f8fa;
  color: #5d6474;
  font-size: 20px;
  line-height: 1;
}

.summary-row {
  padding: 11px 0;
  border-color: var(--line);
}

.summary .actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.summary .actions .btn {
  min-height: 44px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: block;
  visibility: hidden;
  background: rgba(16, 30, 51, .42);
  opacity: 0;
  transition: opacity .18s ease, visibility .18s ease;
}

.modal-backdrop.open {
  visibility: visible;
  opacity: 1;
}

.modal {
  position: fixed;
  top: 72px;
  right: 24px;
  left: auto;
  z-index: 60;
  display: block;
  width: min(540px, calc(100vw - 48px));
  max-height: calc(100dvh - 104px);
  overflow: auto;
  transform: translateX(24px);
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: 0 26px 70px rgba(26, 43, 74, .2);
  visibility: hidden;
  opacity: 0;
  transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
}

.modal.open {
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
}

html.embedded-booking .modal-backdrop {
  position: absolute;
  top: var(--booking-visible-top, 24px);
  height: var(--booking-visible-height, 640px);
  inset-inline: 0;
}

html.embedded-booking .modal {
  position: absolute;
  top: calc(var(--booking-visible-top, 24px) + 24px);
  right: 24px;
  max-height: calc(var(--booking-visible-height, 640px) - 48px);
}

.modal-head {
  align-items: flex-start;
  border-color: var(--line);
}

.modal-body {
  gap: 12px;
}

.meeting {
  display: grid;
  gap: 12px;
  border-color: var(--line);
  border-radius: 8px;
}

.meeting-meta {
  display: grid;
  gap: 3px;
}

.meeting .actions {
  margin-top: 0;
}

.toast {
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: minmax(300px, 360px) minmax(420px, 1fr);
  }

  .room {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .room-photo-wrap,
  .room img {
    width: 112px;
    height: 92px;
  }

  .room-select-cta {
    grid-column: 1 / -1;
    justify-self: end;
  }

}

@media (max-width: 860px) {
  .header {
    align-items: flex-start;
    padding: 13px 16px;
  }

  .header-actions {
    justify-content: flex-end;
  }

  .main {
    padding: 4px 0 24px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    grid-template-columns: repeat(7, minmax(86px, 1fr));
  }

  .room {
    grid-template-columns: 126px minmax(0, 1fr) auto;
  }

  .room-photo-wrap,
  .room img {
    width: 126px;
    height: 96px;
  }

  .room-select-cta {
    grid-column: auto;
  }

  .summary {
    width: min(520px, calc(100vw - 28px));
  }

  .modal {
    width: min(560px, calc(100vw - 28px));
  }
}

@media (max-width: 620px) {
  .header {
    position: static;
    display: grid;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .identity {
    display: none;
  }

  .calendar-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field.full {
    grid-column: auto;
  }

  .room {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 11px;
  }

  .room-photo-wrap,
  .room img {
    width: 96px;
    height: 76px;
  }

  .room-select-cta {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .summary {
    width: calc(100vw - 24px);
  }

  .modal {
    width: calc(100vw - 24px);
    right: 12px;
  }

  .room-pagination {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
