﻿@charset "UTF-8";
:root {
  --ink: #18232e;
  --muted: #667684;
  --line: #d8e1e8;
  --bg: #edf2f6;
  --panel: #ffffff;
  --blue: #1f6fb2;
  --blue-dark: #174f7f;
  --teal: #087d79;
  --green: #3f7f35;
  --gold: #af7414;
  --red: #b24641;
  --slot: #e9f0f5;
  --selected: #cfe5ff;
  --pending: #ffe6ad;
  --busy: #f2c4b5;
  --maintenance: #d7d6fb;
  --shadow: 0 18px 48px rgba(35, 56, 76, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 1180px;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

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

button {
  cursor: pointer;
}

.button-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.compact-actions {
  justify-content: flex-end;
}

.confirm-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

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

.hidden {
  display: none !important;
}

.auth-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 460px;
  gap: 48px;
  align-items: center;
  padding: 56px 8vw;
  background:
    linear-gradient(115deg, rgba(15, 56, 84, 0.95), rgba(19, 116, 110, 0.86)),
    linear-gradient(45deg, #dce8ee, #f4f7f9);
  color: #fff;
}

.auth-copy h1 {
  margin-bottom: 18px;
  font-size: 52px;
  letter-spacing: 0;
}

.auth-copy p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.eyebrow {
  margin-bottom: 8px;
  color: inherit;
  font-size: 13px;
  letter-spacing: 0;
  opacity: 0.72;
}

.wechat-note {
  width: 520px;
  margin-top: 28px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.wechat-note strong,
.wechat-note span {
  display: block;
}

.wechat-note span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.78);
}

.auth-panel,
.panel,
.modal-card {
  border: 1px solid rgba(216, 225, 232, 0.9);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-panel {
  padding: 24px;
  color: var(--ink);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 8px;
  background: #e9eff4;
}

.auth-tabs button,
.nav-btn {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.auth-tabs button.active,
.nav-btn.active {
  background: #fff;
  color: var(--blue-dark);
  box-shadow: 0 7px 18px rgba(35, 56, 76, 0.12);
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

label {
  display: grid;
  gap: 7px;
  color: #314454;
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd7e0;
  border-radius: 6px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.inline-field {
  display: grid;
  grid-template-columns: 1fr 138px;
  gap: 8px;
}

#sendCaptchaBtn {
  white-space: nowrap;
}

#sendCaptchaBtn:disabled {
  border-color: #d5dde4;
  color: #667684;
  background: #eef2f5;
  opacity: 1;
}

.privacy-consent,
.privacy-check {
  display: flex;
  align-items: center;
  gap: 6px;
}

.privacy-check {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

#registerPrivacyConsent {
  width: 16px;
  min-height: 16px;
}

.privacy-link {
  border: 0;
  padding: 0;
  color: var(--blue);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 111, 178, 0.12);
}

.hint {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.topbar {
  min-height: 176px;
  padding: 30px 42px 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  background: linear-gradient(90deg, #123552, #125d63);
}

.brand h1 {
  margin-bottom: 0;
  font-size: 34px;
}

.account-card {
  min-width: 250px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.11);
}

.account-card span,
.account-card small {
  display: block;
  color: rgba(255, 255, 255, 0.75);
}

.account-card strong {
  display: block;
  margin: 4px 0;
  font-size: 20px;
}

.shell {
  width: min(1560px, calc(100% - 56px));
  margin: -46px auto 42px;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  box-shadow: var(--shadow);
}

.nav-btn {
  padding: 0 18px;
}

.nav-btn.ghost {
  margin-left: auto;
  border: 1px solid var(--line);
  background: #fff;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.panel {
  padding: 22px;
}

.panel-heading,
.detail-top,
.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-heading h2,
.detail-top h2 {
  margin-bottom: 6px;
  font-size: 22px;
}

.panel-heading p,
.detail-top p {
  margin-bottom: 0;
  color: var(--muted);
}

.compact {
  align-items: center;
  margin-bottom: 14px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 220px 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.admin-filter-grid {
  grid-template-columns: 180px 180px 180px minmax(240px, 1fr);
  margin: 0 0 14px;
}

.booking-layout {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 22px;
  margin-top: 22px;
  align-items: stretch;
}

.equipment-panel,
.detail-panel,
.schedule-panel {
  min-width: 0;
}

.equipment-panel {
  display: flex;
  min-height: 0;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
}

.equipment-cards {
  display: grid;
  grid-auto-rows: 142px;
  align-content: start;
  gap: 14px;
  min-height: 0;
  max-height: none;
  flex: 1;
  overflow-y: auto;
}

.consumption-summary {
  display: flex;
  gap: 10px;
  margin: 0 0 16px;
  overflow: auto;
}

.consumption-summary article {
  min-width: 180px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.consumption-summary span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.consumption-summary strong {
  color: var(--primary);
  font-size: 18px;
}

.platform-management-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.platform-management-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.platform-card-title {
  margin: 0;
  overflow: hidden;
  color: #12395b;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-card-description {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.platform-add-row {
  align-self: end;
}

.platform-stat-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 2px;
}

.platform-stat-toggles label,
.platform-visibility-filter label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.platform-stat-toggles input,
.platform-visibility-filter input {
  width: 16px;
  min-height: 16px;
}

.platform-visibility-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.platform-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.platform-stat-item {
  min-width: 0;
  padding: 10px;
  border: 1px solid #dce8ef;
  border-radius: 7px;
  background: #ffffff;
}

.platform-stat-item-wide {
  grid-column: 1 / -1;
}

.platform-stat-item span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.platform-stat-item strong {
  display: block;
  overflow-wrap: anywhere;
  color: #0d4b75;
  font-size: 19px;
  line-height: 1.2;
}

.platform-stat-item small {
  color: var(--muted);
  font-size: 12px;
}

.platform-manager-value {
  font-size: 14px !important;
  line-height: 1.5 !important;
}

.platform-policy-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.platform-policy-status span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #0d4b75;
  background: #e8f3f7;
  font-size: 12px;
  font-weight: 800;
}

.platform-card-actions {
  align-items: center;
}

.platform-detail-panel {
  display: grid;
  gap: 10px;
}

.platform-detail-panel summary {
  cursor: pointer;
  color: var(--blue-dark);
  font-weight: 800;
}

.platform-detail-panel[open] summary {
  margin-bottom: 8px;
}

.platform-policy-panel,
.platform-exemption-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dce8ef;
  border-radius: 8px;
  background: #ffffff;
}

.platform-detail-panel[open] .platform-policy-panel {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  align-items: end;
}

.platform-detail-panel[open] .platform-policy-panel .save-platform-policy,
.platform-detail-panel[open] .platform-policy-panel small {
  grid-column: 1 / -1;
}

.platform-policy-panel label,
.platform-exemption-form {
  display: grid;
  grid-template-columns: minmax(108px, 150px) minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
}

.platform-policy-panel label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.platform-policy-panel small {
  color: var(--muted);
  line-height: 1.5;
}

.platform-exemption-panel h4 {
  margin: 0;
  color: #12395b;
  font-size: 15px;
}

.platform-exemption-list,
.platform-exemption-row {
  display: grid;
  gap: 8px;
}

.platform-exemption-row {
  padding: 8px;
  border: 1px solid #eef3f6;
  border-radius: 7px;
  background: #f8fbfd;
}

.platform-exemption-row span {
  color: var(--text);
  font-size: 13px;
}

.platform-exemption-row small {
  color: var(--muted);
}

.platform-exemption-form {
  grid-template-columns: minmax(180px, 1.4fr) minmax(120px, 0.7fr) minmax(160px, 1fr) auto;
  align-items: end;
}

.platform-detail-panel[open] .platform-exemption-form {
  grid-template-columns: minmax(260px, 1.4fr) 140px minmax(180px, 1fr) auto;
}

.inline-admin-label {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  color: var(--text);
  font-weight: 800;
}

.inline-admin-label select {
  max-width: 260px;
}

.compact-table-actions {
  min-width: 150px;
}

.table-wrap input[type="checkbox"],
.admin-equipment-check,
#selectAllAdminEquipment {
  width: 18px;
  min-height: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--blue);
}

