/* 景宁畲族文旅数字化系统 · 水墨宋韵主题
   ──────────────────────────────────────────
   宣纸为底 · 墨色为骨 · 雅红为睛 · 竹青赭金为饰
   留白充分 · 细线分隔 · 无发光阴影
*/
:root {
  /* 主色 */
  --ink-paper:       #F5F0E6;   /* 宣纸底 */
  --ink-paper-soft:  #FAF7ED;   /* 米白 */
  --ink-paper-warm:  #EFE8D8;   /* 暖米 */
  --ink-white:       #FFFFFF;
  --ink-ink:         #2C2C2C;   /* 墨色 */
  --ink-sub:         #5A5A5A;   /* 次墨 */
  --ink-dim:         #9A9A9A;   /* 淡墨 */
  --ink-line:        #D9D2C5;   /* 分隔线 */
  --ink-line-soft:   #EAE3D3;   /* 浅分隔 */

  /* 点缀色（低饱和） */
  --ink-red:         #B8373D;   /* 雅红 · 朱砂 */
  --ink-red-light:   #D4635E;
  --ink-red-soft:    #F4E4E2;   /* 雅红淡彩 */
  --ink-gold:        #C89B3C;   /* 赭金 */
  --ink-gold-soft:   #F5EBD4;
  --ink-green:       #6B8E5A;   /* 竹青 */
  --ink-green-soft:  #E4EADC;
  --ink-blue:        #4A6D8C;   /* 墨青 */
  --ink-blue-soft:   #DCE5EE;
  --ink-ochre:       #8B6B3D;   /* 赭石 */

  /* 兼容旧变量（保持向后不破坏） */
  --she-red: var(--ink-red);
  --she-red-light: var(--ink-red-light);
  --she-red-dark: #8F2D3B;
  --she-black: var(--ink-paper);
  --she-black-soft: var(--ink-white);
  --she-gold: var(--ink-gold);
  --she-gold-light: #D9B768;
  --she-blue: var(--ink-blue);
  --she-green: var(--ink-green);
  --panel-bg: var(--ink-white);
  --panel-border: var(--ink-line);
  --text-primary: var(--ink-ink);
  --text-secondary: var(--ink-sub);
  --text-dim: var(--ink-dim);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: "PingFang SC", "Microsoft YaHei", "Source Han Sans CN", sans-serif;
  background: var(--ink-paper);
  color: var(--ink-ink);
  min-height: 100vh;
  font-feature-settings: "palt";
  letter-spacing: 0.02em;
}

/* 宋体装饰：标题使用 */
.serif, .ink-title {
  font-family: "Songti SC", "STSong", "SimSun", "Source Han Serif SC", serif;
  font-weight: 500;
  letter-spacing: 0.08em;
}

/* 彩带分隔线（水墨淡彩五色·低饱和） */
.she-ribbon {
  height: 2px;
  background: linear-gradient(90deg,
    var(--ink-red) 0%, var(--ink-red) 20%,
    var(--ink-gold) 20%, var(--ink-gold) 40%,
    var(--ink-green) 40%, var(--ink-green) 60%,
    var(--ink-blue) 60%, var(--ink-blue) 80%,
    var(--ink-ochre) 80%, var(--ink-ochre) 100%);
  opacity: 0.75;
  border-radius: 0;
}

/* 驾驶舱背景 · 宣纸 + 远山水印 */
.cockpit-bg {
  background:
    url("../img/mountain.svg") no-repeat bottom center / 100% auto,
    var(--ink-paper);
}

/* 面板 */
.panel {
  background: var(--ink-white);
  border: 1px solid var(--ink-line);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.panel::before { content: none; }

.panel-title {
  padding: 12px 16px 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-ink);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.1em;
  font-family: "Songti SC", "STSong", serif;
  border-bottom: 1px solid var(--ink-line-soft);
  margin-bottom: 2px;
}

.panel-title::before {
  content: "";
  width: 3px; height: 14px;
  background: var(--ink-red);
  border-radius: 0;
}

.panel-body { padding: 0 16px 14px; }

