/* ===== 甘肃省版专用样式（基于 process-tracing.css 扩展）===== */

/* 6张统计卡片栅格 */
.gs-stats-cards {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.gs-stats-cards .stat-card {
    padding: 12px 14px;
    min-height: 96px;
    min-width: 0;
    position: relative;
    overflow: hidden;
}
.gs-stats-cards .stat-card .label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gs-stats-cards .stat-card .value {
    font-size: 30px;
    font-weight: 700;
    color: #1e4d8c;
    line-height: 1.1;
}
.gs-stats-cards .stat-card .gs-unit {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin-left: 2px;
}
.gs-stats-cards .stat-card .change {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gs-stats-cards .stat-card .change.positive {
    color: #16a34a;
    font-weight: 600;
}

/* 项目表格：允许换行、最小宽度收窄 */
.gs-table {
    min-width: 1200px;
}
.gs-table th,
.gs-table td {
    white-space: nowrap;
}
.gs-table td.gs-col-name {
    white-space: normal;
    min-width: 200px;
}

/* 滞后行整行浅红色高亮 */
.gs-table tbody tr.gs-row-lag {
    background-color: #fef2f2 !important;
}
.gs-table tbody tr.gs-row-lag:hover {
    background-color: #fee2e2 !important;
}

/* 项目名称蓝色可点击链接 */
.gs-project-link {
    color: #2563eb;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
}
.gs-project-link:hover {
    text-decoration: underline;
}

/* 通道编号图标 */
.gs-channel-icon {
    display: inline-block;
    background: #1e4d8c;
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
    margin-right: 4px;
    vertical-align: middle;
}

/* 设施类型图标 */
.gs-type-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}
.gs-type-charge { background: #ebf8ff; color: #2563eb; }
.gs-type-swap { background: #f0fdf4; color: #16a34a; }

/* 当前阶段标签 */
.gs-stage-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.gs-stage-备案审批 { background-color: #f3f4f6; color: #4b5563; }
.gs-stage-开工建设 { background-color: #dbeafe; color: #1e4d8c; }
.gs-stage-设备安装 { background-color: #ffedd5; color: #9a3412; }
.gs-stage-竣工投运 { background-color: #d1fae5; color: #065f46; }

/* 项目状态标签 */
.gs-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.gs-status-正常 { background-color: #d1fae5; color: #065f46; }
.gs-status-预警 { background-color: #fef3c7; color: #92400e; }
.gs-status-滞后 {
    background-color: #fee2e2;
    color: #991b1b;
    animation: gsblink 1.2s infinite;
}
@keyframes gsblink { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }

/* 进度单元格 */
.gs-progress-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 110px;
}
.gs-progress-bar {
    flex: 1;
    height: 6px;
    background-color: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    min-width: 50px;
}
.gs-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}
.gs-progress-val {
    font-size: 12px;
    font-weight: 600;
    color: #1e4d8c;
    min-width: 36px;
}

/* 市州表格最小宽度收窄 */
.gs-city-table {
    min-width: 900px;
}

/* 详情抽屉：基本信息块 */
.gs-drawer-section {
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}
.gs-drawer-section:last-child {
    border-bottom: none;
}
.gs-drawer-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: #1F4E79;
    margin-bottom: 10px;
    padding-left: 8px;
    border-left: 3px solid #2E75B6;
}
.gs-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 24px;
}
.gs-info-item {
    display: flex;
    font-size: 13px;
    line-height: 1.8;
}
.gs-info-item .k {
    color: #6b7280;
    min-width: 84px;
}
.gs-info-item .v {
    color: #1F2937;
    font-weight: 500;
}

/* 抽屉内简易甘特 */
.gs-drawer-gantt {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.gs-gantt-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.gs-gantt-stage {
    width: 84px;
    font-size: 12px;
    color: #374151;
    font-weight: 500;
}
.gs-gantt-track {
    flex: 1;
    height: 18px;
    background: #f3f4f6;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}
.gs-gantt-fill {
    height: 100%;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 6px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}
.gs-gantt-fill.done { background: #10b981; }
.gs-gantt-fill.doing { background: #4facfe; }
.gs-gantt-fill.todo { background: #d1d5db; color: #6b7280; }

/* 关键里程碑 */
.gs-drawer-milestones {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.gs-milestone {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #374151;
}
.gs-milestone .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.gs-milestone .dot.done { background: #10b981; }
.gs-milestone .dot.doing { background: #4facfe; }
.gs-milestone .dot.todo { background: #d1d5db; }
.gs-milestone .date {
    color: #6b7280;
    font-size: 12px;
    margin-left: auto;
}

/* 页面副标题 */
#tab1 .page-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

/* ===== 市州表 ===== */
.gs-city-tip {
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
}
.gs-city-table tbody tr {
    cursor: pointer;
}
/* 完成率<60% 行浅红高亮 */
.gs-city-table tbody tr.gs-city-row-lag {
    background-color: #fef2f2 !important;
    animation: gsPulseRow 2s ease-in-out infinite;
}
.gs-city-table tbody tr.gs-city-row-lag:hover {
    background-color: #fee2e2 !important;
}
@keyframes gsPulseRow {
    0%, 100% { background-color: #fef2f2; }
    50% { background-color: #fde8e8; }
}

/* ===== 项目进度甘特图 ===== */
.gs-gantt-panel { padding: 16px 20px; }
.gs-gantt-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.gs-gantt-head .panel-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.gs-gantt-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #4b5563;
}
.gs-leg { display: inline-flex; align-items: center; gap: 4px; }
.gs-leg i {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: #d1d5db;
}
.gs-leg .gs-leg-lag {
    background: #dc2626;
    border-radius: 50%;
    animation: gsBlinkDot 0.9s ease-in-out infinite;
}
.gs-leg .gs-leg-warn {
    background: #f59e0b;
    border-radius: 50%;
}
@keyframes gsBlinkDot { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.gs-gantt-toggle {
    margin-left: 8px;
    padding: 4px 14px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: #4b5563;
    cursor: pointer;
    font-size: 13px;
}
.gs-gantt-toggle:hover { background: #f3f4f6; }

.gs-gantt-body {
    max-height: 520px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 0 0;
}
.gs-gantt-body.collapsed { display: none; }

.gs-gantt-list { display: flex; flex-direction: column; gap: 14px; padding-bottom: 8px; }

.gs-gantt-item {
    padding: 8px 4px;
    border-radius: 6px;
    transition: background 0.2s;
}
.gs-gantt-item:hover { background: #f8fafc; }
.gs-gantt-item.active { background: #eef4ff; box-shadow: inset 3px 0 0 #2E75B6; }

.gs-gantt-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.gs-gantt-name { font-size: 13px; font-weight: 600; color: #1F2937; }
.gs-gantt-meta { font-size: 12px; color: #6b7280; }
.gs-gantt-status-tag {
    margin-left: auto;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.gs-gantt-status-tag.lag {
    background: #fee2e2; color: #dc2626;
    animation: gsBlinkDot 1s ease-in-out infinite;
}
.gs-gantt-status-tag.warn { background: #fef3c7; color: #b45309; }

.gs-gantt-track-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}
.gs-gantt-track {
    position: relative;
    flex: 1;
    height: 22px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}
.gs-gantt-seg {
    position: absolute;
    top: 0;
    height: 100%;
    transition: width 0.4s ease;
}
/* 建设中光点流动 */
.gs-gantt-flow {
    position: absolute;
    top: 0;
    width: 24px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.85), transparent);
    animation: gsFlow 1.6s linear infinite;
    pointer-events: none;
}
@keyframes gsFlow {
    0% { left: -10%; }
    100% { left: 100%; }
}
.gs-gantt-pct {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 700;
    color: #1F4E79;
    background: rgba(255,255,255,0.92);
    padding: 0 4px;
    border-radius: 3px;
    white-space: nowrap;
    pointer-events: none;
}
.gs-gantt-end-mark {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.gs-gantt-end-mark.lag { background: #dc2626; animation: gsBlinkDot 0.9s infinite; }
.gs-gantt-end-mark.warn { background: #f59e0b; }

/* 时间轴 */
.gs-gantt-axis {
    position: relative;
    height: 22px;
    margin-top: 6px;
    border-top: 1px solid #e5e7eb;
    margin-left: 0;
}
.gs-gantt-tick {
    position: absolute;
    top: 4px;
    transform: translateX(-50%);
    font-size: 10px;
    color: #94a3b8;
    white-space: nowrap;
}
.gs-gantt-tick::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    width: 1px;
    height: 5px;
    background: #cbd5e1;
}

/* 甘特图悬浮提示 */
.gs-gantt-tooltip {
    position: fixed;
    z-index: 1100;
    background: rgba(30, 58, 95, 0.95);
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.8;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    min-width: 220px;
}
.gs-gantt-tooltip.visible { opacity: 1; }
.gs-gantt-tooltip .tt-title { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.gs-gantt-tooltip .tt-row { display: flex; justify-content: space-between; gap: 16px; }
.gs-gantt-tooltip .tt-k { color: #9db8d6; }
.gs-gantt-tooltip .tt-lag { color: #fca5a5; font-weight: 600; }

/* 统计卡片数字动画占位 */
.gs-stats-cards .stat-card .value { transition: color 0.3s; }
