/* ============ 基础 ============ */
:root {
  --blue: #0e6bb8;
  --blue-dark: #0b4f8a;
  --blue-deep: #083b69;
  --teal: #2a9d8f;
  --orange: #e76f51;
  --yellow: #e9c46a;
  --bg: #eef3f8;
  --card: #ffffff;
  --text: #23384d;
  --muted: #7a8ba0;
  --line: #e2e9f1;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(15, 50, 90, 0.07);
}

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

html,
body {
  height: 100%;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
}

.mono {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.small {
  font-size: 11px;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.app {
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ============ 侧边栏 ============ */
.sidebar {
  position: relative;
  z-index: 20;
  width: 228px;
  flex: 0 0 228px;
  background: linear-gradient(180deg, var(--blue-deep) 0%, var(--blue-dark) 60%, #0a4c84 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 14px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2fc3b0, #0e6bb8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
}

.brand-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
}

.nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(47, 195, 176, 0.28), rgba(47, 195, 176, 0.1));
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #2fc3b0;
}

.nav-ico {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

.sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-foot .btn {
  color: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.18);
  font-size: 12px;
}

.sidebar-foot .btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* ============ 主区域 ============ */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  position: relative;
  z-index: 20;
  height: 60px;
  flex: 0 0 60px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  box-shadow: 0 1px 6px rgba(15, 50, 90, 0.04);
}

.page-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--blue-dark);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 设置入口仅管理员可见 */
body[data-role="user"] [data-action="open-settings"],
body[data-role="worker"] [data-action="open-settings"] {
  display: none !important;
}

.role-label {
  color: var(--muted);
  font-size: 13px;
}

.hotline {
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: #eef7fd;
  border: 1px solid #cfe4f4;
  border-radius: 20px;
  padding: 5px 12px;
  white-space: nowrap;
}

.hotline:hover {
  background: #e0f0fa;
}

.demo-badge {
  background: linear-gradient(135deg, #2fc3b0, #2a9d8f);
  color: #fff;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 20px;
  font-weight: 600;
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px;
}

/* ============ 控件 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  background: #f2f6fa;
  color: var(--text);
  transition: all 0.15s;
  white-space: nowrap;
}

.btn:hover {
  filter: brightness(0.96);
}

.btn-primary {
  background: linear-gradient(135deg, #1683d4, var(--blue));
  color: #fff;
  box-shadow: 0 3px 10px rgba(14, 107, 184, 0.25);
}

.btn-success {
  background: linear-gradient(135deg, #35b8a5, var(--teal));
  color: #fff;
}

.btn-outline {
  background: #fff;
  border-color: #c9d7e4;
  color: var(--blue-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--blue-dark);
  border-color: transparent;
}

.btn-light {
  background: rgba(255, 255, 255, 0.92);
  color: var(--blue-dark);
  font-weight: 600;
  padding: 10px 18px;
  font-size: 14px;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 7px;
}

.btn-lg {
  padding: 11px 22px;
  font-size: 15px;
  width: 100%;
  margin-top: 6px;
}

.btn-block {
  width: 100%;
  margin-top: 12px;
}

.btn .danger,
.btn.danger {
  color: #c0523c;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid #cdd9e5;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border 0.15s, box-shadow 0.15s;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(14, 107, 184, 0.12);
}

.input[readonly] {
  background: #f2f5f8;
  color: #6b7c8e;
}

.select {
  width: auto;
}

.textarea {
  resize: vertical;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  border: 1px solid rgba(226, 233, 241, 0.7);
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 14px;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 36px 0;
  font-size: 13px;
}

.spacer {
  flex: 1;
}

.hint {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  margin: 3px 0 5px;
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.st-正常 {
  background: rgba(42, 157, 143, 0.14);
  color: #1f7a6f;
}

.st-报警 {
  background: rgba(231, 111, 81, 0.14);
  color: #c2492d;
}

.st-待维修 {
  background: rgba(233, 196, 106, 0.22);
  color: #a67c14;
}

.st-维修中 {
  background: rgba(69, 123, 157, 0.15);
  color: #2f6285;
}

.st-待派单 {
  background: rgba(233, 196, 106, 0.22);
  color: #a67c14;
}

.st-已派单,
.st-进行中 {
  background: rgba(69, 123, 157, 0.15);
  color: #2f6285;
}

.st-已完成 {
  background: rgba(42, 157, 143, 0.14);
  color: #1f7a6f;
}

/* ============ 管理大屏 ============ */
.dash-banner {
  background: linear-gradient(120deg, #0b4f8a 0%, #0e6bb8 55%, #1495c8 100%);
  border-radius: 14px;
  color: #fff;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(11, 79, 138, 0.28);
}

.dash-banner-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
}

.dash-banner-sub {
  margin-top: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(226, 233, 241, 0.7);
}

.kpi.warn {
  border-color: rgba(231, 111, 81, 0.5);
  background: #fffaf8;
}

.kpi-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e8f4fc, #d5ebf9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.kpi-label {
  font-size: 12px;
  color: var(--muted);
}

.kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--blue-dark);
  line-height: 1.25;
}

.kpi-unit {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 3px;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1.1fr;
  gap: 14px;
}

.chart {
  display: block;
}

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.donut-legend {
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.donut-legend div {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #44586d;
}

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

.donut-legend b {
  margin-left: auto;
  color: var(--text);
}

.status-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 6px;
}

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

.sb-label {
  width: 62px;
  font-size: 13px;
  color: #44586d;
}

.sb-label b {
  margin-left: 5px;
  color: var(--text);
}

.sb-track {
  flex: 1;
  height: 10px;
  background: #edf2f7;
  border-radius: 6px;
  overflow: hidden;
}

.sb-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s;
}

.sb-pct {
  width: 40px;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 300px;
  overflow-y: auto;
}

.tl-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.tl-ico {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #edf2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex: 0 0 28px;
}

.tl-text {
  font-size: 13px;
  line-height: 1.4;
}

.tl-time {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* ============ 地图找井 ============ */
.map-view {
  position: relative;
  isolation: isolate;
  display: flex;
  gap: 14px;
  height: calc(100vh - 120px);
  min-height: 480px;
}

.map-panel {
  width: 340px;
  flex: 0 0 340px;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.map-controls {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.map-tools {
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-suggest {
  background: #fff;
  border: 1px solid #d3dfe9;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 50, 90, 0.12);
  overflow: hidden;
  z-index: 30;
}

.sug-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: #fff;
  padding: 9px 12px;
  border-bottom: 1px solid #eef2f6;
  cursor: pointer;
}

.sug-item:last-child {
  border-bottom: none;
}

.sug-item:hover {
  background: #f0f6fb;
}

.sug-item b {
  display: block;
  font-size: 13px;
  color: var(--blue-dark);
}

.sug-item span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.sug-empty {
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted);
}

.wi-dist {
  color: var(--blue);
}

.me-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1683d4;
  border: 3px solid #fff;
  box-shadow: 0 0 0 4px rgba(22, 131, 212, 0.22), 0 2px 8px rgba(0, 0, 0, 0.25);
  animation: me-pulse 1.8s infinite;
}

@keyframes me-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 131, 212, 0.35), 0 2px 8px rgba(0, 0, 0, 0.25);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(22, 131, 212, 0), 0 2px 8px rgba(0, 0, 0, 0.25);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(22, 131, 212, 0), 0 2px 8px rgba(0, 0, 0, 0.25);
  }
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid #d3dfe9;
  background: #fff;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  color: #4a6076;
}

.chip.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 600;
}

.well-list {
  flex: 1;
  overflow-y: auto;
}

.well-list-head {
  display: none;
}

.well-item {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f6;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.12s;
}

.wi-photo img {
  width: 46px;
  height: 38px;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid var(--line);
  flex: 0 0 46px;
}

.well-item:hover {
  background: #f4f9fd;
}

.wi-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 10px;
}

.wi-main {
  flex: 1;
  min-width: 0;
}