.admin-equipment-hidden-row {
  background: #f7fafc;
  color: #6b7782;
}

.admin-equipment-hidden-row strong {
  color: #50616f;
}

.admin-equipment-hidden-row small {
  color: var(--muted);
}

#batchDeleteEquipmentBtn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.account-summary-table {
  table-layout: fixed;
}

.account-summary-table > thead > tr > th:nth-child(1),
.account-summary-table > tbody > tr > td:nth-child(1) {
  width: 15%;
}

.account-summary-table > thead > tr > th:nth-child(2),
.account-summary-table > tbody > tr > td:nth-child(2) {
  width: 8%;
}

.account-summary-table > thead > tr > th:nth-child(3),
.account-summary-table > tbody > tr > td:nth-child(3) {
  width: 77%;
}

.account-summary-table .org-summary summary {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: #07548d;
  font-weight: 700;
  cursor: pointer;
}

.account-summary-table .user-detail-table {
  table-layout: fixed;
  margin-top: 10px;
  font-size: 12px;
}

.account-summary-table .user-detail-table th,
.account-summary-table .user-detail-table td {
  width: auto;
  padding: 8px 6px;
  white-space: normal;
}

.account-summary-table .user-detail-table th:nth-child(1) {
  width: 11%;
}

.account-summary-table .user-detail-table th:nth-child(2) {
  width: 7%;
}

