﻿/* To-B MVP Prototype — aligned with docs/DESIGN.md */
:root {
  --color-bg: #f5f7fa;
  --color-surface: #ffffff;
  --color-border: #e5e6eb;
  --color-text: #1d2129;
  --color-text-secondary: #4e5969;
  --color-text-muted: #86909c;
  --color-primary: #165dff;
  --color-primary-hover: #0e42d2;
  --color-primary-soft: #e8f3ff;
  --color-success: #00b42a;
  --color-warning: #ff7d00;
  --color-danger: #f53f3f;
  --color-notice: #fff7e8;
  --topbar-h: 56px;
  --notice-h: 36px;
  --sidebar-w: 208px;
  --assist-w: 280px;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Microsoft YaHei UI",
    "Source Han Sans SC", "Noto Sans CJK SC", "Noto Sans SC", "WenQuanYi Micro Hei",
    "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, Helvetica, sans-serif;

  /* legacy aliases used by older rules */
  --bg: var(--color-bg);
  --surface: var(--color-surface);
  --border: var(--color-border);
  --text: var(--color-text);
  --text-secondary: var(--color-text-secondary);
  --text-muted: var(--color-text-muted);
  --primary: var(--color-primary);
  --primary-hover: var(--color-primary-hover);
  --primary-soft: var(--color-primary-soft);
  --danger: var(--color-danger);
  --warning: var(--color-warning);
  --success: var(--color-success);
  --info: var(--color-primary);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-hover); }
button, .btn { font-family: inherit; cursor: pointer; }

/* —— Hub —— */
.hub {
  min-height: 100vh;
  background: linear-gradient(160deg, #165dff 0%, #0e42d2 40%, #1d2129 100%);
  color: #fff;
  padding: 48px 24px 64px;
}
.hub-inner { max-width: 960px; margin: 0 auto; }
.hub h1 { font-size: 28px; font-weight: 650; letter-spacing: -.02em; }
.hub .sub { margin-top: 8px; opacity: .85; font-size: 15px; max-width: 560px; }
.hub-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 36px;
}
.hub-cards:has(.hub-card:nth-child(3)) { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 980px) { .hub-cards:has(.hub-card:nth-child(3)) { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .hub-cards { grid-template-columns: 1fr; } }
.hub-card {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 12px;
  padding: 24px;
  color: #fff;
  transition: background .15s;
}
.hub-card:hover { background: rgba(255, 255, 255, .16); text-decoration: none; color: #fff; }
.hub-card h2 { font-size: 18px; margin-bottom: 8px; }
.hub-card p { font-size: 13px; opacity: .8; margin-bottom: 16px; }
.hub-card .go {
  display: inline-block;
  background: #fff;
  color: #165dff;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
}
.hub-paths {
  margin-top: 40px;
  background: rgba(0, 0, 0, .2);
  border-radius: 12px;
  padding: 20px 24px;
}
.hub-paths h3 { font-size: 14px; margin-bottom: 12px; opacity: .9; }
.hub-paths ol { padding-left: 20px; font-size: 13px; opacity: .88; }
.hub-paths li { margin-bottom: 8px; }
.hub-paths code {
  background: rgba(255, 255, 255, .12);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
}
.hub-links { margin-top: 20px; font-size: 13px; opacity: .75; }
.hub-links a { color: #bedaff; }

/* —— Review path bar —— */
.review-bar {
  background: #0e42d2;
  color: #e8f3ff;
  font-size: 12px;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 200;
}
.review-bar strong { font-weight: 600; }
.review-bar a {
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .12);
}
.review-bar a:hover { background: rgba(255, 255, 255, .22); text-decoration: none; color: #fff; }
.review-bar .sep { opacity: .4; }

/* —— Admin mix shell (Top + Side + Main + Assist) —— */
.admin-body {
  min-height: 100vh;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
}
/* 强制限制 body 高度，禁止 body 滚动，让 .main 内部滚动 */
html, body { height: 100%; }
html { overflow: hidden; }
body { overflow: hidden; }

.admin-app {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
}
.admin-topbar {
  height: var(--topbar-h);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 16px 0 12px;
  gap: 8px;
  flex-shrink: 0;
  z-index: 50;
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 0 4px;
  color: var(--color-text);
  font-weight: 650;
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
}
.admin-brand:hover { color: var(--color-text); text-decoration: none; }
.admin-brand .logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--color-primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}
.admin-tenant {
  font-size: 12px;
  color: var(--color-text-secondary);
  padding: 4px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fafbfc;
  margin-right: 8px;
  white-space: nowrap;
}
.admin-tenant b { color: var(--color-text); font-weight: 500; }
.admin-modules {
  display: flex;
  align-items: stretch;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  height: 100%;
}
.admin-modules a {
  display: flex;
  align-items: center;
  padding: 0 14px;
  height: 100%;
  color: var(--color-text-secondary);
  font-size: 14px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.admin-modules a:hover {
  color: var(--color-primary);
  text-decoration: none;
  background: #fafbfc;
}
.admin-modules a.active {
  color: var(--color-primary);
  font-weight: 600;
  border-bottom-color: var(--color-primary);
}
.module-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f53f3f;
  margin-left: 5px;
  flex-shrink: 0;
  align-self: center;
  transform: translateY(-6px);
}
.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.admin-top-actions .icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text-secondary);
  display: grid;
  place-items: center;
  font-size: 13px;
}
.admin-top-actions .icon-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.admin-user {
  font-size: 13px;
  color: var(--color-text-secondary);
  padding: 0 4px 0 8px;
}