.wi-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wi-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.wi-addr {
  font-size: 11px;
  color: var(--muted);
  max-width: 90px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-canvas {
  flex: 1;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #dfe9f2;
}

.baidu-loading {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.baidu-loading i {
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(14, 107, 184, 0.2);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.baidu-info {
  font-size: 13px;
  line-height: 1.6;
}

.baidu-info .bi-name {
  font-weight: 700;
  color: #22384e;
  margin-bottom: 4px;
}

.baidu-info .bi-row {
  color: #4a6076;
}

.baidu-info .btn {
  margin-top: 8px;
}

/* 地图标记 */
.well-marker {
  width: 34px;
  height: 34px;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  background: var(--c, #2a9d8f);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
  border: 2.5px solid #fff;
}

.well-marker span {
  transform: rotate(45deg);
  font-size: 15px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.well-marker.selected {
  width: 42px;
  height: 42px;
  border-width: 3px;
  box-shadow: 0 0 0 5px rgba(14, 107, 184, 0.22), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.well-marker.pulse {
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(231, 111, 81, 0.55), 0 3px 8px rgba(0, 0, 0, 0.28);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(231, 111, 81, 0), 0 3px 8px rgba(0, 0, 0, 0.28);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(231, 111, 81, 0), 0 3px 8px rgba(0, 0, 0, 0.28);
  }
}

.nav-start {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 11px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.nav-moving {
  width: 28px;
  height: 28px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  border: 2px solid var(--blue);
}

.nav-layer {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 1200;
}

.nav-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  padding: 16px 20px;
  width: 380px;
  text-align: center;
}

.nav-title {
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--blue-dark);
}

.nav-route {
  font-size: 12px;
  color: #1f7a6f;
  background: #f0faf8;
  border: 1px solid #bfe3dc;
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 10px;
}

.nav-progress {
  height: 8px;
  background: #edf2f7;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 8px;
}

.nav-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #2fc3b0, var(--blue));
  border-radius: 5px;
  transition: width 0.1s;
}

.nav-info {
  font-size: 13px;
  color: #44586d;
  margin-bottom: 8px;
}

.nav-next {
  font-size: 12px;
  color: var(--blue-dark);
  font-weight: 600;
  background: #eef4fa;
  border-radius: 20px;
  padding: 4px 12px;
  display: inline-block;
  margin-bottom: 8px;
}

.well-popup {
  min-width: 240px;
  font-size: 12px;
}

.wp-photo img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: zoom-in;
  border: 1px solid var(--line);
}

.wp-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--blue-dark);
}

.wp-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  color: #44586d;
}

.wp-row span {
  color: var(--muted);
}

.well-popup .btn {
  margin-top: 8px;
  width: 100%;
}

/* ============ 碰一碰上报 ============ */
.report {
  max-width: 960px;
  margin: 0 auto;
}

.report-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.rs {
  background: var(--card);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.rs-n {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2fc3b0, var(--blue));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex: 0 0 30px;
}

.rs-t {
  font-size: 13px;
  font-weight: 600;
}

.rs-d {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.report-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hotline-banner {
  background: linear-gradient(120deg, #fdf3e3, #fff8ec);
  border: 1px solid #f0dfae;
  color: #7a5b0e;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
  line-height: 1.6;
}

.hotline-banner a {
  color: #c2492d;
  font-weight: 700;
  text-decoration: none;
}

.report-well-pick {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.report-nearby {
  margin-top: 10px;
  background: #f0f7fc;
  border: 1px solid #d6e8f5;
  border-radius: 10px;
  padding: 10px 12px;
}

.nearby-title {
  font-size: 12px;
  color: #2f6285;
  font-weight: 600;
  margin-bottom: 8px;
}

.nearby-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nearby-btns .btn.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  font-weight: 600;
}

.rwell {
  display: flex;
  gap: 14px;
  margin-top: 14px;
  padding: 12px;
  background: #f5f9fc;
  border-radius: 10px;
  border: 1px solid #dce7f0;
}

.rwell-photo img {
  width: 150px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
}

.rwell-info {
  flex: 1;
}

.rwell-name {
  font-weight: 700;
  margin-bottom: 8px;
}

.rwell-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  padding: 2px 0;
  color: #44586d;
}

.rwell-row span:first-child {
  color: var(--muted);
}

.demo-well-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.demo-well-btn {
  flex: 1 1 calc(50% - 8px);
  justify-content: flex-start;
}

.af-nfc-ok {
  background: #f0faf8;
  border: 1px solid #bfe3dc;
  color: #1f6f64;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
}

.nfc-wrap {
  text-align: center;
  padding: 8px 0 2px;
}

.nfc-ring {
  width: 128px;
  height: 128px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 3px dashed #9db9d2;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s;
  background: #f2f8fd;
}

.nfc-ico {
  font-size: 44px;
}

.nfc-ring.tapping {
  border-color: var(--blue);
  border-style: solid;
  animation: nfc-pulse 0.9s infinite;
}

.nfc-ring.ok {
  border-color: var(--teal);
  border-style: solid;
  background: #f0faf8;
  box-shadow: 0 0 0 8px rgba(42, 157, 143, 0.12);
}

@keyframes nfc-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(14, 107, 184, 0.35);
  }
  100% {
    box-shadow: 0 0 0 22px rgba(14, 107, 184, 0);
  }
}