.account-summary-table .user-detail-table th:nth-child(3) {
  width: 11%;
}

.account-summary-table .user-detail-table th:nth-child(4) {
  width: 9%;
}

.account-summary-table .user-detail-table th:nth-child(5) {
  width: 10%;
}

.account-summary-table .user-detail-table th:nth-child(6) {
  width: 8%;
}

.account-summary-table .user-detail-table th:nth-child(7) {
  width: 12%;
}

.account-summary-table .user-detail-table th:nth-child(8) {
  width: 11%;
}

.account-summary-table .user-detail-table th:nth-child(9) {
  width: 21%;
}

.account-summary-table .user-detail-table input,
.account-summary-table .user-detail-table select {
  width: 100%;
  min-width: 0;
}

.account-summary-table .table-actions {
  min-width: 0;
  gap: 5px;
}

.account-summary-table .table-actions .secondary-btn {
  min-height: 30px;
  padding: 0 7px;
  font-size: 12px;
}

.user-platform-select {
  min-width: 150px;
  min-height: 34px;
}

.user-org-input {
  min-width: 150px;
}

@media (max-width: 760px) {
  .topbar {
    min-height: auto;
    padding: 18px 16px 28px;
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
  }

  .brand h1 {
    font-size: 26px;
  }

  .account-card {
    width: 100%;
    min-width: 0;
    padding: 12px 14px;
  }

  .nav-tabs {
    display: flex;
    width: 100%;
    gap: 6px;
    overflow-x: auto;
  }

  .shell {
    width: auto;
    margin: -14px auto 24px;
    padding: 14px;
  }

  .filter-grid,
  .admin-filter-grid,
  .booking-layout,
  .edit-grid,
  .backup-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .booking-layout {
    gap: 14px;
    margin-top: 14px;
  }

  .panel {
    padding: 14px;
  }

  .equipment-panel {
    min-height: auto;
  }

  .equipment-cards {
    display: flex;
    max-height: none;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }

  .equipment-card {
    min-width: min(84vw, 330px);
    scroll-snap-align: start;
  }

  .detail-top {
    display: grid;
    gap: 12px;
  }

  .equipment-sketch {
    width: 100%;
    height: 150px;
  }

  .price-box {
    width: auto;
    text-align: left;
  }

  .section-title,
  .calendar-controls {
    align-items: flex-start;
    gap: 8px;
    flex-direction: column;
  }

  .schedule-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(82vw, 1fr);
    grid-template-columns: none;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }

  .day {
    min-height: auto;
    scroll-snap-align: start;
  }

  .admin-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .admin-tab {
    flex: 0 0 auto;
  }

  .table-wrap {
    overflow-x: auto;
  }

  table {
    min-width: 720px;
  }

  .modal-card,
  .detail-modal-card {
    width: min(calc(100vw - 24px), 680px);
    max-height: calc(100vh - 24px);
  }
}

