﻿    /* ========================================
       参数配置选项卡样式
       ======================================== */

    .param-tabs-container {
        margin-bottom: 16px;
        border-bottom: 1px solid var(--border-default);
    }

    .param-tabs {
        display: flex;
        gap: 4px;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .param-tab {
        padding: 8px 16px;
        background: transparent;
        border: 1px solid transparent;
        border-radius: var(--radius-sm) var(--radius-sm) 0 0;
        color: var(--text-secondary);
        cursor: pointer;
        font-size: 13px;
        font-weight: 500;
        white-space: nowrap;
        transition: all var(--transition-fast);
    }

    .param-tab:hover {
        background: var(--bg-hover);
        color: var(--text-primary);
    }

    .param-tab.active {
        background: var(--bg-secondary);
        border-color: var(--border-default);
        border-bottom-color: var(--bg-secondary);
        color: var(--text-primary);
    }

    .param-content {
        min-height: 200px;
    }

    .param-group-card {
        background: var(--bg-secondary);
        border: 1px solid var(--border-default);
        border-radius: var(--radius-md);
    }

    .param-group-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 16px;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border-subtle);
    }

    .param-group-title {
        font-size: 16px;
        font-weight: 600;
        color: var(--text-primary);
    }

    .param-group-rw-type {
        font-size: 13px;
        padding: 4px 8px;
        background: var(--info-bg);
        color: var(--text-primary);
        border-radius: var(--radius-sm);
    }

/* ========================================
   Info Panel - Config Container Styles
   ======================================== */

/* 顶部关键信息卡片 */
.top-cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.top-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    flex: 1 1 calc(33.333% - var(--spacing-md));
    min-width: 280px;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    cursor: pointer;
}

.top-card:hover {
    background: var(--bg-hover);
    border-color: var(--border-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.top-card-left {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-card-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-left: 12px;
    border-left: 1px solid var(--border-subtle);
}

/* 总电压和温度卡片的右侧垂直排列 */
.voltage-card .top-card-right,
.temperature-card .top-card-right {
    flex-direction: column;
    gap: 4px;
}

.top-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.top-card-icon svg {
    width: 24px;
    height: 24px;
}

.soc-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.top-card-info {
    display: flex;
    flex-direction: column;
}

.voltage-card .top-card-icon {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.current-card .top-card-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.temperature-card .top-card-icon {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
}

.top-card-title {
    font-size: 12px;
    color: var(--text-secondary);
}

.top-card-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.sub-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.sub-label {
    color: var(--text-muted);
}

.sub-item span:last-child {
    color: var(--text-primary);
    font-weight: 500;
}

@media (max-width: 768px) {
    .top-card {
        flex: 1 1 100%;
    }
}
}

.info-config-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-xl);
    overflow: hidden;
}

.info-config-title {
    background: var(--bg-tertiary);
    padding: var(--spacing-md) var(--spacing-lg);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-default);
}

.info-config-items {
    padding: var(--spacing-md);
}

.info-config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--border-subtle);
}

.info-config-item:last-child {
    border-bottom: none;
}

.info-config-item .item-label {
    color: var(--text-secondary);
    font-size: 13px;
}

.info-config-item .item-value {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
}

/* ========================================
   Info Tabs Styles
   ======================================== */

.info-tabs-wrapper {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.info-tabs-header {
    display: flex;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
}

.info-tab {
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.info-tab:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.info-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: var(--bg-tertiary);
}

.info-tabs-content {
    position: relative;
}

.info-tab-content {
    display: none;
}

.info-tab-content.active {
    display: block;
}

/* ========================================
   Cell Voltage Chart Styles
   ======================================== */

.cell-voltage-chart {
    padding: var(--spacing-lg);
}

.voltage-bars {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    justify-content: flex-start;
}

.voltage-bar-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 60px;
      position: relative;
      cursor: pointer;
  }