.nfc-tip {
  color: #44586d;
  font-size: 13px;
  margin-bottom: 12px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: #33475b;
}

.form label small {
  font-weight: 400;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.thumbs img {
  width: 86px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: zoom-in;
}

.thumbs-more {
  width: 86px;
  height: 64px;
  border-radius: 8px;
  background: #f0f4f8;
  border: 1px dashed #c6d4e0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
}

/* ============ 工单中心 ============ */
.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.tab {
  border: none;
  background: #e3ebf3;
  color: #4a6076;
  padding: 9px 18px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
}

.tab.active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 3px 10px rgba(14, 107, 184, 0.25);
}

.tab b {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 12px;
  margin-left: 4px;
}

.tab.active b {
  background: rgba(255, 255, 255, 0.25);
}

.tabs-right {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.orders {
  max-width: 980px;
  margin: 0 auto;
}

.order-note {
  background: #eef7fd;
  border: 1px solid #cfe4f4;
  color: #2f6285;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.oc-user-progress {
  display: inline-block;
  background: #fff8e8;
  color: #a67c14;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

.oc-responsible {
  background: #eef7fd;
  border: 1px solid #cfe4f4;
  color: #2f6285;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 8px;
}

.ai-advice-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ai-advice-tools .hint {
  margin: 0;
}

.ai-advice-panel {
  background: #f0f6fd;
  border: 1px solid #cfe4f4;
  border-radius: 10px;
  padding: 12px 14px;
  animation: modal-in 0.25s ease;
}

.ai-advice-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 6px;
}

.ai-advice-meta {
  font-size: 12px;
  color: #2f6285;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 6px;
  padding: 5px 8px;
  margin-bottom: 8px;
}

.ai-advice-body {
  font-size: 13px;
  line-height: 1.8;
  color: #33475b;
  white-space: pre-line;
}

.ai-advice-block {
  background: #f0f6fd;
  border: 1px solid #cfe4f4;
  color: #2f6285;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 10px;
  white-space: pre-line;
}

.order-card {
  margin-bottom: 14px;
}

.oc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.oc-id {
  font-weight: 700;
  font-size: 15px;
  color: var(--blue-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.oc-type {
  background: #eef4fa;
  color: #4a6076;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
}

.oc-well {
  font-size: 13px;
  color: #44586d;
  margin-bottom: 6px;
}

.oc-desc {
  font-size: 13px;
  color: #44586d;
  line-height: 1.55;
  margin-bottom: 8px;
}

.oc-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0;
}

.oc-order {
  font-size: 12px;
  color: #44586d;
  margin-top: 6px;
}

.oc-hint {
  font-size: 12px;
  color: #a67c14;
  margin-top: 8px;
}

.inspect-wells {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.iw-chip {
  background: #eef4fa;
  color: #2f6285;
  border-radius: 16px;
  padding: 3px 10px;
  font-size: 12px;
}

.inspect-nodes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
}

.insp-node {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e4ecf3;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  background: #fbfdff;
}

.insp-node.done {
  background: #f0f9f1;
  border-color: #cfe7d2;
}

.insp-node-no {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #eef4fa;
  color: #4a6076;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex: none;
}

.insp-node.done .insp-node-no {
  background: #2f9e44;
  color: #fff;
}

.insp-node-name {
  font-weight: 700;
  color: #22384e;
}

.insp-node-t {
  margin-left: auto;
  color: var(--muted);
}

.insp-node.done .insp-node-t {
  color: #2f9e44;
  font-weight: 600;
}

.inspect-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.inspect-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f5f9fc;
  border: 1px solid #e2ebf3;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
}

.insp-well {
  background: #f5f9fc;
  border: 1px solid #e2ebf3;
  border-radius: 10px;
  padding: 10px 12px;
}

.insp-well.insp-locked {
  opacity: 0.55;
}

.insp-well.insp-done {
  background: #f0f9f1;
  border-color: #cfe7d2;
  opacity: 1;
}

.insp-well.insp-done .insp-state {
  color: #2f9e44;
}

.insp-progress {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-dark);
  background: #eef7fd;
  border: 1px solid #cfe4f4;
  border-radius: 8px;
  padding: 8px 12px;
}