.notice-bar {
  height: var(--notice-h);
  background: var(--color-notice);
  border-bottom: 1px solid #ffe4ba;
  color: #ad6800;
  font-size: 12px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 8px;
  flex-shrink: 0;
}
.notice-bar .close-notice {
  margin-left: auto;
  border: none;
  background: transparent;
  color: #ad6800;
  cursor: pointer;
  font-size: 14px;
}

.admin-body-row {
  display: flex;
  flex: 1;
  min-height: 0;
}
.sidebar {
  width: var(--sidebar-w);
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  flex-shrink: 0;
  overflow-y: auto;
  padding: 12px 0 24px;
}
.sidebar-module-label {
  padding: 4px 16px 10px;
  font-size: 12px;
  color: var(--color-text-muted);
}
.nav-group { padding: 4px 0 8px; }
.nav-label {
  padding: 8px 16px 6px;
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
}
.nav-item {
  display: flex;
  align-items: center;
  margin: 0 8px;
  padding: 8px 12px;
  color: var(--color-text-secondary);
  font-size: 13px;
  border-radius: var(--radius-sm);
}
.nav-item .nav-text {
  flex: 1;
  min-width: 0;
}
.nav-item:hover {
  background: #f2f3f5;
  color: var(--color-text);
  text-decoration: none;
}
.nav-item.active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 600;
}
.nav-badge {
  display: inline-block;
  flex-shrink: 0;
  margin-left: 40px;
  min-width: 20px;
  height: 18px;
  line-height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  background: #f53f3f;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}
.nav-item.active .nav-badge {
  background: var(--color-primary);
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
}
.page-header {
  padding: 16px 24px 0;
  flex-shrink: 0;
}
.breadcrumb {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}
.breadcrumb a { color: var(--color-text-secondary); }
.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.page-header h1 {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text);
}
.content { padding: 16px 24px 24px; flex: 1; }

