/**
 * Industrial Theme for Task Control Center
 * Updated to use design-system.css variables
 */

/* ============================================
   CSS VARIABLES (Legacy - defined in design-system.css)
   ============================================ */
/* Note: Industrial theme variables are now mapped in design-system.css
   for backward compatibility. No need to redefine here. */

/* ============================================
   TASK MANAGER PAGE - INDUSTRIAL THEME
   ============================================ */
.task-manager-page.industrial-theme {
    background: var(--industrial-charcoal);
    min-height: calc(100vh - 48px);
    padding: 0 !important;
}

/* Page Header */
.task-manager-page.industrial-theme .page-header {
    background: linear-gradient(180deg, var(--industrial-black) 0%, var(--industrial-charcoal) 100%);
    padding: 16px 24px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--industrial-dark-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-manager-page.industrial-theme .page-header h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-primary);
    margin: 0;
    text-shadow: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.task-manager-page.industrial-theme .page-header h1::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--copper-accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--copper-accent);
    animation: header-pulse 2s ease-in-out infinite;
}

@keyframes header-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--copper-accent); }
    50% { opacity: 0.6; box-shadow: 0 0 4px var(--copper-accent); }
}

/* Header Status Indicators */
.header-status-indicators {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-indicator-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-secondary);
}

.status-light {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--signal-green);
    box-shadow: 0 0 6px var(--signal-green);
}

.status-light.active {
    animation: status-glow 1.5s ease-in-out infinite;
}

.status-light.warning {
    background: var(--signal-amber);
    box-shadow: 0 0 6px var(--signal-amber);
}

.status-light.error {
    background: var(--signal-red);
    box-shadow: 0 0 6px var(--signal-red);
}

@keyframes status-glow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.9); }
}

/* ============================================
   MAIN LAYOUT
   ============================================ */
.industrial-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 320px;
    gap: 0;
    background: var(--industrial-charcoal);
    height: calc(100vh - 88px);
    overflow: hidden;
}

.industrial-layout > * {
    background: var(--industrial-charcoal);
}

/* ============================================
   EXECUTION-FIRST LAYOUT
   ============================================ */
.industrial-layout.layout-exec-first {
    grid-template-columns: minmax(0, 1fr) 380px;
    grid-template-rows: minmax(0, 1fr) 180px;
    gap: 12px;
    padding: 10px;
    background: #161b24;
}

.industrial-layout.layout-exec-first .task-pool-sidebar {
    display: none;
}

.industrial-layout.layout-exec-first .bottom-panels {
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: 1fr;
    border: 1px solid #303b4f;
    border-radius: 12px;
    overflow: hidden;
    background: #1f2633;
}

.industrial-layout.layout-exec-first .execution-monitor-bottom {
    background: #1f2633;
}

.industrial-layout.layout-exec-first .execution-monitor-content {
    padding: 10px;
    background: linear-gradient(180deg, rgba(14, 19, 27, 0.35) 0%, rgba(14, 19, 27, 0.12) 100%);
}

.industrial-layout.layout-exec-first .pending-queue-top {
    grid-column: 2;
    grid-row: 1;
    border: 1px solid #303b4f;
    border-radius: 12px;
    overflow: hidden;
    background: #1f2633;
}

.industrial-layout.layout-exec-first .history-quick-panel {
    grid-column: 1;
    grid-row: 2;
    border: 1px solid #303b4f;
    border-radius: 12px;
    overflow: hidden;
    background: #1f2633;
}

.industrial-layout.layout-exec-first .connection-pool-panel {
    grid-column: 2;
    grid-row: 2;
    border: 1px solid #303b4f;
    border-radius: 12px;
    overflow: hidden;
    background: #1f2633;
}

.industrial-layout.layout-exec-first .panel-header {
    padding: 10px 12px;
    background: #273142;
    border-bottom: 1px solid #3b4860;
}

.industrial-layout.layout-exec-first .panel-header::before,
.industrial-layout.layout-exec-first .panel-header::after {
    background: radial-gradient(circle at 30% 30%, #77839d, #3e495d);
}

.industrial-layout.layout-exec-first .pending-queue-top .queue-tabs {
    transform: scale(0.9);
    transform-origin: left center;
}

.industrial-layout.layout-exec-first .pending-queue-top .pq-list {
    padding: 8px;
    background: #1b2230;
}

.industrial-layout.layout-exec-first .pending-queue-top .pq-item {
    margin-bottom: 5px;
}

.industrial-layout.layout-exec-first .pending-queue-top .pq-content {
    padding: 7px 8px;
    gap: 3px;
}

.industrial-layout.layout-exec-first .pending-queue-top .pq-name {
    font-size: 11px;
}

.industrial-layout.layout-exec-first .pending-queue-top .pq-tag {
    font-size: 8px;
    padding: 1px 4px;
}

.industrial-layout.layout-exec-first .pending-queue-top .queue-controls {
    display: none;
}

.industrial-layout.layout-exec-first .pq-collapsed-hint {
    padding: 5px 10px 8px;
    font-size: 10px;
    color: #9aa8bf;
    border-top: 1px solid rgba(72, 84, 106, 0.45);
}

.industrial-layout.layout-exec-first .history-quick-panel .execution-log {
    padding: 6px 10px;
    font-size: 10px;
    background: #1b2230;
}

.industrial-layout.layout-exec-first .history-quick-panel .log-entry {
    padding: 2px 0;
}

.industrial-layout.layout-exec-first .pool-panel-content {
    padding: 8px;
    gap: 8px;
    background: #1b2230;
}

.industrial-layout.layout-exec-first .pool-cards-grid {
    grid-template-columns: 1fr;
    gap: 8px;
}

.industrial-layout.layout-exec-first .pool-card {
    padding: 10px;
    border-color: #3d4b64;
    background: #232c3d;
}

.industrial-layout.layout-exec-first .pool-card-header {
    margin-bottom: 5px;
}

.industrial-layout.layout-exec-first .pool-card-host,
.industrial-layout.layout-exec-first .pool-card-metrics,
.industrial-layout.layout-exec-first .pool-card-realtime,
.industrial-layout.layout-exec-first .pool-agents-section {
    display: none;
}

.industrial-layout.layout-exec-first .pool-card-name {
    font-size: 12px;
}

.industrial-layout.layout-exec-first .pool-card-db {
    font-size: 10px;
}

.industrial-layout.layout-exec-first .execution-empty {
    width: min(560px, 92%);
    margin: 26px auto;
    padding: 22px 18px;
    border: 1px dashed #4a5873;
    border-radius: 12px;
    background: rgba(31, 40, 57, 0.4);
}

.industrial-layout.layout-exec-first .execution-empty-icon {
    font-size: 16px;
    margin-bottom: 8px;
    color: #9fb0cd;
}

.industrial-layout.layout-exec-first .execution-empty-text {
    color: #b8c6df;
}

/* ============================================
   TASK POOL SIDEBAR
   ============================================ */
.task-pool-sidebar {
    grid-column: 1;
    grid-row: 1;
    background: var(--industrial-graphite);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-primary);
    padding: 14px 16px;
    background: var(--industrial-slate);
    border-bottom: 1px solid var(--industrial-dark-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Panel Header Rivets */
.panel-header::before,
.panel-header::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #6a6a75, #3a3a45);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.5), 0 1px 1px rgba(255,255,255,0.05);
}

.panel-header::before {
    left: 6px;
}

.panel-header::after {
    right: 6px;
}

.panel-header .count-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--copper-accent);
    background: rgba(184, 115, 51, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(184, 115, 51, 0.3);
}

.task-pool-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 8px;
}

/* Custom Scrollbar */
.task-pool-list::-webkit-scrollbar,
.execution-log::-webkit-scrollbar,
.pending-queue-track::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.task-pool-list::-webkit-scrollbar-track,
.execution-log::-webkit-scrollbar-track,
.pending-queue-track::-webkit-scrollbar-track {
    background: var(--industrial-black);
    border-radius: 3px;
}

.task-pool-list::-webkit-scrollbar-thumb,
.execution-log::-webkit-scrollbar-thumb,
.pending-queue-track::-webkit-scrollbar-thumb {
    background: var(--industrial-slate);
    border-radius: 3px;
}

.task-pool-list::-webkit-scrollbar-thumb:hover,
.execution-log::-webkit-scrollbar-thumb:hover,
.pending-queue-track::-webkit-scrollbar-thumb:hover {
    background: var(--brushed-aluminum);
}

/* ============================================
   TASK POOL CARD (Compact Bar Style)
   ============================================ */
.task-pool-card-industrial {
    background: var(--industrial-charcoal);
    border: 1px solid var(--industrial-dark-border);
    border-radius: 6px;
    padding: 8px 10px;
    position: relative;
    transition: all 0.2s ease;
    cursor: default;
    width: calc(20% - 6.4px);
    min-width: 120px;
    max-width: calc(20% - 6.4px);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.task-pool-card-industrial::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 6px 0 0 6px;
    background: var(--steel-blue);
}