.insp-well-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
}

.insp-state {
  font-size: 12px;
  font-weight: 600;
  color: #7a8ba0;
  text-align: right;
}

.insp-count {
  font-size: 12px;
  font-weight: 700;
  color: #c2492d;
  margin-bottom: 6px;
}

.insp-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.insp-actions .input {
  width: auto;
  flex: 1;
  min-width: 160px;
}

.insp-actions .select {
  width: auto;
}

.oc-cause,
.oc-result,
.oc-notes {
  font-size: 13px;
  background: #f5f9fc;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 8px;
}

.oc-cause {
  color: #a67c14;
}

.oc-result {
  color: #1f7a6f;
}

.order-timeline {
  display: flex;
  gap: 0;
  margin: 10px 0;
  background: #f7fafc;
  border-radius: 10px;
  padding: 10px 14px;
}

.ot-item {
  flex: 1;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  position: relative;
}

.ot-item > div {
  position: relative;
  z-index: 2;
  background: #f7fafc;
  border-radius: 6px;
  padding: 0 6px;
  margin-left: 2px;
}

.ot-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 34px;
  right: 10px;
  height: 2px;
  background: #dbe5ee;
}

.ot-item.done:not(:last-child)::after {
  background: var(--teal);
}

.ot-item i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #b9c9d8;
  color: transparent;
  font-style: normal;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  position: relative;
  z-index: 1;
  flex: 0 0 20px;
}

.ot-item.done i {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.ot-label {
  font-size: 12px;
  font-weight: 600;
}

.ot-time {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.dispatch-info {
  background: #f0f6fb;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: #33475b;
}

.input-static {
  background: #f5f8fb;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
}

/* ============ 资产列表 ============ */
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.toolbar .input {
  width: 260px;
}

.pending-wrap {
  margin-bottom: 14px;
}

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

.pending-card {
  border: 1px solid #e4ecf3;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fbfdfe;
}

.pc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.pc-sub {
  font-size: 12px;
  color: #44586d;
  margin-bottom: 8px;
}

.pc-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  padding: 2px 0;
  color: #44586d;
}

.pc-row span {
  color: var(--muted);
}

.pc-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.table-wrap {
  padding: 0;
  overflow: hidden;
}

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

.table th {
  background: #f2f7fb;
  text-align: left;
  padding: 11px 14px;
  color: #4a6076;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

.table td {
  padding: 11px 14px;
  border-bottom: 1px solid #eef2f6;
  vertical-align: middle;
}

.table tr:hover td {
  background: #f8fbfd;
}

.table .addr {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops {
  white-space: nowrap;
}

/* ============ 井位详情 ============ */
.well-detail .wd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.wd-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--blue-dark);
}

.wd-photo {
  margin-bottom: 12px;
}

.wd-photo img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  cursor: zoom-in;
}

.kv {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.kv td {
  padding: 6px 4px;
  border-bottom: 1px dashed #e5ecf3;
  vertical-align: top;
}

.kv td:first-child {
  color: var(--muted);
  width: 110px;
  white-space: nowrap;
}

.wd-order {
  background: #fff8e8;
  border: 1px solid #f0dfae;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  margin: 12px 0;
  color: #7a5b0e;
}

.wd-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.wd-actions .btn {
  flex: 1;
}

/* ============ 知识库 ============ */
.kb {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 14px;
  height: calc(100vh - 120px);
  min-height: 480px;
}

.kb-side-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kb-side-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--blue-dark);
}

.kb-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 6px;
}

.kb-role-note {
  font-size: 12px;
  color: var(--muted);
  background: #f3f8fc;
  border: 1px dashed #c9dcee;
  border-radius: 8px;
  padding: 6px 10px;
  line-height: 1.5;
}

.kb-rec {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  border-radius: 5px;
  padding: 1px 6px;
  vertical-align: 2px;
}

.kb-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  padding-bottom: 10px;
}

.kb-cats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.kb-cat {
  border: 1px solid #d3dfe9;
  background: #fff;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  color: #4a6076;
}

.kb-cat.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 600;
}

.kb-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kb-item {
  border: 1px solid #e4ecf3;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.12s;
}