.equipment-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 15px;
  height: 142px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  overflow: hidden;
  text-align: left;
  background: #fff;
}

.equipment-card.active,
.equipment-card:hover {
  border-color: var(--blue);
  box-shadow: 0 12px 24px rgba(31, 111, 178, 0.13);
}

.thumb,
.equipment-sketch {
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.7), transparent 42%),
    linear-gradient(135deg, #d8e8ef, #8fb6c5);
  position: relative;
  overflow: hidden;
}

.thumb {
  width: 96px;
  height: 96px;
}

.equipment-sketch {
  flex: 0 0 180px;
  height: 148px;
}

.thumb.photo,
.equipment-sketch.photo {
  background-position: center;
  background-size: cover;
}

.thumb.photo::before,
.thumb.photo::after,
.equipment-sketch.photo::before,
.equipment-sketch.photo::after {
  display: none;
}

.thumb::before,
.equipment-sketch::before {
  content: "";
  position: absolute;
  inset: 20% 24%;
  border: 3px solid rgba(18, 62, 86, 0.55);
  border-radius: 6px;
}

.thumb::after,
.equipment-sketch::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 18%;
  height: 10px;
  border-radius: 999px;
  background: rgba(18, 62, 86, 0.5);
}

.equipment-card strong {
  display: block;
  margin-bottom: 7px;
  font-size: 16px;
}

.card-meta,
.fact-row,
.legend,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag,
.card-meta span,
.fact-row span,
.tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #164254;
  background: #e3f1ef;
  font-size: 12px;
}

.equipment-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.detail-top {
  align-items: stretch;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 168px;
}

.detail-top > div {
  min-width: 0;
}

.price-box {
  width: 168px;
  padding: 14px;
  border-radius: 8px;
  background: #f5f8fb;
  text-align: right;
}

.price-box span,
.price-box small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.price-box strong {
  display: block;
  margin: 5px 0;
  color: var(--gold);
  font-size: 24px;
}

.reservation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.section-title {
  align-items: center;
  margin-bottom: 12px;
}

.calendar-controls {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-bottom: 12px;
}

.calendar-controls label {
  width: 180px;
}

.section-title h3,
.confirm-panel h3 {
  margin-bottom: 0;
  font-size: 18px;
}

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

.legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend .free {
  background: var(--slot);
}

.legend .chosen {
  background: var(--selected);
}

.legend .pending {
  background: var(--pending);
}

.legend .busy {
  background: var(--busy);
}

.legend .maintenance {
  background: var(--maintenance);
}

