/* ─── Connection Builder ──────────────────────────────────────────────────── */

.conn-tab-row {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.85rem;
}

.conn-tab-btn {
    padding: 0.35rem 0.85rem;
    font-size: 0.78rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
}

.conn-tab-btn:hover { color: var(--text-main); }

.conn-tab-btn.active {
    color: var(--text-main);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.conn-pill-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.4rem;
}

.conn-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.conn-pill {
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.conn-pill:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.25);
}

/* --- Mock Mode Toggle --- */
.mock-mode-mini {
    position: absolute;
    top: 1rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mock-mode-mini:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    color: var(--text-main);
}

.mock-mode-mini input {
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
}

/* --- Results Section --- */
.results-section {
    margin-top: 2rem;
    display: none;
}

/* --- Summary Stats Grid --- */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.stat-val {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- File Upload --- */
.upload-label {
    font-size: 0.75rem;
    color: var(--primary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--primary);
    border-radius: 0.375rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s ease;
    background: rgba(99, 102, 241, 0.05);
}

.upload-label:hover {
    background: var(--primary);
    color: white;
}

.upload-label svg { transition: transform 0.2s ease; }
.upload-label:hover svg { transform: translateY(-1px); }

.upload-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--primary);
    cursor: pointer;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.05);
    transition: all 0.2s ease;
}

.upload-link-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--primary);
}

/* --- Strategy List --- */
.strategy-list {
    list-style: none;
    padding: 0;
}

.strategy-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.strategy-list li:last-child { border-bottom: none; }
.strategy-list span:first-child { font-size: 0.95rem; color: var(--text-main); }

/* --- Batch Tabs --- */
.tab-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: all 0.2s;
}

.tab-btn:hover { border-color: var(--primary); color: var(--primary); }
.tab-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* --- Results Table --- */
.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    color: var(--text-main);
    border: 1px solid var(--border);
    margin-top: 1rem;
    border-radius: 12px;
    overflow: hidden;
}

.results-table th {
    background: rgba(255, 152, 0, 0.15);
    color: #ff9800;
    font-weight: 700;
    padding: 14px 12px;
    text-align: left;
    border-bottom: 2px solid rgba(255, 152, 0, 0.3);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.2s ease;
}

.results-table th:hover { background: rgba(255, 152, 0, 0.25); }
.results-table th.sortable::after { content: ' \2195'; font-size: 0.7rem; opacity: 0.5; margin-left: 4px; }

.results-table td {
    padding: 12px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    vertical-align: top;
    line-height: 1.5;
}

.results-table tr:last-child td { border-bottom: none; }
.results-table tr:hover { background: rgba(255, 255, 255, 0.03); }

/* --- Download Links --- */
.download-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.4rem;
    cursor: pointer;
    font-weight: 600;
}

.download-link:hover { text-decoration: underline; }

/* --- Loading Indicator --- */
.loading-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 1rem;
    color: var(--primary);
    font-weight: 600;
}