.task-pool-card-industrial.type-tag_analysis::before { background: var(--steel-blue); }
.task-pool-card-industrial.type-smart_summary::before { background: var(--signal-green); }
.task-pool-card-industrial.type-ai_judgment::before { background: #9c27b0; }
.task-pool-card-industrial.type-ai_report_tag::before { background: #17a2b8; }
.task-pool-card-industrial.type-ai_report_summary::before { background: #fd7e14; }
.task-pool-card-industrial.type-ai_report_sales::before { background: #e83e8c; }
.task-pool-card-industrial.type-ai_report_customer::before { background: #20c997; }
.task-pool-card-industrial.type-ai_report_pricing::before { background: #ffc107; }

.task-pool-card-industrial:hover {
    transform: translateX(4px);
    border-color: var(--copper-accent);
    box-shadow: 0 0 12px rgba(184, 115, 51, 0.2);
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.task-card-name {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 11px;
    color: var(--text-primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 6px;
}

.task-card-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.task-card-delete:hover {
    color: var(--signal-red);
}

.task-card-info {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.task-card-info span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.task-card-actions {
    display: flex;
    gap: 4px;
    margin-top: auto;
}

.task-action-btn {
    flex: 1;
    padding: 4px 6px;
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 500;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.task-action-btn.queue {
    background: var(--steel-blue);
    color: white;
}

.task-action-btn.queue:hover {
    background: var(--steel-blue-dim);
    transform: translateY(-1px);
}

.task-action-btn.trigger {
    background: #ff5722;
    color: white;
}

.task-action-btn.trigger:hover {
    background: #e64a19;
    transform: translateY(-1px);
}

.task-action-btn.execute {
    background: var(--signal-green);
    color: white;
}

.task-action-btn.execute:hover {
    background: var(--signal-green-dim);
    transform: translateY(-1px);
}

.task-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Task Type Badge */
.task-type-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 500;
    color: white;
}

/* Task Card Details */
.task-card-details {
    font-family: var(--font-body);
    font-size: 9px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    max-height: 80px;
    overflow-y: auto;
    line-height: 1.4;
}

.task-card-details::-webkit-scrollbar {
    width: 4px;
}

.task-card-details::-webkit-scrollbar-thumb {
    background: var(--industrial-slate);
    border-radius: 2px;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-icon {
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}

.detail-row.highlight {
    color: var(--signal-green);
    font-weight: 500;
}

.detail-row.status-skip {
    color: var(--signal-green);
}

.detail-row.status-overwrite {
    color: var(--signal-amber);
}

.detail-hint {
    color: var(--steel-blue);
    font-size: 9px;
    margin-left: 4px;
}

/* Task Pool Empty State */
.task-pool-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-muted);
    text-align: center;
}

.task-pool-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.task-pool-empty-text {
    font-family: var(--font-body);
    font-size: 14px;
    margin-bottom: 8px;
}

.task-pool-empty-hint {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--text-muted);
}

/* ============================================
   EXECUTION MONITOR (Central Focus)
   ============================================ */

.execution-monitor-content {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px 24px;
    gap: 24px;
    overflow: auto;
    flex-wrap: wrap;
}

/* Circular Progress Ring */
.progress-ring-container {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: var(--industrial-slate);
    stroke-width: 10;
}

.progress-ring-fill {
    fill: none;
    stroke: url(#copper-gradient);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 377;
    stroke-dashoffset: 377;
    transition: stroke-dashoffset 0.5s ease;
    filter: drop-shadow(0 0 6px rgba(184, 115, 51, 0.5));
}

.progress-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-ring-percent {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 24px;
    color: var(--copper-glow);
    line-height: 1;
}

.progress-ring-label {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Execution Info Panel */
.execution-info-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 280px;
}

/* Time Info Row */
.execution-time-info {
    display: flex;
    gap: 16px;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-secondary);
    padding: 8px 0;
    border-bottom: 1px solid var(--industrial-dark-border);
    margin-bottom: 4px;
}

.execution-time-info .time-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.execution-time-info .time-label {
    color: var(--text-muted);
}

.execution-time-info .time-value {
    font-family: var(--font-mono);
    color: var(--text-primary);
}

/* Execution Stats Grid */
.execution-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
}

.stat-box {
    background: var(--industrial-charcoal);
    border: 1px solid var(--industrial-dark-border);
    border-radius: 6px;
    padding: 12px 10px;
    text-align: center;
}

.stat-box-label {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.stat-box-value {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.stat-box-value.highlight {
    color: var(--copper-glow);
}

/* Server Load Bars */
.server-load-section {
    width: 100%;
}

.server-load-title {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.server-load-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.server-load-name {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-secondary);
    width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.server-load-track {
    flex: 1;
    height: 6px;
    background: var(--industrial-slate);
    border-radius: 3px;
    overflow: hidden;
}

.server-load-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--copper-dim), var(--copper-glow));
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
}

.server-load-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: load-shimmer 1.5s infinite;
}

@keyframes load-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.server-load-stats {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
    min-width: 60px;
    text-align: right;
}

/* Execution Empty State */
.execution-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
    text-align: center;
}

.execution-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.execution-empty-text {
    font-family: var(--font-display);
    font-size: 16px;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.execution-empty-hint {
    font-family: var(--font-body);
    font-size: 13px;
}

/* Executing Task Info */
.executing-task-info {
    width: 100%;
    background: var(--industrial-charcoal);
    border: 1px solid var(--industrial-dark-border);
    border-radius: 6px;
    padding: 10px 12px;
}

.executing-task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.executing-task-name {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.executing-task-type {
    font-family: var(--font-body);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--steel-blue);
    color: white;
}

.stop-btn {
    background: var(--signal-red);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.stop-btn:hover {
    background: var(--signal-red-dim);
    transform: translateY(-1px);
}

.stop-btn:active {
    transform: translateY(0);
}

/* ============================================
   EXECUTION MONITOR GRID POSITION
   ============================================ */
/* Pending Queue - Top Right (swapped with execution monitor) */
.pending-queue-top {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--industrial-graphite);
}

/* ============================================
   PENDING QUEUE - CONVEYOR BELT DESIGN
   ============================================ */
.pq-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--industrial-charcoal);
    padding: 8px;
}

.pq-list::-webkit-scrollbar {
    width: 6px;
}

.pq-list::-webkit-scrollbar-track {
    background: var(--industrial-black);
}

.pq-list::-webkit-scrollbar-thumb {
    background: var(--industrial-slate);
    border-radius: 3px;
}

/* Queue Item */
.pq-item {
    display: flex;
    align-items: stretch;
    background: var(--industrial-graphite);
    border: 1px solid var(--industrial-dark-border);
    border-radius: 6px;
    margin-bottom: 6px;
    transition: all 0.15s ease;
    position: relative;
}

.pq-item:hover {
    border-color: var(--copper-accent);
    box-shadow: 0 0 12px rgba(184, 115, 51, 0.15);
}

.pq-item.pq-first {
    border-color: var(--copper-accent);
    background: linear-gradient(90deg, rgba(184, 115, 51, 0.08) 0%, transparent 30%);
}

.pq-item.pq-first::before {
    content: '下一个';
    position: absolute;
    top: -8px;
    left: 50px;
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 600;
    color: var(--copper-accent);
    background: var(--industrial-charcoal);
    padding: 1px 6px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

/* Sequence Column */
.pq-sequence {
    width: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    border-right: 1px solid var(--industrial-dark-border);
    background: rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.pq-num {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--copper-accent);
    line-height: 1;
}

.pq-reorder {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.pq-item:hover .pq-reorder {
    opacity: 1;
}

.pq-arrow {
    width: 18px;
    height: 14px;
    background: transparent;
    border: 1px solid var(--industrial-dark-border);
    border-radius: 3px;
    color: var(--text-muted);
    font-size: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
    padding: 0;
    line-height: 1;
}

.pq-arrow:hover {
    background: var(--copper-accent);
    border-color: var(--copper-accent);
    color: white;
}

.pq-arrow:active {
    transform: scale(0.9);
}

/* Content Column */
.pq-content {
    flex: 1;
    padding: 8px 10px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pq-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pq-type {
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 600;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.pq-name {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pq-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.pq-tag {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-muted);
    background: rgba(50, 50, 60, 0.5);
    padding: 2px 5px;
    border-radius: 3px;
    white-space: nowrap;
}

.pq-tag.date {
    color: var(--steel-blue);
    background: rgba(74, 111, 165, 0.15);
}

.pq-tag.skip {
    color: var(--signal-green);
    background: rgba(67, 160, 71, 0.15);
}

.pq-tag.overwrite {
    color: var(--signal-amber);
    background: rgba(255, 179, 0, 0.15);
}

/* Delete Button */
.pq-delete {
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-left: 1px solid var(--industrial-dark-border);
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.pq-item:hover .pq-delete {
    opacity: 1;
}

.pq-delete svg {
    width: 14px;
    height: 14px;
}

.pq-delete:hover {
    background: rgba(229, 57, 53, 0.15);
    color: var(--signal-red);
}

/* Empty State */
.pq-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 13px;
}

/* ============================================
   BOTTOM PANELS
   ============================================ */
.bottom-panels {
    grid-column: 1 / -1;  /* 跨越所有列 */
    grid-row: 2;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0;
    background: var(--industrial-charcoal);
    height: 100%;
    overflow: hidden;
}

.bottom-panels > * {
    background: var(--industrial-charcoal);
}

/* Execution Monitor - Now in bottom left */
.execution-monitor-bottom {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--industrial-graphite);
}

.execution-monitor-bottom .execution-monitor-content {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 10px 12px;
    gap: 12px;
    overflow-y: auto;
    overflow-x: hidden;
}



.execution-monitor-bottom .progress-ring-container {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.execution-monitor-bottom .progress-ring-bg,
.execution-monitor-bottom .progress-ring-fill {
    stroke-width: 8;
}

.execution-monitor-bottom .progress-ring-fill {
    stroke-dasharray: 264;
    stroke-dashoffset: 264;
}

.execution-monitor-bottom .progress-ring-percent {
    font-size: 18px;
}

.execution-monitor-bottom .progress-ring-label {
    font-size: 10px;
}

.execution-monitor-bottom .execution-info-panel {
    flex: 1;
    gap: 8px;
    min-width: 200px;
}

.execution-monitor-bottom .execution-stats {
    gap: 8px;
}

.execution-monitor-bottom .stat-box {
    padding: 8px 6px;
}

.execution-monitor-bottom .stat-box-label {
    font-size: 10px;
    margin-bottom: 4px;
}

.execution-monitor-bottom .stat-box-value {
    font-size: 13px;
}

.execution-monitor-bottom .execution-time-info {
    padding: 6px 0;
    font-size: 11px;
}

.execution-monitor-bottom .executing-task-header {
    padding: 8px 10px;
}

.execution-monitor-bottom .executing-task-name {
    font-size: 13px;
}

.execution-monitor-bottom .stop-btn {
    padding: 4px 12px;
    font-size: 11px;
}

.execution-monitor-bottom .server-load-section {
    display: none; /* Hide in compact mode */
}

.execution-monitor-bottom .execution-empty {
    padding: 20px;
}

.execution-monitor-bottom .execution-empty-icon {
    font-size: 14px;
}

.execution-monitor-bottom .execution-empty-text {
    font-size: 12px;
}

/* ============================================
   PENDING QUEUE (Horizontal Track)
   ============================================ */
.pending-queue-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pending-queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 16px;
}

/* Queue Tabs */
.queue-tabs {
    display: flex;
    gap: 2px;
    background: var(--industrial-black);
    padding: 2px;
    border-radius: 5px;
}

.queue-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.queue-tab:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
}

.queue-tab.active {
    color: var(--text-primary);
    background: var(--industrial-slate);
}

.queue-tab .tab-count {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
}

.queue-tab.active .tab-count {
    color: var(--copper-accent);
    background: rgba(184, 115, 51, 0.15);
}

/* Scheduled Task Item */
.pq-item.scheduled-item {
    border-left: 3px solid var(--steel-blue);
}

.pq-tag.next-run {
    color: var(--signal-green);
    background: rgba(67, 160, 71, 0.15);
}

/* 执行状态标签 */
.pq-tag.status-running {
    color: var(--signal-amber);
    background: rgba(255, 179, 0, 0.15);
}

.pq-tag.status-completed {
    color: var(--signal-green);
    background: rgba(67, 160, 71, 0.15);
}

.pq-tag.status-failed {
    color: var(--signal-red);
    background: rgba(229, 57, 53, 0.15);
}

.pq-tag.status-pending {
    color: var(--text-muted);
    background: rgba(100, 100, 110, 0.15);
}

/* 触发任务状态 */
.pq-tag.status-listening {
    color: var(--signal-cyan, #26c6da);
    background: rgba(38, 198, 218, 0.15);
}

.pq-tag.trigger-name {
    color: var(--signal-purple, #ab47bc);
    background: rgba(171, 71, 188, 0.15);
}

.pq-item.trigger-item {
    border-left: 2px solid var(--signal-purple, #ab47bc);
}

.pq-item.scene-item {
    border-left: 2px solid #60a5fa;
}

.queue-controls {
    display: flex;
    gap: 8px;
}

.queue-control-btn {
    padding: 4px 10px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.queue-control-btn.start {
    background: var(--signal-green);
    color: white;
}

.queue-control-btn.start:hover {
    background: var(--signal-green-dim);
}

.queue-control-btn.stop {
    background: var(--signal-amber);
    color: #212529;
}

.queue-control-btn.stop:hover {
    background: var(--signal-amber-dim);
}

.queue-control-btn.clear {
    background: var(--industrial-slate);
    color: var(--text-secondary);
}

.queue-control-btn.clear:hover {
    background: var(--industrial-dark-border);
}

.pending-queue-track {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 12px 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--industrial-charcoal);
}

/* Queue Card (Carriage Style) */
.queue-card {
    flex: 0 0 180px;
    background: var(--industrial-graphite);
    border: 1px solid var(--industrial-dark-border);
    border-radius: 6px;
    padding: 10px;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}

.queue-card:hover {
    border-color: var(--copper-accent);
    transform: translateY(-2px);
}

.queue-card-number {
    position: absolute;
    top: -8px;
    left: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 11px;
    color: var(--copper-accent);
    background: var(--industrial-charcoal);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid var(--copper-accent);
}

.queue-card-name {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 12px;
    color: var(--text-primary);
    margin-top: 4px;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.queue-card-info {
    font-family: var(--font-body);
    font-size: 10px;
    color: var(--text-muted);
    flex: 1;
}

.queue-card-actions {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.queue-card-btn {
    flex: 1;
    padding: 4px;
    font-size: 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    background: var(--industrial-slate);
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.queue-card-btn:hover {
    background: var(--steel-blue);
    color: white;
}

.queue-card-btn.delete:hover {
    background: var(--signal-red);
}

/* Expanded Queue Card */
.queue-card-expanded {
    flex: 0 0 220px;
    min-width: 220px;
    background: var(--industrial-graphite);
    border: 1px solid var(--industrial-dark-border);
    border-radius: 6px;
    padding: 10px 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}

.queue-card-expanded:hover {
    border-color: var(--copper-accent);
    transform: translateY(-2px);
}

.queue-card-expanded .queue-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.queue-card-expanded .queue-card-number {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    color: var(--copper-accent);
    background: var(--industrial-charcoal);
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid var(--copper-accent);
}

.queue-card-expanded .queue-card-actions {
    display: flex;
    gap: 4px;
}

.queue-card-expanded .queue-card-btn {
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: var(--steel-blue);
    color: white;
    transition: all 0.15s ease;
    min-width: 28px;
}

.queue-card-expanded .queue-card-btn:hover {
    background: var(--steel-blue-dim);
    transform: scale(1.05);
}

.queue-card-expanded .queue-card-btn.delete {
    background: var(--signal-red);
}

.queue-card-expanded .queue-card-btn.delete:hover {
    background: var(--signal-red-dim);
}

.queue-card-expanded .queue-card-name {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.queue-card-expanded .queue-card-type {
    margin-bottom: 8px;
}

.queue-card-expanded .queue-card-type span {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 500;
    color: white;
}

.queue-card-expanded .queue-card-details {
    font-family: var(--font-body);
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
    overflow-y: auto;
}

.queue-card-expanded .queue-card-details > div {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 1px 0;
}

/* Queue Empty State */
.queue-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: var(--text-muted);
    text-align: center;
    width: 100%;
    grid-column: 1 / -1; /* Span all columns in grid */
}

.queue-empty-icon {
    font-size: 36px;
    margin-bottom: 8px;
    opacity: 0.4;
}

.queue-empty-text {
    font-family: var(--font-body);
    font-size: 13px;
}

/* ============================================
   HISTORY LOG (Terminal Style)
   ============================================ */
.history-log-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.execution-log {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    background: var(--industrial-black);
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.6;
}

.log-entry {
    display: flex;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(58, 58, 69, 0.3);
}

.log-entry:last-child {
    border-bottom: none;
}

.log-timestamp {
    color: var(--text-muted);
    flex-shrink: 0;
}

.log-status {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.log-status.success {
    background: var(--signal-green);
    box-shadow: 0 0 4px var(--signal-green);
}

.log-status.failed {
    background: var(--signal-red);
    box-shadow: 0 0 4px var(--signal-red);
}

.log-status.cancelled {
    background: var(--signal-yellow, #f0ad4e);
    box-shadow: 0 0 4px var(--signal-yellow, #f0ad4e);
}

.log-message {
    color: var(--text-secondary);
    flex: 1;
    word-break: break-word;
}

.log-entry.success .log-message {
    color: var(--signal-green);
}

.log-entry.failed .log-message {
    color: var(--signal-red);
}

.log-entry.cancelled .log-message {
    color: var(--signal-yellow, #f0ad4e);
}

/* 任务来源标签 */
.log-source-tag {
    display: inline-block;
    font-size: 9px;
    font-weight: 500;
    padding: 1px 4px;
    border-radius: 3px;
    background: var(--steel-blue);
    color: white;
    margin-right: 4px;
    vertical-align: middle;
}

.log-source-tag.scene {
    background: #3b82f6;
}

.log-entry.scheduled {
    border-left: 2px solid var(--steel-blue);
    padding-left: 6px;
}

/* History Empty State */
.history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: var(--text-muted);
    text-align: center;
    background: var(--industrial-black);
    height: 100%;
}

.history-empty-icon {
    font-size: 36px;
    margin-bottom: 8px;
    opacity: 0.4;
}

.history-empty-text {
    font-family: var(--font-mono);
    font-size: 12px;
}

/* ============================================
   TRIGGER TASKS SECTION
   ============================================ */
.trigger-section {
    background: var(--industrial-graphite);
    border-radius: 6px;
    margin: 12px;
    overflow: hidden;
}

.trigger-section .panel-header {
    font-size: 12px;
    padding: 10px 14px;
}

.trigger-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 8px;
}

.trigger-card {
    background: var(--industrial-charcoal);
    border: 1px solid var(--industrial-dark-border);
    border-radius: 4px;
    padding: 8px 10px;
    margin-bottom: 6px;
    position: relative;
}

.trigger-card:last-child {
    margin-bottom: 0;
}

.trigger-status-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.trigger-name {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 12px;
    color: var(--text-primary);
    margin-bottom: 4px;
    padding-right: 16px;
}

.trigger-info {
    font-family: var(--font-body);
    font-size: 10px;
    color: var(--text-muted);
}

.trigger-delete {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
    padding: 2px;
    transition: color 0.2s;
}

.trigger-delete:hover {
    color: var(--signal-red);
}

/* Trigger Empty State */
.trigger-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 12px;
    color: var(--text-muted);
    text-align: center;
}

.trigger-empty-icon {
    font-family: var(--font-mono);
    font-size: 24px;
    margin-bottom: 8px;
    opacity: 0.4;
}

.trigger-empty-text {
    font-family: var(--font-body);
    font-size: 12px;
    margin-bottom: 4px;
}

.trigger-empty-hint {
    font-family: var(--font-body);
    font-size: 10px;
    color: var(--text-muted);
    opacity: 0.7;
}

/* Trigger Dialog */
.trigger-dialog {
    background: var(--industrial-slate);
    border-radius: 6px;
    padding: 12px;
    margin: 8px;
    border: 1px solid var(--copper-accent);
}

.trigger-dialog-title {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 12px;
    color: var(--copper-glow);
    margin-bottom: 10px;
}

.trigger-dialog select {
    width: 100%;
    padding: 8px;
    margin-bottom: 8px;
    background: var(--industrial-charcoal);
    border: 1px solid var(--industrial-dark-border);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 12px;
}

.trigger-dialog-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.trigger-dialog-btn {
    padding: 6px 12px;
    font-family: var(--font-body);
    font-size: 11px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.trigger-dialog-btn.cancel {
    background: var(--industrial-dark-border);
    color: var(--text-secondary);
}

.trigger-dialog-btn.confirm {
    background: var(--copper-accent);
    color: white;
}

/* ============================================
   DATE PICKER DIALOG
   ============================================ */
.date-picker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.date-picker-dialog {
    background: var(--industrial-graphite);
    border: 1px solid var(--copper-accent);
    border-radius: 8px;
    padding: 20px;
    min-width: 320px;
    box-shadow: var(--copper-glow-shadow);
}

.date-picker-title {
    font-family: var(--font-display);
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
}

.date-picker-task-name {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--copper-glow);
    text-align: center;
    margin-bottom: 16px;
}

.date-quick-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.date-quick-btn {
    flex: 1;
    min-width: 70px;
    padding: 8px;
    font-family: var(--font-body);
    font-size: 12px;
    border: 1px solid var(--industrial-dark-border);
    border-radius: 4px;
    background: var(--industrial-charcoal);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.date-quick-btn:hover {
    border-color: var(--copper-accent);
    color: var(--text-primary);
}

.date-quick-btn.active {
    background: var(--copper-accent);
    border-color: var(--copper-accent);
    color: white;
}

.date-picker-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 16px;
    background: var(--industrial-charcoal);
    border: 1px solid var(--industrial-dark-border);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 14px;
    text-align: center;
}

.date-picker-input:focus {
    outline: none;
    border-color: var(--copper-accent);
}

.date-picker-actions {
    display: flex;
    gap: 10px;
}

.date-picker-btn {
    flex: 1;
    padding: 10px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.date-picker-btn.cancel {
    background: var(--industrial-slate);
    color: var(--text-secondary);
}

.date-picker-btn.cancel:hover {
    background: var(--industrial-dark-border);
}

.date-picker-btn.confirm {
    background: var(--copper-accent);
    color: white;
}

.date-picker-btn.confirm:hover {
    background: var(--copper-glow);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes panel-startup {
    0% {
        opacity: 0;
        filter: brightness(0.5);
    }
    50% {
        opacity: 1;
        filter: brightness(1.2);
    }
    100% {
        opacity: 1;
        filter: brightness(1);
    }
}

.industrial-theme .panel-startup {
    animation: panel-startup 0.6s ease-out;
}

/* Progress Ring Animation */
@keyframes ring-glow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(184, 115, 51, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 16px rgba(184, 115, 51, 0.8));
    }
}

.progress-ring-fill.animating {
    animation: ring-glow 2s ease-in-out infinite;
}

/* Button Press Effect */
.task-action-btn:active,
.queue-control-btn:active,
.stop-btn:active {
    transform: translateY(1px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Noise texture overlay removed */

/* ============================================
   CONNECTION POOL MONITOR SIDEBAR
   ============================================ */
.connection-pool-sidebar {
    grid-column: 2;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--industrial-graphite);
    border-left: 1px solid var(--industrial-dark-border);
}

.connection-pool-sidebar .panel-header {
    flex-shrink: 0;
}

.pool-monitor-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--industrial-black);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pool-monitor-content::-webkit-scrollbar {
    width: 6px;
}

.pool-monitor-content::-webkit-scrollbar-track {
    background: transparent;
}

.pool-monitor-content::-webkit-scrollbar-thumb {
    background: var(--industrial-slate);
    border-radius: 3px;
}

/* Pool Summary - Large Version */
.pool-summary-large {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px;
    background: var(--industrial-charcoal);
    border-radius: 8px;
    border: 1px solid var(--industrial-dark-border);
}

.pool-usage-ring-large {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.pool-usage-ring-large .circular-chart-large {
    width: 100%;
    height: 100%;
}

.pool-usage-ring-large .circle-bg {
    fill: none;
    stroke: var(--industrial-slate);
    stroke-width: 2.5;
}

.pool-usage-ring-large .circle-fill {
    fill: none;
    stroke: var(--copper-accent);
    stroke-width: 2.5;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dasharray 0.5s ease;
}

.pool-usage-ring-large .percentage-large {
    fill: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 600;
    text-anchor: middle;
}

.pool-usage-ring-large .percentage-label {
    fill: var(--text-muted);
    font-family: var(--font-body);
    font-size: 4px;
    text-anchor: middle;
}

.pool-summary-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pool-stat-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pool-stat-icon {
    font-size: 10px;
    width: 14px;
}

.pool-stat-name {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-secondary);
    flex: 1;
}

.pool-stat-num {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Section Titles */
.pool-section-title {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--industrial-dark-border);
}

/* Database Pool List */
.pool-db-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pool-db-item {
    background: var(--industrial-charcoal);
    border: 1px solid var(--industrial-dark-border);
    border-radius: 6px;
    padding: 12px;
    transition: all 0.15s ease;
}

.pool-db-item:hover {
    border-color: var(--copper-accent);
    box-shadow: 0 0 12px rgba(184, 115, 51, 0.15);
}

.pool-db-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.pool-db-icon {
    color: var(--steel-blue);
    display: flex;
    align-items: center;
}

.pool-db-name {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.pool-db-meta {
    margin-bottom: 8px;
}

.pool-db-host {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
}

.pool-db-bar {
    height: 6px;
    background: var(--industrial-slate);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.pool-db-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--copper-dim), var(--copper-accent));
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
}

.pool-db-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: pool-shimmer 2s infinite;
}

@keyframes pool-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.pool-db-stats {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
}

.pool-agent-limit {
    color: var(--copper-accent);
}

/* Agent Quota List */
.pool-agent-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pool-agent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--industrial-charcoal);
    border-radius: 6px;
    border-left: 3px solid var(--signal-green);
    transition: all 0.15s ease;
}

.pool-agent-item:hover {
    background: var(--industrial-slate);
}

.pool-agent-info {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    flex: 1;
}

.pool-agent-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--signal-green);
    box-shadow: 0 0 8px var(--signal-green);
    animation: agent-pulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes agent-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pool-agent-id {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pool-agent-usage {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-shrink: 0;
}

.pool-agent-count {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 600;
    color: var(--copper-accent);
}

.pool-agent-label {
    font-family: var(--font-body);
    font-size: 10px;
    color: var(--text-muted);
}

/* Empty State */
.pool-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 13px;
    gap: 12px;
}

.pool-empty-icon {
    opacity: 0.4;
    color: var(--steel-blue);
}

/* Update Time */
.pool-update-time {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    padding-top: 12px;
    margin-top: auto;
    border-top: 1px solid var(--industrial-dark-border);
}

.pool-update-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--signal-green);
    animation: agent-pulse 2s ease-in-out infinite;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 1400px) {
    .industrial-layout {
        grid-template-columns: 1fr 280px;
    }

    .industrial-layout.layout-exec-first .bottom-panels {
        grid-template-columns: 1fr;
    }

    .execution-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1200px) {
    .industrial-layout {
        grid-template-columns: 1fr 240px;
    }

    .industrial-layout.layout-exec-first {
        grid-template-columns: minmax(0, 1fr) 280px;
        grid-template-rows: minmax(0, 1fr) 160px;
    }

    .industrial-layout.layout-exec-first .bottom-panels {
        grid-template-columns: 1fr;
    }

    .pool-summary-large {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .pool-usage-ring-large {
        width: 60px;
        height: 60px;
        align-self: center;
    }
}

@media (max-width: 992px) {
    .industrial-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto auto;
    }

    .industrial-layout.layout-exec-first {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(320px, 1fr) 220px 200px 150px;
        height: auto;
        min-height: calc(100vh - 88px);
    }

    .industrial-layout.layout-exec-first .bottom-panels {
        grid-column: 1;
        grid-row: 1;
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
    }

    .industrial-layout.layout-exec-first .pending-queue-top {
        grid-column: 1;
        grid-row: 2;
        max-height: none;
        border-left: none;
        border-top: 1px solid var(--industrial-dark-border);
    }

    .industrial-layout.layout-exec-first .connection-pool-panel {
        grid-column: 1;
        grid-row: 3;
        max-height: none;
        border-left: none;
        border-top: 1px solid var(--industrial-dark-border);
    }

    .industrial-layout.layout-exec-first .history-quick-panel {
        grid-column: 1;
        grid-row: 4;
        border-right: none;
        border-top: 1px solid var(--industrial-dark-border);
    }

    .task-pool-sidebar {
        grid-column: 1;
        grid-row: 1;
        max-height: 200px;
    }

    .connection-pool-sidebar {
        grid-column: 1;
        grid-row: 4;
        width: 100%;
        max-height: 280px;
        border-left: none;
        border-top: 1px solid var(--industrial-dark-border);
    }

    .bottom-panels {
        grid-column: 1;
        grid-row: 3;
    }

    .pool-summary-large {
        flex-direction: row;
    }

    .progress-ring-container {
        width: 160px;
        height: 160px;
    }
}

/* ============================================
   INDUSTRIAL DATE PICKER MODAL
   ============================================ */
.industrial-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 13, 15, 0.85);
    backdrop-filter: blur(4px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modal-fade-in 0.2s ease-out;
}

@keyframes modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.industrial-modal {
    background: var(--industrial-graphite);
    border: 1px solid var(--industrial-dark-border);
    border-radius: 8px;
    max-width: 420px;
    width: 90%;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 0 1px rgba(184, 115, 51, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    animation: modal-slide-in 0.25s ease-out;
    overflow: hidden;
}

@keyframes modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.industrial-modal-header {
    background: linear-gradient(180deg, var(--industrial-slate) 0%, var(--industrial-graphite) 100%);
    padding: 16px 20px;
    border-bottom: 1px solid var(--industrial-dark-border);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.industrial-modal-header::before,
.industrial-modal-header::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #6a6a75, #3a3a45);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}

.industrial-modal-header::before {
    left: 8px;
}

.industrial-modal-header::after {
    right: 8px;
}

.industrial-modal-icon {
    width: 32px;
    height: 32px;
    background: var(--industrial-charcoal);
    border: 1px solid var(--copper-accent);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 0 8px rgba(184, 115, 51, 0.2);
}

.industrial-modal-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-primary);
    margin: 0;
}

/* Modal Body */
.industrial-modal-body {
    padding: 20px;
}

/* Task Info Card */
.industrial-task-info {
    background: var(--industrial-charcoal);
    border: 1px solid var(--industrial-dark-border);
    border-left: 3px solid var(--copper-accent);
    border-radius: 4px;
    padding: 12px 14px;
    margin-bottom: 20px;
}

.industrial-task-name {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.industrial-task-type {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-muted);
}

/* Form Section */
.industrial-form-section {
    margin-bottom: 20px;
}

.industrial-form-label {
    display: block;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

/* Date Input */
.industrial-date-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--industrial-charcoal);
    border: 1px solid var(--industrial-dark-border);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-primary);
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.industrial-date-input:focus {
    outline: none;
    border-color: var(--copper-accent);
    box-shadow: 0 0 0 2px rgba(184, 115, 51, 0.15);
}

.industrial-date-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.industrial-date-input::-webkit-calendar-picker-indicator {
    filter: invert(0.7);
    cursor: pointer;
}

.industrial-form-hint {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.4;
}

/* Quick Select Buttons */
.industrial-quick-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.industrial-quick-btn {
    padding: 8px 14px;
    background: var(--industrial-charcoal);
    border: 1px solid var(--industrial-dark-border);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
}

.industrial-quick-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.industrial-quick-btn:hover {
    background: var(--industrial-slate);
    border-color: var(--brushed-aluminum);
    color: var(--text-primary);
}

.industrial-quick-btn.active {
    background: linear-gradient(180deg, var(--copper-dim) 0%, var(--copper-accent) 100%);
    border-color: var(--copper-glow);
    color: white;
    box-shadow: 0 0 12px rgba(184, 115, 51, 0.3);
}

.industrial-quick-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--copper-glow);
    box-shadow: 0 0 8px var(--copper-glow);
}

/* Modal Footer */
.industrial-modal-footer {
    padding: 16px 20px;
    background: var(--industrial-charcoal);
    border-top: 1px solid var(--industrial-dark-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.industrial-btn {
    padding: 10px 20px;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.industrial-btn-cancel {
    background: var(--industrial-slate);
    border-color: var(--industrial-dark-border);
    color: var(--text-secondary);
}

.industrial-btn-cancel:hover {
    background: var(--industrial-graphite);
    border-color: var(--brushed-aluminum);
    color: var(--text-primary);
}

.industrial-btn-confirm {
    background: linear-gradient(180deg, var(--copper-accent) 0%, var(--copper-dim) 100%);
    border-color: var(--copper-glow);
    color: white;
    box-shadow: 0 2px 8px rgba(184, 115, 51, 0.3);
}

.industrial-btn-confirm:hover {
    background: linear-gradient(180deg, var(--copper-glow) 0%, var(--copper-accent) 100%);
    box-shadow: 0 4px 16px rgba(184, 115, 51, 0.4);
    transform: translateY(-1px);
}

.industrial-btn-confirm:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(184, 115, 51, 0.3);
}

/* ============================================
   DATE PICKER MODAL - REFINED INDUSTRIAL
   ============================================ */
.dp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 12, 0.9);
    backdrop-filter: blur(8px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: dp-fade-in 0.2s ease-out;
}

@keyframes dp-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.dp-modal {
    background: linear-gradient(165deg, #1e1e24 0%, #16161a 100%);
    border: 1px solid #2a2a32;
    border-radius: 12px;
    width: 400px;
    max-width: 92vw;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset,
        0 1px 0 rgba(255, 255, 255, 0.04) inset;
    animation: dp-slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

@keyframes dp-slide-in {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
.dp-header {
    padding: 18px 20px;
    background: linear-gradient(180deg, rgba(45, 45, 55, 0.5) 0%, transparent 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dp-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dp-icon-wrap {
    width: 40px;
    height: 40px;
    background: linear-gradient(145deg, #252530, #1a1a20);
    border: 1px solid #3a3a45;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dp-icon {
    width: 20px;
    height: 20px;
    color: var(--copper-glow);
}

.dp-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dp-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.5px;
    color: #f0f0f4;
    margin: 0;
}

.dp-subtitle {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #5a5a68;
}

.dp-header-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3a3a45;
    transition: all 0.3s ease;
}

.dp-header-indicator.active {
    background: var(--copper-glow);
    box-shadow: 0 0 12px var(--copper-glow);
    animation: dp-pulse 1.2s ease-in-out infinite;
}

@keyframes dp-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

/* Body */
.dp-body {
    padding: 20px;
}

/* Task Panel */
.dp-task-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    margin-bottom: 20px;
}

.dp-task-badge {
    padding: 6px 10px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.dp-task-content {
    flex: 1;
    min-width: 0;
}

.dp-task-name {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    color: #e8e8ec;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.dp-task-type {
    font-family: var(--font-body);
    font-size: 12px;
    color: #6a6a78;
}

/* Date Section */
.dp-date-section {
    margin-bottom: 20px;
}

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

.dp-section-label {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #8a8a98;
    flex-shrink: 0;
}

.dp-section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(138, 138, 152, 0.3), transparent);
}

/* Chips */
.dp-chips {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.dp-chip {
    padding: 8px 14px;
    background: rgba(35, 35, 42, 0.8);
    border: 1px solid #3a3a45;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    color: #a0a0a8;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dp-chip-icon {
    font-size: 14px;
    opacity: 0.7;
}

.dp-chip:hover {
    background: rgba(50, 50, 60, 0.8);
    border-color: #505060;
    color: #d0d0d8;
}

.dp-chip.active {
    background: linear-gradient(135deg, var(--copper-accent), var(--copper-dim));
    border-color: var(--copper-glow);
    color: white;
    box-shadow: 0 2px 12px rgba(184, 115, 51, 0.35);
}

.dp-chip.active .dp-chip-icon {
    opacity: 1;
}

/* Date Input */
.dp-input-wrap {
    position: relative;
}

.dp-date-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(20, 20, 24, 0.8);
    border: 1px solid #3a3a45;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 15px;
    color: #e8e8ec;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.dp-date-input:focus {
    outline: none;
    border-color: var(--copper-accent);
    box-shadow: 0 0 0 3px rgba(184, 115, 51, 0.12);
}

.dp-date-input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.dp-date-input::-webkit-calendar-picker-indicator {
    filter: invert(0.6) sepia(0.3) saturate(3) hue-rotate(350deg);
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.dp-date-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.dp-input-hint {
    font-family: var(--font-body);
    font-size: 11px;
    color: #5a5a68;
    margin-top: 8px;
    padding-left: 2px;
}

/* Gauge Section */
.dp-gauge-section {
    margin-top: 6px;
}

.dp-gauge {
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 16px 18px;
    overflow: hidden;
}

.dp-gauge-track {
    position: absolute;
    left: 0;
    bottom: 0;
    right: 0;
    height: 3px;
    background: rgba(60, 60, 70, 0.5);
}

.dp-gauge-fill {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--signal-green), #6dd58c);
    transition: width 0.4s ease;
    box-shadow: 0 0 8px rgba(67, 160, 71, 0.4);
}

.dp-gauge-fill.loading {
    background: linear-gradient(90deg, var(--copper-accent), var(--copper-glow));
    box-shadow: 0 0 8px rgba(184, 115, 51, 0.4);
    animation: dp-loading-pulse 1s ease-in-out infinite;
}

.dp-gauge-fill.error {
    background: var(--signal-red);
    box-shadow: 0 0 8px rgba(229, 57, 53, 0.4);
}

@keyframes dp-loading-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.dp-gauge-content {
    display: flex;
    align-items: baseline;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.dp-gauge-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 13px;
    color: #8a8a98;
}

.dp-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(184, 115, 51, 0.2);
    border-top-color: var(--copper-glow);
    border-radius: 50%;
    animation: dp-spin 0.8s linear infinite;
}

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

.dp-gauge-error {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--signal-red);
}

.dp-gauge-label {
    font-family: var(--font-body);
    font-size: 12px;
    color: #6a6a78;
}

.dp-gauge-value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 26px;
    color: var(--signal-green);
    line-height: 1;
    letter-spacing: -0.5px;
}

.dp-gauge-value.zero {
    color: var(--signal-amber);
}

.dp-gauge-unit {
    font-family: var(--font-body);
    font-size: 13px;
    color: #6a6a78;
}

.dp-gauge-warning {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--signal-amber);
    background: rgba(255, 179, 0, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 8px;
}

/* Footer */
.dp-footer {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.dp-btn {
    padding: 11px 20px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dp-btn-icon {
    width: 16px;
    height: 16px;
}

.dp-btn-cancel {
    background: rgba(50, 50, 60, 0.6);
    border-color: #3a3a45;
    color: #a0a0a8;
}

.dp-btn-cancel:hover {
    background: rgba(60, 60, 72, 0.8);
    border-color: #505060;
    color: #d0d0d8;
}

.dp-btn-confirm {
    background: linear-gradient(135deg, var(--copper-accent), var(--copper-dim));
    border-color: var(--copper-glow);
    color: white;
    box-shadow: 0 2px 12px rgba(184, 115, 51, 0.3);
}

.dp-btn-confirm:hover {
    background: linear-gradient(135deg, var(--copper-glow), var(--copper-accent));
    box-shadow: 0 4px 20px rgba(184, 115, 51, 0.45);
    transform: translateY(-1px);
}

.dp-btn-confirm:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(184, 115, 51, 0.3);
}

/* ============================================
   QUEUE CARD - REFINED BUTTONS
   ============================================ */
.queue-card-expanded {
    position: relative;
}

/* Delete Button - Floating top right */
.qc-delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    background: rgba(30, 30, 35, 0.8);
    border: 1px solid rgba(100, 100, 110, 0.3);
    border-radius: 5px;
    color: #7a7a88;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 100;
}

.qc-delete-btn svg {
    width: 14px;
    height: 14px;
}

.queue-card-expanded:hover .qc-delete-btn {
    opacity: 1;
}

.qc-delete-btn:hover {
    background: rgba(229, 57, 53, 0.15);
    color: var(--signal-red);
}

.qc-delete-btn:active {
    background: rgba(229, 57, 53, 0.25);
    transform: scale(0.92);
}

/* Header with number and move buttons */
.qc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.qc-number {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    color: var(--copper-accent);
    background: rgba(184, 115, 51, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(184, 115, 51, 0.25);
}

.qc-move-btns {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.queue-card-expanded:hover .qc-move-btns {
    opacity: 1;
}

.qc-move-btn {
    width: 22px;
    height: 22px;
    background: rgba(50, 50, 60, 0.6);
    border: 1px solid #3a3a45;
    border-radius: 5px;
    color: #8a8a98;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.qc-move-btn svg {
    width: 14px;
    height: 14px;
}

.qc-move-btn:hover {
    background: var(--steel-blue);
    border-color: var(--steel-blue);
    color: white;
}

.qc-move-btn:active {
    transform: scale(0.9);
}

/* Hide old header styles for this card */
.queue-card-expanded .queue-card-header {
    display: none;
}

/* ============================================
   EXECUTION MONITOR - INDUSTRIAL GAUGE DESIGN
   ============================================ */
.gauge-monitor {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 10px 14px;
    gap: 10px;
    background: linear-gradient(180deg, rgba(13,13,15,0.4) 0%, transparent 100%);
}

/* Compact Header */
.gauge-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.gauge-task {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.gauge-type-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 6px currentColor;
}

.gauge-task-name {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gauge-type-label {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    flex-shrink: 0;
}

.gauge-stop {
    width: 28px;
    height: 28px;
    background: rgba(229, 57, 53, 0.15);
    border: 1px solid rgba(229, 57, 53, 0.4);
    border-radius: 6px;
    color: var(--signal-red);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.gauge-stop svg {
    width: 14px;
    height: 14px;
}

.gauge-stop:hover {
    background: var(--signal-red);
    border-color: var(--signal-red);
    color: white;
    transform: scale(1.05);
}

/* Industrial Gauge Progress */
.gauge-progress {
    display: flex;
    align-items: center;
    gap: 14px;
}

.gauge-meter {
    flex: 1;
    height: 36px;
    background: var(--industrial-black);
    border-radius: 4px;
    border: 2px solid var(--industrial-slate);
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 2px 8px rgba(0, 0, 0, 0.6),
        0 1px 0 rgba(255, 255, 255, 0.05);
}

.gauge-segments {
    position: absolute;
    inset: 0;
    display: flex;
    gap: 2px;
    padding: 4px;
    z-index: 2;
}

.gauge-segment {
    flex: 1;
    background: rgba(60, 60, 70, 0.5);
    border-radius: 2px;
    transition: all 0.2s ease;
}

.gauge-segment.active {
    background: linear-gradient(180deg, #d4923a 0%, #b87333 50%, #8b5a2b 100%);
    box-shadow: 0 0 8px rgba(184, 115, 51, 0.6);
}

.gauge-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        rgba(139, 90, 43, 0.3) 0%,
        rgba(184, 115, 51, 0.4) 50%,
        rgba(212, 146, 58, 0.5) 100%);
    transition: width 0.4s ease-out;
    z-index: 1;
}

.gauge-scanline {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    z-index: 3;
    pointer-events: none;
}

.gauge-readout {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 70px;
}

.gauge-percent {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--copper-glow);
    line-height: 1;
    text-shadow: 0 0 20px rgba(212, 146, 58, 0.5);
}

.gauge-percent small {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.7;
}

.gauge-count {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* Stats Row */
.gauge-stats {
    display: flex;
    gap: 6px;
}

.gauge-stat {
    flex: 1;
    background: rgba(25, 25, 30, 0.6);
    border: 1px solid var(--industrial-dark-border);
    border-radius: 4px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.gauge-stat-val {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
}

.gauge-stat-val.elapsed {
    color: var(--signal-green);
}

.gauge-stat-lbl {
    font-family: var(--font-body);
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Override content layout for gauge monitor */
.execution-monitor-bottom .execution-monitor-content:has(.gauge-monitor) {
    padding: 0;
    display: block;
}

/* Segment activation animation */
@keyframes gauge-segment-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(184, 115, 51, 0.6); }
    50% { box-shadow: 0 0 12px rgba(212, 146, 58, 0.8); }
}

.gauge-segment.active:last-of-type {
    animation: gauge-segment-glow 1s ease-in-out infinite;
}

/* ============================================
   SCHEME BUTTONS IN QUEUE HEADER
   ============================================ */
.queue-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.scheme-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    border: 1px solid var(--industrial-dark-border);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    background: rgba(40, 40, 50, 0.6);
    color: var(--text-secondary);
}

.scheme-btn:hover {
    border-color: var(--copper-accent);
    color: var(--copper-accent);
    background: rgba(184, 115, 51, 0.1);
}

.scheme-btn.load {
    border-color: var(--steel-blue-dim);
}

.scheme-btn.load:hover {
    border-color: var(--steel-blue);
    color: var(--steel-blue);
    background: rgba(74, 111, 165, 0.15);
}

/* ============================================
   TASK SCHEME DIALOG - INDUSTRIAL BLUEPRINT
   ============================================ */
/* 全局重置 - 对话框内所有文字元素强制透明背景 */
.scheme-modal label,
.scheme-modal span,
.scheme-overlay label,
.scheme-overlay span {
    background: transparent !important;
    background-color: transparent !important;
}

.scheme-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: scheme-fade-in 0.2s ease;
}

@keyframes scheme-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.scheme-modal {
    width: 480px;
    max-width: 90vw;
    max-height: 80vh;
    background: var(--industrial-graphite);
    border: 1px solid var(--industrial-dark-border);
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.1) inset;
    display: flex;
    flex-direction: column;
    animation: scheme-slide-up 0.25s ease;
}

@keyframes scheme-slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Header */
.scheme-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--industrial-dark-border);
    background: linear-gradient(180deg, rgba(50, 50, 60, 0.5) 0%, transparent 100%);
}