.legend .expired {
  background: #edf1f3;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.day {
  min-height: 492px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.day h4 {
  margin: 0 0 12px;
  font-size: 15px;
}

.day-select-btn {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--blue-dark);
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.day-select-btn:hover {
  border-color: #c8d7e6;
  background: #eef6ff;
}

.slot {
  width: 100%;
  min-height: 48px;
  margin-bottom: 8px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 8px 9px;
  color: #36505f;
  background: var(--slot);
  text-align: center;
  font-size: 13px;
}

.slot:hover {
  border-color: var(--blue);
}

.slot.selected {
  color: #12395b;
  background: var(--selected);
  border-color: #7db4ee;
}

.slot.busy {
  color: #6d2e21;
  background: var(--busy);
  cursor: not-allowed;
}

.slot.pending {
  color: #765113;
  background: var(--pending);
  cursor: not-allowed;
}

.slot.admin-reviewable-slot {
  cursor: pointer;
  outline: 2px solid rgba(175, 116, 20, 0.28);
}

.slot.admin-inspectable-slot {
  cursor: pointer;
  outline: 2px solid rgba(31, 111, 178, 0.24);
}

.slot.maintenance {
  color: #34306f;
  background: var(--maintenance);
  cursor: not-allowed;
}

.slot.expired {
  color: #84919a;
  background: #edf1f3;
  cursor: not-allowed;
}

.slot.busy:has(strong),
.slot.pending:has(strong) {
  text-align: center;
}

.slot strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}

.confirm-panel {
  display: grid;
  grid-template-columns: 1fr 1.2fr 168px;
  grid-template-rows: auto auto;
  align-content: start;
  align-items: stretch;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.confirm-panel h3 {
  grid-column: 1 / -1;
}

.confirm-panel .summary {
  grid-column: 1;
  grid-row: 2;
  min-height: 156px;
}

.confirm-panel label {
  grid-column: 2;
  grid-row: 2;
  grid-template-rows: auto 1fr;
}

.confirm-panel textarea {
  height: 100%;
  min-height: 116px;
}

.confirm-panel .primary-btn {
  min-width: 168px;
}

.confirm-panel > button {
  grid-column: 3;
  grid-row: 2;
  align-self: end;
  min-width: 168px;
}

#submitInlineMaintenanceBtn {
  transform: translateY(-56px);
}

#submitBookingBtn {
  transform: translateY(0);
}

.summary {
  min-height: 80px;
  padding: 12px;
  border-radius: 8px;
  color: #2f4858;
  background: #eaf2f7;
  line-height: 1.65;
}

.primary-btn,
.secondary-btn {
  min-height: 42px;
  border-radius: 7px;
  padding: 0 16px;
  font-weight: 700;
}

.primary-btn {
  border: 0;
  color: #fff;
  background: var(--blue);
}

.primary-btn:disabled {
  cursor: not-allowed;
  background: #9db1c0;
}

.secondary-btn {
  border: 1px solid #c7d3dd;
  color: var(--blue-dark);
  background: #fff;
}

.secondary-btn.danger {
  color: var(--red);
}

.profile-panel {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 18px;
}

.profile-info {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.password-panel {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.password-panel h3 {
  font-size: 17px;
}

.password-panel .primary-btn {
  width: 100%;
}

.info-line {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
}

.info-line span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.info-line strong {
  display: block;
  margin-top: 4px;
}

.invoice-panel {
  display: grid;
  gap: 14px;
  margin: 12px 0 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.invoice-panel h3 {
  margin-bottom: 4px;
  font-size: 17px;
}

.invoice-panel p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.invoice-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 120px 150px;
  gap: 10px;
  align-items: end;
}

.invoice-total {
  min-height: 42px;
  display: grid;
  align-content: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.invoice-total span {
  color: var(--muted);
  font-size: 12px;
}

.invoice-total strong {
  color: var(--gold);
  font-size: 18px;
}

.invoice-check,
#selectAllInvoiceBookings,
.admin-invoice-check,
#selectAllAdminInvoices {
  width: 16px;
  min-height: 16px;
}

.invoice-review-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 220px));
  gap: 12px;
  margin-bottom: 14px;
}

.equipment-filter-toolbar {
  grid-template-columns: minmax(160px, 220px) minmax(160px, 220px) minmax(160px, 220px) minmax(220px, 1fr);
  align-items: end;
}