.assist {
  width: var(--assist-w);
  flex-shrink: 0;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  overflow-y: auto;
  padding: 16px;
}
.assist h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
.assist .assist-block {
  margin-bottom: 20px;
}
.assist ol, .assist ul {
  padding-left: 18px;
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}
.assist a { font-size: 12px; }
.assist-toggle {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* —— Cards / tables / forms —— */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-hd {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-hd h2 { font-size: 16px; font-weight: 600; }
.card-bd { padding: 16px; }
.hero-panel {
  background: linear-gradient(105deg, #e8f3ff 0%, #f0f5ff 55%, #ffffff 100%);
  border: 1px solid #bedaff;
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.hero-panel h2 { font-size: 18px; font-weight: 650; color: var(--color-text); }
.hero-panel p { font-size: 13px; color: var(--color-text-secondary); margin-top: 6px; max-width: 480px; }
.hero-panel .hero-art {
  width: 120px;
  height: 72px;
  border-radius: 8px;
  background: linear-gradient(135deg, #165dff, #94bfff);
  opacity: .85;
  flex-shrink: 0;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat .label { font-size: 12px; color: var(--color-text-secondary); }
.stat .value {
  font-size: 24px;
  font-weight: 650;
  margin-top: 4px;
  letter-spacing: -.02em;
  color: var(--color-text);
}
.stat .hint { font-size: 11px; color: var(--color-text-muted); margin-top: 4px; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.toolbar .spacer { flex: 1; }
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--color-text);
  height: 32px;
}
textarea { height: auto; }
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--color-primary-soft);
  border-color: var(--color-primary);
}
input[type="checkbox"],
input[type="radio"] {
  width: 14px;
  height: 14px;
  margin: 0 6px 0 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  flex-shrink: 0;
  vertical-align: -2px;
  accent-color: var(--color-primary, #165dff);
  cursor: pointer;
}
input[type="checkbox"]:focus,
input[type="radio"]:focus {
  outline: 2px solid rgba(22, 93, 255, 0.25);
  outline-offset: 2px;
  border-color: transparent;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  height: 32px;
  font-size: 13px;
}
.btn:hover { background: #f7f8fa; text-decoration: none; color: var(--color-text); }
.btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: #fff;
}
.btn-ghost { background: transparent; border-color: transparent; }
.btn-danger { color: var(--color-danger); border-color: #fdcdc5; }
.btn-sm { height: 28px; padding: 0 8px; font-size: 12px; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.data th {
  text-align: left;
  padding: 10px 12px;
  background: #fafbfc;
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 13px;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
table.data td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
  min-height: 40px;
}
table.data tr:hover td { background: #fafbfc; }
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  background: #f2f3f5;
  color: #4e5969;
}
.badge-success { background: #e8ffea; color: #009a29; }
.badge-warn { background: #fff7e8; color: #d25f00; }
.badge-danger { background: #ffece8; color: #cb2634; }
.badge-info { background: var(--color-primary-soft); color: #0e42d2; }
.badge-teal { background: var(--color-primary-soft); color: #0e42d2; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.form-grid .full { grid-column: 1 / -1; }
.field label {
  display: block;
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea { width: 100%; }
.field input[type="checkbox"],
.field input[type="radio"] {
  width: 14px;
  height: 14px;
  margin: 0 6px 0 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  flex-shrink: 0;
  vertical-align: -2px;
  accent-color: var(--color-primary, #165dff);
  cursor: pointer;
}
.field > label:has(> input[type="checkbox"]),
.field > label:has(> input[type="radio"]),
.field > div > label:has(> input[type="checkbox"]),
.field > div > label:has(> input[type="radio"]) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 16px 6px 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text, #1d2129);
  cursor: pointer;
  line-height: 1.4;
}
.field > div:has(> label > input[type="radio"]),
.field > div:has(> label > input[type="checkbox"]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 4px;
}
.muted { color: var(--color-text-secondary); font-size: 12px; }
/* 勿对 td.row-actions 使用 display:flex，会破坏 table-cell 行高对齐 */
td.row-actions {
  vertical-align: middle;
  font-size: 0; /* 消除 a 标签间空白节点 */
}
.row-actions a {
  display: inline-block;
  margin-right: 8px;
  white-space: nowrap;
  font-size: 13px;
  color: var(--color-primary);
  text-decoration: none;
}
.row-actions a:last-child { margin-right: 0; }
.row-actions a:hover { text-decoration: underline; }
.row-actions .muted,
.row-actions .row-more {
  display: inline-block;
  margin-right: 8px;
  white-space: nowrap;
  font-size: 13px;
}
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 16px;
}
.tabs .spacer { flex: 1; }
.tabs a {
  padding: 10px 14px;
  color: var(--color-text-secondary);
  font-size: 13px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs a.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}
.tabs a:hover { text-decoration: none; color: var(--color-text); }
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 140px;
  padding-top: 8px;
}
.chart-bars .bar {
  flex: 1;
  background: linear-gradient(180deg, #94bfff, #165dff);
  border-radius: 4px 4px 0 0;
  min-width: 0;
  position: relative;
}
.chart-bars .bar span {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1d2129;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 300;
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}
.toast.show { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.tag {
  display: inline-block;
  background: #f2f3f5;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  margin-right: 4px;
}
.tag-teal { background: var(--color-primary-soft); border-color: #bedaff; color: #0e42d2; }
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}
.detail-grid dt { font-size: 12px; color: var(--color-text-secondary); }
.detail-grid dd { font-size: 13px; margin-bottom: 8px; }
.two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; } }
.quick-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.quick-links a {
  display: block;
  padding: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-align: center;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 500;
}
.quick-links a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  text-decoration: none;
}
.quick-links a small {
  display: block;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-top: 4px;
  font-size: 11px;
}
.segmented {
  display: inline-flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.segmented button {
  border: none;
  background: #fff;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--color-text-secondary);
  cursor: pointer;
}
.segmented button.active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 600;
}

/* —— Mini program (unchanged structure, primary synced) —— */
.mp-page {
  min-height: 100vh;
  background: #1e293b;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px 32px;
}
.mp-frame {
  width: 375px;
  max-width: 100%;
  height: 760px;
  background: #f7f7f7;
  border-radius: 28px;
  border: 8px solid #0f172a;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.mp-status {
  height: 28px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  font-size: 11px;
  font-weight: 600;
  color: #111;
}
.mp-nav {
  height: 44px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #eee;
  font-size: 16px;
  font-weight: 600;
  position: relative;
}
.mp-nav .back {
  position: absolute;
  left: 12px;
  color: #333;
  font-size: 14px;
}
.mp-body {
  flex: 1;
  overflow-y: auto;
  background: #f7f7f7;
}
.mp-tabbar {
  height: 52px;
  background: #fff;
  border-top: 1px solid #eee;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.mp-tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #999;
  gap: 2px;
}
.mp-tabbar a.active { color: var(--color-primary); }
.mp-tabbar a:hover { text-decoration: none; }
.mp-tabbar .ico { font-size: 16px; line-height: 1; }
.mp-banner {
  margin: 12px;
  height: 120px;
  border-radius: 10px;
  background: linear-gradient(135deg, #165dff, #0e42d2 60%, #1d2129);
  color: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.mp-banner h3 { font-size: 18px; }
.mp-banner p { font-size: 12px; opacity: .85; margin-top: 4px; }
.mp-section { padding: 4px 12px 12px; }
.mp-section-title {
  font-size: 15px;
  font-weight: 650;
  margin: 8px 4px 10px;
}
.course-card {
  display: flex;
  gap: 10px;
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
  color: inherit;
}
.course-card:hover { text-decoration: none; }
.course-cover {
  width: 96px;
  height: 72px;
  border-radius: 8px;
  background: var(--color-primary-soft);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  padding: 4px;
}
.course-cover.live { background: #ffece8; color: #cb2634; }
.course-info h4 { font-size: 14px; color: #111; font-weight: 600; }
.course-info p { font-size: 11px; color: #888; margin-top: 4px; }
.course-info .price { color: #dc2626; font-weight: 650; margin-top: 6px; font-size: 14px; }
.course-info .price s { color: #aaa; font-weight: 400; font-size: 11px; margin-left: 4px; }
.mp-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--color-primary);
  color: #fff !important;
  border: none;
  border-radius: 999px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
}
.mp-btn:hover { text-decoration: none; background: var(--color-primary-hover); }
.mp-btn-outline {
  background: #fff;
  color: var(--color-primary) !important;
  border: 1px solid var(--color-primary);
}
.mp-bottom-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-top: 1px solid #eee;
  padding: 8px 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.live-player {
  height: 210px;
  background: #0f172a;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}
.live-player .live-tag {
  position: absolute;
  top: 10px; left: 10px;
  background: #dc2626;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
}
.live-chat {
  flex: 1;
  padding: 8px 12px;
  overflow-y: auto;
  font-size: 12px;
}
.live-chat .msg { margin-bottom: 6px; }
.live-chat .msg b { color: var(--color-primary); }
.goods-sheet {
  background: #fff;
  border-radius: 12px 12px 0 0;
  padding: 12px;
  border-top: 1px solid #eee;
}
.goods-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}
.mp-hint {
  margin-top: 12px;
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
  max-width: 375px;
}
.mp-hint a { color: #94bfff; }

/* —— Drawer / Modal (prototype interactions) —— */
.proto-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  display: none;
}
.proto-mask.open { display: block; }
.proto-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(480px, 92vw);
  background: #fff;
  z-index: 1001;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08);
  display: none;
  flex-direction: column;
}
.proto-drawer.open { display: flex; }
.proto-drawer-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}
.proto-drawer-hd h3 { font-size: 16px; font-weight: 600; }
.proto-drawer-bd { flex: 1; overflow: auto; padding: 16px 20px; }
.proto-drawer-ft {
  padding: 12px 20px;
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.proto-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, 92vw);
  max-height: 90vh;
  background: #fff;
  border-radius: 8px;
  z-index: 1001;
  display: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  flex-direction: column;
}
.proto-modal.open { display: flex; }
.proto-modal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}
.proto-modal-bd { padding: 16px 20px; overflow: auto; }
.proto-modal-ft {
  padding: 12px 20px;
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.prio-p0 { color: #f53f3f; font-weight: 600; }
.prio-p1 { color: #ff7d00; font-weight: 600; }
.prio-p2 { color: #165dff; font-weight: 600; }
.prio-p3 { color: #86909c; font-weight: 600; }
.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
  align-items: start;
}
.kanban-col {
  background: #f7f8fa;
  border-radius: 8px;
  padding: 10px;
  min-height: 280px;
}
.kanban-col h4 {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}
.kanban-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
}
.kanban-card:hover { border-color: var(--color-primary); }
.kanban-card .t { font-weight: 500; margin-bottom: 4px; }
.kanban-card .m { font-size: 12px; color: var(--color-text-muted); }

/* ===== 补充：统计卡片、表单、表格等公用样式 ===== */
.stat-cards {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.stat-card {
  background: #fff; border: 1px solid var(--color-border);
  border-radius: 8px; padding: 14px 18px;
}
.stat-label { font-size: 13px; color: var(--color-text-muted); margin-bottom: 6px; }
.stat-value { font-size: 24px; font-weight: 700; color: var(--color-text); line-height: 1.2; }
.stat-sub   { font-size: 12px; color: var(--color-text-muted); margin-top: 4px; }
.stat-sub .up   { color: #00b42a; margin-right: 4px; }
.stat-sub .down { color: #f53f3f; margin-right: 4px; }
.stat-hint  { font-size: 12px; color: var(--color-text-muted); margin-top: 4px; }
.stat-hint .up   { color: #00b42a; margin-right: 4px; }
.stat-hint .down { color: #f53f3f; margin-right: 4px; }

/* Card */
.card {
  background: #fff; border: 1px solid var(--color-border); border-radius: 8px;
}
.card-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--color-border);
  font-weight: 600;
}
.card-title { font-size: 14px; }
.card-bd { padding: 16px; }
.card-bd > *:first-child { margin-top: 0; }
.card-bd > *:last-child { margin-bottom: 0; }

/* Field + Form */
.form-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
.field label {
  display: block; font-size: 12px; color: var(--color-text-muted);
  margin-bottom: 6px;
}
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
  width: 100%; padding: 7px 10px; border: 1px solid var(--color-border);
  border-radius: 4px; background: #fff; font-size: 13px; color: var(--color-text);
  font-family: inherit;
}
.field input:not([type="checkbox"]):not([type="radio"]):focus,
.field select:focus,
.field textarea:focus {
  outline: none; border-color: var(--color-primary);
}
.field input[type="checkbox"],
.field input[type="radio"] {
  width: 14px;
  height: 14px;
  margin: 0 6px 0 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  flex-shrink: 0;
  vertical-align: -2px;
  accent-color: var(--color-primary, #165dff);
  cursor: pointer;
}
.field input[type="checkbox"]:focus,
.field input[type="radio"]:focus {
  outline: 2px solid rgba(22, 93, 255, 0.25);
  outline-offset: 2px;
  border-color: transparent;
}
.field > label:has(> input[type="checkbox"]),
.field > label:has(> input[type="radio"]),
.field > div > label:has(> input[type="checkbox"]),
.field > div > label:has(> input[type="radio"]) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 16px 6px 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text);
  cursor: pointer;
  line-height: 1.4;
}
.field > div:has(> label > input[type="radio"]),
.field > div:has(> label > input[type="checkbox"]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 4px;
}

/* Form readonly */
.form-grid.readonly .field > div,
.form-grid.readonly .field > input,
.form-grid.readonly .field > select,
.form-grid.readonly .field > textarea {
  background: #f7f8fa; color: #4e5969;
}

/* Toolbar */
.toolbar {
  display: flex; align-items: center; gap: 8px;
}
.toolbar .spacer { flex: 1; }
.muted { color: var(--color-text-muted); font-size: 12px; }

/* Tabs */
.tabs {
  display: flex; gap: 24px;
  border-bottom: 1px solid var(--color-border);
  margin: 8px 0;
}
.tabs a {
  padding: 10px 0; color: var(--color-text-muted); font-size: 14px;
  text-decoration: none; border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs a:hover { color: var(--color-text); }
.tabs a.active {
  color: var(--color-primary); border-bottom-color: var(--color-primary); font-weight: 500;
}

/* Data table */
.data {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.data thead th {
  background: #fafbfc; padding: 10px 12px; text-align: left;
  font-size: 12px; color: var(--color-text-muted); font-weight: 500;
  border-bottom: 1px solid var(--color-border);
}
.data tbody td {
  padding: 12px; border-bottom: 1px solid var(--color-border); color: var(--color-text);
}
.data tbody tr:hover { background: #fafbfc; }

/* Row actions — rules defined earlier; keep td as table-cell */

/* Link blue */
.link-blue { color: var(--color-primary); text-decoration: none; }
.link-blue:hover { text-decoration: underline; }

/* Alert */
.alert { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 6px; font-size: 13px; }
.alert-info    { background: #e6f0ff; color: #165dff; border: 1px solid #adc8ff; }
.alert-success { background: #e8f5e9; color: #00b42a; border: 1px solid #b7e1c0; }
.alert-warning { background: #fff7e6; color: #d48806; border: 1px solid #ffd591; }
.alert-error   { background: #fff1f0; color: #f53f3f; border: 1px solid #ffa39e; }

/* ===== 用户头像 + Cell ===== */
.user-cell { display: flex; align-items: center; gap: 8px; }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 600;
  flex-shrink: 0;
}
.user-avatar.lg { width: 36px; height: 36px; font-size: 14px; }

/* ===== 审计/状态徽标 ===== */
.audit-badge {
  display: inline-block; padding: 2px 8px; border-radius: 3px;
  font-size: 12px; font-weight: 500;
}
.audit-pending   { background: #fff7e6; color: #d48806; }
.audit-approved  { background: #e8f5e9; color: #00b42a; }
.audit-rejected  { background: #fff1f0; color: #f53f3f; }
.audit-cancelled { background: #f0f2f5; color: #86909c; }

/* ===== 推送类型标签 ===== */
.pr-type {
  display: inline-block; padding: 2px 8px; border-radius: 3px;
  font-size: 12px; font-weight: 500;
}
.pr-type-start   { background: rgba(22,93,255,.15); color: #4d8aff; }
.pr-type-onlive  { background: rgba(245,63,63,.15); color: #ff7875; }
.pr-type-replay  { background: rgba(0,180,42,.15); color: #5fd068; }
.pr-type-promo   { background: rgba(250,140,22,.15); color: #ffc857; }

/* ===== 详情抽屉内推送记录 ===== */
.bk-push-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 10px; background: #f7f8fa; border-radius: 4px;
  font-size: 12px;
}
.bk-push-ok { color: #00b42a; font-size: 11px; padding: 2px 6px; background: #e8f5e9; border-radius: 3px; }
.bk-push-fail { color: #f53f3f; font-size: 11px; padding: 2px 6px; background: #fff1f0; border-radius: 3px; }

/* ===== 排名徽标 ===== */
.rank-badge {
  display: flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 12px;
  background: #f0f2f5; color: #4e5969;
  font-size: 12px; font-weight: 600; width: fit-content;
}
.rank-1, .rank-2, .rank-3 { background: #fff7e6; color: #d48806; }

/* ===== Proto Mask + Drawer ===== */
.proto-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: none; z-index: 999;
}
.proto-mask.open { display: block; }
/* 用 translateX 隐藏，避免 width>480px（如 560px）时仍露出一截 */
.proto-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 480px;
  max-width: 92vw;
  background: #fff; box-shadow: -4px 0 20px rgba(0,0,0,.1);
  transition: transform .25s ease; z-index: 1000;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  pointer-events: none;
}
.proto-drawer.open {
  transform: translateX(0);
  pointer-events: auto;
}
.proto-drawer-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--color-border);
}
.proto-drawer-hd h3 { margin: 0; font-size: 16px; }
.proto-drawer-bd { flex: 1; padding: 18px; overflow: auto; }
.proto-drawer-ft {
  padding: 12px 18px; border-top: 1px solid var(--color-border);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* ===== 按钮：基础 + 尺寸 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 14px; border: 1px solid var(--color-border); border-radius: 4px;
  background: #fff; color: var(--color-text); font-size: 13px;
  cursor: pointer; white-space: nowrap; font-family: inherit;
}
.btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-primary {
  background: var(--color-primary); color: #fff; border-color: var(--color-primary);
}
.btn-primary:hover { background: #4080ff; border-color: #4080ff; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { padding: 3px 10px; font-size: 12px; }

/* ===== 输入控件 ===== */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  padding: 6px 10px; border: 1px solid var(--color-border); border-radius: 4px;
  background: #fff; color: var(--color-text); font-size: 13px; font-family: inherit;
}
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  outline: none; border-color: var(--color-primary);
}
input[type="checkbox"],
input[type="radio"] {
  width: 14px;
  height: 14px;
  margin: 0 6px 0 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  flex-shrink: 0;
  vertical-align: -2px;
  accent-color: var(--color-primary, #165dff);
  cursor: pointer;
}

/* ===== 顶栏用户下拉 ===== */
.admin-user-wrap { position: relative; }
.admin-user {
  font-size: 13px; color: var(--color-text-secondary); padding: 4px 8px;
  background: transparent; border: none; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 4px;
}
.admin-user:hover { color: var(--color-primary); }
.admin-user .caret { font-style: normal; font-size: 11px; }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 1000;
  background: #fff; border: 1px solid var(--color-border); border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .1); min-width: 170px; padding: 6px;
  display: none;
}
.user-dropdown.open { display: block; }
.user-dropdown .udd-hd {
  padding: 8px 10px; font-size: 13px; border-bottom: 1px solid var(--color-border);
  margin-bottom: 4px; color: var(--color-text);
}
.user-dropdown .udd-hd span { font-size: 12px; color: var(--color-text-muted); }
.user-dropdown .udd-item {
  display: block; width: 100%; text-align: left; padding: 8px 10px;
  font-size: 13px; color: var(--color-text); background: transparent;
  border: none; border-radius: 6px; cursor: pointer; font-family: inherit;
}
.user-dropdown .udd-item:hover { background: #f2f3f5; }
.user-dropdown .udd-logout { color: var(--color-danger); }
.user-dropdown .udd-sep { height: 1px; background: var(--color-border); margin: 4px 6px; }

/* ===== 数据专题看板 ===== */
.board-chain {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  padding: 10px 14px; margin-bottom: 16px;
  background: #f7f8fa; border: 1px solid var(--color-border); border-radius: 8px;
  font-size: 13px;
}
.board-chain a {
  color: var(--color-text-secondary); text-decoration: none;
  padding: 4px 10px; border-radius: 4px;
}
.board-chain a:hover { color: var(--color-primary); background: #fff; }
.board-chain a.active {
  color: var(--color-primary); background: var(--color-primary-soft); font-weight: 600;
}
.board-chain .sep { color: var(--color-text-muted); font-size: 12px; }
.board-tip {
  font-size: 12px; color: var(--color-text-secondary);
  padding: 8px 12px; margin-bottom: 12px;
  background: #fff7e6; border: 1px solid #ffd591; border-radius: 6px;
}
.board-tip b { color: #d48806; }
.board-funnel {
  display: flex; align-items: stretch; gap: 0; margin: 4px 0 8px;
}
.board-funnel.slope {
  align-items: flex-end;
  gap: 8px;
  min-height: 168px;
  padding-top: 8px;
}
.board-funnel.slope .step {
  flex: 1;
  margin-left: 0;
  border-radius: 8px 8px 0 0;
  height: var(--h, 100%);
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}
.board-funnel .step {
  flex: 1; text-align: center; padding: 14px 8px;
  background: linear-gradient(180deg, #e8f3ff, #f7f8fa);
  border: 1px solid #d0e3ff; margin-left: -1px;
  position: relative;
}
.board-funnel:not(.slope) .step:first-child { border-radius: 8px 0 0 8px; margin-left: 0; }
.board-funnel:not(.slope) .step:last-child { border-radius: 0 8px 8px 0; }
.board-attr {
  font-size: 12px; color: var(--color-text-muted);
  padding: 8px 0 0; line-height: 1.5;
}
.board-attr code {
  font-size: 11px; background: #f2f3f5; padding: 1px 6px; border-radius: 3px;
}
.board-funnel .step .n { font-size: 20px; font-weight: 700; color: var(--color-text); }
.board-funnel .step .l { font-size: 12px; color: var(--color-text-muted); margin-top: 4px; }
.board-funnel .step .r { font-size: 11px; color: var(--color-primary); margin-top: 4px; }
.board-funnel .step.drop { background: linear-gradient(180deg, #fff1f0, #fafbfc); border-color: #ffccc7; }
.board-funnel .step.drop .r { color: #f53f3f; }
.board-two {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin-bottom: 16px;
}
@media (max-width: 1100px) { .board-two { grid-template-columns: 1fr; } }
.board-bars {
  display: flex; align-items: flex-end; gap: 8px; height: 120px; padding-top: 8px;
}
.board-bars .bw { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.board-bars .b {
  width: 100%; border-radius: 4px 4px 0 0; min-height: 4px;
  background: linear-gradient(180deg, #94bfff, #165dff);
}
.board-bars .bl { font-size: 11px; color: var(--color-text-muted); }
.board-filter {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 16px; padding: 12px 14px;
  background: #fff; border: 1px solid var(--color-border); border-radius: 8px;
}
.board-filter select, .board-filter input {
  height: 32px; padding: 0 10px; border: 1px solid var(--color-border);
  border-radius: 4px; font-size: 13px; background: #fff;
}
.stat-cards.board-stats { margin-bottom: 16px; }
.stat-cards.cols-5 { grid-template-columns: repeat(5, 1fr); }
.stat-cards.cols-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1200px) {
  .stat-cards.cols-5, .stat-cards.cols-6 { grid-template-columns: repeat(3, 1fr); }
}
.board-chain.mini { padding: 8px 12px; margin-bottom: 12px; font-size: 12px; }
.board-caliber-wrap { position: relative; display: inline-flex; align-items: center; margin-left: 4px; }
.board-caliber-pop {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 40;
  width: 360px; max-width: min(360px, 80vw);
  padding: 12px 14px; background: #fff;
  border: 1px solid var(--color-border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  font-size: 12px; line-height: 1.6; color: var(--color-text-secondary);
}
.board-caliber-pop p { margin: 0 0 10px; }
.board-caliber-pop p:last-child { margin-bottom: 0; }
.board-caliber-pop b { color: var(--color-text); font-weight: 600; }
.board-caliber-pop .today-note {
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--color-border);
  color: var(--color-text-secondary);
}
.board-funnel.lg .step { padding: 20px 10px; }
.board-funnel.lg .step .n { font-size: 26px; }
.board-funnel .step .sub { font-size: 11px; color: var(--color-text-muted); margin-top: 2px; }
.board-drop-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px;
}
@media (max-width: 900px) { .board-drop-cards { grid-template-columns: 1fr; } }
.board-drop-cards a {
  display: block; padding: 14px 16px; background: #fff;
  border: 1px solid var(--color-border); border-radius: 8px;
  text-decoration: none; color: inherit;
}
.board-drop-cards a:hover { border-color: #94bfff; }
.board-drop-cards .t { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.board-drop-cards .d { font-size: 12px; color: var(--color-text-secondary); line-height: 1.5; }
.board-drop-cards .tag { color: #f53f3f; font-weight: 600; }
.board-scope {
  display: inline-block; font-size: 11px; font-weight: 500;
  padding: 2px 8px; border-radius: 4px; margin-left: 8px;
  background: #f2f3f5; color: var(--color-text-muted);
}
.board-scope.main { background: var(--color-primary-soft); color: var(--color-primary); }
.board-scope.aux { background: #fff7e6; color: #d48806; }
.channel-bars { display: flex; flex-direction: column; gap: 10px; }
.channel-bars .row { display: grid; grid-template-columns: 88px 1fr 64px; gap: 10px; align-items: center; font-size: 13px; }
.channel-bars .track { height: 8px; background: #f2f3f5; border-radius: 4px; overflow: hidden; }
.channel-bars .fill { height: 100%; background: linear-gradient(90deg, #165dff, #94bfff); border-radius: 4px; }
.channel-bars .pct { text-align: right; color: var(--color-text-secondary); }
a.stat-card { text-decoration: none; color: inherit; display: block; }
a.stat-card:hover { border-color: #94bfff; box-shadow: 0 2px 8px rgba(22,93,255,.08); }

.board-conclusion {
  background: #f7f8fa; border: 1px solid var(--color-border); border-radius: 8px;
  padding: 10px 14px; margin: 0 0 14px; font-size: 13px; line-height: 1.6;
}
.board-conclusion b { margin-right: 6px; }
.board-conclusion li { margin: 2px 0; }
.board-sort-bar { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin:0 0 10px; font-size:12px; }
.board-sort-bar button.active { background: var(--color-primary); color:#fff; border-color: var(--color-primary); }
.board-detail-panel {
  margin-top: 12px; padding: 12px 14px; border: 1px dashed var(--color-border);
  border-radius: 8px; background: #fafbfc;
}
.board-detail-panel[hidden] { display: none !important; }
.board-detail-panel h3 { margin: 0 0 8px; font-size: 14px; }
.board-mini-funnel { display:flex; gap:6px; flex-wrap:wrap; margin: 8px 0 12px; }
.board-mini-funnel .mf {
  flex:1; min-width: 90px; background:#fff; border:1px solid var(--color-border);
  border-radius:6px; padding:8px; text-align:center;
}
.board-mini-funnel .mf .n { font-weight:700; font-size:16px; }
.board-mini-funnel .mf .l { font-size:11px; color:var(--color-text-muted); margin-top:2px; }
tr.is-selected td { background: rgba(22,93,255,.06); }
.eff-tag { font-size:11px; padding:1px 6px; border-radius:4px; margin-left:6px; }
.eff-tag.vol { background:#e8f3ff; color:#165dff; }
.eff-tag.risk { background:#fff1f0; color:#f53f3f; }

/* P2 toolbar / views / glossary / print */
.board-toolbar { display:inline-flex; flex-wrap:wrap; align-items:center; gap:6px; margin-left:8px; }
.board-toolbar-group { position:relative; display:inline-block; }
.board-toolbar-menu {
  position:absolute; right:0; top:calc(100% + 4px); z-index:40; min-width:220px;
  background:#fff; border:1px solid var(--color-border); border-radius:8px;
  box-shadow:0 8px 24px rgba(0,0,0,.12); padding:6px 0;
}
.board-toolbar-menu button {
  display:block; width:100%; text-align:left; border:0; background:transparent;
  padding:8px 12px; font-size:13px; cursor:pointer;
}
.board-toolbar-menu button:hover { background:#f2f3f5; }
.board-toolbar-menu button:disabled { opacity:.45; cursor:not-allowed; }
.board-view-row { display:grid; grid-template-columns:1fr auto auto; gap:4px; align-items:center; padding:0 4px; }
.board-view-row.is-active button[data-apply-view] { color:var(--color-primary); font-weight:600; }
.board-view-row .linkish { color:var(--color-text-secondary); font-size:12px; padding:4px 6px; }
.board-view-row .linkish.danger { color:#f53f3f; }
.board-view-status { font-size:12px; margin-left:4px; max-width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.board-modal-overlay, .board-drawer-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:1000;
  display:flex; align-items:center; justify-content:center;
}
.board-drawer-overlay { justify-content:flex-end; }
.board-modal {
  width:min(440px, 92vw); background:#fff; border-radius:10px; overflow:hidden;
  box-shadow:0 12px 40px rgba(0,0,0,.18);
}
.board-drawer {
  width:min(420px, 94vw); height:100%; background:#fff; overflow:auto;
  box-shadow:-8px 0 24px rgba(0,0,0,.12);
}
.board-modal-hd, .board-drawer-hd {
  display:flex; justify-content:space-between; align-items:center;
  padding:12px 16px; border-bottom:1px solid var(--color-border);
}
.board-modal-hd h3, .board-drawer-hd h3 { margin:0; font-size:15px; }
.board-modal-bd, .board-drawer-bd { padding:14px 16px; }
.board-modal-ft { display:flex; gap:8px; justify-content:flex-end; padding:12px 16px; border-top:1px solid var(--color-border); flex-wrap:wrap; }
.board-field { display:block; margin-bottom:10px; font-size:13px; }
.board-field input { display:block; width:100%; margin-top:4px; padding:8px 10px; border:1px solid var(--color-border); border-radius:6px; }
.board-field-error { color:#f53f3f; font-size:12px; margin:0; }
.board-field-error[hidden] { display:none !important; }
.board-search { width:100%; padding:8px 10px; border:1px solid var(--color-border); border-radius:6px; margin-bottom:10px; }
.board-gl-cats { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
.board-gl-item { border:1px solid var(--color-border); border-radius:8px; padding:10px 12px; margin-bottom:10px; }
.board-gl-item h4 { margin:0 0 6px; font-size:14px; }
.board-gl-item p { margin:4px 0; font-size:12px; line-height:1.5; }
.board-gl-note { margin-top:16px; padding-top:12px; border-top:1px dashed var(--color-border); font-size:12px; }
.metric-help {
  display:inline-flex; align-items:center; justify-content:center;
  width:16px; height:16px; margin-left:4px; border-radius:50%;
  border:1px solid #c9cdd4; background:#fff; color:#86909c;
  font-size:11px; line-height:1; cursor:pointer; vertical-align:middle; padding:0;
}
.metric-help:focus { outline:2px solid var(--color-primary); outline-offset:1px; }
.metric-pop {
  position:absolute; z-index:1100; width:280px; background:#fff;
  border:1px solid var(--color-border); border-radius:8px; padding:10px 12px;
  box-shadow:0 8px 24px rgba(0,0,0,.12); font-size:12px;
}
.metric-pop .btn { margin:6px 4px 0 0; }
.board-print-banner { display:none; }
.board-custom-range-label { white-space:nowrap; }
.board-topic-entries {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:16px;
}
@media (max-width:900px) { .board-topic-entries { grid-template-columns:1fr; } }
.board-topic-entry {
  display:block; background:#fff; border:1px solid var(--color-border); border-radius:8px;
  padding:14px 16px; text-decoration:none; color:inherit;
}
.board-topic-entry:hover { border-color:#94bfff; }
.board-topic-entry .t { font-weight:600; margin-bottom:6px; }
.board-topic-entry .d { font-size:12px; color:var(--color-text-muted); line-height:1.5; }
.board-analysis-source {
  background:#f2f3f5; border-radius:6px; padding:8px 10px; margin-bottom:10px; font-size:12px;
}
.bottleneck-item.is-active { outline:2px solid rgba(22,93,255,.35); }
.is-focus-flash { animation: boardFocusFlash 1.1s ease; }
@keyframes boardFocusFlash {
  0% { box-shadow:0 0 0 0 rgba(22,93,255,.35); }
  40% { box-shadow:0 0 0 4px rgba(22,93,255,.2); }
  100% { box-shadow:none; }
}
.todo-risk-item { padding:10px 0; border-bottom:1px solid var(--color-border); }
.todo-risk-item:last-child { border-bottom:0; }
.todo-risk-item .tag { font-size:11px; }
.live-recap-drawer { width:min(520px, 96vw); max-width:96vw; }
.board-inline-select { margin-left:auto; font-size:12px; padding:4px 8px; }
.board-conclusion .btn { margin-left:6px; vertical-align:baseline; }

@media print {
  .admin-aside, .admin-topbar, .proto-scene, #header-actions, .board-toolbar,
  .board-filter, .board-caliber-wrap, .board-sort-bar, .board-tip,
  .board-modal-overlay, .board-drawer-overlay, .metric-pop, .toast,
  button.btn, .row-actions, #btn-refresh, #btn-export, .board-filter-note { display:none !important; }
  .board-print-banner { display:block !important; margin-bottom:16px; }
  .board-print-banner h1 { font-size:18px; margin:0 0 8px; }
  #page-content { display:block !important; }
  body.board-printing .admin-main { margin:0; padding:0; }
  a { text-decoration:none; color:inherit; }
}

/* cache-bust-radio-fix-20260908 */
