/* =====================================================================
   中泰高铁 4-3 工程文档中心 — 3.0 视觉方案
   明亮玻璃（Glassmorphism）+ 蓝色弥散光，参考 Apple 设计语言
   ===================================================================== */

:root {
  color-scheme: light;
  --bg: #edf3fc;
  --ink: #0e1b2c;
  --muted: #5c6c80;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-soft: rgba(244, 249, 255, 0.85);
  --line: rgba(13, 60, 130, 0.1);
  --accent: #0a7aff;
  --accent-strong: #0057d6;
  --accent-soft: rgba(10, 122, 255, 0.1);
  --teal: #0a7aff;
  --teal-strong: #0057d6;
  --indigo: #1d4ed8;
  --amber: #b45309;
  --red: #d92d20;
  --glass: rgba(255, 255, 255, 0.66);
  --glass-strong: rgba(255, 255, 255, 0.84);
  --glass-border: rgba(255, 255, 255, 0.78);
  --blur: blur(22px) saturate(1.7);
  --radius-card: 18px;
  --radius-control: 12px;
  --shadow: 0 12px 40px rgba(23, 58, 128, 0.1);
  --shadow-soft: 0 8px 28px rgba(23, 58, 128, 0.08);
  --shadow-pop: 0 18px 56px rgba(23, 58, 128, 0.16);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Segoe UI Variable", "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
}

/* 蓝色弥散背景：固定合成层，避免滚动重绘 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 700px at 12% -8%, rgba(64, 156, 255, 0.22), transparent 62%),
    radial-gradient(950px 620px at 92% -2%, rgba(125, 211, 252, 0.24), transparent 58%),
    radial-gradient(850px 640px at 84% 92%, rgba(99, 102, 241, 0.12), transparent 58%),
    radial-gradient(720px 520px at 4% 78%, rgba(56, 189, 248, 0.14), transparent 55%),
    linear-gradient(180deg, #f3f8ff, var(--bg));
}

::selection {
  color: var(--ink);
  background: rgba(10, 122, 255, 0.18);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
}

/* ---------- 顶栏：悬浮玻璃 ---------- */

