:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #86868b;
  --primary: #0071e3;
  --primary-dark: #0058b0;
  --primary-soft: #e8f1fd;
  --border: #d2d2d7;
  --success: #e8f5e9;
  --success-text: #1b873f;
  --error: #fce8e8;
  --error-text: #de3730;
  --shadow: 0 2px 8px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --radius: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: color .2s;
  background: var(--bg);
  color: var(--text);
}
body.admin-page {
  background: var(--bg);
}

a { color: inherit; text-decoration: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: rgba(251,251,253,0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.brand-title { font-weight: 600; font-size: 21px; color: #1d1d1f; letter-spacing: -0.01em; }
.brand-subtitle { font-size: 12px; color: #86868b; margin-top: 2px; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  padding: 6px 14px;
  border-radius: 980px;
  color: #1d1d1f;
  font-size: 14px;
  font-weight: 400;
  transition: background .2s, color .2s;
}
.nav a:hover {
  background: rgba(0,0,0,0.04);
  color: #0071e3;
}

.container {
  width: min(1440px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px;
}
.admin-container {
  width: min(1760px, calc(100vw - 24px));
  max-width: 1760px;
  padding: 20px 12px 28px;
}

.container.admin-container {
  width: min(1760px, calc(100vw - 24px));
  max-width: 1760px;
  margin: 0 auto;
  padding: 20px 12px 28px;
}
.admin-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.admin-sidebar {
  position: sticky;
  top: 72px;
  padding: 12px 16px;
  margin-right: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}
.admin-main,
.admin-main.shell-main,
#log-panel,
#log-panel .card,
#log-panel .table-wrap,
#log-panel .data-table,
#log-panel .audit-filter-toolbar,
#log-panel .pagination-bar {
  width: 100%;
  max-width: none;
}

.card {
  background: rgba(255,255,255,0.72);
  border: 0;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.06);
  padding: 24px;
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 20px;
}
.hero h1 { margin: 8px 0 12px; font-size: 32px; line-height: 1.15; font-weight: 600; letter-spacing: -0.03em; color: #1d1d1f; }
.hero p { color: #86868b; font-size: 15px; line-height: 1.6; }
.hero-side { display: grid; gap: 14px; }
.mobile-note, .admin-note {
  background: #fff;
  border: none;
  border-radius: 16px;
  padding: 20px;
  color: #1d1d1f;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.06);
  line-height: 1.7;
}

.eyebrow {
  display: inline-block;
  padding: 4px 12px;
  background: transparent;
  color: #0071e3;
  font-size: 12px;
  border-radius: 980px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
}

.grid {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-grid { grid-template-columns: 1fr 1fr; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  background: rgba(255,255,255,0.72);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}

.stat-label { color: #86868b; font-size: 12px; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.02em; }
.stat-number { font-size: 40px; font-weight: 600; color: #1d1d1f; letter-spacing: -0.03em; }

.feature-list { display: grid; gap: 14px; }
.feature-list.compact-list { gap: 12px; }
.feature-item {
  padding: 20px;
  border-radius: 16px;
  background: #fff;
  border: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.06);
}
.feature-item h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: #1d1d1f; }
.feature-item p { margin: 0; color: var(--muted); line-height: 1.7; }

.quick-links { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 20px; }
.quick-link {
  padding: 12px 16px;
  border-radius: 8px;
  background: #f3f4f6;
  color: #1d1d1f;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #e5e7eb;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 980px;
  background: #e8e8ed;
  color: #1d1d1f;
  font-size: 14px;
  font-weight: 400;
  transition: background .2s;
}
.btn:hover { background: #dcdce0; }
.btn.primary {
  background: #0071e3;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,113,227,0.3);
}
.btn.primary:hover { background: #0077ed; transform: scale(1.01); }
.btn.full { width: 100%; }
.btn.small { padding: 7px 14px; font-size: 13px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

.auth-wrapper {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-card { max-width: 460px; width: 100%; }

.form-grid { display: grid; gap: 14px; }
label span { display: block; margin-bottom: 4px; font-weight: 600; font-size: 13px; color: #1d1d1f; }
input, textarea, select {
  width: 100%;
  padding: 13px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.72);
  font-size: 15px;
  outline: none;
}
select[multiple] {
  min-height: 130px;
}
input:focus, textarea:focus, select:focus {
  border-color: #0071e3;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

.alert {
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-weight: 700;
}
.alert.success { background: #e8f5e9; color: #1b873f; }
.alert.error { background: #fce8e8; color: #de3730; }

.dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  
}
.dashboard-head p { color: var(--muted); line-height: 1.7; }

.mobile-first { position: relative; overflow: hidden; }
.mobile-panel {
  background: #fff;
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.06);
  padding: 18px;
}
.status-chip {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e8f5e9;
  color: #1b873f;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.mobile-panel p, .mobile-panel li { color: #1d1d1f; line-height: 1.8; }

.user-list, .child-mobile-list, .class-card-grid { display: grid; gap: 12px; }
.child-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.72);
}

.child-item-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-row-stack { align-items: flex-start; }
.action-col {
  display: grid;
  gap: 10px;
  width: min(360px, 100%);
}
.action-col.compact-actions {
  width: 320px;
}
.inline-form {
  display: flex;
  gap: 10px;
  align-items: center;
}
.reset-form input { min-width: 0; }

.class-card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.72);
}

.class-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.class-card h3 { margin: 0 0 8px; }
.class-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: #424245;
  font-size: 14px;
  margin: 10px 0;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.status-badge.ok { background: #e8f5e9; color: #1b873f; }
.status-badge.off { background: #fce8e8; color: #de3730; }
.status-badge.warn { background: #fff8e1; color: #f09300; }
.status-badge.info { background: #e8f1fd; color: #0071e3; }
.vest-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.vest-badge.yellow {
  background: #fff3bf;
  color: #9a6700;
}
.vest-badge.green {
  background: #dcfce7;
  color: #166534;
}
.vest-badge.red {
  background: #fee2e2;
  color: #b91c1c;
}

.table-wrap {
  overflow-x: auto;
  width: 100%;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}
.data-table th,
.data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f3f4f6;
  text-align: left;
  vertical-align: top;
  background-clip: padding-box;
}

.data-table th {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  background: #f9fafb;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
/* ---- 表格行悬停 & 斑马纹 ---- */
.data-table tbody tr:nth-child(even) {
  background: #f9fafb;
}
.data-table tbody tr:hover {
  background: #f3f4f6;
  
}
.checkbox-cell {
  width: 52px;
  text-align: center !important;
}
.checkbox-cell input {
  width: 18px;
  height: 18px;
}
.empty-state {
  padding: 18px;
  border-radius: 8px;
  background: #fafafa;
  color: #86868b;
  border: 1px dashed #d2d2d7;
}
.muted { color: #86868b; font-size: 14px; margin-top: 4px; }
.no-margin { margin-top: 0; }
.tips { color: var(--muted); line-height: 1.8; }
.tips.compact { margin-top: 16px; font-size: 14px; }
.error-card { max-width: 520px; margin: 40px auto; text-align: center; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.toolbar-links, .tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.stacked-links {
  flex-direction: column;
  align-items: stretch;
}
.import-box {
  margin-top: 18px;
  padding: 16px;
  border: 1px dashed #d2d2d7;
  border-radius: 16px;
  background: #f9fafb;
}
.import-box h3 { margin-top: 0; }
.no-top-margin { margin-top: 0; }
.batch-toolbar {
  display: grid;
  gap: 14px;
}
.batch-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: center;
}
.filter-toolbar {
  margin-bottom: 14px;
}
.filter-row {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(160px, 220px) auto auto;
  gap: 10px;
  align-items: center;
}
.filter-row-wide {
  grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) auto auto;
}
.filter-row-attention {
  grid-template-columns: minmax(260px, 1.6fr) minmax(180px, 1fr) minmax(160px, 1fr) auto auto;
}
.full-row {
  grid-column: 1 / -1;
}
.tag-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  vertical-align: middle;
}
.compact-tag-list {
  gap: 6px;
}
.tag-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #1d1d1f;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}
.attn-panel-grid {
  display: flex; flex-direction: column; gap: 20px;
}
.attention-editor-card {
  padding: 16px;
  border: 1px solid #e4ebf7;
  border-radius: 16px;
  background: #fff;
}
.attn-ed-header {
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 1px solid #f0f0f5;
}
.attn-ed-name { font-size: 17px; font-weight: 700; color: #1d1d1f; }
.attn-ed-meta { font-size: 13px; color: #86868b; }
.attn-ed-form {
  display: grid; grid-template-columns: 100px 1fr 1fr; gap: 10px 14px; align-items: end;
}
.attn-ed-wide { grid-column: 1 / -1; }
.attn-ed-row { }
.attn-ed-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.attn-ed-field { display: flex; flex-direction: column; gap: 3px; }
.attn-ed-field > span { font-size: 12px; font-weight: 600; color: #86868b; }
.attn-ed-field input,
.attn-ed-field select,
.attn-ed-field textarea {
  width: 100%; box-sizing: border-box;
  padding: 7px 10px; border: 1px solid #d2d2d7; border-radius: 8px;
  font-size: 13px; background: #f9fafb; transition: border-color .15s;
}
.attn-ed-field input:focus,
.attn-ed-field select:focus,
.attn-ed-field textarea:focus { border-color: #0071e3; outline: none; background: #fff; }
.attn-ed-actions { display: flex; gap: 8px; align-items: end; }
.attention-current-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
/* tag pills */
.attn-tag-pills {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px;
}
.attn-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; background: #e8f1fd; color: #0071e3;
  border-radius: 980px; font-size: 12px; font-weight: 500;
}
.attn-pill-x {
  cursor: pointer; font-size: 14px; line-height: 1; color: #0071e3; opacity: .6;
}
.attn-pill-x:hover { opacity: 1; }

/* attention panel responsive */
@media (max-width: 900px) {
  .attention-editor-card { position: static !important; }
}
@media (max-width: 640px) {
  .attn-ed-form { grid-template-columns: 1fr 1fr; }
  .attn-ed-actions { grid-column: 1 / -1; }
  .attention-table th:nth-child(5),
  .attention-table td:nth-child(5),
  .attention-table th:nth-child(6),
  .attention-table td:nth-child(6),
  .attention-table th:nth-child(7),
  .attention-table td:nth-child(7) { display: none; }
}
.attention-clear-form {
  margin-top: 12px;
}
.attention-tag-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #d7e3fb;
  background: rgba(255,255,255,0.72);
  font-size: 14px;
  font-weight: 600;
  color: #1d1d1f;
}
.tag-check input {
  width: 16px;
  height: 16px;
  margin: 0;
}
.attention-row {
  cursor: pointer;
  transition: background-color .2s, box-shadow .2s;
}
.attention-row:hover {
  background: #fafafa;
}
.attention-row.is-selected {
  background: #eef4ff;
  box-shadow: inset 3px 0 0 var(--primary);
}
.attention-row-radio {
  pointer-events: none;
}
.attention-action-grid {
  display: grid;
  gap: 10px;
  min-width: 280px;
}
.attention-edit-form {
  min-width: 260px;
  grid-template-columns: 1fr;
}
.compact-card-form { margin-top: 12px; }
.class-toggle-form { display: none; }
.full-height-card { height: 100%; }

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #f5f5f7 0%, #e8f1fd 50%, #f5f5f7 100%);
  border-radius: 20px;
  padding: 32px;
}
.admin-hero h1 {
  margin: 6px 0 8px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #1d1d1f;
}
.admin-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  max-width: none;
}
.admin-hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  align-items: start;
}
.admin-sidebar {
  position: sticky;
  top: 72px;
  padding: 12px 16px;
  margin-right: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}
.sidebar-brand {
  margin-bottom: 14px;
}
.sidebar-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.sidebar-menu {
  display: grid;
  gap: 22px;
}
.nav-group {
  display: grid;
  gap: 12px;
}
.nav-group-card {
  display: grid;
  gap: 12px;
}
.main-nav-link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: #1d1d1f;
  text-align: left;
  
}
.main-nav-link:hover {
  color: #0071e3;
  background: rgba(0,113,227,0.06);
}
.main-nav-link.active {
  background: rgba(0,113,227,0.08);
  color: #0071e3;
  font-weight: 600;
  border-left: 3px solid #0071e3;
  padding-left: 9px;
}
.main-nav-title {
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
}
.nav-submenu {
  display: grid;
  gap: 8px;
  padding: 2px 0 0 14px;
}
.nav-submenu.always-open {
  display: grid;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #424245;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  transition: all .15s;
}
.sidebar-link:hover {
  background: #f3f4f6;
  color: #111827;
}
.sidebar-link.active {
  background: rgba(0,113,227,0.08);
  color: #0071e3;
  font-weight: 600;
  border-left: 3px solid #0071e3;
  padding-left: 9px;
}
.sub-nav-link {
  margin-left: 0;
}
.sub-nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #d1d5db;
  flex: 0 0 auto;
}
.sidebar-link.active .sub-nav-dot {
  background: #0071e3;
}
.logs-grid {
  display: block;
  width: 100%;
}
.log-card-main {
  min-width: 0;
  width: 100%;
}
.log-card-main.card {
  width: 100%;
}
.log-card-main .table-wrap {
  overflow-x: auto;
  width: 100%;
}
.log-card-main .admin-table {
  width: 100%;
  min-width: 1320px;
}
.audit-time-cell {
  min-width: 190px;
  white-space: normal;
}
.audit-time-text {
  white-space: normal;
  line-height: 1.6;
  color: #1d1d1f;
}
.audit-target-cell {
  min-width: 200px;
}
.audit-target-text {
  white-space: normal;
  line-height: 1.6;
}
.audit-detail-cell {
  min-width: 480px;
}
.audit-detail-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.65;
  font-size: 13px;
  color: #1d1d1f;
  font-family: inherit;
}
.audit-filter-toolbar {
  margin: 12px 0 14px;
}
.audit-filter-row select,
.audit-filter-row input[type='date'] {
  min-width: 180px;
}
.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.pagination-link {
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 6px;
  background: rgba(255,255,255,0.72);
  color: #1d1d1f;
  border: 1px solid #e5e7eb;
  font-size: 13px;
  font-weight: 500;
  transition: all .15s;
}
.pagination-link:hover:not(.active) {
  background: #f3f4f6;
  color: #111827;
}
.pagination-link.active {
  background: #0071e3;
  color: #fff;
}
.pagination-nav {
  min-width: 76px;
}
.sidebar-footer {
  margin-top: 16px;
  line-height: 1.7;
}
.admin-main {
  min-width: 0;
  width: 100%;
  max-width: none;
}
.admin-panel {
  display: none;
}
.admin-panel.is-active {
  display: block;
  width: 100%;
}
.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.panel-heading h2 {
  margin: 8px 0 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.panel-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  max-width: 860px;
}
.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
#log-panel .panel-grid {
  display: block;
}
#log-panel .card {
  width: 100%;
  max-width: none;
}
#log-panel .audit-filter-toolbar,
#log-panel .table-wrap,
#log-panel .pagination-bar {
  width: 100%;
}
.overview-grid {
  align-items: start;
}
.management-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}
.management-side,
.management-main {
  display: grid;
  gap: 20px;
  min-width: 0;
}
.admin-class-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.wide-class-card {
  min-width: 0;
}
.admin-table {
  min-width: 960px;
}
.overview-stats {
  margin-bottom: 20px;
}

@media (max-width: 1280px) {
  .admin-layout {
    grid-template-columns: 200px 1fr;
  }
  .management-layout {
    grid-template-columns: 280px 1fr;
  }
  .admin-class-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .management-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .hero,
  .two-col,
  .admin-grid,
  .stats-grid,
  .dashboard-head,
  .panel-grid,
  .management-layout,
  .admin-layout,
  .admin-hero {
    grid-template-columns: 1fr;
    display: grid;
  }

  .dashboard-head,
  .admin-hero { align-items: start; }
  .batch-row { grid-template-columns: 1fr; }
  .filter-row,
  .filter-row-wide,
  .filter-row-attention { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: static;
  }
  .admin-hero-actions {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 14px;
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-title { font-size: 18px; }
  .container,
  .admin-container {
    width: calc(100vw - 16px);
    padding: 12px 8px 20px;
  }
  .card { padding: 16px; border-radius: 16px; }
  .hero h1,
  .admin-hero h1 { font-size: 28px; }
  .nav { width: 100%; }
  .nav a { padding: 10px 12px; font-size: 14px; }
  .btn, input, textarea, select { font-size: 16px; }
  .inline-form, .tool-row { align-items: flex-start; flex-direction: column; }
  .action-col, .action-col.compact-actions { width: 100%; }
  .data-table,
  .admin-table { min-width: 680px; }
  .main-nav-link {
    min-height: 54px;
    padding: 0 14px;
  }
  .main-nav-title { font-size: 17px; }
  .sidebar-link {
    justify-content: flex-start;
  }
  .logs-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== 场地预约 ========== */
.venue-round-card,
.venue-attention-card,
.venue-attention-manage-card,
.venue-map-shell {
  margin-bottom: 16px;
}
.venue-attention-manage-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(260px, 0.95fr);
  gap: 16px;
}
.venue-attention-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.venue-attention-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}
.venue-attention-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.venue-attention-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.venue-attention-current {
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(248, 250, 252, 0.88);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.venue-attention-current-head,
.venue-attention-current-meta,
.venue-scene-attention-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.venue-attention-current-list,
.venue-scene-attention-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.venue-attention-current-item,
.venue-scene-attention-item {
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.venue-attention-vest-tabs,
.venue-attention-child-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.venue-attention-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  font-size: 12px;
  font-weight: 700;
}
.venue-attention-vest-panel,
.venue-attention-child-detail-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.venue-attention-child-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(241, 245, 249, 0.96);
  color: #334155;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.venue-attention-child-btn:hover {
  background: rgba(219, 234, 254, 0.96);
  color: #1d4ed8;
}
.venue-attention-child-btn.is-active {
  background: #1d4ed8;
  color: #fff;
}
.venue-attention-current-empty {
  padding: 16px;
}
.venue-map-shell {
  width: min(1680px, 100%);
  margin-left: auto;
  margin-right: auto;
  padding: 28px 30px 30px;
}
.venue-countdown-box {
  min-width: 180px;
  text-align: right;
}
.venue-countdown-label {
  color: var(--muted);
  font-size: 13px;
}
.venue-countdown-timer {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.venue-view-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.venue-view-panel[hidden] {
  display: none !important;
}
.venue-board-scroll,
.layout-editor-scroll {
  overflow: auto;
  padding-bottom: 4px;
}
.venue-map-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 620px;
  overflow: auto;
  width: 100%;
  max-width: 100%;
  padding: 18px 8px 10px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 50% 6%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 26%),
    linear-gradient(180deg, #edf4ff 0%, #e3ecff 100%);
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.venue-map-stage-inner {
  position: relative;
  flex: 0 0 auto;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}
.venue-map-board,
.layout-canvas {
  position: relative;
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 12%, rgba(29, 78, 216, 0.06), transparent 28%),
    linear-gradient(180deg, #edf3ff 0%, #e5ecfb 100%);
  border: 1px solid rgba(148, 163, 184, 0.28);
  overflow: visible;
}
.venue-map-board {
  will-change: transform;
  max-width: none;
}
.venue-background-layer {
  position: absolute;
  overflow: hidden;
  pointer-events: none;
  border-radius: 20px;
}
.venue-background-layer.is-fixed {
  opacity: 0.96;
}
.venue-background-image {
  position: absolute;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border-radius: 20px;
}
.venue-zone,
.layout-block {
  position: absolute;
  border-radius: 20px;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}
.venue-zone {
  background: #fafafa;
}
.venue-zone.is-mine {
  box-shadow: 0 20px 44px rgba(22, 163, 74, 0.18);
  border-color: rgba(34, 197, 94, 0.36);
}
.venue-zone.is-pool-full {
  filter: saturate(0.9);
}
.venue-zone-bg,
.layout-block-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border-radius: 20px;
}
.venue-zone-bg {
  cursor: pointer;
}
.venue-zone-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 20px;
}
.venue-zone-overlay,
.layout-block-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}
.venue-zone-head,
.layout-block-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.venue-zone-head {
  padding: 16px 16px 0;
  pointer-events: none;
}
.venue-zone-head h4,
.layout-block-head strong {
  margin: 0;
  font-size: 15px;
}
.venue-zone-meta,
.layout-block-meta {
  font-size: 12px;
  color: #424245;
}
.venue-zone-badge {
  min-width: 46px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.14);
  color: #dc2626;
  font-weight: 700;
  text-align: center;
}
.venue-zone-foot {
  position: absolute;
  inset: auto 0 0;
  z-index: 4;
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
}
.venue-map-hotspot-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.venue-hotspot-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.venue-hotspot-shape {
  fill: rgba(15, 23, 42, 0.001);
  stroke: transparent;
  stroke-width: 16;
  cursor: pointer;
  pointer-events: all;
}
.venue-hotspot-shape:hover,
.venue-hotspot-shape:focus-visible {
  fill: rgba(15, 23, 42, 0.001);
  stroke: transparent;
  filter: none;
  outline: none;
}
.venue-hotspot-hint {
  --hint-color: #2563eb;
  --hint-label-size: 14px;
  --hint-size: 28px;
  --hint-length: 54px;
  --hint-bounce-ms: 1500ms;
  position: absolute;
  z-index: 4;
  display: block;
  width: calc(var(--hint-size) * 1.45);
  height: calc(var(--hint-length) + var(--hint-size));
  transform: translate(-50%, calc(-100% - 18px));
  transform-origin: 50% 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--hint-color);
  cursor: pointer;
  overflow: visible;
  animation: venue-hotspot-bounce var(--hint-bounce-ms) cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
  filter: drop-shadow(0 14px 20px rgba(15, 23, 42, 0.22));
}
.venue-hotspot-hint-label {
  position: absolute;
  left: 50%;
  top: calc(var(--hint-size) * -1.2);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  font-size: var(--hint-label-size);
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.24);
}
.venue-hotspot-hint::before,
.venue-hotspot-hint::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.venue-hotspot-hint::before {
  top: 0;
  width: max(4px, calc(var(--hint-size) * 0.18));
  height: var(--hint-length);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, currentColor 26%, currentColor 100%);
}
.venue-hotspot-hint::after {
  top: calc(var(--hint-length) - 1px);
  width: var(--hint-size);
  height: calc(var(--hint-size) * 0.84);
  background: currentColor;
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}
.venue-hotspot-hint:hover,
.venue-hotspot-hint:focus-visible {
  filter: drop-shadow(0 18px 24px rgba(15, 23, 42, 0.28));
  outline: none;
}
@keyframes venue-hotspot-bounce {
  0%, 100% { transform: translate(-50%, calc(-100% - 18px)); }
  45% { transform: translate(-50%, calc(-100% - 2px)); }
  68% { transform: translate(-50%, calc(-100% - 10px)); }
}
.venue-class-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 28px;
}
.venue-class-chip,
.venue-class-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #1d1d1f;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}
.venue-class-chip.is-self {
  background: #dbeafe;
  color: #1d4ed8;
}
.venue-class-empty {
  font-weight: 500;
  color: #86868b;
}
.venue-zone-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.venue-map-caption {
  margin-top: 14px;
  text-align: center;
}
.venue-text-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}
.venue-text-card {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 24px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 245, 255, 0.92) 100%);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}
.venue-text-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.venue-text-head h4 {
  margin: 0 0 6px;
  font-size: 20px;
}
.venue-text-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}
.venue-text-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.venue-text-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.venue-chip-button {
  border: 0;
  cursor: pointer;
}
.venue-chip-button:hover {
  background: #dbeafe;
  color: #1d4ed8;
}
.venue-availability {
  color: #1d1d1f;
  font-size: 13px;
}
.venue-marker,
.layout-pin {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 0;
}
.venue-marker {
  background: rgba(30, 64, 175, 0.94);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(30, 64, 175, 0.25);
  overflow: hidden;
}
.venue-marker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.venue-marker span,
.layout-pin {
  font-size: 11px;
  font-weight: 700;
}
.layout-canvas {
  min-height: 0;
}
.layout-background-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 4px 14px;
}
.layout-block {
  border: 2px dashed #2563eb;
  background: rgba(255,255,255,0.72);
}
.layout-background-block {
  border-style: dashed;
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(219, 234, 254, 0.16);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.12);
}
.layout-background-block .layout-block-head strong {
  color: #1d4ed8;
}
.layout-block.is-active {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14), 0 20px 44px rgba(15, 23, 42, 0.18);
}
.layout-drag-zone {
  position: relative;
  z-index: 2;
  padding: 14px;
  cursor: move;
  user-select: none;
  touch-action: none;
}
.layout-block-action {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.94);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  cursor: pointer;
}
.layout-block-action:hover {
  background: #ffffff;
}
.layout-block-meta {
  margin-top: 6px;
}
.layout-handle {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 6px;
  background: #0071e3;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
  cursor: nwse-resize;
}
.layout-pin {
  background: rgba(255,255,255,0.72);
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.24);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}
.layout-pin.is-disabled {
  opacity: 0.45;
}
.venue-hotspot-field {
  border: 1px dashed rgba(37, 99, 235, 0.28);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(239, 246, 255, 0.72);
}
.venue-hotspot-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.venue-hotspot-summary {
  font-size: 13px;
}
.venue-hotspot-scene-preview {
  margin-top: 10px;
}
.venue-hotspot-scene-preview img {
  width: min(100%, 260px);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  display: block;
}
.venue-hotspot-scene-preview video {
  width: min(100%, 320px);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  display: block;
}
.hotspot-editor-overlay {
  align-items: center;
}
.modal-box.hotspot-editor-modal {
  width: min(98vw, 1440px);
  max-width: 1440px;
  max-height: 96vh;
}
.hotspot-editor-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}
.hotspot-editor-toolbar,
.hotspot-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.hotspot-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.hotspot-zoom-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.hotspot-editor-style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px 12px;
}
.hotspot-editor-style-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #475569;
}
.hotspot-editor-style-grid input {
  width: 100%;
}
.hotspot-editor-stage-wrap {
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(226, 232, 240, 0.55);
  padding: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  height: min(74vh, 840px);
  max-height: min(74vh, 840px);
}
.hotspot-editor-stage {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
  transform-origin: top left;
}
.hotspot-editor-stage .venue-background-image {
  background-size: 100% 100%;
  background-position: left top;
  background-color: rgba(255, 255, 255, 0.72);
}
.hotspot-editor-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
}
.hotspot-editor-existing {
  fill: rgba(59, 130, 246, 0.08);
  stroke: rgba(37, 99, 235, 0.35);
  stroke-width: 3;
  stroke-dasharray: 12 10;
}
.hotspot-editor-polygon {
  fill: rgba(16, 185, 129, 0.22);
  stroke: rgba(4, 120, 87, 0.92);
  stroke-width: 4;
}
.hotspot-editor-polyline {
  fill: none;
  stroke: rgba(4, 120, 87, 0.92);
  stroke-width: 3;
  stroke-dasharray: 8 8;
}
.hotspot-editor-handle {
  fill: #fff;
  stroke: #0f766e;
  stroke-width: 3;
  cursor: grab;
}
.hotspot-editor-hint {
  z-index: 5;
}
@media (max-width: 900px) {
  .modal-box.hotspot-editor-modal {
    width: min(100vw - 16px, 1000px);
    max-height: 95vh;
  }
  .hotspot-editor-stage-wrap {
    height: min(60vh, 560px);
    max-height: min(60vh, 560px);
    padding: 10px;
  }
}
.venue-admin-card {
  margin-bottom: 16px;
}
.venue-admin-top {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 18px;
}
.venue-admin-preview {
  min-height: 180px;
  border-radius: 18px;
  background: linear-gradient(180deg, #eef2ff 0%, #e2e8f0 100%);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border: 1px solid var(--border);
}
.venue-admin-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.venue-elements-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.venue-element-position-field {
  border: 1px dashed rgba(37, 99, 235, 0.24);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(239, 246, 255, 0.68);
}
.venue-element-stage {
  position: relative;
  margin-top: 10px;
  width: min(100%, 520px);
  aspect-ratio: var(--stage-width, 280) / var(--stage-height, 180);
  min-height: 220px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, #eef2ff 0%, #e2e8f0 100%);
}
.venue-element-stage-bg,
.venue-element-stage-empty {
  position: absolute;
  inset: 0;
}
.venue-element-stage-bg {
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.venue-element-stage-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}
.venue-element-stage-marker {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  transform: translate(0, 0);
  border: 0;
  border-radius: 999px;
  background: rgba(30, 64, 175, 0.94);
  color: #fff;
  box-shadow: 0 12px 24px rgba(30, 64, 175, 0.24);
  cursor: grab;
  touch-action: none;
}
.venue-element-stage-marker:active {
  cursor: grabbing;
}
.venue-element-stage-marker span {
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}
.venue-element-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: #f9fafb;
}
.venue-element-item.is-new {
  border-style: dashed;
}
.venue-element-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.venue-detail-modal {
  max-width: 680px;
}
.venue-detail-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.venue-detail-image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.venue-scene-overlay {
  align-items: stretch;
}
.modal-box.venue-scene-modal {
  width: min(97vw, 1480px);
  max-width: 1480px;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.venue-scene-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.venue-scene-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.72fr);
  gap: 18px;
}
.venue-scene-visual {
  background: linear-gradient(180deg, rgba(219, 234, 254, 0.45) 0%, rgba(241, 245, 249, 0.94) 100%);
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.venue-scene-switches {
  display: flex;
  gap: 10px;
  padding: 16px 16px 0;
  flex-wrap: wrap;
}
.venue-resource-mode-btn {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #475569;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.venue-resource-mode-btn.is-active {
  background: #0f766e;
  color: #fff;
  box-shadow: 0 12px 22px rgba(15, 118, 110, 0.22);
}
.venue-resource-mode-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.venue-scene-surface {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}
.venue-scene-image-frame {
  position: relative;
  width: 100%;
  aspect-ratio: var(--scene-width, 960) / var(--scene-height, 640);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9) 0%, rgba(226, 232, 240, 0.8) 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}
