/**
 * 充电桩大盘 - 样式文件
 * 商业级 UI 设计
 */

/* ==================== 基础设置 ==================== */

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #0a0c10 0%, #0d1117 50%, #0a0c10 100%);
  color: #e6edf3;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* ==================== 背景斜水印 ==================== */

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  background-image: repeating-linear-gradient(
    -30deg,
    transparent,
    transparent 100px,
    rgba(148, 163, 184, 0.03) 100px,
    rgba(148, 163, 184, 0.03) 101px
  );
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 0;
  background-image: repeating-linear-gradient(
    -30deg,
    transparent 0,
    transparent 80px,
    rgba(148, 163, 184, 0.015) 80px,
    rgba(148, 163, 184, 0.015) 82px
  );
  animation: watermark-scroll 60s linear infinite;
}

@keyframes watermark-scroll {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-50%, -50%); }
}

/* 水印文字层 */
#app::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='150'%3E%3Ctext x='50%25' y='50%25' fill='rgba(148,163,184,0.06)' font-size='14' font-family='system-ui' text-anchor='middle' dominant-baseline='middle' transform='rotate(-25 200 75)'%3E飞书@pasca 个人制作，仅供内部参考%3C/text%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* ==================== 动画 ==================== */

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}

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

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-spin {
  animation: spin 0.8s linear infinite;
}