.portal-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 46px);
  color: var(--ink);
  background: var(--glass);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 1px 0 rgba(13, 60, 130, 0.06), 0 12px 36px rgba(23, 58, 128, 0.07);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(140deg, #4fa6ff, var(--accent) 55%, var(--accent-strong));
  box-shadow: 0 8px 22px rgba(10, 122, 255, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  font-weight: 800;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(20px, 2.2vw, 27px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

/* ---------- 视图切换 / 语言 ---------- */

.view-tabs {
  display: inline-flex;
  padding: 4px;
  border: 1px solid rgba(13, 60, 130, 0.08);
  border-radius: 999px;
  background: rgba(13, 60, 130, 0.06);
  scrollbar-width: none;
}

.view-tabs::-webkit-scrollbar,
.header-actions::-webkit-scrollbar,
.category-list::-webkit-scrollbar {
  display: none;
}

.view-tab {
  min-width: 104px;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  color: var(--muted);
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.view-tab.active {
  color: var(--accent-strong);
  background: #fff;
  box-shadow: 0 4px 14px rgba(23, 58, 128, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.view-tab:hover:not(.active) {
  color: var(--ink);
}

.header-actions,
.button-row,
.file-actions,
.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions {
  scrollbar-width: none;
}

.language-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid rgba(13, 60, 130, 0.08);
  border-radius: 999px;
  background: rgba(13, 60, 130, 0.06);
}

.language-button {
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.language-button.active {
  color: var(--accent-strong);
  background: #fff;
  box-shadow: 0 3px 10px rgba(23, 58, 128, 0.12);
}

/* ---------- 按钮体系 ---------- */

.primary-action,
.secondary-action,
.ghost-action,
.text-action,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  padding: 0 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.primary-action {
  color: #fff;
  border: none;
  background: linear-gradient(135deg, #3b9bff, var(--accent) 55%, var(--accent-strong));
  box-shadow: 0 8px 22px rgba(10, 122, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.primary-action:hover:not(:disabled) {
  box-shadow: 0 12px 30px rgba(10, 122, 255, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  filter: brightness(1.05);
}

.primary-action.wide {
  width: 100%;
}

.secondary-action {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(13, 60, 130, 0.12);
  box-shadow: 0 2px 8px rgba(23, 58, 128, 0.06);
}

.secondary-action:hover:not(:disabled) {
  border-color: rgba(10, 122, 255, 0.4);
  color: var(--accent-strong);
}

.secondary-action:disabled {
  color: #9aa9bb;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: none;
  cursor: not-allowed;
}

.ghost-action {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(13, 60, 130, 0.12);
}

.ghost-action:hover {
  border-color: rgba(10, 122, 255, 0.4);
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.85);
}

.ghost-action.is-admin,
#adminOpen.is-admin {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: rgba(10, 122, 255, 0.35);
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(13, 60, 130, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.theme-toggle:hover {
  transform: rotate(-16deg) scale(1.08);
  background: #fff;
  box-shadow: 0 6px 18px rgba(10, 122, 255, 0.24);
}

.text-action {
  min-height: 34px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(13, 60, 130, 0.06);
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.text-action:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.text-action.strong {
  color: #fff;
  background: linear-gradient(135deg, #3b9bff, var(--accent-strong));
  box-shadow: 0 4px 12px rgba(10, 122, 255, 0.28);
}

.text-action.strong:hover {
  color: #fff;
  filter: brightness(1.06);
}

.text-action.danger {
  color: var(--red);
  background: rgba(217, 45, 32, 0.08);
}

.text-action.danger:hover {
  color: var(--red);
  background: rgba(217, 45, 32, 0.14);
}

.icon-button {
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--muted);
  background: rgba(13, 60, 130, 0.06);
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
}

.icon-button:hover {
  color: var(--ink);
  background: rgba(13, 60, 130, 0.1);
}

/* ---------- 主布局 ---------- */

.portal-main {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  width: min(1460px, calc(100% - 32px));
  margin: 20px auto 48px;
}

.portal-main.no-sidebar {
  grid-template-columns: minmax(0, 1fr);
}

.main-stage {
  min-width: 0;
}

/* ---------- 页脚：浅色玻璃 ---------- */

.site-footer {
  margin-top: 26px;
  color: var(--muted);
  background: var(--glass);
  border-top: 1px solid rgba(255, 255, 255, 0.65);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px 34px;
  width: min(1460px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 28px;
}

.footer-brand strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
}

.footer-brand p,
.footer-note {
  margin: 0;
  line-height: 1.8;
}

.footer-meta {
  display: grid;
  gap: 7px;
  align-content: start;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.footer-meta span {
  min-width: 0;
}

.footer-note {
  grid-column: 1 / -1;
  padding-top: 16px;
  color: #8294a9;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

/* ---------- 分类侧栏 ---------- */

.category-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  background: var(--glass);
  box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  animation: riseIn 360ms ease both;
}

.category-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
}

.category-list {
  display: grid;
  gap: 6px;
}

.category-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  padding: 0 12px;
  color: var(--ink);
  background: transparent;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.category-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-button strong {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 22px;
  border-radius: 999px;
  padding: 0 6px;
  color: var(--muted);
  background: rgba(13, 60, 130, 0.07);
  font-size: 12px;
  font-weight: 700;
}

.category-button:hover {
  background: rgba(255, 255, 255, 0.7);
}

.category-button.active {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: rgba(10, 122, 255, 0.28);
}

.category-button.active strong {
  color: #fff;
  background: var(--accent);
}

.category-button.is-confidential {
  color: #71808f;
  filter: saturate(0.4);
}

.category-button.is-confidential:hover,
.category-button.is-confidential.active {
  color: #4d5a68;
  background: rgba(110, 125, 145, 0.12);
  border-color: rgba(110, 125, 145, 0.25);
  box-shadow: none;
}

.category-button.is-confidential strong,
.category-button.is-confidential.active strong {
  color: #4d5a68;
  background: rgba(110, 125, 145, 0.18);
}

/* ---------- 实时状态条 ---------- */

.live-strip {
  display: grid;
  grid-template-columns: 180px 170px 170px minmax(260px, 1fr);
  gap: 12px;
  width: min(1460px, calc(100% - 32px));
  margin: 18px auto 0;
}

/* 网站运行天数：蓝色弥散高亮，作为演示信任信号 */
.live-item-days {
  background: linear-gradient(150deg, rgba(10, 122, 255, 0.14), rgba(10, 122, 255, 0.04));
  border-color: rgba(10, 122, 255, 0.26);
}

.live-days-badge {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: linear-gradient(140deg, #4fa6ff, var(--accent-strong));
  box-shadow: 0 6px 16px rgba(10, 122, 255, 0.32);
  font-size: 16px;
  line-height: 1;
}

.live-strip .live-item-days strong {
  color: var(--accent-strong);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.live-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 64px;
  padding: 12px 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  background: var(--glass);
  box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  animation: riseIn 420ms ease both;
}

.live-item small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.live-item strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-item strong.is-rotating {
  animation: tickerSwap 360ms ease both;
}

.live-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #30c558;
  box-shadow: 0 0 0 0 rgba(48, 197, 88, 0.55);
  animation: livePulse 1.8s ease-out infinite;
}

/* ---------- 视图面板 / 指标卡 ---------- */

.view-panel {
  display: grid;
  gap: 16px;
  animation: panelIn 240ms ease both;
}

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

.metric-card {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 18px 20px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  background: var(--glass);
  box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  animation: riseIn 360ms ease both;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.metric-card:hover {
  box-shadow: var(--shadow-pop);
  transform: translateY(-2px);
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.metric-card strong {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* ---------- 资料库面板 ---------- */

.library-panel,
.dashboard-shell {
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

.library-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 560px);
  align-items: end;
  gap: 16px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.library-toolbar h2,
.dashboard-head h2,
.modal-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.toolbar-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px);
  align-items: end;
  gap: 10px;
}

.search-box,
.sort-box,
.field {
  display: grid;
  gap: 7px;
}

.search-box span,
.sort-box span,
.field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.search-box input,
.sort-box select,
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(13, 60, 130, 0.14);
  border-radius: var(--radius-control);
  padding: 10px 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field textarea {
  resize: vertical;
}

.search-box input:focus,
.sort-box select:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(10, 122, 255, 0.14);
}

.field small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 22px;
  background: rgba(240, 247, 255, 0.55);
  border-bottom: 1px solid var(--line);
}

.select-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.status.error {
  color: var(--red);
}

.status.success {
  color: #0f7a3d;
}

.file-grid {
  display: grid;
}

.file-grid.photo-gallery {
  display: grid;
  gap: 0;
  padding: 18px;
  background: rgba(240, 247, 255, 0.4);
}

.file-grid.value-gallery {
  display: block;
  padding: 18px;
  background: rgba(240, 247, 255, 0.4);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 22px;
  background: rgba(240, 247, 255, 0.55);
  border-top: 1px solid var(--line);
}

.pagination span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ---------- 文件卡片 ---------- */

.file-card {
  display: grid;
  grid-template-columns: auto 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px 22px;
  border-bottom: 1px solid var(--line);
  animation: fileIn 280ms ease both;
  animation-delay: calc(var(--stagger, 0) * 24ms);
  transition: background 160ms ease, box-shadow 160ms ease;
}

.file-card.profile-file {
  grid-template-columns: 50px minmax(0, 1fr) auto;
}

.file-card:hover {
  background: rgba(10, 122, 255, 0.05);
  box-shadow: inset 3px 0 0 var(--accent);
}

.file-select {
  display: grid;
  place-items: center;
}

.file-badge {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  color: var(--accent-strong);
  background: linear-gradient(150deg, rgba(10, 122, 255, 0.14), rgba(10, 122, 255, 0.07));
  border: 1px solid rgba(10, 122, 255, 0.16);
  font-size: 12px;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease;
}

.file-card:hover .file-badge {
  transform: scale(1.05);
}

.file-card.is-confidential {
  color: #71808f;
  background: rgba(120, 135, 155, 0.06);
  filter: saturate(0.35);
}

.file-card.is-confidential:hover {
  background: rgba(120, 135, 155, 0.1);
  box-shadow: inset 3px 0 0 #93a1b3;
}

.file-card.is-confidential .file-badge {
  color: #4d5a68;
  background: rgba(110, 125, 145, 0.14);
  border-color: rgba(110, 125, 145, 0.2);
  font-size: 12px;
}

.file-card.is-confidential .file-main h3 {
  color: #4d5a68;
}

.confidential-copy {
  color: #71808f !important;
}

.confidential-pill {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid rgba(110, 125, 145, 0.3);
  border-radius: var(--radius-control);
  padding: 0 10px;
  color: #4d5a68;
  background: rgba(110, 125, 145, 0.12);
  font-size: 13px;
  font-weight: 700;
}

.file-main {
  min-width: 0;
}

.file-main h3 {
  margin: 0 0 4px;
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 600;
}

.file-main p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 13px;
}

.file-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  display: none;
  place-items: center;
  gap: 8px;
  min-height: 250px;
  color: var(--muted);
  text-align: center;
}

.empty-state.visible {
  display: grid;
}

.empty-state strong {
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
}

/* ---------- 照片墙 ---------- */

.photo-date-group {
  display: grid;
  gap: 12px;
  padding: 16px 0 22px;
  border-bottom: 1px solid var(--line);
  animation: riseIn 320ms ease both;
  animation-delay: calc(var(--stagger, 0) * 32ms);
}

.photo-date-group:last-child {
  border-bottom: 0;
}

.photo-date-head {
  position: sticky;
  top: 84px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-control);
  background: var(--glass-strong);
  box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

.photo-date-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.photo-date-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}

.photo-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  animation: fileIn 260ms ease both;
  animation-delay: calc(var(--stagger, 0) * 18ms);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-pop);
}

.photo-select {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 14px rgba(23, 58, 128, 0.18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.photo-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
  padding: 0;
  overflow: hidden;
  background: #dde8f5;
  cursor: zoom-in;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.25s ease;
}

.photo-card:hover .photo-thumb img {
  filter: saturate(1.06);
  transform: scale(1.05);
}

.photo-caption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
}

.photo-caption span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 产值看板 ---------- */

.value-dashboard {
  display: grid;
  gap: 16px;
}

.value-hero,
.value-panel,
.value-table-wrap {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.value-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}

.value-hero h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
}

.value-hero span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.value-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.value-kpis article {
  display: grid;
  gap: 8px;
  min-height: 90px;
  padding: 16px 18px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.value-kpis span,
.value-plan-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.value-kpis strong {
  font-size: 27px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.value-visual-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
}

.value-panel {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
}

.value-panel h4 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.value-rate-row {
  display: grid;
  grid-template-columns: minmax(100px, 160px) minmax(0, 1fr) 64px;
  align-items: center;
  gap: 10px;
}

.value-rate-row span {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.value-rate-row strong {
  color: var(--accent-strong);
  font-size: 13px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.value-rate-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(13, 60, 130, 0.1);
}

.value-rate-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #54b0ff, var(--accent));
}

.value-plan-note {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 6px;
}

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

.value-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  font-size: 13px;
}

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

.value-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--accent-strong);
  background: rgba(234, 244, 255, 0.96);
  font-weight: 700;
}

/* ---------- 工作纪要看板 ---------- */

.work-dashboard {
  display: grid;
  gap: 16px;
}

.work-hero,
.work-module-panel,
.work-section {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.work-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}

.work-hero h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
}

.work-hero span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.work-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.work-kpis article {
  display: grid;
  gap: 8px;
  min-height: 90px;
  padding: 16px 18px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.work-kpis span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.work-kpis strong {
  font-size: 27px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.work-module-panel {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
}

.work-module-panel h4,
.work-section-head h4 {
  margin: 0;
  font-weight: 700;
}

.work-module-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work-module-tags span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 0 13px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 13px;
  font-weight: 600;
}

.work-module-tags b {
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: 1px 7px;
}

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

.work-section {
  overflow: hidden;
  animation: riseIn 320ms ease both;
  animation-delay: calc(var(--stagger, 0) * 40ms);
}

.work-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(10, 122, 255, 0.1), rgba(10, 122, 255, 0.02) 72%);
  border-bottom: 1px solid var(--line);
}