.venue-scene-map {
  position: relative;
  flex: 0 0 auto;
  max-width: 100%;
  max-height: 100%;
}
.venue-scene-map > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.venue-scene-empty {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-weight: 600;
}
.venue-scene-image-actions {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.venue-scene-image-tip {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
  font-size: 13px;
  font-weight: 700;
}
.venue-scene-image-frame.is-zoomable {
  cursor: zoom-in;
}
.venue-scene-image-frame.is-zoomable::after {
  content: "双击查看整图";
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
}
.venue-resource-meta-line {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
}
.venue-scene-map-marker {
  z-index: 3;
  min-width: 20px;
  min-height: 20px;
  box-shadow: 0 12px 20px rgba(30, 64, 175, 0.28);
}
.venue-resource-board {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.venue-resource-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.venue-resource-eyebrow {
  font-size: 12px;
  font-weight: 700;
  color: #0f766e;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.venue-resource-title {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1.15;
}
.venue-resource-grade-note {
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #475569;
  font-size: 13px;
  line-height: 1.6;
}
.venue-resource-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.venue-resource-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.venue-resource-panel-head h4 {
  margin: 4px 0 0;
  font-size: 22px;
}
.venue-resource-panel-label {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}
.venue-resource-level-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.venue-resource-level-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.venue-resource-level-panel[hidden],
.venue-resource-panel[hidden],
.venue-scene-surface[hidden] {
  display: none !important;
}
.venue-resource-level-btn,
.venue-resource-nav-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(226, 232, 240, 0.9);
  color: #334155;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.venue-resource-level-btn.is-active,
.venue-resource-nav-btn.is-active {
  background: #1d4ed8;
  color: #fff;
}
.venue-resource-level-btn:disabled,
.venue-resource-nav-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.venue-resource-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.venue-resource-content-grid.is-loop {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.venue-resource-card {
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.22);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.venue-resource-card strong {
  color: #0f172a;
}
.venue-resource-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.venue-resource-figure {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.venue-resource-figure img {
  width: 100%;
  display: block;
  object-fit: contain;
  background: #fff;
}
.venue-resource-figure figcaption {
  padding: 10px 12px 12px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}
.venue-resource-video {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.venue-resource-video video {
  width: 100%;
  max-height: 360px;
  border-radius: 14px;
  background: #020617;
}
.venue-resource-empty {
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px dashed rgba(148, 163, 184, 0.36);
  color: #64748b;
  font-weight: 600;
  text-align: center;
}
.venue-resource-empty-placeholder {
  text-align: left;
}
.venue-scene-subtitle {
  margin: 0;
  color: #475569;
  font-size: 13px;
}
.venue-scene-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.venue-scene-card {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.94);
}
.venue-scene-card-booking .venue-scene-actions {
  justify-content: space-between;
}
.venue-scene-card-booking .inline-form,
.venue-scene-card-booking form {
  margin: 0;
}
.venue-resource-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.venue-resource-nav-group {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.venue-resource-nav-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}
.venue-resource-nav-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.venue-scene-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.venue-scene-title {
  margin: 0 0 8px;
  font-size: 24px;
}
.venue-scene-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.venue-scene-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.venue-scene-stat {
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(239, 246, 255, 0.85);
}
.venue-scene-stat strong {
  display: block;
  font-size: 11px;
  color: #475569;
  margin-bottom: 4px;
}
.venue-scene-text {
  white-space: pre-wrap;
  color: #334155;
  font-size: 14px;
  line-height: 1.6;
}

/* 弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
body.modal-open {
  overflow: hidden;
  touch-action: none;
}
.modal-box {
  background: rgba(255,255,255,0.72);
  border-radius: var(--radius);
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 28px 80px rgba(15,23,42,0.24);
  border: 1px solid rgba(226,232,240,0.9);
  
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { margin: 0; }
.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
  padding: 0 4px;
}
.modal-body {
  padding: 20px;
  line-height: 1.8;
  color: var(--text);
}
.venue-scene-image-overlay {
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(10px);
}
.venue-scene-image-viewer {
  width: min(96vw, 1400px);
  height: min(92vh, 920px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.38);
}
.venue-scene-image-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  color: #e2e8f0;
}
.venue-scene-image-toolbar strong {
  display: block;
  font-size: 20px;
}
.venue-scene-image-hint {
  margin-top: 6px;
  color: #cbd5e1;
  font-size: 13px;
}
.venue-scene-image-toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.venue-scene-image-toolbar-actions .btn {
  border-color: rgba(148, 163, 184, 0.45);
}
.venue-scene-image-close {
  color: #e2e8f0;
  font-size: 28px;
}
.venue-scene-image-viewport {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.venue-scene-image-full {
  display: block;
  max-width: none;
  width: auto;
  height: auto;
  margin: 0;
  user-select: none;
  cursor: zoom-in;
}

@media (max-width: 900px) {
  .venue-admin-top {
    grid-template-columns: 1fr;
  }
  .venue-countdown-box {
    text-align: left;
  }
  .venue-scene-image-viewer {
    width: 100%;
    height: 100%;
    border-radius: 22px;
    padding: 14px;
  }
  .venue-scene-image-toolbar {
    flex-direction: column;
  }
  .venue-scene-image-toolbar-actions {
    width: 100%;
  }
  .venue-map-shell {
    padding: 20px;
  }
  .venue-map-stage {
    min-height: 500px;
  }
}

@media (min-width: 901px) {
  .venue-map-stage {
    overflow: hidden;
  }
}

@media (max-width: 640px) {
  .venue-attention-manage-grid,
  .venue-attention-form-row {
    grid-template-columns: 1fr;
  }
  .venue-attention-form-actions,
  .venue-attention-current-meta,
  .venue-scene-attention-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .venue-attention-form-actions .btn {
    width: 100%;
  }
  .venue-view-toolbar {
    width: 100%;
    justify-content: space-between;
  }
  .venue-map-shell {
    padding: 14px 10px;
    border-radius: 16px;
  }
  .venue-map-stage {
    min-height: 240px;
    padding: 8px 0 0;
    border-radius: 18px;
    overflow-x: auto;
    overflow-y: auto;
  }
  .venue-map-stage-inner {
    margin: 0 auto;
  }
  .venue-countdown-box {
    min-width: 0;
    width: 100%;
    text-align: left;
  }
  .venue-countdown-timer {
    font-size: 22px;
    word-break: break-all;
  }
  .venue-text-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .venue-text-card {
    padding: 14px;
    border-radius: 16px;
  }
  .venue-text-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .venue-zone-actions,
  .venue-text-actions {
    align-items: flex-start;
    flex-direction: column;
  }
  .venue-text-actions .btn,
  .venue-text-actions form,
  .venue-text-actions .inline-form,
  .venue-zone-actions .btn,
  .venue-zone-actions form,
  .venue-zone-actions .inline-form {
    width: 100%;
  }
  .venue-text-actions .btn,
  .venue-zone-actions .btn {
    min-height: 40px;
  }
  .venue-hotspot-hint {
    transform: translate(-50%, calc(-100% - 12px));
    filter: drop-shadow(0 12px 18px rgba(15, 23, 42, 0.2));
  }
  .venue-scene-shell {
    grid-template-columns: 1fr;
  }
  .venue-scene-panel {
    order: -1;
  }
  .venue-resource-head {
    flex-direction: column;
  }
  .venue-resource-grade-note {
    max-width: none;
    width: 100%;
  }
  .venue-scene-title {
    font-size: 24px;
  }
  .venue-scene-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .venue-scene-stat {
    padding: 10px;
    border-radius: 14px;
  }
  .venue-scene-card {
    padding: 14px;
  }
  .venue-scene-card-booking { order: 1; }
  .venue-scene-card-stats { order: 2; }
  .venue-scene-card-nav { order: 3; }
  .venue-scene-card-attention { order: 4; }
  .venue-scene-card-classes { order: 5; }
  .venue-scene-actions,
  .venue-scene-card-booking .venue-scene-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .venue-scene-card-booking .btn,
  .venue-scene-card-booking form,
  .venue-scene-card-booking .inline-form {
    width: 100%;
  }
  .venue-resource-content-grid,
  .venue-resource-content-grid.is-loop,
  .venue-resource-media-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .dashboard-head > .btn {
    width: 100%;
  }
  .modal-box.venue-detail-modal {
    width: min(94vw, 94vw);
    max-width: 94vw;
    margin: 0 auto;
  }
  .modal-box.venue-scene-modal {
    width: min(96vw, 96vw);
    max-width: 96vw;
  }
  .venue-detail-body {
    padding: 14px;
  }
}



.chart-card {
  overflow: hidden;
}
.visual-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  align-items: stretch;
}
.radar-card,
.trend-card {
  background: rgba(255,255,255,0.72);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  
}
.radar-card {
  position: relative;
  overflow: hidden;
}
.radar-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, rgba(191, 219, 254, 0.26), transparent 38%);
  pointer-events: none;
}
.radar-svg,
.wave-chart-svg {
  width: 100%;
  height: auto;
  display: block;
}
.radar-ring {
  fill: rgba(59, 130, 246, 0.04);
  stroke: rgba(59, 130, 246, 0.18);
  stroke-width: 1;
}
.radar-axis {
  stroke: rgba(100, 116, 139, 0.32);
  stroke-width: 1;
}
.radar-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  margin-bottom: 12px;
}
.radar-toggle-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.radar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.88);
  color: #475569;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.radar-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--radar-toggle-color, #0f172a);
}
.radar-toggle.is-active {
  color: var(--radar-toggle-color, #0f172a);
  border-color: var(--radar-toggle-color, #0f172a);
  box-shadow: inset 0 0 0 1px var(--radar-toggle-color, #0f172a);
}
.radar-toggle-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}
.radar-series.is-hidden {
  display: none;
}
.radar-series-shape {
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.radar-series-current .radar-series-shape {
  filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.12));
}
.radar-series-dot {
  stroke: #ffffff;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.radar-label {
  fill: #334155;
  font-size: 12px;
  text-anchor: middle;
}
.wave-chart-wrap {
  overflow-x: auto;
}
.wave-grid {
  stroke: rgba(148, 163, 184, 0.35);
  stroke-width: 1;
}
.wave-line {
  fill: none;
  stroke: #0f766e;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wave-point {
  fill: #14b8a6;
  stroke: #ffffff;
  stroke-width: 2;
}
.wave-label {
  fill: #64748b;
  font-size: 11px;
  text-anchor: middle;
}
.wave-value {
  fill: #0f766e;
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
}
.narrative-list {
  display: grid;
  gap: 12px;
}
.narrative-item {
  padding: 12px 14px;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  color: #1d1d1f;
  line-height: 1.7;
}
.narrative-item strong {
  display: inline-block;
  margin-bottom: 4px;
  color: #1d1d1f;
}
@media (max-width: 900px) {
  .visual-grid {
    grid-template-columns: 1fr;
  }
  .radar-card-head {
    margin-bottom: 10px;
  }
  .radar-toggle-list {
    width: 100%;
  }
  .radar-toggle {
    justify-content: center;
  }
}


.sidebar-group {
  border-radius: 8px;
  margin-bottom: 10px;
  background: #fafafa;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}
.sidebar-summary-wrap {
  list-style: none;
}
.sidebar-summary-wrap::-webkit-details-marker {
  display: none;
}
.sidebar-summary-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  box-sizing: border-box;
}
.sidebar-count {
  display: inline-flex;
  min-width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e2e8f0;
  color: #424245;
  font-size: 12px;
  font-weight: 700;
  margin-left: 10px;
  flex-shrink: 0;
}
.sidebar-submenu {
  padding: 0 12px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-sublink {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  color: #424245;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}
.sidebar-sublink:hover {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.sidebar-sublink.active {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
  font-weight: 700;
}



.fitness-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.fitness-nav-root {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 14px;
  border-radius: 10px;
  text-decoration: none;
  background: transparent;
  color: #1d1d1f;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  border: none;
  transition: background .2s;
}
.fitness-nav-root:hover {
  color: #0071e3;
  background: rgba(0,113,227,0.06);
}
.fitness-nav-root.active {
  background: rgba(0,113,227,0.08);
  color: #0071e3;
  font-weight: 600;
  border-left: 3px solid #0071e3;
  padding-left: 9px;
}
.fitness-nav-group {
  display: grid;
  gap: 10px;
}
.fitness-nav-grade-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  min-height: 38px;
  padding: 6px 14px;
  border-radius: 10px;
  text-decoration: none;
  background: transparent;
  color: #1d1d1f;
  border: none;
  transition: background .2s;
}
.fitness-nav-grade-link:hover {
  color: #0071e3;
  background: rgba(0,113,227,0.06);
}
.fitness-nav-grade-link.active {
  background: rgba(0,113,227,0.08);
  color: #0071e3;
  font-weight: 600;
  border-left: 3px solid #0071e3;
  padding-left: 9px;
}
.fitness-nav-grade-title {
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
}
.fitness-nav-grade-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.fitness-nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
  font-size: 12px;
  font-weight: 700;
}
.fitness-nav-chevron {
  font-size: 13px;
  color: inherit;
  opacity: 0.9;
}
.fitness-nav-classes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 0 0 14px;
}
.fitness-nav-class {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #424245;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  transition: all .15s;
}
.fitness-nav-class:hover {
  background: #f3f4f6;
  color: #111827;
}
.fitness-nav-class.active {
  background: rgba(0,113,227,0.08);
  color: #0071e3;
  font-weight: 600;
  border-left: 3px solid #0071e3;
  padding-left: 9px;
}


.inline-editor-card {
  width: 100%;
}
.inline-editor-card summary {
  list-style: none;
  cursor: pointer;
}
.inline-editor-card summary::-webkit-details-marker {
  display: none;
}
.inline-edit-panel {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid #dbe5f3;
  border-radius: 8px;
  background: #fafafa;
}
.inline-edit-panel label {
  margin-bottom: 0;
}
.inline-edit-panel input,
.inline-edit-panel select,
.inline-edit-panel textarea {
  width: 100%;
}
.class-editor-card {
  margin-top: 10px;
}
.compact-actions {
  align-items: flex-start;
}

/* ---- 审美增强 ---- */
/* 占比文字加深 */
.stat-card .muted {
  color: #86868b;
}
/* 按钮层级：退出用灰色 */
.btn.secondary {
  background: rgba(255,255,255,0.72);
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.btn.secondary:hover {
  background: linear-gradient(180deg, #f8fafc 0%, #e9eef5 100%);
  color: #424245;
}


/* ========== RBAC Readonly Mode ========== */
.readonly-mode form[method="post"] button[type="submit"],
.readonly-mode form[method="post"] .btn.primary,
.readonly-mode .inline-edit-panel,
.readonly-mode .batch-actions,
.readonly-mode form[action*="/add"],
.readonly-mode form[action*="/import"],
.readonly-mode form[action*="/batch"],
.readonly-mode form[action*="/edit"],
.readonly-mode form[action*="/toggle"],
.readonly-mode form[action*="/reset"],
.readonly-mode form[action*="/delete"],
.readonly-mode form[action*="/save"],
.readonly-mode form[action*="/settings"],
.readonly-mode form[action*="/content"],
.readonly-mode form[action*="/roles"] {
  display: none !important;
}
.readonly-mode .data-table .checkbox-cell {
  display: none !important;
}

/* ========== RBAC Role Cards ========== */
.role-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 900px) {
  .role-card-grid {
    grid-template-columns: 1fr;
  }
}
.role-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px 28px;
  transition: box-shadow .25s, border-color .25s;
  min-height: 120px;
}
.role-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.07);
  border-color: #0071e3;
}
.role-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}
.role-card-name {
  font-size: 18px;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -0.02em;
}
.role-card-id {
  font-size: 12px;
  color: #86868b;
  margin-top: 2px;
  font-family: 'SF Mono', Menlo, monospace;
}
.role-card-perms {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}
.perm-tag {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 6px;
  background: rgba(0,113,227,0.08);
  color: #0071e3;
  letter-spacing: 0.01em;
}
.role-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #86868b;
  margin-bottom: 14px;
}
.role-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid #f0f0f2;
}