.equipment-filter-toolbar label {
  min-width: 0;
}

.table-wrap small {
  color: var(--muted);
}

.user-discount-input {
  width: 92px;
  min-height: 34px;
}

.ledger-cell {
  min-width: 260px;
  white-space: normal;
}

.ledger-cell > strong {
  display: block;
  color: var(--gold);
  font-size: 16px;
}

.ledger-details {
  margin-top: 4px;
}

.ledger-details summary {
  cursor: pointer;
  color: var(--blue-dark);
  font-weight: 700;
}

.ledger-list {
  display: grid;
  gap: 6px;
  max-height: 180px;
  margin-top: 8px;
  overflow: auto;
}

.ledger-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f9fbfd;
}

.ledger-item span,
.ledger-item small {
  grid-column: 1 / -1;
}

.ledger-item strong {
  color: var(--gold);
}

.org-summary {
  min-width: 260px;
}

.org-summary summary {
  cursor: pointer;
  color: var(--blue-dark);
  font-weight: 800;
}

.user-detail-table {
  width: 100%;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.user-detail-table td,
.user-detail-table th {
  white-space: nowrap;
}

.billing-type-select {
  min-height: 34px;
  min-width: 104px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 220px;
}

.table-actions .secondary-btn {
  min-height: 34px;
  padding: 0 10px;
}

.booking-group-alert {
  background: #fff7df;
}

.pending-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-left: 10px;
  padding: 0 9px;
  border-radius: 999px;
  color: #765113;
  background: var(--pending);
  font-size: 12px;
  font-weight: 800;
}

.pending-count {
  color: #765113;
}

.booking-group-detail summary {
  cursor: pointer;
  color: var(--blue-dark);
  font-weight: 800;
}

.booking-detail-table {
  width: 100%;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.booking-detail-table th,
.booking-detail-table td {
  vertical-align: top;
}

.booking-application-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.booking-application-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.booking-application-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.booking-application-head span {
  color: var(--blue-dark);
  font-weight: 800;
}

.booking-application-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.booking-application-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e5edf3;
  border-radius: 7px;
  background: #f9fbfd;
  white-space: normal;
}

.booking-application-grid small {
  display: block;
  color: var(--muted);
  margin-bottom: 4px;
}

.booking-application-grid span,
.booking-application-grid strong {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.55;
}

.quick-review-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(105deg, #123552, #087d79);
}

.quick-review-hero span,
.quick-review-hero small {
  display: block;
  color: rgba(255, 255, 255, 0.78);
}

.quick-review-hero strong {
  display: block;
  margin: 5px 0;
  font-size: 22px;
}

.quick-review-amount {
  align-self: stretch;
  display: grid;
  align-content: center;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  text-align: right;
}

.quick-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-review-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid #dfeaf1;
  border-radius: 8px;
  background: #f9fbfd;
  white-space: normal;
}

.quick-review-grid .wide {
  grid-column: 1 / -1;
}

.quick-review-grid small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
}

.quick-review-grid span,
.quick-review-grid strong {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.65;
}

.pending-application-row {
  background: #fffbef;
}

.purpose-cell {
  min-width: 220px;
  max-width: 320px;
  white-space: normal;
  line-height: 1.55;
}

.secondary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.rule-overview {
  display: grid;
  gap: 14px;
}

.rule-audience-group {
  display: grid;
  gap: 10px;
}

.rule-audience-group h4 {
  margin: 0;
  color: var(--blue-dark);
}

.rule-audience-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
}

.rule-item {
  display: grid;
  gap: 5px;
  min-width: 240px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
  color: #435464;
  font-size: 13px;
}

.rule-item strong {
  color: var(--ink);
  font-size: 15px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  box-shadow: var(--shadow);
}