.work-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.work-section-head strong {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  border-radius: var(--radius-control);
  color: #fff;
  background: linear-gradient(135deg, #3b9bff, var(--accent-strong));
  box-shadow: 0 6px 16px rgba(10, 122, 255, 0.3);
  font-size: 19px;
}

.work-meter {
  height: 7px;
  background: rgba(13, 60, 130, 0.08);
}

.work-meter i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #54b0ff, var(--accent));
}

.work-items {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: rgba(240, 247, 255, 0.45);
}

.work-item {
  display: grid;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid rgba(13, 60, 130, 0.08);
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, 0.92);
}

.work-item-main {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.work-item-main:not(:has(.work-item-number)) {
  grid-template-columns: minmax(0, 1fr);
}

.work-item-number,
.work-subitem-number {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-weight: 700;
}

.work-item-number {
  width: 28px;
  height: 28px;
  font-size: 14px;
}

.work-item-copy {
  min-width: 0;
}

.work-item strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}

.work-detail-list,
.work-subitems {
  display: grid;
  gap: 7px;
  margin: 9px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  list-style: none;
}

.work-detail-list li {
  position: relative;
  padding-left: 13px;
}

.work-detail-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.82em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.work-subitems {
  margin-left: 38px;
}

.work-subitems li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-height: 28px;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(240, 247, 255, 0.7);
}

.work-subitems li:not(:has(.work-subitem-number)) {
  grid-template-columns: minmax(0, 1fr);
}

.work-subitem-number {
  width: 22px;
  height: 22px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 12px;
}

/* ---------- 看板容器 ---------- */

.dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.dashboard-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.dashboard-frame {
  display: block;
  width: 100%;
  height: min(1120px, calc(100vh - 178px));
  min-height: 720px;
  border: 0;
  background: transparent;
  animation: panelIn 260ms ease both;
}

/* ---------- 个人中心 ---------- */

.profile-panel {
  display: grid;
}