/* KPI 卡片 */
.kpi-card {
  background: var(--ink-white);
  border: 1px solid var(--ink-line);
  border-radius: 2px;
  padding: 14px 16px;
  position: relative;
  transition: border-color .25s;
}

.kpi-card:hover { border-color: var(--ink-gold); }

.kpi-value {
  font-size: 28px;
  font-weight: 600;
  color: var(--ink-ink);
  font-family: "Songti SC", "STSong", serif;
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.kpi-label {
  font-size: 12px;
  color: var(--ink-sub);
  margin-top: 6px;
  letter-spacing: 0.05em;
}

.kpi-trend {
  font-size: 11px;
  color: var(--ink-green);
  margin-top: 2px;
}
.kpi-trend.down { color: var(--ink-red); }

/* 凤凰水印 */
.phoenix-watermark {
  position: absolute;
  right: 20px; top: 20px;
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

/* 业务端侧边栏 */
.ops-sidebar {
  width: 220px;
  background: var(--ink-white);
  border-right: 1px solid var(--ink-line);
  min-height: 100vh;
  padding: 0;
  flex-shrink: 0;
  position: relative;
  transition: width .3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ops-sidebar .sidebar-toggle {
  position: absolute;
  top: 24px; right: -10px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--ink-white);
  border: 1px solid var(--ink-line);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-size: 11px;
  color: var(--ink-sub);
  transition: all .2s;
}
.ops-sidebar .sidebar-toggle:hover {
  border-color: var(--ink-red);
  color: var(--ink-red);
}
.ops-page.sidebar-collapsed .ops-sidebar {
  width: 64px;
}
.ops-page.sidebar-collapsed .ops-sidebar .logo > div:not(.seal) {
  display: none;
}
.ops-page.sidebar-collapsed .ops-sidebar .nav-section-title {
  display: none;
}
.ops-page.sidebar-collapsed .ops-sidebar .nav-item {
  justify-content: center;
  padding: 11px 0;
  font-size: 0;
}
.ops-page.sidebar-collapsed .ops-sidebar .nav-item::before {
  content: attr(data-icon);
  font-size: 14px;
  color: inherit;
  font-family: "Songti SC", serif;
  letter-spacing: 0;
}
.ops-page.sidebar-collapsed .ops-sidebar .nav-item.active::before {
  color: var(--ink-red);
}
.ops-page.sidebar-collapsed .ops-sidebar .logo {
  padding: 22px 0 18px;
  justify-content: center;
}

/* 稠度切换 */
.ops-page.density-compact .card { padding: 14px 16px; }
.ops-page.density-compact .kpi-card { padding: 10px 14px; }
.ops-page.density-compact .kpi-row { gap: 10px; margin-bottom: 14px; }
.ops-page.density-compact .row-2,
.ops-page.density-compact .row-22,
.ops-page.density-compact .row-3,
.ops-page.density-compact .row-31 { gap: 12px; margin-bottom: 14px; }
.ops-page.density-compact .ops-content { padding: 18px 24px; }
.ops-page.density-compact .ops-table th,
.ops-page.density-compact .ops-table td { padding: 8px 10px; font-size: 12px; }

.ops-sidebar .logo {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--ink-line-soft);
  color: var(--ink-ink);
  font-size: 15px;
  font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  font-family: "Songti SC", serif;
  letter-spacing: 0.08em;
}

.nav-section { margin-top: 10px; }
.nav-section-title {
  padding: 12px 22px 6px;
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.2em;
  font-family: "Songti SC", serif;
}
.nav-item {
  padding: 9px 22px;
  color: var(--ink-sub);
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  transition: all .2s;
  border-left: 2px solid transparent;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.05em;
}

.nav-item:hover {
  background: var(--ink-paper-soft);
  color: var(--ink-ink);
}

.nav-item.active {
  background: var(--ink-red-soft);
  color: var(--ink-red);
  border-left-color: var(--ink-red);
  font-weight: 500;
}

.ops-topbar {
  height: 58px;
  background: var(--ink-white);
  border-bottom: 1px solid var(--ink-line);
  display: flex; align-items: center;
  padding: 0 28px;
  justify-content: space-between;
}

/* 按钮 */
.btn {
  padding: 7px 16px;
  border-radius: 2px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .2s;
  display: inline-flex; align-items: center; gap: 6px;
  letter-spacing: 0.05em;
}

.btn-primary {
  background: var(--ink-red);
  color: #fff;
  border-color: var(--ink-red);
}
.btn-primary:hover { background: var(--ink-red-light); border-color: var(--ink-red-light); }

.btn-ghost {
  background: var(--ink-white);
  color: var(--ink-ink);
  border-color: var(--ink-line);
}
.btn-ghost:hover { border-color: var(--ink-ink); color: var(--ink-ink); }

/* 表格 */
table.ops-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ops-table th {
  text-align: left;
  padding: 12px 14px;
  background: var(--ink-paper-soft);
  color: var(--ink-sub);
  font-weight: 500;
  border-bottom: 1px solid var(--ink-line);
  letter-spacing: 0.05em;
  font-size: 12px;
}
.ops-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--ink-line-soft);
  color: var(--ink-ink);
}
.ops-table tr:hover td { background: var(--ink-paper-soft); }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 11px;
  margin-right: 4px;
  letter-spacing: 0.04em;
}
.tag-red { background: var(--ink-red-soft); color: var(--ink-red); border: 1px solid rgba(184, 55, 61, 0.25); }
.tag-gold { background: var(--ink-gold-soft); color: var(--ink-ochre); border: 1px solid rgba(200, 155, 60, 0.3); }
.tag-green { background: var(--ink-green-soft); color: var(--ink-green); border: 1px solid rgba(107, 142, 90, 0.3); }
.tag-blue { background: var(--ink-blue-soft); color: var(--ink-blue); border: 1px solid rgba(74, 109, 140, 0.3); }