.scheme-header h3 {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-primary);
    margin: 0;
}

.scheme-close {
    width: 28px;
    height: 28px;
    background: transparent;
    border: 1px solid var(--industrial-dark-border);
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.scheme-close:hover {
    background: rgba(229, 57, 53, 0.15);
    border-color: var(--signal-red);
    color: var(--signal-red);
}

/* Body */
.scheme-body {
    padding: 16px 18px;
    overflow-y: auto;
    flex: 1;
}

/* Form Elements */
.scheme-form {
    margin-bottom: 14px;
}

.scheme-form label {
    display: block;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.scheme-form input {
    width: 100%;
    padding: 10px 12px;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-primary);
    background: var(--industrial-charcoal);
    border: 1px solid var(--industrial-dark-border);
    border-radius: 4px;
    transition: all 0.15s ease;
}

.scheme-form input:focus {
    outline: none;
    border-color: var(--copper-accent);
    box-shadow: 0 0 0 2px rgba(184, 115, 51, 0.2);
}

.scheme-form input::placeholder {
    color: var(--text-muted);
}

/* Preview Section */
.scheme-preview {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--industrial-dark-border);
}

.scheme-preview > label {
    display: block;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    color: var(--copper-accent);
    margin-bottom: 10px;
}

.scheme-task-list {
    max-height: 180px;
    overflow-y: auto;
    background: var(--industrial-charcoal);
    border-radius: 4px;
    padding: 6px;
}