.animate-in {
  animation: fade-in-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==================== 卡片状态 - 精致区分 ==================== */

.card-free {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(160deg, rgba(6, 78, 59, 0.3) 0%, rgba(6, 78, 59, 0.06) 100%);
  box-shadow:
    0 0 0 1px rgba(16, 185, 129, 0.08),
    0 0 20px rgba(16, 185, 129, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.card-free:hover {
  border-color: rgba(52, 211, 153, 0.6);
  box-shadow:
    0 0 0 1px rgba(52, 211, 153, 0.15),
    0 0 30px rgba(16, 185, 129, 0.12),
    0 8px 32px rgba(16, 185, 129, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.card-charging {
  border-color: rgba(34, 211, 238, 0.45);
  background: linear-gradient(160deg, rgba(8, 51, 68, 0.35) 0%, rgba(8, 51, 68, 0.08) 100%);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.1),
    0 0 20px rgba(34, 211, 238, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.card-charging:hover {
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.2),
    0 0 30px rgba(34, 211, 238, 0.12),
    0 8px 32px rgba(34, 211, 238, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.card-occupied {
  border-color: rgba(251, 146, 60, 0.45);
  background: linear-gradient(160deg, rgba(88, 45, 20, 0.35) 0%, rgba(68, 38, 20, 0.08) 100%);
  box-shadow:
    0 0 0 1px rgba(251, 146, 60, 0.08),
    0 0 20px rgba(251, 146, 60, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.card-occupied:hover {
  border-color: rgba(251, 146, 60, 0.65);
  box-shadow:
    0 0 0 1px rgba(251, 146, 60, 0.15),
    0 0 30px rgba(251, 146, 60, 0.12),
    0 8px 32px rgba(251, 146, 60, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ==================== DC 专属卡片 ==================== */

.card-dc {
  min-height: 280px;
}

/* ==================== 5kW 功率卡片特殊样式 ==================== */

.power-5kw {
  border-color: rgba(168, 85, 247, 0.4) !important;
  background: linear-gradient(160deg, rgba(88, 28, 135, 0.25) 0%, rgba(88, 28, 135, 0.05) 100%) !important;
}

.power-5kw:hover {
  border-color: rgba(192, 132, 252, 0.6) !important;
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, 0.15),
    0 0 30px rgba(168, 85, 247, 0.12),
    0 8px 32px rgba(168, 85, 247, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* ==================== 进度条 ==================== */

@keyframes wave-flow {
  0% {
    background-position: 0% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes wave-pulse {
  0%, 100% {
    height: 2px;
    opacity: 0.7;
    box-shadow: 0 0 4px rgba(34, 211, 238, 0.3);
  }
  50% {
    height: 3px;
    opacity: 1;
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.5), 0 0 16px rgba(34, 211, 238, 0.2);
  }
}

.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(34, 211, 238, 0.2) 0%, rgba(34, 211, 238, 0.05) 100%);
  overflow: hidden;
  transition: height 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(34, 211, 238, 0.4) 15%,
    rgba(103, 232, 249, 0.9) 30%,
    rgba(34, 211, 238, 1) 50%,
    rgba(103, 232, 249, 0.9) 70%,
    rgba(34, 211, 238, 0.4) 85%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: wave-flow 2s linear infinite, wave-pulse 1.5s ease-in-out infinite;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(103, 232, 249, 0.6) 25%,
    rgba(103, 232, 249, 1) 50%,
    rgba(103, 232, 249, 0.6) 75%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: wave-flow 1.2s linear infinite;
  filter: blur(1px);
}

/* ==================== Modal ==================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              backdrop-filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: linear-gradient(145deg, #161b22 0%, #0d1117 100%);
  border: 1px solid rgba(48, 54, 61, 0.8);
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 420px;
  margin: 16px;
  transform: scale(0.92) translateY(16px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 24px 80px rgba(0, 0, 0, 0.5);
  will-change: transform, opacity;
}

.modal-overlay.show .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* ==================== Toast ==================== */

.toast {
  position: fixed;
  top: 88px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 24px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  z-index: 300;
  animation: toast-in 3.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  will-change: transform, opacity;
}

.toast-success {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.95) 0%, rgba(6, 78, 59, 0.85) 100%);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #a7f3d0;
}

.toast-error {
  background: linear-gradient(135deg, rgba(88, 28, 28, 0.95) 0%, rgba(68, 20, 20, 0.85) 100%);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

@keyframes toast-in {
  0% { opacity: 0; transform: translateX(-50%) translateY(-20px) scale(0.92); }
  12% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  85% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-10px) scale(0.95); }
}

/* ==================== 留言替换动画 ==================== */

@keyframes comment-fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.comment-replace-in {
  animation: comment-fade-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ==================== 卡片入场动画 ==================== */

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.animate-card {
  animation: card-enter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* 交错延迟：每个卡片递增 40ms */
.animate-card:nth-child(1)  { animation-delay: 0ms; }
.animate-card:nth-child(2)  { animation-delay: 40ms; }
.animate-card:nth-child(3)  { animation-delay: 80ms; }
.animate-card:nth-child(4)  { animation-delay: 120ms; }
.animate-card:nth-child(5)  { animation-delay: 160ms; }
.animate-card:nth-child(6)  { animation-delay: 200ms; }
.animate-card:nth-child(7)  { animation-delay: 240ms; }
.animate-card:nth-child(8)  { animation-delay: 280ms; }
.animate-card:nth-child(9)  { animation-delay: 320ms; }
.animate-card:nth-child(10) { animation-delay: 360ms; }
.animate-card:nth-child(11) { animation-delay: 400ms; }
.animate-card:nth-child(12) { animation-delay: 440ms; }
.animate-card:nth-child(13) { animation-delay: 480ms; }
.animate-card:nth-child(14) { animation-delay: 520ms; }
.animate-card:nth-child(15) { animation-delay: 560ms; }
.animate-card:nth-child(16) { animation-delay: 600ms; }
.animate-card:nth-child(17) { animation-delay: 640ms; }
.animate-card:nth-child(18) { animation-delay: 680ms; }
.animate-card:nth-child(19) { animation-delay: 720ms; }
.animate-card:nth-child(20) { animation-delay: 760ms; }

/* Reduced motion: 关闭动画 */
@media (prefers-reduced-motion: reduce) {
  .modal-overlay,
  .modal-content {
    transition: none;
  }
  .toast {
    animation: none;
    opacity: 1;
  }
  .comment-replace-in,
  .animate-card {
    animation: none;
  }
}

/* ==================== 输入框 ==================== */

.input-field {
  width: 100%;
  padding: 14px 18px;
  background: rgba(13, 17, 23, 0.8);
  border: 1px solid rgba(48, 54, 61, 0.8);
  border-radius: 12px;
  color: #e6edf3;
  font-size: 15px;
  outline: none;
  transition: all 0.2s ease;
}

.input-field:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  background: rgba(13, 17, 23, 1);
}

.input-field::placeholder {
  color: #484f58;
}

/* ==================== 网格布局 ==================== */

.charger-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, 1fr);
}

.charger-grid-dc {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 1200px) {
  .charger-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
  .charger-grid { grid-template-columns: repeat(3, 1fr); }
  .charger-grid-dc { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .charger-grid { grid-template-columns: repeat(2, 1fr); }
  .charger-grid-dc { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  .charger-grid { grid-template-columns: 1fr; }
  .charger-grid-dc { grid-template-columns: 1fr; }
}

/* ==================== 状态指示点 ==================== */

.status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.status-dot.free { background: #10b981; }
.status-dot.free::before { display: none; }

.status-dot.charging { background: #22d3ee; }
.status-dot.charging::before { background: #22d3ee; animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; }

.status-dot.occupied { background: #f97316; }
.status-dot.occupied::before { display: none; }

/* ==================== 筛选按钮增强 ==================== */

.filter-btn {
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.2s;
}

.filter-btn:hover::before {
  opacity: 1;
}

/* ==================== 滚动条美化 ==================== */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(13, 17, 23, 0.5);
}

::-webkit-scrollbar-thumb {
  background: rgba(48, 54, 61, 0.8);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(88, 96, 105, 0.8);
}

/* ==================== 导航 Tab ==================== */

.nav-tab {
  position: relative;
}

.nav-tab.active {
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.15);
}

/* ==================== 热力图 ==================== */

.heatmap-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 600px;
}

.heatmap-header,
.heatmap-row {
  display: flex;
  align-items: center;
  gap: 2px;
}

.heatmap-label {
  width: 40px;
  text-align: right;
  font-size: 12px;
  color: #64748b;
  padding-right: 8px;
  flex-shrink: 0;
}

.heatmap-hour {
  flex: 1;
  text-align: center;
  font-size: 10px;
  color: #475569;
  min-width: 20px;
}

.heatmap-cell {
  flex: 1;
  aspect-ratio: 1;
  border-radius: 3px;
  min-width: 28px;
  min-height: 28px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: default;
}

.heatmap-cell-text {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.heatmap-cell:hover {
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.4);
  z-index: 10;
  position: relative;
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
  margin-top: 12px;
  padding-right: 4px;
}

.heatmap-legend .heatmap-cell {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  flex: none;
}

/* ==================== 移动端适配 ==================== */

@media (max-width: 768px) {
  /* 主内容区域底部留出导航栏+订阅栏空间 */
  main {
    padding-bottom: 130px;
  }

  /* 移动端底部导航栏 */
  #mobile-nav button {
    color: #64748b;
  }

  #mobile-nav button:disabled {
    opacity: 0.5;
  }

  /* 热力图允许横向滚动 */
  .heatmap-grid {
    min-width: 600px;
  }

  /* 筛选按钮栏可横向滚动 */
  .filter-bar-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .filter-bar-scroll::-webkit-scrollbar {
    display: none;
  }

  /* Header 在移动端紧凑排列 */
  header {
    grid-template-columns: 1fr auto;
    gap: 8px;
  }
  header > div:first-child {
    min-width: 0;
  }
  header h1 {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 底部栏移动端适配 */
  #bottom-bar {
    max-width: calc(100% - 2rem);
  }
}

/* ==================== 安全区域适配（iPhone X 等） ==================== */

.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* 移动端订阅栏定位在底部导航上方（需要在媒体查询外） */
.bottom-nav-spacing {
  bottom: 56px;
}

@media (max-width: 768px) {
  /* iPhone X 等有安全区域的设备，订阅栏需要额外上移 */
  .bottom-nav-spacing {
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }
}

/* ==================== 引导弹窗 ==================== */

.guide-modal-content {
  max-width: 420px;
  padding: 20px;
}

.guide-header {
  text-align: center;
  margin-bottom: 16px;
}

.guide-header h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-top: 6px;
}

.guide-header-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.2) 0%, rgba(34, 211, 238, 0.2) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

/* 功能区块 */
.guide-section {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(71, 85, 105, 0.3);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}

.guide-section:last-of-type {
  margin-bottom: 12px;
}

.guide-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.guide-section-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.15) 0%, rgba(52, 211, 153, 0.05) 100%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-section-icon.cyan {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.15) 0%, rgba(34, 211, 238, 0.05) 100%);
}

.guide-section-header h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #f1f5f9;
}

.guide-section-desc {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 10px 0 0 0;
}

/* 时间卡片 */
.guide-time-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.guide-time-card {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 8px;
  padding: 10px;
  border: 1px solid rgba(71, 85, 105, 0.2);
}

.guide-time-card-header {
  margin-bottom: 8px;
}

.guide-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 4px;
}

.guide-time-badge.green {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
}

.guide-time-badge.gray {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
}

.guide-time-card-body {
  text-align: center;
}

.guide-time-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 2px;
}