.profile-note {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.profile-overview {
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(240, 247, 255, 0.45);
}

/* ---------- 弹窗 ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(13, 30, 60, 0.32);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
}

.modal-card {
  width: min(720px, 100%);
  max-height: calc(100vh - 36px);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  background: var(--glass-strong);
  box-shadow: 0 32px 90px rgba(10, 30, 70, 0.32);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  animation: lightboxIn 0.26s ease both;
}

.modal-card.compact {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.admin-card small {
  color: var(--muted);
}

.upload-form {
  display: grid;
  gap: 16px;
}

.drop-zone {
  display: grid;
  place-items: center;
  min-height: 170px;
  padding: 22px;
  border: 1.5px dashed rgba(10, 122, 255, 0.4);
  border-radius: var(--radius-card);
  color: var(--muted);
  background: rgba(10, 122, 255, 0.05);
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.drop-zone.is-dragover {
  border-color: var(--accent);
  background: rgba(10, 122, 255, 0.1);
  transform: scale(1.01);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.drop-zone strong {
  margin-top: 8px;
  color: var(--ink);
  font-weight: 600;
}

.drop-zone small {
  max-width: 360px;
  margin-top: 6px;
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #3b9bff, var(--accent-strong));
  box-shadow: 0 8px 20px rgba(10, 122, 255, 0.32);
  font-size: 30px;
  line-height: 1;
}

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

.progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(13, 60, 130, 0.1);
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #54b0ff, var(--accent), #54b0ff);
  background-size: 200% 100%;
  animation: progressFlow 1.1s linear infinite;
  transition: width 150ms ease;
}

.progress span {
  min-width: 46px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

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

/* ---------- 预览 / Lightbox ---------- */

.preview-modal {
  place-items: stretch end;
  padding: 0;
}

.preview-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(920px, 100%);
  height: 100vh;
  border-radius: 0;
  animation: none;
}

.preview-card .modal-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.preview-card h2 {
  max-width: min(760px, 76vw);
  overflow-wrap: anywhere;
}

.preview-card small {
  color: var(--muted);
}

.preview-body {
  min-height: 0;
  overflow: auto;
  background: rgba(240, 247, 255, 0.5);
}

.preview-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.preview-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  object-fit: contain;
}

.preview-text {
  min-height: 100%;
  margin: 0;
  padding: 22px;
  color: var(--ink);
  background: #fff;
  font-family: "SF Mono", Consolas, "Courier New", monospace;
  font-size: 14px;
  white-space: pre-wrap;
}

.preview-loading,
.preview-fallback {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 32px;
  color: var(--muted);
  text-align: center;
  font-weight: 600;
}

.preview-fallback {
  gap: 10px;
}

.modal-actions {
  justify-content: flex-end;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
}

.download-link {
  color: var(--ink);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(20, 40, 80, 0.45);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.lightbox-nav:hover:not(:disabled) {
  background: rgba(10, 122, 255, 0.85);
  transform: scale(1.08);
}

.lightbox-nav:disabled {
  opacity: 0.3;
  cursor: default;
}

.lightbox-prev {
  left: 14px;
}

.lightbox-next {
  right: 14px;
}

.lightbox-counter {
  position: absolute;
  bottom: 76px;
  left: 50%;
  z-index: 5;
  transform: translateX(-50%);
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(20, 40, 80, 0.55);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.06em;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-variant-numeric: tabular-nums;
}

.lightbox-enter {
  animation: lightboxIn 0.28s ease both;
}

/* ---------- 登录分屏卡 ---------- */

.admin-card.login-split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  width: min(680px, 100%);
  padding: 0;
  overflow: hidden;
}

.login-brand {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 10px;
  padding: 34px 28px;
  color: #f0f7ff;
  background:
    radial-gradient(420px 260px at 18% -4%, rgba(110, 200, 255, 0.4), transparent 62%),
    radial-gradient(360px 240px at 90% 110%, rgba(99, 102, 241, 0.35), transparent 60%),
    linear-gradient(155deg, #0a3677, #0a5bd0 62%, #2f8fff);
}

.login-brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-strong);
  font-weight: 800;
  box-shadow: 0 8px 26px rgba(4, 30, 80, 0.4);
}

.login-brand h3 {
  margin: 6px 0 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
}

.login-brand p {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(208, 232, 255, 0.8);
}

.login-brand-line {
  width: 46px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #9bd1ff, transparent);
}

.login-brand small {
  color: rgba(208, 232, 255, 0.66);
  letter-spacing: 0.08em;
}

.login-form-side {
  display: grid;
  gap: 16px;
  padding: 26px;
}

/* ---------- 后台管理 ---------- */

.manage-card {
  display: grid;
  gap: 14px;
  width: min(760px, 100%);
  padding: 22px;
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.manage-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.manage-tab {
  padding: 8px 16px;
  border: 1px solid rgba(13, 60, 130, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
}

.manage-tab.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(10, 122, 255, 0.3);
}

.manage-view {
  display: grid;
  gap: 12px;
}

.create-user-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto auto;
  gap: 8px;
  padding: 12px;
  border: 1.5px dashed rgba(10, 122, 255, 0.3);
  border-radius: var(--radius-control);
  background: rgba(10, 122, 255, 0.04);
}

.create-user-form input,
.create-user-form select {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(13, 60, 130, 0.14);
  border-radius: 10px;
  background: #fff;
}

.manage-rows {
  display: grid;
  gap: 8px;
}

.manage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(13, 60, 130, 0.1);
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, 0.85);
}

.manage-row.is-inactive {
  opacity: 0.55;
  background: rgba(240, 247, 255, 0.6);
}