.scheme-task-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 3px;
    margin-bottom: 4px;
}

.scheme-task-item:last-child {
    margin-bottom: 0;
}

.scheme-task-item:hover {
    background: rgba(50, 50, 60, 0.5);
}

.scheme-task-num {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    color: var(--copper-accent);
    min-width: 18px;
}

.scheme-task-type {
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 600;
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    text-transform: uppercase;
}

.scheme-task-name {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* Date Row */
.scheme-date-row {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--industrial-dark-border);
}

.scheme-date-row > label {
    display: block;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
    background: transparent !important;
    background-color: transparent !important;
}

.scheme-date-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.scheme-date-btns button {
    padding: 6px 12px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    background: var(--industrial-charcoal);
    border: 1px solid var(--industrial-dark-border);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.scheme-date-btns button:hover {
    border-color: var(--steel-blue);
    color: var(--steel-blue);
}

.scheme-date-btns button.active {
    background: var(--copper-accent);
    border-color: var(--copper-accent);
    color: white;
    box-shadow: 0 0 10px rgba(184, 115, 51, 0.3);
}

/* Scheme List */
.scheme-list-container {
    min-height: 200px;
    max-height: 300px;
    overflow-y: auto;
    background: var(--industrial-charcoal);
    border-radius: 4px;
    border: 1px solid var(--industrial-dark-border);
}

.scheme-loading,
.scheme-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 150px;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-muted);
}