.kb-item:hover {
  border-color: var(--blue);
  background: #f6fafe;
  box-shadow: 0 3px 12px rgba(14, 107, 184, 0.1);
}

.kb-cat-tag {
  display: inline-block;
  background: #eaf3fb;
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
  border-radius: 5px;
  padding: 2px 8px;
  margin-bottom: 6px;
}

.kb-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

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

.kb-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.kb-badge {
  font-size: 11px;
  border-radius: 5px;
  padding: 2px 7px;
  font-weight: 600;
}

.kb-badge-video {
  background: #fdeef0;
  color: #c2274b;
}

.kb-badge-manual {
  background: #eef4fa;
  color: #1664a8;
}

.kb-badge-faq {
  background: #f1f7ec;
  color: #4e7a1f;
}

.kb-badge-steps {
  background: #f5f1ea;
  color: #8a5a17;
}

.kb-detail-desc {
  color: #44586d;
  margin: 10px 0;
  font-size: 13px;
}

.kb-detail-intro {
  background: #f6f9fc;
  border-radius: 10px;
  padding: 14px 16px;
  line-height: 1.8;
  font-size: 14px;
  color: #44586d;
}

.kb-detail-sec {
  margin-top: 14px;
}

.kb-detail-sec h4 {
  font-size: 14px;
  margin: 0 0 8px;
  color: var(--blue-dark);
}

.kb-videos {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kb-video-card {
  border: 1px solid #e2ebf3;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fbfdff;
}

.kb-video-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.kb-video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 8px;
  background: #0b1c2b;
}

.kb-video-offline {
  padding: 22px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  background: #f1f5f9;
  border-radius: 8px;
}

.kb-video-play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff5a5a, #e02d2d);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex: none;
}

.kb-video-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kb-video-txt b {
  font-size: 13px;
  color: #22384e;
}

.kb-video-txt i {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}

.kb-steps {
  margin: 0;
  padding-left: 20px;
  line-height: 1.8;
  font-size: 13px;
  color: #33475c;
}

.kb-manual {
  background: #fff8ec;
  border: 1px solid #f3e3bd;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.7;
  color: #6b4f16;
}

.kb-faqs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kb-faq-item {
  border: 1px solid #e4ecf3;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fbfdff;
}

.kb-faq-q {
  font-size: 13px;
  font-weight: 700;
  color: #22384e;
  margin-bottom: 4px;
}

.kb-faq-a {
  font-size: 13px;
  line-height: 1.65;
  color: #4a6076;
}

.kb-detail-hotline {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eaf7ef;
  color: #1e6b3c;
  font-size: 13px;
}

.kb-detail-hotline b {
  font-size: 15px;
}