/* Permission chip (for create/edit forms) */
.perm-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #f5f5f7;
  border: 1px solid #e5e5ea;
  font-size: 12px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.perm-chip:hover {
  background: #e8f1fd;
  border-color: #0071e3;
}
.perm-chip input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
}
.perm-chip input[type="checkbox"]:checked + span {
  color: #0071e3;
  font-weight: 600;
}

/* ========== Permission Matrix ========== */
.perm-matrix { margin-bottom: 8px; }
.perm-matrix.compact .perm-group { margin-bottom: 8px; }
.perm-matrix.compact .perm-module { margin-bottom: 4px; }
.perm-matrix-title {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 13px;
  color: #1d1d1f;
}
.perm-group {
  margin-bottom: 16px;
  padding: 12px;
  background: #fafafa;
  border-radius: 12px;
  border: 1px solid #f0f0f2;
}
.perm-group-header {
  font-weight: 600;
  font-size: 11px;
  color: #86868b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e5e5ea;
}
.perm-module {
  margin-bottom: 8px;
}
.perm-module-name {
  font-size: 13px;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 4px;
}
.perm-module-name.small {
  font-size: 12px;
}
.perm-module-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* ========== Role Section Headers ========== */
.role-section {
  margin-bottom: 24px;
}
.role-section:last-child {
  margin-bottom: 0;
}
.role-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #86868b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e5ea;
}