.admin-tab {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.admin-tab.active {
  color: var(--blue-dark);
  background: #fff;
  box-shadow: 0 7px 18px rgba(35, 56, 76, 0.12);
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: grid;
  gap: 22px;
}

.admin-card {
  display: grid;
  gap: 12px;
}

.admin-card.wide {
  grid-column: 1 / -1;
}

.backup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.backup-action-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
}

.backup-action-card h3,
.backup-action-card p {
  margin: 0;
}

.backup-action-card p,
.backup-action-card small {
  color: var(--muted);
  line-height: 1.65;
}

.edit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.span-2 {
  grid-column: span 2;
}

.image-upload-editor {
  display: grid;
  gap: 8px;
}

.image-upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.image-upload-editor small {
  color: var(--muted);
  line-height: 1.6;
}

.notice-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) 420px;
  gap: 18px;
  align-items: start;
}

.notice-editor.span-2 {
  grid-column: 1 / -1;
}

.notice-editor-fields,
.notice-preview {
  display: grid;
  gap: 14px;
}

.notice-editor-section,
.notice-preview section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
}

.notice-editor-section h3,
.notice-preview h3 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 16px;
}

.notice-preview {
  position: sticky;
  top: 16px;
}

.preview-auth {
  padding: 18px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(115deg, rgba(15, 56, 84, 0.95), rgba(19, 116, 110, 0.86));
}

.preview-auth h2 {
  margin: 6px 0 10px;
  font-size: 26px;
}

.preview-auth p {
  margin-bottom: 12px;
  line-height: 1.65;
}

.preview-auth div {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.preview-auth div span {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.82);
}

.preview-modal,
.preview-card {
  padding: 14px;
  border: 1px solid #dfeaf1;
  border-radius: 8px;
  background: #fff;
  color: #2f4858;
  line-height: 1.65;
}

.preview-modal strong,
.preview-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 18px;
}

.preview-modal small {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
}

.preview-modal button {
  width: 100%;
  min-height: 38px;
  margin-top: 10px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: var(--blue);
  font-weight: 800;
}

.table-wrap {
  overflow: auto;
}

.table-wrap.tall {
  max-height: 380px;
}

.admin-section[data-admin-section="bookings"] .table-wrap.tall {
  max-height: none;
  overflow: visible;
}

.quick-review-card {
  width: min(900px, calc(100vw - 72px));
}

.quick-review-card .summary {
  background: #fff;
  padding: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: #435464;
  background: #f4f7fa;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(10, 22, 32, 0.52);
}

.modal-card {
  width: 520px;
  padding: 20px;
}

.privacy-modal-card {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.privacy-content {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  color: #2f4858;
  font-size: 14px;
}

.privacy-content p {
  margin: 0;
}

.detail-modal-card {
  width: min(1080px, calc(100vw - 72px));
  max-height: calc(100vh - 72px);
  overflow: auto;
  padding: 0;
}

.equipment-edit-modal-card {
  width: min(1120px, calc(100vw - 72px));
  max-height: calc(100vh - 72px);
  overflow: auto;
  padding: 18px 20px 0;
}

.equipment-edit-grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.equipment-edit-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbfd;
}

.equipment-edit-section h3 {
  margin: 0;
  color: #12395b;
  font-size: 16px;
}