/* H5 手机壳 */
.phone-frame {
  width: 375px; height: 812px;
  background: #1A1A1A;
  border-radius: 44px;
  padding: 14px;
  box-shadow: 0 24px 48px rgba(44, 44, 44, 0.15);
  position: relative;
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 32px;
  overflow-y: auto;
  background: var(--ink-paper-soft);
  position: relative;
}
.phone-screen::-webkit-scrollbar { width: 0; }
.phone-notch {
  position: absolute;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 26px;
  background: #000;
  border-radius: 0 0 16px 16px;
  z-index: 100;
}

/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--ink-line); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-dim); }
::-webkit-scrollbar-track { background: transparent; }

/* 数字 */
.digit {
  font-family: "Songti SC", "STSong", serif;
  font-weight: 600;
  color: var(--ink-ink);
}

/* 去掉角标装饰（过于花哨） */
.corner-tl, .corner-tr, .corner-bl, .corner-br { display: none; }

/* 状态灯 */
.status-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.status-dot.online { background: var(--ink-green); }
.status-dot.warn { background: var(--ink-gold); }
.status-dot.danger { background: var(--ink-red); }

/* 进度条 */
.progress-bar {
  height: 4px;
  background: var(--ink-paper-warm);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--ink-red);
  border-radius: 2px;
  transition: width .6s;
}

/* 栅格 */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