/* ========== Role Card Permission Groups ========== */
.role-card-perm-groups {
  margin-bottom: 12px;
}
.perm-group-block {
  margin-bottom: 8px;
}
.perm-group-block:last-child {
  margin-bottom: 0;
}
.perm-group-label {
  font-size: 11px;
  font-weight: 600;
  color: #86868b;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.perm-group-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}


/* ========== Permission Accordion ========== */
.perm-accordion {
  border: 1px solid #e5e5ea;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 4px;
}
.perm-accordion[open] {
  border-color: #0071e3;
}
.perm-accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #1d1d1f;
  cursor: pointer;
  background: #fafafa;
  transition: background .15s;
  list-style: none;
}
.perm-accordion-toggle::-webkit-details-marker { display: none; }
.perm-accordion-toggle::before {
  content: '▸';
  margin-right: 8px;
  transition: transform .2s;
  font-size: 11px;
  color: #86868b;
}
.perm-accordion[open] > .perm-accordion-toggle::before {
  transform: rotate(90deg);
}
.perm-accordion-toggle:hover {
  background: #f0f0f5;
}
.perm-accordion-count {
  font-size: 11px;
  font-weight: 500;
  color: #0071e3;
  background: rgba(0,113,227,0.08);
  padding: 2px 8px;
  border-radius: 10px;
}
.perm-accordion-body {
  padding: 12px 14px;
  border-top: 1px solid #e5e5ea;
}
/* Role cards spacing refinement */
.role-card {
  padding: 24px 28px;
}