.manage-row-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.manage-row-main strong {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manage-row-main span {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manage-row-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.manage-empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1.5px dashed rgba(13, 60, 130, 0.18);
  border-radius: var(--radius-control);
}

/* ---------- 骨架屏 ---------- */

.skeleton-card {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}

.skeleton-badge {
  width: 50px;
  height: 50px;
  border-radius: 14px;
}

.skeleton-lines {
  display: grid;
  gap: 10px;
}

.skeleton-lines i {
  height: 13px;
  border-radius: 6px;
}

.skeleton-lines i:last-child {
  width: 55%;
}

.skeleton-badge,
.skeleton-lines i {
  background: linear-gradient(100deg, rgba(120, 155, 205, 0.13) 35%, rgba(120, 155, 205, 0.26) 50%, rgba(120, 155, 205, 0.13) 65%);
  background-size: 240% 100%;
  animation: skeletonShimmer 1.3s ease-in-out infinite;
}

/* ---------- 开发者助手 ---------- */

.guide-bot {
  position: fixed;
  left: clamp(14px, 2vw, 26px);
  bottom: clamp(14px, 2vw, 26px);
  z-index: 42;
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* 看板演示运行时让机器人退避，避免与底部讲解条争视觉 */
.guide-bot.dimmed {
  opacity: 0.16;
  transform: translateY(6px) scale(0.94);
  pointer-events: none;
}

.guide-bubble {
  position: relative;
  overflow: hidden;
  width: min(320px, calc(100vw - 104px));
  padding: 12px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  color: var(--ink);
  background: var(--glass-strong);
  box-shadow: 0 16px 42px rgba(23, 58, 128, 0.2);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
}

.guide-bubble::before {
  position: absolute;
  inset: 0;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  content: "";
  transform: translateX(-130%) skewX(-16deg);
}

.guide-bot.is-open .guide-bubble::before {
  animation: guideShine 3.8s ease-in-out infinite;
}

.guide-bot.is-open .guide-bubble {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.guide-bubble-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.guide-bubble strong {
  color: var(--accent-strong);
  font-size: 13px;
}

.guide-bubble small {
  min-width: 42px;
  border-radius: 999px;
  padding: 2px 7px;
  color: #fff;
  background: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.guide-bubble p {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}

.guide-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: linear-gradient(145deg, #54b0ff, var(--accent-strong));
  box-shadow: 0 16px 38px rgba(10, 122, 255, 0.38);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.guide-button:hover {
  box-shadow: 0 20px 46px rgba(10, 122, 255, 0.46);
  transform: translateY(-2px);
}

.guide-button.is-speaking::after {
  position: absolute;
  inset: -5px;
  border: 2px solid rgba(110, 180, 255, 0.6);
  border-radius: inherit;
  content: "";
  animation: guidePulse 1.2s ease-out;
}

.guide-button.is-switching {
  animation: guideSwitch 520ms ease both;
}

.guide-button::before {
  position: absolute;
  inset: 7px;
  border-radius: inherit;
  background: radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.7), transparent 34%);
  content: "";
  opacity: 0.66;
}

.robot-head {
  position: relative;
  z-index: 1;
  display: block;
  width: 34px;
  height: 28px;
  border-radius: 9px;
  background: #eaf4ff;
  box-shadow: inset 0 -4px 0 rgba(10, 90, 220, 0.12);
}

.robot-head::before {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 2px;
  height: 8px;
  background: #d4e8ff;
  content: "";
  transform: translateX(-50%);
}

.robot-head::after {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #aed4ff;
  content: "";
  transform: translateX(-50%);
}

.robot-head i,
.robot-head b {
  position: absolute;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-strong);
}

.robot-head i {
  left: 8px;
}

.robot-head b {
  right: 8px;
}

/* ---------- 微交互 ---------- */

.primary-action,
.secondary-action,
.ghost-action,
.category-button,
.view-tab,
.text-action {
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, filter 0.18s ease;
}

.primary-action:hover:not(:disabled),
.secondary-action:hover:not(:disabled) {
  transform: translateY(-1px);
}

.primary-action:active,
.secondary-action:active {
  transform: translateY(0) scale(0.98);
}

.file-card,
.photo-card,
.metric-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

/* ---------- 动画 ---------- */

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(48, 197, 88, 0.55);
  }
  72% {
    box-shadow: 0 0 0 12px rgba(48, 197, 88, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(48, 197, 88, 0);
  }
}

@keyframes tickerSwap {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fileIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes progressFlow {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 200% 50%;
  }
}

@keyframes skeletonShimmer {
  from { background-position: 130% 0; }
  to { background-position: -30% 0; }
}

@keyframes lightboxIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes guidePulse {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.28);
  }
}