.scheme-list {
    padding: 6px;
}

.scheme-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: var(--industrial-graphite);
    border: 1px solid var(--industrial-dark-border);
    border-left: 3px solid var(--steel-blue-dim);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.scheme-item:last-child {
    margin-bottom: 0;
}

.scheme-item:hover {
    border-color: var(--copper-accent);
    border-left-color: var(--copper-accent);
    background: rgba(184, 115, 51, 0.05);
}

.scheme-item.selected {
    border-color: var(--copper-accent);
    border-left-color: var(--copper-accent);
    background: rgba(184, 115, 51, 0.1);
    box-shadow: 0 0 12px rgba(184, 115, 51, 0.15);
}

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

.scheme-item-name {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.scheme-item-meta {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
}

.scheme-item-desc {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scheme-item-delete {
    width: 22px;
    height: 22px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.scheme-item:hover .scheme-item-delete {
    opacity: 1;
}

.scheme-item-delete:hover {
    background: rgba(229, 57, 53, 0.15);
    border-color: var(--signal-red);
    color: var(--signal-red);
}

/* Actions */
.scheme-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--industrial-dark-border);
}

.scheme-btn.cancel,
.scheme-btn.confirm {
    padding: 8px 18px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.scheme-btn.cancel {
    background: transparent;
    border: 1px solid var(--industrial-dark-border);
    color: var(--text-secondary);
}

.scheme-btn.cancel:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.scheme-btn.confirm {
    background: var(--copper-accent);
    border: 1px solid var(--copper-accent);
    color: white;
}

.scheme-btn.confirm:hover:not(:disabled) {
    background: var(--copper-glow);
    box-shadow: 0 0 12px rgba(184, 115, 51, 0.4);
}

.scheme-btn.confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== 方案定时配置样式 ==================== */

/* 重置文字元素背景 - 确保没有白色背景 */
.schedule-config label,
.schedule-config span,
.schedule-row label,
.schedule-row span,
.schedule-toggle label,
.schedule-toggle span,
.weekday-checkbox span {
    background: transparent !important;
    background-color: transparent !important;
}

.schedule-config {
    padding: 16px 0;
}

/* 启用开关行 */
.schedule-config > .schedule-row:first-child {
    padding: 12px 16px;
    background: rgba(184, 115, 51, 0.08);
    border: 1px solid rgba(184, 115, 51, 0.2);
    border-radius: 8px;
    margin-bottom: 8px;
}

.schedule-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.schedule-row:last-child {
    border-bottom: none;
}

/* 标签样式 - 更具体的选择器 */
.schedule-config .schedule-row > label:not(.schedule-toggle):not(.weekday-checkbox) {
    min-width: 80px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    background: transparent !important;
}

/* 启用开关 */
.schedule-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    background: transparent !important;
}

.schedule-toggle input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(184, 115, 51, 0.5);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.schedule-toggle input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #b87333, #8b5a2b);
    border-color: #b87333;
}

.schedule-toggle input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.schedule-toggle input[type="checkbox"]:hover {
    border-color: #b87333;
}

.schedule-toggle span {
    color: #e8d5c4;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: transparent !important;
}

/* 详情区域 */
.schedule-details {
    margin-top: 12px;
    padding: 20px;
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.15));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

/* 时间输入框 */
.schedule-time-input {
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: #f5f5f5;
    font-size: 14px;
    font-family: 'SF Mono', 'Menlo', monospace;
    transition: all 0.2s ease;
}

.schedule-time-input:focus {
    outline: none;
    border-color: #b87333;
    box-shadow: 0 0 0 3px rgba(184, 115, 51, 0.15);
    background: rgba(0, 0, 0, 0.4);
}

/* 下拉选择框 */
.schedule-select {
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: #f5f5f5;
    font-size: 13px;
    min-width: 130px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.schedule-select:focus {
    outline: none;
    border-color: #b87333;
    box-shadow: 0 0 0 3px rgba(184, 115, 51, 0.15);
}

.schedule-select option {
    background: #2a2a2a;
    color: #f5f5f5;
    padding: 8px;
}

/* 星期选择器 */
.schedule-weekdays {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.weekday-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.weekday-checkbox:hover {
    background: rgba(184, 115, 51, 0.15);
    border-color: rgba(184, 115, 51, 0.3);
}

.weekday-checkbox input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.weekday-checkbox input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #b87333, #8b5a2b);
    border-color: #b87333;
}

.weekday-checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.weekday-checkbox span {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 500;
    background: transparent !important;
}

/* 提示文字 */
.schedule-hint {
    color: rgba(184, 115, 51, 0.7);
    font-size: 12px;
    font-style: italic;
    margin-left: auto;
}

/* 上次执行信息 */
.schedule-last-exec {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-top: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid rgba(184, 115, 51, 0.5);
    border-radius: 0 6px 6px 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.exec-status-completed {
    color: #66bb6a;
    font-weight: 600;
}

.exec-status-failed {
    color: #ef5350;
    font-weight: 600;
}

.exec-status-skipped {
    color: #ffa726;
    font-weight: 600;
}

/* 方案列表中的定时标识 */
.scheme-schedule-badge {
    display: inline-block;
    padding: 2px 6px;
    margin-left: 8px;
    background: linear-gradient(135deg, #b87333, #8b5a2b);
    border-radius: 3px;
    font-size: 10px;
    color: #fff;
    vertical-align: middle;
}

.scheme-schedule-info {
    color: #b87333;
}

/* 方案操作按钮组 */
.scheme-item-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.scheme-item-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s;
}

.scheme-item-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.scheme-item-btn.delete:hover {
    background: rgba(244, 67, 54, 0.3);
    color: #f44336;
}

.scheme-item-btn svg {
    width: 16px;
    height: 16px;
}

/* ==================== 定时方案状态面板 ==================== */
/* 工业风格：金属质感、铆钉装饰、仪表盘风格 */

.scheduled-schemes-panel {
    margin-bottom: 16px;
    background:
        linear-gradient(180deg, rgba(45, 42, 38, 0.95) 0%, rgba(28, 26, 24, 0.98) 100%);
    border: 2px solid rgba(184, 115, 51, 0.35);
    border-radius: 4px;
    overflow: hidden;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    position: relative;
}

/* 顶部铆钉装饰 */
.scheduled-schemes-panel::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 8px;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle at 30% 30%, #c9a066, #8b6914);
    border-radius: 50%;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.5),
        inset 0 -1px 1px rgba(0, 0, 0, 0.3);
}

.scheduled-schemes-panel::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 8px;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle at 30% 30%, #c9a066, #8b6914);
    border-radius: 50%;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.5),
        inset 0 -1px 1px rgba(0, 0, 0, 0.3);
}

.scheduled-schemes-panel .panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background:
        linear-gradient(180deg, rgba(60, 55, 48, 0.9) 0%, rgba(40, 36, 32, 0.95) 100%);
    border-bottom: 1px solid rgba(184, 115, 51, 0.25);
    position: relative;
}

/* 面板标题带时钟图标 */
.scheduled-schemes-panel .panel-header::before {
    content: '⏱';
    font-size: 14px;
    opacity: 0.8;
}

.scheduled-schemes-panel .panel-header span:first-child {
    font-size: 13px;
    font-weight: 600;
    color: #d4b896;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.scheduled-schemes-panel .expand-icon {
    margin-left: auto;
    font-size: 10px;
    color: rgba(184, 115, 51, 0.6);
    transition: transform 0.2s ease;
}

.scheduled-schemes-list {
    padding: 10px 12px;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 1px,
            rgba(0, 0, 0, 0.03) 1px,
            rgba(0, 0, 0, 0.03) 2px
        );
}

.scheduled-scheme-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background:
        linear-gradient(135deg, rgba(50, 45, 40, 0.8) 0%, rgba(35, 32, 28, 0.9) 100%);
    border: 1px solid rgba(184, 115, 51, 0.2);
    border-radius: 3px;
    margin-bottom: 8px;
    position: relative;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: all 0.2s ease;
}

.scheduled-scheme-item:hover {
    border-color: rgba(184, 115, 51, 0.4);
    background:
        linear-gradient(135deg, rgba(60, 54, 48, 0.85) 0%, rgba(40, 36, 32, 0.92) 100%);
    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* 左侧状态指示灯 */
.scheduled-scheme-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: linear-gradient(180deg, #b87333, #8b5a2b);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 6px rgba(184, 115, 51, 0.4);
}

.scheduled-scheme-item:last-child {
    margin-bottom: 0;
}

.scheduled-scheme-info {
    flex: 1;
    min-width: 0;
}

.scheduled-scheme-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #f0e6dc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
    letter-spacing: 0.3px;
}

.scheduled-scheme-tasks {
    font-size: 11px;
    color: rgba(184, 115, 51, 0.7);
    font-weight: 500;
}

.scheduled-scheme-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(184, 115, 51, 0.15);
    border-radius: 3px;
}

.next-run-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.next-run-time {
    font-size: 13px;
    color: #d4a656;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 8px rgba(212, 166, 86, 0.3);
}

.scheduled-scheme-status {
    min-width: 60px;
    text-align: center;
}

/* 状态徽章 - 仪表盘风格 */
.scheduled-scheme-status .exec-status-completed,
.scheduled-scheme-status .exec-status-failed,
.scheduled-scheme-status .exec-status-pending {
    display: inline-block;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 2px;
}