/* 工具类 */
.text-right { text-align: right; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* ============ ops 公共布局 ============ */
.ops-page {
  display: flex;
  background: var(--ink-paper);
  min-height: 100vh;
}
.ops-page .ops-main { flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.ops-page .ops-content { padding: 26px 32px; flex: 1; }

.ops-page .page-title {
  font-family: "Songti SC", serif;
  font-size: 22px; color: var(--ink-ink);
  margin-bottom: 4px; letter-spacing: 0.1em;
  display: flex; align-items: center;
  font-weight: 500;
}
.ops-page .page-title::before {
  content: ""; width: 3px; height: 18px;
  background: var(--ink-red); margin-right: 10px;
}
.ops-page .page-breadcrumb {
  font-size: 12px; color: var(--ink-dim);
  margin-bottom: 22px; padding-left: 13px;
  letter-spacing: 0.05em;
}
.ops-page .page-header {
  display: flex; justify-content: space-between;
  align-items: flex-end; margin-bottom: 22px;
}
.ops-page .page-actions { display: flex; gap: 10px; }

/* 卡片 */
.ops-page .card {
  background: var(--ink-white);
  border: 1px solid var(--ink-line);
  border-radius: 2px;
  padding: 20px 22px;
  margin-bottom: 0;
}
.ops-page .card h3 {
  color: var(--ink-ink); font-size: 15px;
  margin-bottom: 16px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: "Songti SC", serif;
  font-weight: 500; letter-spacing: 0.08em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink-line-soft);
}
.ops-page .card h3 .more {
  color: var(--ink-dim); font-size: 12px;
  cursor: pointer; font-weight: normal;
  letter-spacing: 0.05em;
}

/* KPI 行 */
.ops-page .kpi-row {
  display: grid; gap: 14px; margin-bottom: 22px;
}
.ops-page .kpi-row.cols-4 { grid-template-columns: repeat(4, 1fr); }
.ops-page .kpi-row.cols-5 { grid-template-columns: repeat(5, 1fr); }
.ops-page .kpi-row.cols-6 { grid-template-columns: repeat(6, 1fr); }

/* 行/列 */
.row-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 22px; }
.row-22 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 22px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 22px; }
.row-13 { display: grid; grid-template-columns: 1fr 3fr; gap: 16px; margin-bottom: 22px; }
.row-31 { display: grid; grid-template-columns: 3fr 1fr; gap: 16px; margin-bottom: 22px; }

/* Topbar 通用 */
.ops-page .ops-topbar .crumb {
  color: var(--ink-sub);
  font-size: 13px;
  font-family: "Songti SC", serif;
  letter-spacing: 0.08em;
}

/* avatar */
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink-red);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 500;
  font-family: "Songti SC", serif;
}

/* 趋势 */
.trend-up { color: var(--ink-green); font-size: 11px; }
.trend-down { color: var(--ink-red); font-size: 11px; }

/* 表格通用样式 已在前面定义 */

/* 顶部 ticker 滚动 */
.ticker {
  display: flex;
  gap: 32px;
  white-space: nowrap;
  animation: ticker-scroll 60s linear infinite;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker:hover { animation-play-state: paused; }

/* 数字滚动元素 */
.count-up {
  font-family: "Songti SC", serif;
  font-weight: 600;
}

/* Tab */
.tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--ink-line);
  margin-bottom: 18px;
}
.tab {
  padding: 11px 22px;
  font-size: 13px;
  color: var(--ink-sub);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-family: "Songti SC", serif;
  letter-spacing: 0.05em;
  margin-bottom: -1px;
}
.tab:hover { color: var(--ink-ink); }
.tab.active { color: var(--ink-red); border-bottom-color: var(--ink-red); font-weight: 500; }