/* ========== Readonly mode: hide write buttons ========== */
.readonly-mode .btn.primary:not(.readonly-keep),
.readonly-mode form[method="post"],
.readonly-mode .batch-bar,
.readonly-mode .import-box,
.readonly-mode .inline-editor-card,
.readonly-mode a[href*="template"],
.readonly-mode a[href*="export"] {
  /* Allow export for readonly if they have export permission */
}
/* Actually readonly should block everything including export */
.readonly-mode form[method="post"] { display: none !important; }
.readonly-mode .import-box { display: none !important; }
.readonly-mode .batch-bar { display: none !important; }
.readonly-mode .inline-editor-card { display: none !important; }
/* Block export links in readonly mode */
.readonly-mode a[href*="/export"] { display: none !important; }
.readonly-mode a[href*="/template"] { display: none !important; }

/* ========== Inline editor refinements ========== */
.inline-editor-card > summary {
  cursor: pointer;
}
.inline-edit-panel {
  animation: fadeSlideDown .2s ease;
}
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.compact-inline-form label span {
  font-size: 12px;
}


/* ========== 教师端布局 ========== */
  body:not(.admin-page) .container {
    width: min(1760px, calc(100vw - 24px));
    max-width: 1760px;
    padding: 20px 12px 28px;
  }
  .user-fitness-layout { display:grid; grid-template-columns: 260px minmax(0,1fr); gap:18px; align-items:start; }
  .user-fitness-sidebar { position:sticky; top:72px; align-self:start; display:block !important; }
  .user-fitness-main { min-width:0; width:100%; }
  .user-fitness-nav { display:flex; flex-direction:column; gap:12px; }
  .user-fitness-nav-link { display:block; width:100%; box-sizing:border-box; min-height:42px; padding:14px 16px; border-radius:12px; background:transparent; color:#1d1d1f !important; text-decoration:none; font-weight:500;  }
  .user-fitness-nav-link:hover { color:#0071e3 !important; background:rgba(0,113,227,0.06); }
  .user-fitness-nav-link.active { background:rgba(0,113,227,0.1); color:#0071e3 !important; }
  .user-fitness-nav-title { display:block; font-size:14px; line-height:1.2; }
  .user-fitness-nav-desc { display:block; margin-top:6px; font-size:12px; color:#86868b; font-weight:600; }
  .user-fitness-main .card { max-width:none; }
  .user-fitness-main .table-wrap { overflow-x:visible; }
  .user-fitness-main .data-table { min-width:0 !important; width:100%; table-layout:fixed; }
  .user-fitness-main .data-table th,
  .user-fitness-main .data-table td { padding:10px 8px; font-size:13px; word-break:break-word; }
  .user-fitness-main .data-table th:nth-child(1), .user-fitness-main .data-table td:nth-child(1) { width:72px; }
  .user-fitness-main .data-table th:nth-child(2), .user-fitness-main .data-table td:nth-child(2) { width:52px; }
  .user-fitness-main .data-table th:nth-child(3), .user-fitness-main .data-table td:nth-child(3) { width:92px; }
  .user-fitness-main .stats-grid.overview-stats { grid-template-columns: repeat(6, minmax(0,1fr)); }
  @media (max-width: 1400px) {
    .user-fitness-main .stats-grid.overview-stats { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .user-fitness-main .data-table th, .user-fitness-main .data-table td { font-size:12px; padding:9px 6px; }
  }
  @media (max-width: 960px) {
    body:not(.admin-page) .container { width:min(100vw - 12px, 100%); padding:16px 6px 24px; }
    .user-fitness-layout { grid-template-columns: 1fr; }
    .user-fitness-sidebar { position: static; }
    .user-fitness-main .table-wrap { overflow-x:auto; }
    .user-fitness-main .data-table { min-width:980px !important; table-layout:auto; }
    .user-fitness-main .stats-grid.overview-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  }


/* ========== 管理端体测导航覆盖 ========== */
  .fitness-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .fitness-nav-root {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    background: transparent;
    color: #1d1d1f !important;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    border: none;
    
  }
  .fitness-nav-root:hover {
    color: #0071e3 !important;
    background: rgba(0,113,227,0.06);
  }
  .fitness-nav-root.active {
    background: rgba(0,113,227,0.1);
    border-color: transparent;
    color: #0071e3 !important;
    
  }
  .fitness-nav-group {
    display: grid;
    gap: 10px;
  }
  .fitness-nav-grade-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 12px;
    text-decoration: none;
    background: transparent;
    color: #1d1d1f !important;
    border: none;
    
  }
  .fitness-nav-grade-link:hover {
    color: #0071e3 !important;
    background: rgba(0,113,227,0.06);
  }
  .fitness-nav-grade-link.active {
    background: rgba(0,113,227,0.1);
    border-color: transparent;
    color: #0071e3 !important;
    
  }
  .fitness-nav-grade-title {
    font-size: 18px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: 0.01em;
  }
  .fitness-nav-grade-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .fitness-nav-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
    font-size: 12px;
    font-weight: 700;
  }
  .fitness-nav-chevron {
    font-size: 13px;
    color: inherit;
    opacity: 0.9;
  }
  .fitness-nav-classes {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding: 2px 0 0 14px;
  }
  .fitness-nav-class {
    display: flex !important;
    align-items: center;
    gap: 10px;
    width: 100% !important;
    min-height: 44px;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    color: #475569 !important;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
  }
  .fitness-nav-class:hover {
    background: #f1f5f9;
    color: #1d1d1f !important;
    border-color: #cbd5e1;
  }
  .fitness-nav-class.active {
    background: #eaf2ff;
    color: #1d4ed8 !important;
    border-color: #bfd4ff;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.08);
  }


/* ========== 场地管理面板 ========== */
/* ── 地图居中 ── */
.venue-map-wrapper {
  display: flex;
  justify-content: center;
  padding: 16px;
  background: var(--bg);
  border-radius: 16px;
}
.layout-block { min-width: 100px; min-height: 65px; }
.layout-block-head strong { font-size: 12px; }
.layout-block-head .status-badge { font-size: 10px; padding: 2px 6px; }
.layout-block-meta { font-size: 11px; }
.layout-drag-zone { padding: 10px 12px; }
.layout-handle { width: 16px; height: 16px; }

/* ── 场地卡片网格 ── */
.venue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.venue-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all .2s;
}
.venue-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(0,113,227,.12);
  transform: translateY(-2px);
}
.venue-card-thumb {
  height: 100px;
  background: var(--bg) center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}
.venue-card-no-img {
  font-size: 28px;
  font-weight: 700;
  color: var(--muted);
  opacity: .4;
}
.venue-card-body {
  padding: 12px 14px 14px;
}
.venue-card-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}
.venue-card-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── 右侧滑出面板 ── */
.venue-editor-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.3);
  z-index: 900;
}
.venue-editor-overlay.open { display: block; }
.venue-editor-drawer {
  position: fixed;
  top: 0;
  right: -640px;
  width: 620px;
  max-width: 96vw;
  height: 100vh;
  background: #fff;
  box-shadow: -8px 0 40px rgba(0,0,0,.15);
  z-index: 901;
  transition: right .3s ease;
  display: flex;
  flex-direction: column;
  border-radius: 20px 0 0 20px;
}
.venue-editor-drawer.open { right: 0; }
.venue-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.venue-editor-header h3 { margin: 0; font-size: 16px; }
.venue-editor-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 120px;
}
.compact-venue-form {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── 新增面板 ── */
.venue-slide-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s;
  padding: 0 16px;
}
.venue-slide-panel.open {
  max-height: 1600px;
  overflow: auto;
  padding: 16px;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}