.scheduled-scheme-status .exec-status-completed {
    color: #7cb342;
    background: rgba(124, 179, 66, 0.15);
    border: 1px solid rgba(124, 179, 66, 0.3);
    box-shadow: 0 0 8px rgba(124, 179, 66, 0.2);
}

.scheduled-scheme-status .exec-status-failed {
    color: #e57373;
    background: rgba(229, 115, 115, 0.15);
    border: 1px solid rgba(229, 115, 115, 0.3);
    box-shadow: 0 0 8px rgba(229, 115, 115, 0.2);
}

.scheduled-scheme-status .exec-status-pending {
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 任务来源标记 - 工业铭牌风格 */
.pq-tag.scheme-source {
    background:
        linear-gradient(180deg, rgba(184, 115, 51, 0.25) 0%, rgba(139, 90, 43, 0.35) 100%);
    border: 1px solid rgba(184, 115, 51, 0.5);
    color: #d4a656;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
}

/* 铭牌左右凹槽装饰 */
.pq-tag.scheme-source::before,
.pq-tag.scheme-source::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 2px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
}

.pq-tag.scheme-source::before {
    left: 2px;
}

.pq-tag.scheme-source::after {
    right: 2px;
}

/* 空状态提示 */
.scheduled-schemes-empty {
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
    font-style: italic;
}

/* ============================================
   Task Execution History Dialog - Redesigned
   Compact, Data-Dense Layout
   ============================================ */

/* ============================================
   TASK HISTORY MODAL - THEME-AWARE STYLES
   Supports both light and dark modes via CSS variables
   ============================================ */
.task-history-overlay {
    position: fixed;
    inset: 0;
    background: var(--th-overlay-bg, rgba(15, 23, 42, 0.6));
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    animation: th-fade-in 0.25s ease-out;
}

/* Light mode overlay */
:root .task-history-overlay,
[data-theme="light"] .task-history-overlay {
    --th-overlay-bg: rgba(15, 23, 42, 0.4);
}

/* Dark mode overlay */
.theme-dark .task-history-overlay,
[data-theme="dark"] .task-history-overlay {
    --th-overlay-bg: rgba(8, 8, 10, 0.85);
}

/* Compact Header with Filters */
.th-header-compact {
    padding: 14px 20px 12px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-light);
}

.th-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.th-title-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.th-title-left h2 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 0.3px;
}

.th-record-count {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 8px;
    border-radius: 10px;
}

.th-filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.th-filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.th-filter-select {
    padding: 5px 10px;
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    cursor: pointer;
    min-width: 70px;
    transition: all 0.15s ease;
}

.th-filter-select:hover {
    border-color: var(--border-medium);
    background: var(--bg-hover);
}

.th-filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.th-date-range {
    display: flex;
    align-items: center;
    gap: 4px;
}

.th-date-range input[type="date"] {
    padding: 5px 8px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    width: 110px;
    transition: all 0.15s ease;
}

.th-date-range input[type="date"]:hover {
    border-color: var(--border-medium);
}

.th-date-range input[type="date"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.th-date-range span {
    color: var(--text-muted);
    font-size: 10px;
}

.th-view-tabs {
    display: flex;
    gap: 2px;
    background: var(--bg-tertiary);
    padding: 2px;
    border-radius: 6px;
}

.th-view-tabs button {
    padding: 5px 12px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.th-view-tabs button:hover {
    color: var(--text-secondary);
    background: var(--bg-hover);
}

.th-view-tabs button.active {
    background: var(--primary);
    color: var(--text-inverse);
    box-shadow: var(--shadow-sm);
}

/* Compact Statistics Bar */
.th-stats-compact {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.th-stat-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 14px;
    background: var(--bg-secondary);
    border-radius: 6px;
    min-width: 60px;
    border: 1px solid var(--border-light);
}

.th-stat-chip.success .th-stat-num {
    color: var(--success);
}

.th-stat-chip.danger .th-stat-num {
    color: var(--danger);
}

.th-stat-num {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}

.th-stat-num small {
    font-size: 12px;
    opacity: 0.7;
}

.th-stat-txt {
    font-family: var(--font-body);
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.th-stat-divider {
    width: 1px;
    height: 30px;
    background: var(--industrial-dark-border);
    margin: 0 8px;
}

/* Record List */
.th-record-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.th-record {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all 0.15s ease;
}

.th-record:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-md);
}

/* Status indicator */
.th-record::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--success);
}

.th-record.status-failed::before {
    background: var(--danger);
}

.th-record.status-cancelled::before,
.th-record.status-stopped::before {
    background: var(--warning);
}

.th-record-main {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding: 10px 12px 10px 14px;
    gap: 16px;
}

.th-record-left {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.th-type-tag {
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 600;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.th-record-info {
    flex: 1;
    min-width: 0;
}

.th-record-name {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.th-record-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.th-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
}

.th-meta-item em {
    color: var(--primary);
    font-style: normal;
}

.th-icon {
    font-size: 10px;
    opacity: 0.6;
    font-style: normal;
}

.th-record-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.th-record-stats {
    display: flex;
    gap: 3px;
}

.th-stat-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    min-width: 48px;
}

.th-stat-block .th-stat-label {
    font-family: var(--font-body);
    font-size: 8px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.th-stat-block .th-stat-value {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.th-stat-block.success .th-stat-value {
    color: var(--success);
}

.th-stat-block.danger .th-stat-value {
    color: var(--danger);
}

.th-record-badges {
    display: flex;
    gap: 4px;
}

.th-badge {
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.th-badge.source {
    background: var(--info-light);
    color: var(--info);
}

.th-badge.source.scene {
    background: var(--primary-light);
    color: var(--primary);
}

.th-badge.source.scheduled {
    background: #F3E8FF;
    color: #9333EA;
}

.th-badge.source.triggered {
    background: var(--warning-light);
    color: var(--warning);
}

.th-badge.status.completed {
    background: var(--success-light);
    color: var(--success);
}

.th-badge.status.failed {
    background: var(--danger-light);
    color: var(--danger);
}

.th-badge.status.cancelled,
.th-badge.status.stopped {
    background: var(--warning-light);
    color: var(--warning);
}

/* Dark mode badge adjustments */
.theme-dark .th-badge.source.scheduled,
[data-theme="dark"] .th-badge.source.scheduled {
    background: rgba(147, 51, 234, 0.2);
    color: #C084FC;
}

/* Record Details */
.th-record-detail {
    padding: 8px 14px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.th-detail-label {
    font-family: var(--font-body);
    font-size: 10px;
    color: var(--text-muted);
    margin-right: 6px;
}

.th-servers {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.th-server-chip {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-secondary);
    background: var(--bg-hover);
    padding: 3px 8px;
    border-radius: 4px;
}

.th-server-chip b {
    color: var(--success);
}

.th-error-info {
    display: flex;
    align-items: flex-start;
    flex: 1;
}

.th-error-text {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--danger);
}

/* Date indicator */
.th-record-date {
    position: absolute;
    top: 10px;
    right: 12px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    opacity: 0.6;
}

@keyframes th-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.task-history-modal {
    width: 92vw;
    max-width: 1200px;
    height: 88vh;
    max-height: 860px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    animation: th-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    position: relative;
}

/* Remove corner rivets for cleaner look */
.task-history-modal::before,
.task-history-modal::after {
    display: none;
}

@keyframes th-slide-up {
    from { transform: translateY(40px) scale(0.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Header - Clean modern style */
.th-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-elevated);
    position: relative;
}

.th-header::after {
    display: none;
}

.th-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.th-header-left::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary);
    animation: th-header-pulse 2.5s ease-in-out infinite;
}

@keyframes th-header-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--primary); }
    50% { opacity: 0.6; box-shadow: 0 0 4px var(--primary); }
}

.th-header-left h2 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-primary);
    margin: 0;
    position: relative;
    z-index: 1;
}

.th-subtitle {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 3px;
    display: block;
    letter-spacing: 0.5px;
}

.th-close-btn {
    width: 34px;
    height: 34px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 20px;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

.th-close-btn:hover {
    background: var(--danger-light);
    border-color: var(--danger);
    color: var(--danger);
}

/* Statistics Bar - Clean Design */
.th-stats-bar {
    display: flex;
    gap: 0;
    padding: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.th-stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    position: relative;
    border-right: 1px solid var(--border-light);
    transition: background 0.2s ease;
}

.th-stat-item:last-child {
    border-right: none;
}

.th-stat-item:hover {
    background: var(--bg-hover);
}

/* Remove stat item indicator light */
.th-stat-item::before {
    display: none;
}

.th-stat-item.success::before {
    display: none;
}

.th-stat-value {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1;
}

.th-stat-item.success .th-stat-value {
    color: var(--success);
}

.th-stat-label {
    font-family: var(--font-body);
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 6px;
}

/* Filter Bar */
.th-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-light);
    gap: 20px;
}

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

.th-filters select,
.th-filters input[type="date"] {
    padding: 7px 12px;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 100px;
}

.th-filters select:hover,
.th-filters input[type="date"]:hover {
    border-color: var(--border-medium);
}

.th-filters select:focus,
.th-filters input[type="date"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.th-date-sep {
    color: var(--text-muted);
    font-size: 11px;
    font-family: var(--font-mono);
}

.th-view-tabs {
    display: flex;
    gap: 2px;
    background: var(--industrial-charcoal);
    padding: 3px;
    border-radius: 6px;
    border: 1px solid var(--industrial-dark-border);
}

.th-view-tabs button {
    padding: 7px 16px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.th-view-tabs button:hover {
    color: var(--text-secondary);
    background: var(--bg-hover);
}

.th-view-tabs button.active {
    background: var(--primary);
    color: var(--text-inverse);
    box-shadow: var(--shadow-sm);
}

/* Content Area */
.th-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    background: var(--bg-primary);
}

/* Custom scrollbar */
.th-content::-webkit-scrollbar {
    width: 8px;
}

.th-content::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.th-content::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 4px;
    border: 2px solid var(--bg-tertiary);
}

.th-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Loading State */
.th-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    gap: 16px;
    color: var(--text-muted);
}

.th-loading-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: th-spin 0.8s linear infinite;
}

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

.th-loading span {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Empty State */
.th-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    gap: 12px;
}

.th-empty-icon {
    font-family: var(--font-mono);
    font-size: 32px;
    color: var(--text-tertiary);
}

.th-empty-text {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-muted);
}

/* Task Card List */
.th-card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.th-task-card {
    background: var(--industrial-charcoal);
    border: 1px solid var(--industrial-dark-border);
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.2s ease;
    position: relative;
}

.th-task-card:hover {
    border-color: rgba(184, 115, 51, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

/* Status indicator stripe */
.th-task-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--industrial-slate);
}

.th-task-card.status-completed::before {
    background: var(--signal-green);
    box-shadow: 0 0 8px var(--signal-green);
}

.th-task-card.status-failed::before {
    background: var(--signal-red);
    box-shadow: 0 0 8px var(--signal-red);
}

.th-task-card.status-cancelled::before,
.th-task-card.status-stopped::before {
    background: var(--signal-amber);
    box-shadow: 0 0 8px var(--signal-amber);
}

.th-task-card.status-timeout::before {
    background: #757575;
}

/* Card Header */
.th-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 12px 20px;
    background: rgba(20, 20, 25, 0.5);
    border-bottom: 1px solid rgba(60, 60, 70, 0.3);
    gap: 16px;
}