.voltage-bar-container {
    width: 40px;
    height: 120px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.voltage-bar {
    width: 100%;
    background: #0EA5E9;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: height 0.3s ease;
}

/* 电压柱状图颜色 - 纯色 */
.voltage-bar-min {
    background: #F97316 !important; /* 橘黄色 - 最低电压 */
}

.voltage-bar-max {
    background: #22C55E !important; /* 绿色 - 最高电压 */
}

.voltage-bar-normal {
    background: #0EA5E9 !important; /* 蓝色 - 正常电压 */
}

.voltage-label {
    margin-top: var(--spacing-sm);
    font-size: 13px;
    color: var(--text-secondary);
}

.voltage-value {
    margin-top: var(--spacing-xs);
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

/* 电压统计信息栏（柱状图下方） */
.voltage-stats-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    padding: 12px var(--spacing-lg);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    font-size: 13px;
}

.voltage-stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.voltage-color-box {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.voltage-color-min {
    background: linear-gradient(135deg, #f97316, #fb923c);
}

.voltage-color-max {
    background: linear-gradient(135deg, #84cc16, #a3e635);
}

.voltage-stat-label {
    color: var(--text-secondary);
}

#voltage-min-value,
#voltage-max-value,
#voltage-diff-value {
    color: var(--text-primary);
    font-weight: 500;
}

  /* 电压柱状图悬停提示 - 使用JS实现，此处样式已移除 */

/* ========================================
   Battery Info Grid Styles
   ======================================== */

.battery-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
}

.battery-info-group {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.battery-info-group-title {
    background: transparent;
    padding: var(--spacing-sm) var(--spacing-md);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle);
}

.battery-info-group-items {
    padding: var(--spacing-sm);
}

.battery-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-bottom: 1px solid var(--border-subtle);
}

.battery-info-item:last-child {
    border-bottom: none;
}

.battery-info-item .item-label {
    color: var(--text-secondary);
    font-size: 13px;
}

.battery-info-item .item-value {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
}

/* ========================================
   Battery Info Multi-Column Layout
   ======================================== */

.info-config-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1px;
    padding: var(--spacing-md);
}

.info-config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
}

.info-config-item:nth-child(-n+3) {
    border-top: 1px solid var(--border-subtle);
}

.info-config-item:nth-child(3n+1) {
    border-left: 1px solid var(--border-subtle);
}

  /* ========================================
     Battery Status Bit Display Styles
     ======================================== */

  .battery-status-container {
      padding: 2px;
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
      gap: 2px;
  }

  .bit-status-card {
      background: var(--bg-tertiary);
      border-radius: 2px;
      overflow: visible;
      display: flex;
      flex-direction: column;
  }

  .bit-card-title {
      background: transparent;
      padding: 2px 4px;
      font-weight: 600;
      font-size: 13px;
      color: var(--text-primary);
      border-bottom: 1px solid var(--border-subtle);
      margin: 0;
      line-height: 1.2;
  }

  .bit-grid {
        display: grid;
        grid-template-columns: repeat(8, 1fr);
        grid-auto-rows: 1fr;
        gap: 1px;
        padding: 1px;
        margin: 0;
        flex: 1;
    }

  

  
  

  .bit-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 1px;
      margin: 0;
      background: var(--bg-secondary);
      border: 1px solid var(--border-subtle);
      border-radius: 0;
      min-height: auto;
      height: auto;
      position: relative;
      cursor: pointer;
      transition: all 0.2s ease;
  }

  .bit-item:hover {
      transform: scale(1.05);
      z-index: 10;
  }

  .bit-item:hover::after {
      content: attr(data-tooltip);
      position: absolute;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%);
      margin-bottom: 8px;
      
      background: var(--bg-primary);
      color: var(--text-primary);
      padding: var(--spacing-xs) var(--spacing-sm);
      border-radius: var(--radius-sm);
      font-size: 13px;
      white-space: nowrap;
      z-index: 10000;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
        border: 1px solid var(--border-default);
  }

  .bit-name {
      font-size: 13px;
      color: var(--text-secondary);
      text-align: center;
      white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      line-height: 1.2;
      margin: 0;
      padding: 1px;
  }

  /* 位状态底色 */
  .bit-active {
      background: rgba(239, 68, 68, 0.3) !important;
      border: 1px solid #ef4444 !important;
  }

  .bit-inactive {
      background: rgba(16, 185, 129, 0.3) !important;
      border: 1px solid #10b981 !important;
  }

  .bit-reserved {
      background: rgba(100, 100, 100, 0.2) !important;
      border: 1px solid #666 !important;
      opacity: 0.5;
  }

  .bit-reserved .bit-name {
      color: var(--text-muted);
  }

  /* 8位状态位特殊处理 - 固定2行高度 */
  .bit-grid-8 {
      
      grid-auto-rows: 1fr;
      grid-template-rows: 1fr 1fr;
  }