.equipment-edit-section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.equipment-edit-section-grid.compact {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.equipment-edit-split {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  gap: 12px;
  align-items: stretch;
}

.equipment-edit-section label {
  min-width: 0;
}

.equipment-edit-section textarea {
  min-height: 126px;
}

.equipment-edit-modal-card > .confirm-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 16px -20px 0;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.booking-info-modal-card {
  width: min(760px, calc(100vw - 48px));
  max-height: calc(100vh - 72px);
  overflow: auto;
}

.platform-config-modal-card {
  width: min(1080px, calc(100vw - 64px));
  max-height: calc(100vh - 64px);
  overflow: auto;
}

.platform-config-summary {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.platform-config-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.platform-config-overview article,
.platform-config-section {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbfd;
}

.platform-config-overview span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.platform-config-overview strong {
  display: block;
  overflow-wrap: anywhere;
  color: #0d4b75;
  font-size: 20px;
  line-height: 1.25;
}

.platform-config-overview small {
  color: var(--muted);
  font-size: 12px;
}

.platform-config-section {
  display: grid;
  gap: 10px;
}

.platform-config-section h3 {
  margin: 0;
  color: #12395b;
  font-size: 17px;
}

.platform-equipment-table {
  max-height: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.platform-config-policy {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  align-items: end;
  background: #fff;
}

.platform-config-policy .save-platform-policy,
.platform-config-policy small {
  grid-column: 1 / -1;
}

.platform-config-exemption-form {
  grid-template-columns: minmax(260px, 1.4fr) 140px minmax(180px, 1fr) auto;
  align-items: end;
}

.booking-record-list {
  margin-top: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.booking-record-list table {
  min-width: 680px;
}

.booking-record-list .secondary-btn {
  min-height: 30px;
  padding: 0 9px;
}

.poster-hero {
  min-height: 260px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 34px;
  color: #fff;
  background: linear-gradient(110deg, #123552, #087d79);
}

.poster-copy h2 {
  margin: 12px 0 8px;
  font-size: 42px;
  line-height: 1.15;
}

.poster-copy strong {
  display: block;
  margin-bottom: 14px;
  font-size: 19px;
}

.poster-copy p {
  color: rgba(255, 255, 255, 0.82);
}

.poster-body {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  gap: 28px;
  padding: 30px 34px 36px;
}

.poster-body .equipment-sketch {
  width: 100%;
  height: 360px;
  margin: 0;
}

.poster-body p {
  align-self: center;
  color: #2f4858;
  font-size: 18px;
  line-height: 1.9;
}

.poster-content {
  display: grid;
  align-content: center;
  gap: 18px;
}

.poster-content img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.detail-open-btn {
  width: max-content;
  margin-top: 12px;
}

.modal-card p {
  margin-bottom: 0;
  white-space: pre-line;
  line-height: 1.7;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font-size: 22px;
}

.pay-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 16px;
}

.pay-btn {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.pay-btn.alipay {
  background: #1677ff;
}

.pay-btn.wechat {
  background: #16a34a;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  max-width: 420px;
  padding: 13px 16px;
  border-radius: 8px;
  color: #fff;
  background: rgba(23, 32, 42, 0.94);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  body {
    min-width: 0;
  }

  body.app-active {
    min-width: 1180px;
  }

  body.app-active .calendar-controls {
    display: flex;
    align-items: end;
    width: auto;
    gap: 10px;
    flex-direction: row;
  }

  body.app-active .calendar-controls label {
    width: 180px;
  }

  .auth-view {
    min-height: 100svh;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    align-items: stretch;
    gap: 18px;
    padding: 28px 16px 36px;
  }

  .auth-copy h1 {
    margin-bottom: 12px;
    font-size: 32px;
    line-height: 1.25;
  }

  .auth-copy p {
    font-size: 14px;
    line-height: 1.7;
  }

  .wechat-note {
    width: auto;
    margin-top: 18px;
    padding: 14px;
    font-size: 13px;
  }

  .auth-panel {
    padding: 14px;
  }

  .auth-form {
    gap: 13px;
    margin-top: 16px;
  }

  .platform-exemption-form {
    grid-template-columns: minmax(0, 1fr);
  }

}

@media (max-width: 1180px) {
  .platform-config-overview,
  .platform-config-policy,
  .platform-config-exemption-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .equipment-filter-toolbar,
  .equipment-edit-section-grid,
  .equipment-edit-section-grid.compact,
  .equipment-edit-split {
    grid-template-columns: minmax(0, 1fr);
  }
}