.th-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.th-card-type {
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 700;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.th-card-name {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.th-card-date {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--copper-accent);
    white-space: nowrap;
    padding: 3px 8px;
    background: rgba(184, 115, 51, 0.1);
    border-radius: 3px;
}

.th-card-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.th-source-badge {
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.th-source-badge.manual {
    background: rgba(74, 111, 165, 0.2);
    color: var(--steel-blue);
    border: 1px solid rgba(74, 111, 165, 0.3);
}

.th-source-badge.scheduled {
    background: rgba(156, 39, 176, 0.15);
    color: #ce93d8;
    border: 1px solid rgba(156, 39, 176, 0.3);
}

.th-source-badge.triggered {
    background: rgba(255, 179, 0, 0.15);
    color: var(--signal-amber);
    border: 1px solid rgba(255, 179, 0, 0.3);
}

.th-source-badge.scene {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.th-scheme-badge {
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 3px;
    background: rgba(184, 115, 51, 0.12);
    color: var(--copper-accent);
    border: 1px solid rgba(184, 115, 51, 0.25);
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.th-status-badge {
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.th-status-badge.completed {
    background: rgba(67, 160, 71, 0.15);
    color: var(--signal-green);
    border: 1px solid rgba(67, 160, 71, 0.3);
}

.th-status-badge.failed {
    background: rgba(229, 57, 53, 0.15);
    color: var(--signal-red);
    border: 1px solid rgba(229, 57, 53, 0.3);
}

.th-status-badge.cancelled,
.th-status-badge.stopped {
    background: rgba(255, 179, 0, 0.15);
    color: var(--signal-amber);
    border: 1px solid rgba(255, 179, 0, 0.3);
}

.th-status-badge.timeout {
    background: rgba(158, 158, 158, 0.15);
    color: #bdbdbd;
    border: 1px solid rgba(158, 158, 158, 0.3);
}

/* Card Body */
.th-card-body {
    padding: 12px 16px 14px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px 24px;
}

.th-card-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 12px;
}

.th-card-label {
    font-family: var(--font-body);
    color: var(--text-muted);
    min-width: 45px;
    flex-shrink: 0;
    font-size: 11px;
}

.th-card-value {
    font-family: var(--font-body);
    color: var(--text-secondary);
    flex: 1;
}

.th-duration {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--copper-accent);
    margin-left: 8px;
    padding: 2px 6px;
    background: rgba(184, 115, 51, 0.1);
    border-radius: 3px;
}

.th-stats-inline {
    color: var(--text-muted);
    font-size: 11px;
}

.th-config {
    font-family: var(--font-mono);
    font-size: 11px;
}

.th-target-date {
    color: var(--copper-accent);
    margin-left: 4px;
}

.th-server-row {
    grid-column: 1 / -1;
}

.th-server-row .th-servers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.th-server-stat {
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 3px 8px;
    background: var(--industrial-slate);
    border-radius: 3px;
    color: var(--text-muted);
    border: 1px solid var(--industrial-dark-border);
}

.th-error-row {
    grid-column: 1 / -1;
}

.th-error-row .th-error {
    color: var(--signal-red);
    font-size: 11px;
    padding: 6px 10px;
    background: rgba(229, 57, 53, 0.08);
    border-radius: 4px;
    border-left: 2px solid var(--signal-red);
}

/* Pagination */
.th-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.th-pagination button {
    width: 36px;
    height: 36px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.th-pagination button:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.th-pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.th-page-info {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    padding: 6px 14px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-xs);
    border: 1px solid var(--border-light);
}

.th-total-count {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--text-muted);
}

/* Statistics Tables - Industrial Treatment */
.th-table-wrapper {
    overflow-x: auto;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.th-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-body);
}

.th-stats-table th {
    padding: 14px 18px;
    text-align: left;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

/* Table header separator */
.th-stats-table th:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 60%;
    background: var(--border-light);
}

.th-stats-table td {
    padding: 14px 18px;
    font-size: 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s ease;
}

.th-stats-table tr:hover td {
    background: var(--bg-hover);
}

.th-stats-table tr:last-child td {
    border-bottom: none;
}

.th-stats-table .success-rate {
    color: var(--success);
    font-weight: 700;
    font-family: var(--font-mono);
}

.th-stats-table .warning-rate {
    color: var(--warning);
    font-weight: 700;
    font-family: var(--font-mono);
}

.th-stats-table .danger-rate {
    color: var(--danger);
    font-weight: 700;
    font-family: var(--font-mono);
}

.th-stats-table .success-count {
    color: var(--success);
    font-family: var(--font-mono);
}

.th-stats-table .failed-count {
    color: var(--danger);
    font-family: var(--font-mono);
}

.th-type-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    color: var(--text-inverse);
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: var(--shadow-sm);
}

/* ============================================
   DUAL TASK MONITOR - 双任务执行监控
   ============================================ */
.dual-task-monitor {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 12px;
    padding: 10px;
    box-sizing: border-box;
    width: 100%;
    align-content: start;
}

.dual-task-monitor.single-slot {
    grid-template-columns: 1fr;
}

.dual-task-monitor.compact-mode {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
    padding: 8px;
}

.task-slot {
    background: var(--industrial-dark-bg);
    border: 1px solid var(--industrial-dark-border);
    border-radius: 12px;
    padding: 10px 12px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dual-task-monitor.compact-mode .task-slot {
    padding: 8px 10px;
}

.dual-task-monitor.compact-mode .slot-name {
    font-size: 12px;
}

.dual-task-monitor.compact-mode .slot-percent {
    font-size: 18px;
}

.dual-task-monitor.compact-mode .slot-kpi {
    padding: 3px 5px;
}

.dual-task-monitor.compact-mode .slot-kpi-grid {
    gap: 5px;
    margin-bottom: 5px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .dual-task-monitor.compact-mode .slot-count,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .dual-task-monitor.compact-mode .slot-content-count {
    font-size: 15px;
    line-height: 1.2;
}

.task-slot.slot-active {
    border-color: var(--copper-accent);
    box-shadow: 0 0 20px rgba(207, 153, 88, 0.2);
}

.task-slot.slot-empty {
    opacity: 0.5;
    border-style: dashed;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slot-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.slot-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 6px;
    flex-shrink: 0;
}

.slot-label.scene {
    color: var(--copper-accent);
    background: rgba(207, 153, 88, 0.15);
    border: 1px solid rgba(207, 153, 88, 0.3);
}

.slot-label.manual {
    color: var(--signal-green);
    background: rgba(67, 160, 71, 0.15);
    border: 1px solid rgba(67, 160, 71, 0.3);
}

.slot-name {
    flex: 1;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.slot-stop {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid var(--signal-red);
    color: var(--signal-red);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.slot-stop:hover {
    background: rgba(244, 67, 54, 0.15);
}

.slot-progress {
    height: 8px;
    background: var(--industrial-charcoal);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
    flex-shrink: 0;
}

.slot-progress .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--copper-accent), var(--copper-bright));
    transition: width 0.3s ease;
    border-radius: 4px;
}

.slot-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 6px;
}