/* 切片标签筛选 */
.chip {
  padding: 4px 12px;
  background: var(--ink-white);
  border: 1px solid var(--ink-line);
  color: var(--ink-sub);
  border-radius: 2px;
  font-size: 12px;
  cursor: pointer;
  font-family: "Songti SC", serif;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chip:hover { border-color: var(--ink-ink); color: var(--ink-ink); }
.chip.active { background: var(--ink-red); color: #fff; border-color: var(--ink-red); }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* 详情抽屉 */
.drawer-mask {
  position: fixed; inset: 0;
  background: rgba(44, 44, 44, 0.45);
  z-index: 999;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.drawer-mask.active { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; right: 0; top: 0; bottom: 0;
  width: 520px;
  background: var(--ink-paper-soft);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow-y: auto;
  border-left: 1px solid var(--ink-line);
  box-shadow: -8px 0 30px rgba(44, 44, 44, 0.08);
}
.drawer.active { transform: translateX(0); }
.drawer-header {
  padding: 24px 28px 18px;
  background: var(--ink-white);
  border-bottom: 1px solid var(--ink-line);
  display: flex; justify-content: space-between; align-items: flex-start;
  position: sticky; top: 0; z-index: 5;
}
.drawer-title {
  font-family: "Songti SC", serif;
  font-size: 20px;
  color: var(--ink-ink);
  letter-spacing: 0.08em;
  font-weight: 500;
}
.drawer-sub { font-size: 12px; color: var(--ink-dim); margin-top: 4px; letter-spacing: 0.05em; }
.drawer-close {
  width: 28px; height: 28px;
  border: 1px solid var(--ink-line);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-sub);
}
.drawer-close:hover { border-color: var(--ink-red); color: var(--ink-red); }
.drawer-body { padding: 22px 28px; }

/* 信息行 */
.info-row { display: flex; padding: 10px 0; border-bottom: 1px dashed var(--ink-line-soft); font-size: 13px; }
.info-row:last-child { border-bottom: none; }
.info-row .label { width: 90px; color: var(--ink-dim); flex-shrink: 0; font-family: "Songti SC", serif; }
.info-row .value { flex: 1; color: var(--ink-ink); }

/* 骨架屏 */
.skeleton {
  background: linear-gradient(90deg, var(--ink-paper-warm) 0%, var(--ink-paper-soft) 50%, var(--ink-paper-warm) 100%);
  background-size: 200% 100%;
  animation: skeleton 1.4s ease-in-out infinite;
  border-radius: 2px;
}
@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 入场动画 */
.fade-in { animation: fadeIn .5s ease-out; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-up { animation: slideUp .4s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ Topbar 增强组件 ============ */
.topbar-search {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  width: 200px;
  background: var(--ink-paper-soft);
  border: 1px solid var(--ink-line);
  border-radius: 2px;
  cursor: pointer;
  transition: all .2s;
}
.topbar-search:hover {
  border-color: var(--ink-red);
  background: var(--ink-white);
}
.topbar-search kbd { margin-left: auto; }

.topbar-density {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ink-paper-soft);
  border: 1px solid var(--ink-line);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--ink-sub);
  transition: all .2s;
}
.topbar-density:hover {
  border-color: var(--ink-red);
  color: var(--ink-red);
}

.topbar-bell {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ink-paper-soft);
  border: 1px solid var(--ink-line);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all .2s;
}
.topbar-bell:hover {
  border-color: var(--ink-red);
  transform: scale(1.05);
}
.bell-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--ink-red);
  color: #fff;
  font-size: 10px;
  font-family: DIN, Arial;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  border: 2px solid var(--ink-white);
  min-width: 16px;
  height: 16px;
  display: flex; align-items: center; justify-content: center;
}

/* 命令面板项 */
.__cmdk-item.active { background: var(--ink-red-soft) !important; }
.__cmdk-item:hover { background: var(--ink-paper-soft); }
.__cmdk-item kbd, kbd {
  font-family: DIN, Arial;
  font-size: 11px;
}

/* 焦点状态 */
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--ink-red) !important;
  box-shadow: 0 0 0 3px rgba(184, 55, 61, 0.1);
}

/* 弹层滚动条 */
.drawer::-webkit-scrollbar,
#__cmdkList::-webkit-scrollbar { width: 4px; }
.drawer::-webkit-scrollbar-thumb,
#__cmdkList::-webkit-scrollbar-thumb { background: var(--ink-line); border-radius: 2px; }

/* 表格悬浮指示 */
.ops-table tbody tr { transition: background .12s; }

/* 表格头吸顶 */
.card .ops-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
}

/* 选中态 */
::selection {
  background: var(--ink-red);
  color: #fff;
}

/* 动画延迟（用于卡片波浪入场） */
.stagger > * { animation: slideUp .45s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.stagger > *:nth-child(1) { animation-delay: .04s; }
.stagger > *:nth-child(2) { animation-delay: .08s; }
.stagger > *:nth-child(3) { animation-delay: .12s; }
.stagger > *:nth-child(4) { animation-delay: .16s; }
.stagger > *:nth-child(5) { animation-delay: .20s; }
.stagger > *:nth-child(6) { animation-delay: .24s; }
.stagger > *:nth-child(7) { animation-delay: .28s; }
.stagger > *:nth-child(8) { animation-delay: .32s; }

/* 空状态 */
.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--ink-dim);
}
.empty-state .empty-icon {
  font-size: 48px;
  opacity: 0.4;
  margin-bottom: 12px;
}
.empty-state .empty-title {
  font-family: "Songti SC", serif;
  color: var(--ink-sub);
  font-size: 14px;
  margin-bottom: 4px;
}
.empty-state .empty-desc {
  font-size: 12px;
  color: var(--ink-dim);
}