/* ========== Apple-style Homepage ========== */
.apple-hero {
  padding: 88px 24px 64px;
  text-align: center;
}
.apple-hero-inner {
  max-width: 920px;
  margin: 0 auto;
}
.apple-eyebrow {
  margin-bottom: 16px;
  color: #6e6e73;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: .01em;
}
.apple-hero-title {
  margin: 0;
  color: #1d1d1f;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.apple-hero-desc {
  max-width: 760px;
  margin: 24px auto 0;
  color: #424245;
  font-size: clamp(19px, 2.3vw, 28px);
  line-height: 1.45;
  font-weight: 400;
}
.apple-hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 34px;
}
.apple-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 17px;
  font-weight: 500;
  transition: all .2s ease;
}
.apple-btn-primary {
  background: #0071e3;
  color: #fff;
}
.apple-btn-primary:hover { background: #0077ed; color: #fff; }
.apple-btn-secondary {
  background: #f5f5f7;
  color: #1d1d1f;
  border: 1px solid #d2d2d7;
}
.apple-btn-secondary:hover { background: #fff; color: #1d1d1f; }

.apple-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0 auto 28px;
  padding: 0;
  overflow: hidden;
}
.apple-stat-item {
  padding: 34px 18px;
  text-align: center;
}
.apple-stat-item + .apple-stat-item {
  border-left: 1px solid #e5e5e7;
}
.apple-stat-value {
  color: #1d1d1f;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.apple-stat-label {
  margin-top: 8px;
  color: #6e6e73;
  font-size: 14px;
}

.apple-section {
  padding: 56px 0 24px;
}
.apple-section-head {
  max-width: 860px;
  margin: 0 auto 34px;
  text-align: center;
}
.apple-section-kicker {
  color: #6e6e73;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.apple-section-head h2 {
  margin: 10px 0 12px;
  color: #1d1d1f;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.apple-section-head p {
  margin: 0;
  color: #424245;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.5;
}

.apple-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.apple-feature-card {
  padding: 34px 32px;
  border-radius: 28px;
  background: #fbfbfd;
  border: 1px solid #ececf0;
  box-shadow: 0 4px 18px rgba(0,0,0,.04);
}
.apple-feature-card h3 {
  margin: 0 0 12px;
  color: #1d1d1f;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.apple-feature-card p {
  margin: 0;
  color: #424245;
  font-size: 16px;
  line-height: 1.7;
}

.apple-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 12px 0 12px;
}
.apple-panel {
  padding: 36px 32px;
}
.apple-panel h3 {
  margin: 10px 0 12px;
  color: #1d1d1f;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.apple-panel p {
  margin: 0;
  color: #424245;
  font-size: 16px;
  line-height: 1.7;
}