@keyframes guideSwitch {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  42% {
    transform: translateY(-4px) rotate(-6deg) scale(1.04);
  }
  76% {
    transform: translateY(1px) rotate(4deg) scale(0.99);
  }
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

@keyframes guideShine {
  0%,
  58% {
    transform: translateX(-130%) skewX(-16deg);
  }
  100% {
    transform: translateX(260%) skewX(-16deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- 响应式 ---------- */

@media (max-width: 1100px) {
  .live-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-section-grid {
    grid-template-columns: 1fr;
  }

  .value-visual-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .portal-header {
    position: static;
    grid-template-columns: 1fr;
  }

  .header-actions {
    flex-wrap: wrap;
  }

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

  .value-kpis,
  .work-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-main {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .category-sidebar {
    position: static;
  }

  .photo-date-head {
    top: 0;
  }

  .category-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .category-button {
    min-width: 132px;
  }

  .library-toolbar {
    grid-template-columns: 1fr;
  }

  .toolbar-controls {
    grid-template-columns: 1fr;
  }

  .file-card {
    grid-template-columns: auto 50px minmax(0, 1fr);
  }

  .file-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

@media (max-width: 760px) {
  .create-user-form {
    grid-template-columns: 1fr 1fr;
  }

  .create-user-form button {
    grid-column: 1 / -1;
  }

  .manage-row {
    flex-direction: column;
    align-items: stretch;
  }

  .manage-row-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 620px) {
  .portal-main {
    width: calc(100% - 20px);
    margin-top: 12px;
  }

  .live-strip {
    width: calc(100% - 20px);
    grid-template-columns: 1fr;
  }

  .footer-inner {
    width: calc(100% - 20px);
    padding: 20px 0 22px;
  }

  .portal-header {
    padding: 14px;
  }

  .brand-row {
    align-items: flex-start;
    gap: 10px;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
    font-size: 13px;
  }

  h1 {
    font-size: 20px;
  }

  .view-tabs,
  .header-actions {
    width: 100%;
    overflow-x: auto;
  }

  .view-tab,
  .header-actions > * {
    flex: 1;
    min-width: max-content;
  }

  .file-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .file-badge {
    display: none;
  }

  .selection-bar,
  .pagination,
  .dashboard-head {
    display: grid;
    gap: 10px;
  }

  .library-panel,
  .profile-panel {
    padding: 0;
  }

  .text-action,
  .primary-action,
  .secondary-action {
    min-height: 42px;
  }

  .modal {
    align-items: flex-end;
    padding: 10px;
  }

  .modal-card,
  .manage-card {
    width: 100%;
    max-height: calc(100vh - 20px);
    overflow: auto;
  }

  .admin-card.login-split {
    grid-template-columns: 1fr;
  }

  .login-brand {
    padding: 22px 24px;
  }

  .drop-zone {
    min-height: 132px;
    padding: 16px;
  }

  .dashboard-frame {
    min-height: 720px;
  }

  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
    gap: 8px;
  }

  .work-subitems {
    margin-left: 0;
  }

  .value-kpis,
  .work-kpis {
    grid-template-columns: 1fr;
  }

  .toolbar-controls {
    width: 100%;
  }

  .search-box input,
  .sort-box select {
    width: 100%;
  }

  .guide-bot {
    left: 12px;
    bottom: 12px;
  }

  .guide-button {
    width: 52px;
    height: 52px;
  }

  .guide-bubble {
    width: min(280px, calc(100vw - 84px));
  }
}

/* =====================================================================
   深色模式：深蓝玻璃 + 弥散光
   ===================================================================== */

[data-theme="dark"] {
  --bg: #0a1322;
  --ink: #e9f1fc;
  --muted: #93a7c0;
  --surface: rgba(19, 32, 56, 0.72);
  --surface-soft: rgba(14, 25, 45, 0.8);
  --line: rgba(120, 170, 255, 0.14);
  --accent: #3d9bff;
  --accent-strong: #6cb5ff;
  --accent-soft: rgba(61, 155, 255, 0.14);
  --teal: #3d9bff;
  --teal-strong: #6cb5ff;
  --glass: rgba(19, 32, 56, 0.6);
  --glass-strong: rgba(22, 37, 64, 0.85);
  --glass-border: rgba(120, 170, 255, 0.16);
  --shadow: 0 18px 45px rgba(2, 8, 20, 0.55);
  --shadow-soft: 0 12px 32px rgba(2, 8, 20, 0.45);
  --shadow-pop: 0 22px 60px rgba(2, 8, 20, 0.6);
  --red: #ff7b72;
  color-scheme: dark;
}

[data-theme="dark"] body {
  color: var(--ink);
  background: var(--bg);
}

[data-theme="dark"] body::before {
  background:
    radial-gradient(1000px 600px at 85% -10%, rgba(56, 130, 255, 0.18), transparent 60%),
    radial-gradient(800px 500px at -10% 25%, rgba(80, 180, 255, 0.12), transparent 55%),
    radial-gradient(700px 500px at 70% 100%, rgba(99, 102, 241, 0.12), transparent 55%),
    var(--bg);
}

[data-theme="dark"] .portal-header {
  border-bottom-color: rgba(120, 170, 255, 0.12);
  box-shadow: 0 1px 0 rgba(120, 170, 255, 0.08), 0 12px 36px rgba(2, 8, 20, 0.4);
}

[data-theme="dark"] .view-tabs,
[data-theme="dark"] .language-switch {
  border-color: rgba(120, 170, 255, 0.12);
  background: rgba(8, 16, 32, 0.5);
}

[data-theme="dark"] .view-tab.active,
[data-theme="dark"] .language-button.active {
  color: #8fc5ff;
  background: rgba(61, 155, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(110, 180, 255, 0.35);
}

[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .ghost-action {
  color: var(--ink);
  border-color: rgba(120, 170, 255, 0.2);
  background: rgba(19, 32, 56, 0.55);
}

[data-theme="dark"] .theme-toggle:hover,
[data-theme="dark"] .ghost-action:hover {
  background: rgba(28, 46, 78, 0.85);
  color: #8fc5ff;
}

[data-theme="dark"] .secondary-action,
[data-theme="dark"] .icon-button,
[data-theme="dark"] .manage-tab,
[data-theme="dark"] .create-user-form input,
[data-theme="dark"] .create-user-form select {
  background: rgba(26, 42, 70, 0.75);
  border-color: rgba(120, 170, 255, 0.18);
  color: var(--ink);
}

[data-theme="dark"] .secondary-action:hover:not(:disabled) {
  color: #8fc5ff;
  border-color: rgba(110, 180, 255, 0.4);
}

[data-theme="dark"] .secondary-action:disabled {
  color: #5d6f87;
  background: rgba(19, 32, 56, 0.4);
}

[data-theme="dark"] .text-action {
  background: rgba(120, 170, 255, 0.1);
  color: var(--ink);
}

[data-theme="dark"] .text-action:hover {
  color: #8fc5ff;
}

[data-theme="dark"] .text-action.strong {
  color: #fff;
}

[data-theme="dark"] .text-action.danger {
  background: rgba(255, 123, 114, 0.12);
  color: var(--red);
}

[data-theme="dark"] .category-button {
  color: var(--ink);
}

[data-theme="dark"] .category-button:hover {
  background: rgba(28, 46, 78, 0.7);
}

[data-theme="dark"] .category-button.active {
  color: #8fc5ff;
  background: rgba(61, 155, 255, 0.14);
  border-color: rgba(110, 180, 255, 0.4);
}

[data-theme="dark"] .category-button strong {
  color: var(--muted);
  background: rgba(120, 170, 255, 0.12);
}

[data-theme="dark"] .category-button.active strong {
  color: #04111f;
  background: #6cb5ff;
}

[data-theme="dark"] .selection-bar,
[data-theme="dark"] .pagination,
[data-theme="dark"] .profile-overview,
[data-theme="dark"] .preview-body,
[data-theme="dark"] .file-grid.photo-gallery,
[data-theme="dark"] .file-grid.value-gallery,
[data-theme="dark"] .work-items,
[data-theme="dark"] .create-user-form,
[data-theme="dark"] .manage-empty,
[data-theme="dark"] .dashboard-head,
[data-theme="dark"] .modal-actions {
  background: rgba(10, 19, 36, 0.5);
  border-color: var(--line);
}

[data-theme="dark"] .value-hero,
[data-theme="dark"] .value-panel,
[data-theme="dark"] .value-table-wrap,
[data-theme="dark"] .value-kpis article,
[data-theme="dark"] .work-hero,
[data-theme="dark"] .work-module-panel,
[data-theme="dark"] .work-section,
[data-theme="dark"] .work-kpis article,
[data-theme="dark"] .work-item,
[data-theme="dark"] .photo-card,
[data-theme="dark"] .manage-row {
  background: rgba(22, 37, 64, 0.7);
  border-color: var(--line);
  color: var(--ink);
}

[data-theme="dark"] .work-subitems li {
  background: rgba(10, 19, 36, 0.55);
}

[data-theme="dark"] .work-section-head {
  background: linear-gradient(135deg, rgba(61, 155, 255, 0.14), transparent 72%);
  border-color: var(--line);
}

[data-theme="dark"] .value-table th {
  color: #8fc5ff;
  background: rgba(14, 26, 48, 0.96);
}

[data-theme="dark"] .value-rate-track,
[data-theme="dark"] .work-meter,
[data-theme="dark"] .progress-track {
  background: rgba(120, 170, 255, 0.12);
}

[data-theme="dark"] .file-card:hover {
  background: rgba(61, 155, 255, 0.08);
}

[data-theme="dark"] .file-badge {
  background: rgba(61, 155, 255, 0.14);
  color: #8fc5ff;
  border-color: rgba(110, 180, 255, 0.25);
}

[data-theme="dark"] .file-card.is-confidential,
[data-theme="dark"] .category-button.is-confidential {
  color: #7e8da1;
  background: rgba(10, 18, 32, 0.5);
}

[data-theme="dark"] .file-card.is-confidential .file-main h3 {
  color: #93a2b6;
}

[data-theme="dark"] .confidential-copy {
  color: #7e8da1 !important;
}

[data-theme="dark"] .confidential-pill {
  background: rgba(140, 160, 190, 0.14);
  border-color: rgba(140, 160, 190, 0.25);
  color: var(--muted);
}

[data-theme="dark"] .search-box input,
[data-theme="dark"] .sort-box select,
[data-theme="dark"] .field input,
[data-theme="dark"] .field select,
[data-theme="dark"] .field textarea {
  background: rgba(10, 19, 36, 0.7);
  border-color: rgba(120, 170, 255, 0.18);
  color: var(--ink);
}

[data-theme="dark"] .search-box input:focus,
[data-theme="dark"] .sort-box select:focus,
[data-theme="dark"] .field input:focus,
[data-theme="dark"] .field select:focus,
[data-theme="dark"] .field textarea:focus {
  background: rgba(12, 23, 42, 0.9);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(61, 155, 255, 0.18);
}

[data-theme="dark"] .drop-zone {
  background: rgba(61, 155, 255, 0.06);
  border-color: rgba(110, 180, 255, 0.35);
  color: var(--muted);
}

[data-theme="dark"] .drop-zone.is-dragover {
  background: rgba(61, 155, 255, 0.12);
}

[data-theme="dark"] .drop-zone strong,
[data-theme="dark"] .empty-state strong {
  color: var(--ink);
}

[data-theme="dark"] .photo-select {
  background: rgba(10, 20, 36, 0.8);
}

[data-theme="dark"] .photo-thumb {
  background: #16243d;
}

[data-theme="dark"] .preview-frame,
[data-theme="dark"] .preview-text {
  background: #0f1b30;
  color: var(--ink);
}

[data-theme="dark"] .modal {
  background: rgba(2, 8, 18, 0.6);
}

[data-theme="dark"] .guide-bubble {
  color: var(--ink);
}

[data-theme="dark"] .guide-bubble strong {
  color: #8fc5ff;
}

[data-theme="dark"] .dashboard-frame {
  background: transparent;
}

[data-theme="dark"] .login-form-side {
  background: transparent;
}

[data-theme="dark"] .status.success {
  color: #5fd394;
}

[data-theme="dark"] .status.error {
  color: var(--red);
}

[data-theme="dark"] .work-module-tags span {
  color: #8fc5ff;
}

[data-theme="dark"] .work-subitem-number {
  color: #8fc5ff;
}

[data-theme="dark"] .value-rate-row span {
  color: var(--ink);
}

[data-theme="dark"] .value-rate-row strong {
  color: #8fc5ff;
}

[data-theme="dark"] .skeleton-badge,
[data-theme="dark"] .skeleton-lines i {
  background: linear-gradient(100deg, rgba(110, 170, 255, 0.1) 35%, rgba(110, 170, 255, 0.22) 50%, rgba(110, 170, 255, 0.1) 65%);
  background-size: 240% 100%;
}

/* =====================================================================
   手机端专项适配（≤640px）— 面向领导演示，首屏更快见内容
   作为文件末尾的权威层，覆盖上方各处移动规则
   ===================================================================== */

@media (max-width: 640px) {
  /* —— 头部：从 ~256px 压缩到 ~150px —— */
  .portal-header {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 7px 12px calc(7px + env(safe-area-inset-bottom, 0px));
    padding-top: calc(7px + env(safe-area-inset-top, 0px));
  }

  .brand-row {
    align-items: center;
    gap: 9px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 11px;
  }

  /* 装饰性英文副标题在手机上隐藏，让位给标题 */
  .brand-row .eyebrow {
    display: none;
  }

  h1 {
    font-size: 15px;
    line-height: 1.15;
  }

  /* 视图切换：主导航，铺满整行平分 */
  .view-tabs {
    width: 100%;
    overflow: visible;
  }

  .view-tab {
    flex: 1;
    min-width: 0;
    min-height: 34px;
    padding: 0 6px;
    font-size: 13px;
  }

  /* 操作区：单行居中、紧凑、可横滑兜底 */
  .header-actions {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 0;
  }

  .header-actions > * {
    flex: 0 0 auto;
  }

  /* 批量下载对领导手机演示无意义，隐藏让头部更清爽 */
  #batchDownload {
    display: none;
  }

  .language-button {
    min-height: 28px;
    padding: 0 8px;
    font-size: 12px;
  }

  .language-switch {
    padding: 2px;
  }

  .primary-action,
  .secondary-action,
  .ghost-action {
    min-height: 32px;
    padding: 0 12px;
    font-size: 13px;
  }

  .theme-toggle {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
  }

  /* —— 实时状态条：4 条竖排 297px → 2×2 网格 ~150px —— */
  .live-strip {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
  }

  .live-item {
    min-height: 56px;
    padding: 10px 12px;
    border-radius: 14px;
  }

  .live-item.wide {
    grid-column: auto;
  }

  .live-item small {
    margin-bottom: 2px;
    font-size: 11px;
  }

  .live-item strong {
    font-size: 13px;
  }

  /* —— 主区间距收紧 —— */
  .portal-main {
    gap: 12px;
    margin: 14px auto 32px;
  }

  .view-panel {
    gap: 12px;
  }

  .overview-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .metric-card {
    min-height: 76px;
    padding: 14px;
  }

  .metric-card strong {
    font-size: 24px;
  }

  /* 资料库工具栏：搜索与排序铺满 */
  .library-toolbar {
    padding: 16px;
    gap: 12px;
  }

  .library-toolbar h2,
  .dashboard-head h2 {
    font-size: 19px;
  }

  /* 看板 iframe：手机上给足高度但不过分 */
  .dashboard-frame {
    height: calc(100vh - 60px);
    min-height: 560px;
  }

  /* 引导气泡更窄，避免遮挡 */
  .guide-bubble {
    width: min(248px, calc(100vw - 78px));
    padding: 10px 12px;
  }

  .guide-bubble p {
    font-size: 12px;
  }
}

/* 超窄屏（≤380px）再退一档 */
@media (max-width: 380px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .view-tab {
    font-size: 13px;
    padding: 0 4px;
  }

  h1 {
    font-size: 16px;
  }
}

/* 全局键盘焦点可见（无障碍 WCAG 2.4.7） */
:focus-visible {
  outline: 2px solid var(--accent, #0a7aff);
  outline-offset: 2px;
  border-radius: 4px;
}
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
.openable-card:focus-visible,
.view-tab:focus-visible,
.language-button:focus-visible {
  outline: 2px solid var(--accent, #0a7aff);
  outline-offset: 2px;
}

/* 看板演示：iframe 切全屏接管整个视口（保证演示居中滚动与固定浮层正常），
   并锁住外层页面滚动；退出后恢复自适应高度的单一滚动 */
.dashboard-frame.tour-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 0 !important;
  z-index: 1000;
  border-radius: 0;
  background: var(--bg);
}

body.dashboard-tour-active {
  overflow: hidden;
}

/* 关键修复：.view-panel 的 panelIn 动画(both 填充)会锁住一个 transform 矩阵，
   任何非 none 的 transform 都会让内部 iframe 的 position:fixed 改为相对该祖先，
   导致"全屏"遮罩挤在原位、看板像整块消失。演示期间清掉祖先 transform 并解除
   dashboard-shell 的 overflow 裁剪，使 fixed 真正相对视口铺满。 */
body.dashboard-tour-active .view-panel {
  animation: none !important;
  transform: none !important;
  filter: none !important;
  perspective: none !important;
}

body.dashboard-tour-active .dashboard-shell {
  overflow: visible !important;
  /* backdrop-filter 同样会为 fixed 子元素建立包含块，演示期间必须解除 */
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* ===================================================================
   一键演示 CTA：悬浮主入口，进入综合看板时高亮提示用户点击
   =================================================================== */
.demo-launcher {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.demo-launcher[hidden] {
  display: none;
}

.demo-hint {
  pointer-events: none;
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(13, 38, 76, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 26px rgba(10, 40, 90, 0.32);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.demo-hint::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}

.demo-launcher.hint-on .demo-hint {
  opacity: 1;
  transform: translateY(0);
  animation: demoHintBob 2.4s ease-in-out infinite;
}

@keyframes demoHintBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.demo-cta {
  pointer-events: auto;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 26px;
  border: none;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(120deg, #3b9bff, #0a66d8);
  box-shadow: 0 14px 34px rgba(10, 102, 216, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.demo-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 18px 42px rgba(10, 102, 216, 0.5);
}

.demo-cta:active {
  transform: translateY(0);
}

.demo-cta-play {
  font-size: 13px;
  line-height: 1;
}

/* 呼吸光环，吸引点击 */
.demo-cta-ring {
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid rgba(59, 155, 255, 0.7);
  opacity: 0;
  pointer-events: none;
  animation: demoCtaRing 2.4s ease-out infinite;
}

@keyframes demoCtaRing {
  0% { opacity: 0.7; transform: scale(1); }
  70% { opacity: 0; transform: scale(1.22); }
  100% { opacity: 0; transform: scale(1.22); }
}

/* 演示进行时（iframe 全屏接管）隐藏 CTA，避免重叠 */
body.dashboard-tour-active .demo-launcher {
  display: none !important;
}

@media (max-width: 640px) {
  /* 手机端：进入综合看板，让看板演示成为焦点 —— 收起占篇幅的状态条与讲解机器人 */
  .live-strip {
    display: none;
  }

  #guideBot {
    display: none !important;
  }

  .demo-launcher {
    bottom: 18px;
    width: calc(100% - 32px);
  }

  .demo-cta {
    width: 100%;
    justify-content: center;
    padding: 15px 20px;
    font-size: 17px;
  }

  .demo-hint {
    font-size: 13px;
  }
}

/* ============ 影像清晰化下载入口（替换原「个人中心」Tab） ============ */
.studio-panel {
  display: grid;
  gap: 22px;
}
.studio-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  padding: 6px 4px 2px;
}
.studio-hero-main { flex: 1 1 320px; min-width: 0; }
.studio-panel h2 {
  margin: 6px 0 0;
  font-size: 30px;
  letter-spacing: -0.4px;
  color: var(--ink);
}
.studio-tagline {
  margin: 12px 0 0;
  max-width: 560px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}
.studio-cta { margin: 20px 0 8px; }
.studio-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 360px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
}
.studio-req {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}
.studio-hero-art {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}
.studio-hero-art img {
  width: 168px;
  height: 168px;
  filter: drop-shadow(0 18px 40px rgba(23, 58, 128, 0.18));
}
.studio-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 14px;
}
.studio-feature {
  display: grid;
  gap: 6px;
  padding: 16px 16px 18px;
  border-radius: var(--radius-card);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
}
.studio-feature-ico {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 4px;
  border-radius: 11px;
  font-size: 18px;
  color: var(--teal-strong);
  background: var(--accent-soft);
}
.studio-feature strong { font-size: 15px; color: var(--ink); }
.studio-feature span:last-child { font-size: 13px; line-height: 1.55; color: var(--muted); }
.studio-steps {
  padding: 18px 20px 8px;
  border-radius: var(--radius-card);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.studio-steps h3 { margin: 0 0 12px; font-size: 16px; color: var(--ink); }
.studio-steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.studio-steps li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink); }
.studio-step-n {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--teal-strong));
}
.studio-note {
  margin: 0;
  padding: 12px 16px;
  border-radius: var(--radius-control);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
  background: var(--accent-soft);
  border: 1px solid var(--line);
}
@media (max-width: 640px) {
  .studio-hero { gap: 14px; }
  .studio-hero-art { order: -1; }
  .studio-hero-art img { width: 104px; height: 104px; }
  .studio-panel h2 { font-size: 23px; }
  .studio-download { max-width: none; width: 100%; }
}