/* 实时数据点 (driving cockpit) */
.live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-red);
  margin-right: 4px;
  animation: live-blink 1.4s infinite;
  vertical-align: middle;
}
@keyframes live-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* 平滑滚动 */
html { scroll-behavior: smooth; }

/* 移动端 */
@media (max-width: 1024px) {
  .topbar-search { display: none; }
  .ops-page .ops-content { padding: 18px 20px; }
  .ops-page .kpi-row.cols-6 { grid-template-columns: repeat(3, 1fr); }
  .ops-page .kpi-row.cols-5 { grid-template-columns: repeat(3, 1fr); }
  .row-3 { grid-template-columns: 1fr; }
  .row-2, .row-22 { grid-template-columns: 1fr; }
}

/* 进度条容器（如已存在） */
#__progressBar { transition: opacity .2s; }
#__progressBar > div { box-shadow: 0 0 8px var(--ink-red); }

/* ============ 阴影深度系统 ============ */
:root {
  --shadow-1: 0 1px 2px rgba(44, 44, 44, 0.04);
  --shadow-2: 0 2px 6px rgba(44, 44, 44, 0.05), 0 1px 2px rgba(44, 44, 44, 0.04);
  --shadow-3: 0 6px 16px rgba(44, 44, 44, 0.08), 0 2px 4px rgba(44, 44, 44, 0.04);
  --shadow-4: 0 12px 28px rgba(44, 44, 44, 0.12), 0 4px 8px rgba(44, 44, 44, 0.06);
  --shadow-red: 0 6px 16px rgba(184, 55, 61, 0.12), 0 2px 4px rgba(184, 55, 61, 0.06);
}

/* 卡片悬浮：所有 card / kpi / 各种 card 类悬浮自动获得深度 */
.kpi-card,
.ops-page .card,
.portal-card,
.module-card,
.inh-card,
.vil-card,
.village-card,
.persona-card,
.channel-card,
.asset-card,
.rfm-card,
.level-card,
.fac-card,
.benefit-card,
.product-card,
.pj-card {
  transition: transform .35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow .35s, border-color .25s;
}

/* 表格行 hover */
.ops-table tbody tr {
  transition: background .15s, transform .15s;
}
.ops-table tbody tr:hover {
  background: var(--ink-paper-soft) !important;
  position: relative;
}

/* ============ 主题入场动画 ============ */
.ops-page .ops-content > * {
  animation: pageReveal .55s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
.ops-page .ops-content > *:nth-child(1) { animation-delay: 0.04s; }
.ops-page .ops-content > *:nth-child(2) { animation-delay: 0.10s; }
.ops-page .ops-content > *:nth-child(3) { animation-delay: 0.16s; }
.ops-page .ops-content > *:nth-child(4) { animation-delay: 0.22s; }
.ops-page .ops-content > *:nth-child(5) { animation-delay: 0.28s; }
.ops-page .ops-content > *:nth-child(6) { animation-delay: 0.34s; }
@keyframes pageReveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ 印章背景纹路（极淡） ============ */
.ops-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(184, 55, 61, 0.025), transparent 30%),
    radial-gradient(circle at 88% 80%, rgba(200, 155, 60, 0.025), transparent 30%);
}
.ops-page > * { position: relative; z-index: 1; }

/* ============ KPI 数字变化高亮 ============ */
@keyframes pulse-up {
  0% { background: transparent; }
  20% { background: rgba(107, 142, 90, 0.12); }
  100% { background: transparent; }
}
@keyframes pulse-down {
  0% { background: transparent; }
  20% { background: rgba(184, 55, 61, 0.12); }
  100% { background: transparent; }
}
.pulse-up { animation: pulse-up 1.4s ease-out; }
.pulse-down { animation: pulse-down 1.4s ease-out; }