.slot-kpi {
    background: rgba(19, 27, 39, 0.38);
    border: 1px solid rgba(109, 119, 138, 0.18);
    border-radius: 6px;
    padding: 4px 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.slot-kpi-label {
    font-size: 9px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.slot-stats {
    font-family: var(--font-mono);
    color: var(--text-secondary);
}

.slot-percent {
    color: var(--copper-accent);
    font-weight: 700;
    font-size: 22px;
    line-height: 1;
}

.slot-phase-progress {
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slot-count {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
}

.slot-elapsed {
    color: var(--signal-green);
    font-size: 12px;
    font-weight: 500;
}

.slot-stats-eta {
    margin-top: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 6px;
}

.slot-metric-item {
    background: rgba(14, 20, 30, 0.28);
    border: 1px solid rgba(109, 119, 138, 0.14);
    border-radius: 6px;
    padding: 3px 6px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.slot-metric-label {
    font-size: 9px;
    letter-spacing: 0.35px;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
    font-family: var(--font-mono);
}

.slot-speed,
.slot-eta,
.slot-finish,
.slot-content-rate,
.slot-content-count,
.slot-concurrency-value {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-align: right;
    min-width: 0;
}

.slot-speed {
    color: var(--signal-yellow);
}

.slot-eta {
    color: var(--signal-cyan, #00d4ff);
}

.slot-finish {
    color: var(--copper-bright);
}

.slot-content-rate {
    color: var(--signal-green, #00ff88);
}

.slot-content-count {
    color: var(--text-secondary, #8a9bae);
}

.slot-stats-concurrency {
    margin-top: 4px;
    font-size: 10px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    border: 1px solid rgba(109, 119, 138, 0.14);
    border-radius: 8px;
    background: rgba(14, 20, 30, 0.22);
}

.slot-servers {
    color: var(--copper-text-secondary, #b0a090);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.slot-total-workers {
    color: var(--signal-cyan, #00d4ff);
    font-weight: 600;
    white-space: nowrap;
}

/* Stats Row 3: Token Stats */
.slot-stats-tokens {
    margin-top: 4px;
    font-size: 10px;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    color: var(--copper-text-secondary, #b0a090);
    padding: 4px 6px;
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.04);
}

.slot-stats-tokens svg {
    flex-shrink: 0;
    color: #f59e0b;
    opacity: 0.8;
}

.slot-token-tps {
    font-weight: 600;
    color: #f59e0b;
    letter-spacing: 0.01em;
}

.slot-token-label {
    color: var(--copper-text-secondary, #b0a090);
    opacity: 0.7;
}

.slot-token-total {
    color: #c6cfde;
    font-weight: 500;
}

.slot-token-avg {
    color: var(--copper-text-secondary, #b0a090);
}

.slot-token-sep {
    opacity: 0.4;
}

/* Stats Row 4: Memory Monitoring */
.slot-stats-memory {
    margin-top: 4px;
    font-size: 10px;
    font-family: var(--font-mono);
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 8px;
    color: var(--copper-text-secondary, #b0a090);
    padding: 4px 6px;
    border: 1px solid rgba(109, 119, 138, 0.14);
    border-radius: 8px;
    background: rgba(14, 20, 30, 0.22);
}

.slot-mem-current {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slot-mem-delta {
    white-space: nowrap;
    font-weight: 600;
}

.slot-mem-delta.positive {
    color: var(--signal-green, #00ff88);
}

.slot-mem-delta.elevated {
    color: var(--signal-yellow, #ffaa00);
}

.slot-mem-delta.critical {
    color: var(--signal-red, #ff4444);
}

.slot-mem-peak {
    white-space: nowrap;
    color: var(--copper-text-secondary, #b0a090);
}

.slot-mem-warning {
    margin-top: 3px;
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--signal-red, #ff4444);
    animation: mem-warn-pulse 2s ease-in-out infinite;
}

@keyframes mem-warn-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.slot-empty-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px;
}

.slot-idle {
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
}

/* ============================================
   CONNECTION POOL MONITOR PANEL
   ============================================ */
.connection-pool-panel {
    grid-column: 2;
    grid-row: 1;
    background: var(--industrial-graphite);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-left: 1px solid var(--industrial-dark-border);
}

.pool-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Database Pool Cards Grid */
.pool-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

/* Individual Pool Card */
.pool-card {
    background: var(--industrial-slate);
    border: 1px solid var(--industrial-dark-border);
    border-radius: 8px;
    padding: 14px;
    position: relative;
    transition: all 0.2s ease;
}

.pool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--steel-blue), var(--signal-cyan, #26c6da));
    border-radius: 8px 8px 0 0;
}

.pool-card:hover {
    border-color: var(--steel-blue);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Card Header */
.pool-card-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.pool-card-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.15) 0%, rgba(69, 137, 148, 0.25) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--signal-cyan, #26c6da);
    flex-shrink: 0;
}

.pool-card-title {
    flex: 1;
    min-width: 0;
}

.pool-card-name {
    display: block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pool-card-db {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Card Status */
.pool-card-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

.pool-card-status .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.pool-card-status.status-active {
    background: rgba(67, 160, 71, 0.15);
    color: var(--signal-green);
}

.pool-card-status.status-active .status-dot {
    background: var(--signal-green);
    box-shadow: 0 0 6px var(--signal-green);
    animation: status-pulse 2s ease-in-out infinite;
}

.pool-card-status.status-idle {
    background: rgba(100, 100, 110, 0.15);
    color: var(--text-muted);
}

.pool-card-status.status-idle .status-dot {
    background: var(--text-muted);
}

.pool-card-status.status-warning {
    background: rgba(255, 179, 0, 0.15);
    color: var(--signal-amber);
}

.pool-card-status.status-warning .status-dot {
    background: var(--signal-amber);
    box-shadow: 0 0 6px var(--signal-amber);
}

@keyframes status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Host Info */
.pool-card-host {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
    padding: 6px 8px;
    background: var(--industrial-black);
    border-radius: 4px;
    margin-bottom: 12px;
}

.pool-card-host svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Metrics Section */
.pool-card-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.pool-metric {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 10px;
    text-align: center;
}

.pool-metric-label {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.pool-metric-value {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.pool-metric-value .metric-min {
    color: var(--signal-green);
}

.pool-metric-value .metric-sep {
    color: var(--text-muted);
    margin: 0 4px;
}

.pool-metric-value .metric-max {
    color: var(--copper-accent);
}

.pool-metric-value.pool-metric-quota {
    color: var(--steel-blue);
}

.pool-metric-value .metric-unit {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 2px;
}

/* Realtime Connection Stats */
.pool-card-realtime {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: var(--industrial-black);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 12px;
}

.realtime-stat {
    display: flex;
    align-items: center;
    gap: 6px;
}

.realtime-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.realtime-dot.active {
    background: var(--signal-green);
    box-shadow: 0 0 6px var(--signal-green);
    animation: realtime-pulse 1.5s ease-in-out infinite;
}

.realtime-dot.idle {
    background: var(--signal-cyan, #26c6da);
    opacity: 0.6;
}

@keyframes realtime-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

.realtime-label {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--text-muted);
}

.realtime-value {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
}

.realtime-value.active {
    color: var(--signal-green);
}

.realtime-value.idle {
    color: var(--signal-cyan, #26c6da);
}

.realtime-value.total {
    color: var(--copper-accent);
}

/* Usage Bar */
.pool-card-usage {
    margin-top: auto;
}

.pool-usage-bar {
    height: 6px;
    background: var(--industrial-black);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.pool-usage-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--signal-green), var(--signal-cyan, #26c6da));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.pool-usage-text {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
}

.pool-usage-text .usage-percent {
    color: var(--copper-accent);
    font-weight: 600;
}

/* Empty State */
.pool-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-muted);
    text-align: center;
    gap: 12px;
}

.pool-empty-state svg {
    opacity: 0.3;
}

.pool-empty-state span {
    font-family: var(--font-body);
    font-size: 13px;
}

.pool-empty-hint {
    font-size: 11px !important;
    color: var(--text-muted);
    opacity: 0.7;
}

/* Agents Section */
.pool-agents-section {
    background: var(--industrial-slate);
    border: 1px solid var(--industrial-dark-border);
    border-radius: 8px;
    padding: 12px;
}

.pool-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--industrial-dark-border);
}

.pool-section-header span:first-child {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.pool-section-count {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--copper-accent);
    background: rgba(184, 115, 51, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
}

.pool-agents-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pool-agent-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--industrial-black);
    border: 1px solid var(--industrial-dark-border);
    border-radius: 4px;
    padding: 4px 10px;
    font-family: var(--font-mono);
    font-size: 11px;
}

.pool-agent-chip .agent-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--signal-green);
    box-shadow: 0 0 4px var(--signal-green);
}

.pool-agent-chip .agent-id {
    color: var(--text-secondary);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pool-agent-chip .agent-count {
    color: var(--copper-accent);
    font-weight: 600;
}

/* Footer */
.pool-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    background: var(--industrial-black);
    border-radius: 4px;
}

.pool-update-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--signal-green);
    animation: update-blink 2s ease-in-out infinite;
}

@keyframes update-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ============================================
   EXEC-FIRST REDESIGN (MATCH PREVIEW)
   ============================================ */
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first {
    --exec-bg: #171b22;
    --exec-panel: #222834;
    --exec-panel-2: #1d2330;
    --exec-line: #394153;
    --exec-line-soft: #324058;
    --exec-text: #e6ecf7;
    --exec-muted: #94a0b6;
    --exec-blue: #3f7cff;
    --exec-ok: #18c37e;
    --exec-warn: #f4b451;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-rows: minmax(0, 1fr) 168px;
    gap: 10px;
    height: calc(100vh - 88px);
    padding: 10px;
    background: var(--exec-bg);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first > .panel-startup {
    background: var(--exec-panel);
    border: 1px solid var(--exec-line);
    border-radius: 10px;
    overflow: hidden;
    min-height: 0;
    box-shadow: none;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .panel-header {
    height: 40px;
    min-height: 40px;
    padding: 0 12px;
    border-bottom: 1px solid var(--exec-line);
    background: var(--exec-panel-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-family: "SF Pro Text", "PingFang SC", sans-serif;
    color: var(--exec-text);
    letter-spacing: 0;
    text-transform: none;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .panel-header::before,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .panel-header::after {
    content: none;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .count-badge {
    background: transparent;
    border: none;
    padding: 0;
    color: var(--exec-muted);
    font-size: 12px;
    font-family: "SF Pro Text", "PingFang SC", sans-serif;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .bottom-panels {
    grid-column: 1;
    grid-row: 1;
    border: 1px solid var(--exec-line);
    border-radius: 10px;
    background: var(--exec-panel);
    overflow: hidden;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .execution-monitor-bottom {
    background: transparent;
    border: none;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .execution-monitor-content {
    height: calc(100% - 40px);
    padding: 10px;
    overflow: auto;
    background: transparent;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pending-queue-top {
    grid-column: 2;
    grid-row: 1;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .connection-pool-panel {
    grid-column: 2;
    grid-row: 2;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .history-quick-panel {
    grid-column: 1;
    grid-row: 2;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .queue-header-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .queue-scene-pill,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .queue-tab {
    font-size: 11px;
    line-height: 1;
    border-radius: 6px;
    padding: 6px 10px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .queue-scene-pill {
    background: #3b4f75;
    color: #fff;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .queue-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    transform: none;
    flex-wrap: nowrap;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .queue-tab {
    background: #2a3345;
    color: #9aabc8;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    height: 24px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .queue-tab.active {
    background: #4a5f87;
    color: #fff;
    border-color: #6078a5;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .tab-count {
    margin-left: 4px;
    background: rgba(20, 25, 37, 0.65);
    border: none;
    color: inherit;
    font-size: 10px;
    padding: 1px 5px;
    min-width: 16px;
    line-height: 1.2;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .queue-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .scheme-btn {
    height: 24px;
    border-radius: 6px;
    border: 1px solid #52607a;
    background: #2a3345;
    color: #d3def2;
    font-size: 10px;
    padding: 0 8px;
    box-shadow: none;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .queue-controls {
    display: none;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pq-list {
    height: calc(100% - 40px);
    padding: 8px;
    overflow: auto;
    background: transparent;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pq-item {
    background: #202838;
    border: 1px solid #374258;
    border-radius: 8px;
    padding: 7px 8px;
    margin-bottom: 6px;
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pq-sequence,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pq-reorder,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pq-delete,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pq-type {
    display: none;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pq-content {
    padding: 0;
    width: 100%;
    gap: 4px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pq-main {
    margin: 0;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pq-name {
    font-size: 12px;
    line-height: 1.3;
    color: var(--exec-text);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pq-meta {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pq-tag {
    background: transparent;
    border: none;
    color: var(--exec-muted);
    padding: 0;
    font-size: 11px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pq-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .scheduled-item .pq-tag,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .trigger-item .pq-tag {
    opacity: 0.9;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pq-empty {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--exec-muted);
    font-size: 12px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pq-collapsed-hint {
    padding: 0 10px 8px;
    font-size: 11px;
    color: var(--exec-muted);
    border: none;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .dual-task-monitor {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 10px;
    padding: 0;
    align-content: start;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .task-slot {
    background: #1a2130;
    border: 1px solid #43506a;
    border-radius: 10px;
    padding: 10px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .dual-task-monitor.compact-mode {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 8px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .task-slot.slot-active {
    box-shadow: none;
    border-color: #43506a;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-header {
    margin-bottom: 8px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--exec-text);
    letter-spacing: 0.1px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-stop {
    border: 1px solid #ff6565;
    color: #ff7a7a;
    background: transparent;
    border-radius: 8px;
    width: 40px;
    height: 32px;
    padding: 0;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-progress {
    height: 7px;
    border-radius: 999px;
    background: #30384b;
    margin-bottom: 8px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-progress .progress-bar {
    background: linear-gradient(90deg, #3f7cff, #50a2ff);
    border-radius: inherit;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-kpi-grid {
    gap: 6px;
    margin-bottom: 6px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-kpi {
    background: #252d3e;
    border: 1px solid #3c465a;
    border-radius: 8px;
    padding: 6px;
    min-height: 58px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-kpi-label,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-metric-label {
    color: var(--exec-muted);
    font-size: 11px;
    letter-spacing: 0;
    text-transform: none;
    font-family: "SF Pro Text", "PingFang SC", sans-serif;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-percent {
    color: var(--exec-blue);
    font-size: 30px;
    line-height: 1;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-count {
    color: var(--exec-text);
    font-size: 18px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-elapsed {
    color: var(--exec-ok);
    font-size: 18px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-stats-eta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-metric-item {
    background: #252d3e;
    border: 1px solid #3c465a;
    border-radius: 8px;
    padding: 4px 6px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-speed,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-finish {
    color: #c6cfde;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-profile-name {
    color: #a78bfa;
    font-size: 10px;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    display: block;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-metric-profile {
    border-color: rgba(167, 139, 250, 0.2);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-content-rate {
    color: var(--exec-ok);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-eta {
    color: #00c9ff;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-stats-memory {
    background: var(--exec-card-soft);
    border-color: var(--exec-line-soft);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-mem-warning {
    color: #ff7c7c;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .dual-task-monitor.compact-mode .slot-stats-memory {
    font-size: 9px;
    padding: 3px 5px;
    gap: 6px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .execution-empty {
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
    background: transparent;
    border: 1px dashed #3b455a;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .execution-empty-icon,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .execution-empty-text {
    color: var(--exec-muted);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .execution-empty-icon {
    font-size: 13px;
    margin-bottom: 4px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .history-quick-panel .panel-header button {
    font-size: 11px !important;
    color: #8fb8ff !important;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .execution-log {
    height: calc(100% - 40px);
    overflow: auto;
    padding: 6px 10px;
    background: transparent;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .log-entry {
    padding: 4px 0;
    border-bottom: 1px solid #333c4f;
    font-size: 11px;
    line-height: 1.25;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .log-entry:last-child {
    border-bottom: none;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .log-timestamp,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .log-message {
    color: #bac6d9;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .history-empty {
    color: var(--exec-muted);
    font-size: 12px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-panel-content {
    height: calc(100% - 40px);
    padding: 8px;
    overflow: auto;
    background: transparent;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-cards-grid {
    grid-template-columns: 1fr;
    gap: 7px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-card {
    background: #202838;
    border: 1px solid #374258;
    border-radius: 8px;
    padding: 8px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-card-header {
    margin-bottom: 6px;
    align-items: center;
    gap: 8px;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-card-title {
    gap: 0;
    min-width: 0;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-card-name {
    font-size: 12px;
    color: var(--exec-text);
    line-height: 1.2;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-card-db {
    font-size: 10px;
    color: var(--exec-muted);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-card-status {
    background: transparent;
    border: none;
    font-size: 11px;
    color: var(--exec-muted);
    padding: 0;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-card-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #2a3345;
    color: #31d0ea;
    border: 1px solid #3b495f;
    flex-shrink: 0;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-card-host,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-card-metrics,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-card-realtime,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-agents-section,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-footer {
    display: none;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-usage-bar {
    height: 6px;
    border-radius: 999px;
    background: #2f384a;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-usage-fill {
    background: linear-gradient(90deg, #19d0af, #3f7cff);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-usage-text {
    margin-top: 4px;
    font-size: 11px;
    color: var(--exec-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-usage-text .usage-percent {
    color: #5d92ff;
    font-weight: 600;
}

@media (max-width: 1280px) {
    .task-manager-page.industrial-theme .industrial-layout.layout-exec-first {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr) 300px 168px 168px;
    }

    .task-manager-page.industrial-theme .industrial-layout.layout-exec-first .bottom-panels {
        grid-column: 1;
        grid-row: 1;
    }

    .task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pending-queue-top {
        grid-column: 1;
        grid-row: 2;
    }

    .task-manager-page.industrial-theme .industrial-layout.layout-exec-first .history-quick-panel {
        grid-column: 1;
        grid-row: 3;
    }

    .task-manager-page.industrial-theme .industrial-layout.layout-exec-first .connection-pool-panel {
        grid-column: 1;
        grid-row: 4;
    }
}

/* ============================================
   EXEC-FIRST THEME BRIDGE
   ============================================ */
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first {
    --exec-bg: #eef2f7;
    --exec-panel: #ffffff;
    --exec-panel-2: #f3f6fb;
    --exec-line: #d6dee9;
    --exec-line-soft: #c9d3e1;
    --exec-text: #152238;
    --exec-muted: #64748b;
    --exec-blue: #2f6ff5;
    --exec-ok: #11a874;
    --exec-warn: #f2a93f;
    --exec-row: #f8fbff;
    --exec-row-deep: #f1f6ff;
    --exec-card: #fcfdff;
    --exec-card-soft: #f6f9ff;
    --exec-btn: #e9eff8;
    --exec-btn-border: #bcc9dc;
    --exec-btn-text: #334155;
}

.theme-dark .task-manager-page.industrial-theme .industrial-layout.layout-exec-first,
[data-theme="dark"] .task-manager-page.industrial-theme .industrial-layout.layout-exec-first {
    --exec-bg: #171b22;
    --exec-panel: #222834;
    --exec-panel-2: #1d2330;
    --exec-line: #394153;
    --exec-line-soft: #324058;
    --exec-text: #e6ecf7;
    --exec-muted: #94a0b6;
    --exec-blue: #3f7cff;
    --exec-ok: #18c37e;
    --exec-warn: #f4b451;
    --exec-row: #202838;
    --exec-row-deep: #1a2130;
    --exec-card: #202838;
    --exec-card-soft: #252d3e;
    --exec-btn: #2a3345;
    --exec-btn-border: #52607a;
    --exec-btn-text: #d3def2;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first {
    background: var(--exec-bg);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first > .panel-startup,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .bottom-panels {
    background: var(--exec-panel);
    border-color: var(--exec-line);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .panel-header {
    background: var(--exec-panel-2);
    border-bottom-color: var(--exec-line);
    color: var(--exec-text);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .count-badge,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .log-timestamp,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .log-message,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .history-empty,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pq-empty,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-usage-text {
    color: var(--exec-muted);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .queue-tab {
    background: var(--exec-btn);
    border-color: var(--exec-btn-border);
    color: var(--exec-btn-text);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .queue-tab.active {
    background: color-mix(in srgb, var(--exec-blue) 20%, var(--exec-btn));
    border-color: color-mix(in srgb, var(--exec-blue) 50%, var(--exec-btn-border));
    color: var(--exec-text);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .scheme-btn {
    background: var(--exec-btn);
    border-color: var(--exec-btn-border);
    color: var(--exec-btn-text);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pq-item,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-card {
    background: var(--exec-row);
    border-color: var(--exec-line-soft);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pq-name,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-card-name,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-name {
    color: var(--exec-text);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pq-tag,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-card-db,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-card-status {
    color: var(--exec-muted);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .task-slot {
    background: var(--exec-row-deep);
    border-color: color-mix(in srgb, var(--exec-line) 85%, #ffffff 15%);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-progress {
    background: color-mix(in srgb, var(--exec-line) 70%, transparent);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-kpi,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-metric-item {
    background: var(--exec-card-soft);
    border-color: var(--exec-line-soft);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-kpi-label,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-metric-label,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .execution-empty-icon,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .execution-empty-text {
    color: var(--exec-muted);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-percent {
    color: var(--exec-blue);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-count,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-speed,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-finish,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-concurrency-value {
    color: var(--exec-text);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-elapsed,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-content-rate {
    color: var(--exec-ok);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .slot-eta {
    color: color-mix(in srgb, var(--exec-blue) 75%, #00c9ff 25%);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .execution-empty {
    border-color: color-mix(in srgb, var(--exec-line) 75%, transparent);
    background: color-mix(in srgb, var(--exec-panel) 85%, transparent);
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .execution-log,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pool-panel-content,
.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .pq-list {
    background: transparent;
}

.task-manager-page.industrial-theme .industrial-layout.layout-exec-first .log-entry {
    border-bottom-color: color-mix(in srgb, var(--exec-line) 70%, transparent);
}