.kb-chat {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.chat-head {
  padding: 14px 16px;
  font-weight: 700;
  font-size: 15px;
  color: var(--blue-dark);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-mode {
  font-size: 11px;
  font-weight: 600;
  background: #eef4fa;
  color: #4a6076;
  border-radius: 20px;
  padding: 2px 10px;
}

.kb-hotline {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: #c2410c;
  background: #fef3e2;
  border-radius: 20px;
  padding: 3px 10px;
}

.chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f7fafc;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.chat-msg.me {
  justify-content: flex-end;
  align-items: flex-end;
}

.bubble {
  max-width: 82%;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.6;
  background: #fff;
  border: 1px solid #e3ebf3;
  box-shadow: 0 1px 4px rgba(15, 50, 90, 0.06);
  white-space: pre-line;
}

.chat-msg.me .bubble {
  background: linear-gradient(135deg, #1683d4, var(--blue));
  color: #fff;
  border: none;
}

.chat-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.chat-jump-btn {
  border: 1px solid #c9dcee;
  background: #eef6fd;
  color: var(--blue);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.chat-jump-btn:hover {
  background: #dcecf9;
}

.chat-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.chat-tips {
  padding: 0 12px 12px;
  background: #fff;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chat-tips span {
  color: var(--blue);
  cursor: pointer;
  background: #eef4fa;
  border-radius: 20px;
  padding: 3px 10px;
}

.chat-tips span:hover {
  background: #dfeaf5;
}

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(8, 30, 52, 0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.modal-mask[hidden] {
  display: none;
}

.modal {
  background: #fff;
  border-radius: 14px;
  width: min(640px, calc(100vw - 40px));
  max-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modal-in 0.18s ease;
}

@keyframes modal-in {
  from {
    transform: translateY(14px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--blue-dark);
}

.modal-close {
  border: none;
  background: #eef3f8;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 14px;
  color: #4a6076;
}

.modal-close:hover {
  background: #e2eaf2;
}

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
}

.picker-map {
  height: 360px;
  border-radius: 10px;
  border: 1px solid var(--line);
  z-index: 1;
}

.picker-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 2px;
}

.pick-marker {
  width: 34px;
  height: 34px;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  background: linear-gradient(135deg, #f2994a, #e76f51);
  border: 3px solid #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pick-marker span {
  transform: rotate(45deg);
  font-size: 16px;
}

.preview-wrap {
  text-align: center;
}

.preview-img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 10px;
}

/* ============ 角色权限说明 ============ */
.role-matrix table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.role-matrix th,
.role-matrix td {
  border: 1px solid #e2e9f1;
  padding: 8px 10px;
  text-align: center;
}

.role-matrix th {
  background: #f2f7fb;
  color: #33475b;
  font-weight: 600;
}

.role-matrix td:first-child {
  text-align: left;
  color: #44586d;
}

.role-desc {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: #44586d;
  line-height: 1.6;
}

/* ============ 轻提示 ============ */
.toasts {
  position: fixed;
  top: 72px;
  right: 22px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #23384d;
  color: #fff;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateX(12px);
  transition: all 0.25s;
  max-width: 360px;
}

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

.toast.ok {
  background: linear-gradient(135deg, #2a9d8f, #248277);
}

.toast.warn {
  background: linear-gradient(135deg, #e9a23b, #d9822b);
}

/* ============ 闭环演示引导 ============ */
.demo-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 30, 52, 0.62);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}

.demo-box {
  width: min(720px, calc(100vw - 40px));
  max-height: calc(100vh - 60px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modal-in 0.2s ease;
}

.demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(120deg, #0b4f8a, #0e6bb8);
  color: #fff;
}

.demo-title {
  font-size: 16px;
  font-weight: 700;
}

.demo-head .modal-close {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.demo-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  background: #f7fafc;
}

.demo-node {
  font-size: 12px;
  font-weight: 600;
  color: #7a8ba0;
  background: #fff;
  border: 1.5px solid #dbe5ee;
  border-radius: 20px;
  padding: 6px 12px;
  white-space: nowrap;
  transition: all 0.2s;
}

.demo-node.done {
  color: #1f7a6f;
  border-color: #2a9d8f;
  background: rgba(42, 157, 143, 0.08);
}

.demo-node.done::after {
  content: " ✔";
}

.demo-node.active {
  color: #fff;
  border-color: var(--blue);
  background: linear-gradient(135deg, #1683d4, var(--blue));
  box-shadow: 0 4px 12px rgba(14, 107, 184, 0.3);
}

.demo-arrow {
  color: #b8c7d6;
  font-size: 14px;
  flex: 0 0 auto;
}

.demo-body {
  padding: 22px 24px;
  flex: 1;
  overflow-y: auto;
}

.demo-step-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 12px;
}

.demo-desc {
  font-size: 14px;
  line-height: 1.85;
  color: #33475b;
  white-space: pre-line;
  background: #f5f9fc;
  border-radius: 10px;
  padding: 14px 16px;
  border: 1px solid #e2ebf3;
}

.demo-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  margin-top: 14px;
}

.demo-loading i {
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(14, 107, 184, 0.2);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.demo-result {
  margin-top: 14px;
  background: #f0faf8;
  border: 1px solid #bfe3dc;
  color: #1f6f64;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-line;
  animation: modal-in 0.25s ease;
}

.demo-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.demo-actions .btn {
  min-width: 100px;
}

/* ============ 大屏模式 ============ */
body.screen-mode .sidebar {
  display: none;
}

body.screen-mode .topbar {
  height: 46px;
  flex-basis: 46px;
}

body.screen-mode .content {
  padding: 12px 16px;
}

/* ============ 响应式 ============ */
@media (max-width: 1280px) {
  .kpis {
    grid-template-columns: repeat(3, 1fr);
  }
  .dash-grid {
    grid-template-columns: 1fr 1fr;
  }
  .kb {
    grid-template-columns: 1fr;
    height: auto;
  }
  .kb-chat {
    min-height: 420px;
  }
}