/* ============ 浮动按钮 (FAB) ============ */
.fab {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--ink-red);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(184, 55, 61, 0.35);
  z-index: 500;
  font-size: 22px;
  transition: all .3s cubic-bezier(0.2, 0.8, 0.2, 1);
  user-select: none;
}
.fab:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 28px rgba(184, 55, 61, 0.45);
}
.fab .fab-menu {
  position: absolute;
  bottom: 60px; right: 0;
  display: flex; flex-direction: column; gap: 10px;
  opacity: 0; pointer-events: none;
  transition: all .3s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform: translateY(8px);
}
.fab.expanded .fab-menu {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.fab .fab-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--ink-white);
  border: 1px solid var(--ink-line);
  color: var(--ink-ink);
  padding: 8px 16px;
  border-radius: 24px;
  font-family: "Songti SC", serif;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: var(--shadow-3);
  transition: all .2s;
}
.fab .fab-item:hover {
  border-color: var(--ink-red);
  color: var(--ink-red);
  transform: translateX(-4px);
}
.fab > span { transition: transform .3s cubic-bezier(0.2, 0.8, 0.2, 1); display: inline-flex; align-items: center; justify-content: center; }
.fab.expanded > span { transform: rotate(45deg); }

/* ============ 数据条 sparkline 容器 ============ */
.sparkline {
  display: inline-block;
  vertical-align: middle;
  width: 60px;
  height: 16px;
}

/* ============ 实时事件流 ============ */
.event-stream {
  padding: 0;
}
.event-stream-row {
  padding: 8px 14px;
  display: grid;
  grid-template-columns: 50px 16px 1fr;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--ink-line-soft);
  font-size: 12px;
  animation: eventFlash .8s ease-out;
}
.event-stream-row:last-child { border-bottom: none; }
@keyframes eventFlash {
  from { background: var(--ink-gold-soft); }
  to { background: transparent; }
}
.event-stream-row .es-time {
  color: var(--ink-dim);
  font-family: DIN, Arial;
  font-size: 11px;
}
.event-stream-row .es-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink-blue);
}
.event-stream-row.warn .es-dot { background: var(--ink-gold); }
.event-stream-row.danger .es-dot { background: var(--ink-red); animation: live-blink 1.4s infinite; }
.event-stream-row.success .es-dot { background: var(--ink-green); }
.event-stream-row .es-text {
  color: var(--ink-ink);
  font-family: "Songti SC", serif;
  letter-spacing: 0.02em;
}
.event-stream-row .es-text strong {
  color: var(--ink-red);
}

/* ============ 雷达扫描效果 ============ */
.radar-sweep {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}
.radar-sweep::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 200%; height: 200%;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 280deg, rgba(184, 55, 61, 0.15) 340deg, rgba(184, 55, 61, 0.25) 360deg);
  transform-origin: center;
  animation: radar-rotate 8s linear infinite;
}
@keyframes radar-rotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============ 卡片悬浮指针 ============ */
.kpi-card { cursor: pointer; }
.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--ink-red);
  box-shadow: var(--shadow-red);
}

/* ============ Toast 增强 ============ */
#__toastHost > div { box-shadow: var(--shadow-3); }

/* ============ Modal/Drawer 阴影增强 ============ */
.drawer { box-shadow: var(--shadow-4); }

/* ============ 印章红圆 ============ */
.seal-red {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 2px solid var(--ink-red);
  color: var(--ink-red);
  font-family: "Songti SC", serif;
  font-size: 13px;
  font-weight: 600;
  border-radius: 50%;
  background: rgba(184, 55, 61, 0.04);
  letter-spacing: -0.04em;
}

/* 印章 */
.seal {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 2px solid var(--ink-red);
  color: var(--ink-red);
  font-family: "Songti SC", serif;
  font-size: 14px;
  font-weight: 600;
  border-radius: 2px;
  background: var(--ink-paper-soft);
  letter-spacing: -0.04em;
}

/* glow-text 不再发光，保持沉稳 */
.glow-text { color: var(--ink-ink); text-shadow: none; }