.guide-time-freq {
  font-size: 0.625rem;
  color: #64748b;
}

/* 订阅流程图 */
.flow-diagram {
  padding: 12px 0;
}

/* 主流程行 */
.flow-main {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

/* 分支行 */
.flow-branch-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-top: 16px;
}

/* 流程节点 */
.flow-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 60px;
}

/* 分支行中的隐藏占位符 */
.flow-branch-row .flow-spacer {
  visibility: hidden;
}

/* 图标容器 */
.flow-icon {
  width: 34px;
  height: 34px;
  background: rgba(22, 29, 41, 0.95);
  border: 1.5px solid rgba(71, 85, 105, 0.5);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

/* 图标颜色 */
.flow-icon.mail { color: #22d3ee; border-color: rgba(34, 211, 238, 0.35); }
.flow-icon.bell { color: #34d399; border-color: rgba(52, 211, 153, 0.35); }
.flow-icon.clock { color: #34d399; border-color: rgba(52, 211, 153, 0.35); }
.flow-icon.check { color: #fff; background: linear-gradient(145deg, #10b981, #059669); border: none; box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3); }
.flow-icon.alert { color: #fbbf24; border-color: rgba(251, 191, 36, 0.35); }
.flow-icon.refresh { color: #34d399; border-color: rgba(52, 211, 153, 0.35); }

/* 文字标签 */
.flow-label {
  font-size: 0.625rem;
  font-weight: 600;
  color: #e2e8f0;
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
}

.flow-sub {
  font-size: 0.5rem;
  color: #64748b;
  text-align: center;
  line-height: 1.2;
}

/* 箭头 */
.flow-arrow {
  display: flex;
  align-items: center;
  padding-top: 12px;
  margin: 0 2px;
}

.flow-arrow-line {
  width: 14px;
  height: 2px;
  background: rgba(100,116,139,0.5);
}

.flow-arrow-head {
  width: 0;
  height: 0;
  border-left: 5px solid rgba(100,116,139,0.5);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

/* 分支连接（从空闲5分钟向下） */
.flow-branch-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

/* 让 wrap 内的 flow-col 与外部 flow-col 宽度一致 */
.flow-branch-wrap .flow-col {
  min-width: 60px;
}

.flow-branch-tag {
  font-size: 0.5rem;
  color: #fbbf24;
  font-weight: 600;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.25);
  padding: 2px 4px;
  border-radius: 4px;
  margin-top: 4px;
  white-space: nowrap;
}

.flow-branch-line {
  width: 2px;
  height: 16px;
  background: linear-gradient(180deg, rgba(251,191,36,0.5), rgba(251,191,36,0.2));
}

/* 状态文字颜色 */
.flow-col.success .flow-label { color: #a7f3d0; }
.flow-col.warn .flow-label { color: #fcd34d; }
.flow-col.keep .flow-label { color: #a7f3d0; }

/* 底部按钮 */
.guide-footer {
  display: flex;
  gap: 8px;
}

.guide-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.guide-btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.guide-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

.guide-btn-secondary {
  background: rgba(51, 65, 85, 0.8);
  color: #94a3b8;
  border: 1px solid rgba(71, 85, 105, 0.6);
}

.guide-btn-secondary:hover {
  background: rgba(71, 85, 105, 0.8);
  color: #e2e8f0;
}

/* 移动端适配 */
@media (max-width: 480px) {
  .guide-modal-content {
    padding: 16px;
    margin: 8px;
    max-width: calc(100% - 16px);
  }

  .guide-section {
    padding: 12px;
  }

  .guide-time-cards {
    gap: 6px;
  }

  .guide-time-card {
    padding: 8px;
  }

  .guide-time-value {
    font-size: 0.8125rem;
  }

  .flow-icon {
    width: 28px;
    height: 28px;
  }

  .flow-label {
    font-size: 0.5rem;
  }

  .flow-sub {
    font-size: 0.375rem;
  }

  .flow-arrow-line {
    width: 10px;
  }

  .flow-col {
    min-width: 48px;
  }

  .guide-btn {
    padding: 9px 10px;
    font-size: 0.6875rem;
  }
}

/* ==================== 访问统计悬浮标牌 ==================== */

.visit-badge {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-left: none;
  border-radius: 0 12px 12px 0;
  padding: 14px 12px;
  writing-mode: vertical-rl;
  font-size: 13px;
  color: #94a3b8;
  letter-spacing: 0.08em;
  animation: badge-slide-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  user-select: none;
  pointer-events: none;
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.08);
}

.visit-badge .visit-count {
  color: #34d399;
  font-weight: 700;
  font-size: 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  writing-mode: horizontal-tb;
  display: inline-block;
  margin: 6px 0;
}

@keyframes badge-slide-in {
  from {
    transform: translateY(-50%) translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .visit-badge {
    display: none;
  }
}