.apple-links-section {
  padding-top: 44px;
}
.apple-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.apple-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 26px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #e5e5e7;
  color: #1d1d1f;
  text-decoration: none;
  font-size: 19px;
  font-weight: 500;
  transition: all .2s ease;
}
.apple-link-card:hover {
  background: #fbfbfd;
  border-color: #d2d2d7;
  color: #1d1d1f;
  transform: translateY(-1px);
}
.apple-link-arrow {
  color: #0071e3;
  font-size: 22px;
}

@media (max-width: 900px) {
  .apple-stats,
  .apple-feature-grid,
  .apple-split-grid,
  .apple-link-grid {
    grid-template-columns: 1fr 1fr;
  }
  .apple-stat-item:nth-child(3),
  .apple-stat-item:nth-child(4) {
    border-top: 1px solid #e5e5e7;
  }
}
@media (max-width: 640px) {
  .apple-hero { padding: 56px 8px 40px; }
  .apple-hero-desc { font-size: 19px; }
  .apple-stats,
  .apple-feature-grid,
  .apple-split-grid,
  .apple-link-grid {
    grid-template-columns: 1fr;
  }
  .apple-stat-item + .apple-stat-item {
    border-left: none;
    border-top: 1px solid #e5e5e7;
  }
  .apple-feature-card,
  .apple-panel,
  .apple-link-card {
    border-radius: 20px;
  }
}
