/* ═══════════════════════════════════════════════════════════════════════════
   Dystrio UI - Styles (Simplified)
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: #16161f;
    --bg-card-hover: #1e1e2a;
    
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    
    --accent-primary: #00d4aa;
    --accent-secondary: #00a8ff;
    --accent-warning: #ffaa00;
    --accent-error: #ff4466;
    --accent-success: #00d4aa;
    
    --gradient-main: linear-gradient(135deg, #00d4aa 0%, #00a8ff 100%);
    
    --border-color: #2a2a35;
    
    --font-main: 'Outfit', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(0,212,170,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(0,168,255,0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.app {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.25rem;
}

.logo-icon {
    color: var(--accent-primary);
    font-size: 1.5rem;
}

.api-key-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.api-key-section input {
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    width: 180px;
}

.api-key-section input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.2);
}

.api-key-section input.valid {
    border-color: var(--accent-primary);
    background: rgba(0,212,170,0.15);
}

.api-key-section input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.api-key-section button {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.api-key-section button:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--bg-primary);
}

.api-key-section button.saved {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--bg-primary);
}

/* Hero */
.hero {
    text-align: center;
    padding: 1.5rem 0 2rem;
}

.hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

.tagline {
    font-size: 0.9rem;
    color: var(--accent-primary);
    font-weight: 500;
    margin-top: 0.75rem;
    letter-spacing: 0.02em;
}

.upload-formats {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.format-badges {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0.75rem 0;
}

.format-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.format-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.format-badge.spark {
    border-color: rgba(255, 140, 0, 0.4);
    color: #ff8c00;
}

.format-badge.argo {
    border-color: rgba(0, 180, 216, 0.4);
    color: #00b4d8;
}

.format-badge.airflow {
    border-color: rgba(1, 124, 238, 0.4);
    color: #017cee;
}

.format-badge.json {
    border-color: rgba(0, 212, 170, 0.4);
    color: var(--accent);
}

.api-key-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#signupSection {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

#keyInput {
    padding: 0.4rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.8rem;
    width: 180px;
    min-width: 150px;
}

#keyInput:focus {
    outline: none;
    border-color: var(--accent-primary);
}

#signupBtn {
    padding: 0.4rem 0.75rem;
    background: #00d4aa;
    border: none;
    border-radius: 6px;
    color: #000000;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

#signupBtn:hover {
    opacity: 0.9;
}

#signupBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.or-demo {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.or-demo code {
    color: var(--accent-primary);
    cursor: pointer;
    padding: 0.1rem 0.3rem;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 3px;
}

.or-demo code:hover {
    background: rgba(0, 255, 136, 0.2);
}

#loggedInSection {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.logged-in-status {
    color: var(--accent-primary);
    font-size: 0.85rem;
}

#currentKeyDisplay {
    padding: 0.3rem 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-family: var(--font-mono);
    width: 160px;
    cursor: text;
}

#copyKeyBtn {
    padding: 0.25rem 0.4rem;
    font-size: 0.7rem;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.btn-small:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.format-section {
    margin: 1rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.format-section:last-child {
    border-bottom: none;
}

/* Main Interface */
.main-interface {
    flex: 1;
}

/* Step Sections */
.step-section {
    margin-bottom: 2rem;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.step-number {
    width: 28px;
    height: 28px;
    background: var(--gradient-main);
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.step-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all 0.2s ease;
}

.upload-zone.dragover {
    border-color: var(--accent-primary);
    background: rgba(0,212,170,0.05);
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.6;
}

.upload-zone p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.upload-or {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0.75rem 0;
}

.upload-btn {
    padding: 0.5rem 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
}

/* File Preview */
.file-preview {
    background: rgba(0,212,170,0.1);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-lg);
    padding: 1rem;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-icon {
    font-size: 1.5rem;
    color: var(--accent-primary);
}

.file-details {
    flex: 1;
}

.file-name {
    display: block;
    font-weight: 500;
    color: var(--accent-primary);
}

.file-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.file-remove {
    width: 28px;
    height: 28px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-remove:hover {
    background: var(--accent-error);
    border-color: var(--accent-error);
    color: white;
}

/* Help Text */
.help-text {
    margin-top: 1rem;
}

.help-text summary {
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem 0;
}

.help-text summary:hover {
    color: var(--text-secondary);
}

.json-example {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    overflow-x: auto;
    color: var(--text-secondary);
    margin: 0.75rem 0;
}

.help-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Goals Form */
.goals-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group > label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.form-group small {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Radio Options */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-option:hover {
    border-color: var(--text-muted);
}

.radio-option input {
    margin-top: 0.25rem;
    accent-color: var(--accent-primary);
}

.radio-option input:checked + .radio-label strong {
    color: var(--accent-primary);
}

.radio-option:has(input:checked) {
    border-color: var(--accent-primary);
    background: rgba(0,212,170,0.05);
}

.radio-option.recommended-option {
    border-color: var(--accent-primary);
    background: rgba(0,212,170,0.03);
}

.radio-option.recommended-option strong {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.radio-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.radio-label strong {
    font-size: 0.95rem;
}

.radio-label small {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Input Fields */
input[type="number"] {
    width: 100%;
    max-width: 250px;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.input-with-prefix {
    display: flex;
    align-items: center;
    max-width: 250px;
}

.input-with-prefix .prefix {
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    color: var(--text-muted);
}

.input-with-prefix input {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    max-width: none;
    flex: 1;
}

/* Cluster Builder */
.cluster-builder {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.cluster-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cluster-row .node-count {
    width: 70px;
    padding: 0.6rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-align: center;
}

.cluster-row .multiply {
    color: var(--text-muted);
    font-size: 1rem;
}

.cluster-row .node-type {
    flex: 1;
    padding: 0.6rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    cursor: pointer;
}

.cluster-row .node-type:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.cluster-row .remove-row-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cluster-row .remove-row-btn:hover {
    background: var(--accent-error);
    border-color: var(--accent-error);
    color: white;
}

.add-row-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: fit-content;
}

.add-row-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.custom-cluster-group {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Optimize Button */
.optimize-btn {
    width: 100%;
    padding: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 500;
    cursor: not-allowed;
    transition: all 0.2s ease;
    margin-top: 1rem;
}

.optimize-btn.ready {
    background: var(--gradient-main);
    border: none;
    color: var(--bg-primary);
    cursor: pointer;
}

.optimize-btn.ready:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,212,170,0.3);
}

.optimize-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Results Panel */
.results-panel {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.panel-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.back-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.back-btn:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

/* Answer Box */
.answer-box {
    background: var(--gradient-main);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--bg-primary);
}

.answer-box h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.answer-box .answer-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.answer-box .answer-detail {
    font-size: 0.9rem;
    opacity: 0.9;
}

.answer-box .answer-why {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
    font-size: 0.85rem;
    opacity: 0.95;
    line-height: 1.5;
}

.answer-box .why-label {
    font-weight: 700;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-right: 0.4rem;
}

/* Results Summary */
.results-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
}

.summary-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.summary-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: var(--font-mono);
}

.summary-value.highlight {
    color: var(--accent-primary);
}

/* Comparison Table */
.results-comparison h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.comparison-table {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.comparison-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

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

.comparison-row.header {
    background: var(--bg-secondary);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comparison-row.best {
    background: linear-gradient(90deg, rgba(0,212,170,0.2) 0%, rgba(0,212,170,0.08) 100%);
    border-left: 4px solid var(--accent-primary);
    box-shadow: inset 0 0 30px rgba(0, 212, 170, 0.05);
}

.comparison-row.best .shape {
    color: var(--accent-primary);
    font-weight: 600;
}

.comparison-row.best .value {
    font-weight: 500;
}

.comparison-row .shape {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.comparison-row .value {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-align: center;
}

.comparison-row .reduction {
    color: var(--accent-primary);
    font-weight: 500;
}

.comparison-row .increase {
    color: var(--accent-warning);
    font-weight: 500;
}

.best-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--bg-primary);
    background: var(--accent-primary);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 212, 170, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(0, 212, 170, 0); }
}

/* Footer */
.footer {
    text-align: center;
    padding: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 600px) {
    .results-summary {
        grid-template-columns: 1fr;
    }
    
    .comparison-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .comparison-row.header {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Token Display
   ═══════════════════════════════════════════════════════════════════════════ */

.token-balance {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-left: 0.75rem;
    cursor: help;
}

.token-balance .token-icon {
    font-size: 1rem;
}

.summary-card.tokens {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.1) 0%, rgba(0, 212, 170, 0.1) 100%);
    border-color: rgba(255, 170, 0, 0.3);
}

.summary-card.tokens .summary-label {
    color: var(--accent-warning);
}

.tokens-remaining {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: normal;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Placement Section
   ═══════════════════════════════════════════════════════════════════════════ */

.placement-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.placement-section h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.placement-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Bottleneck Analysis Section
   ═══════════════════════════════════════════════════════════════════════════ */

.bottleneck-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.bottleneck-section h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.bottleneck-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0 0 1rem 0;
}

.bottleneck-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bottleneck-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 3px solid var(--accent-warning);
}

.bottleneck-item:first-child {
    border-left-color: var(--accent-error);
    background: rgba(255, 68, 102, 0.08);
}

.bottleneck-rank {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 28px;
}

.bottleneck-item:first-child .bottleneck-rank {
    color: var(--accent-error);
}

.bottleneck-flow {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.bottleneck-src, .bottleneck-dst {
    color: var(--accent-primary);
}

.bottleneck-arrow {
    color: var(--text-muted);
}

.bottleneck-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: right;
}

.bottleneck-bytes {
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.bottleneck-pct {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.bottleneck-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.bottleneck-total strong {
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   DAG Insights Section
   ═══════════════════════════════════════════════════════════════════════════ */

.dag-insights-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.dag-insights-section h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.dag-insights-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0 0 1rem 0;
}

.dag-insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.dag-insight-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1rem;
    border-left: 3px solid var(--accent-primary);
}

.dag-insight-card.fanout {
    border-left-color: #ff9f43;
}

.dag-insight-card.fanin {
    border-left-color: #54a0ff;
}

.insight-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.insight-icon {
    font-size: 1.1rem;
}

.insight-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.insight-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem 0;
}

.insight-items {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.insight-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.insight-task {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-weight: 500;
}

.insight-arrow {
    color: var(--text-muted);
}

.insight-count {
    color: var(--text-secondary);
    font-weight: 500;
}

.insight-bytes {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-left: auto;
}

.dag-insight-tip {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 212, 170, 0.08);
    border-radius: 6px;
    border: 1px solid rgba(0, 212, 170, 0.2);
}

.dag-insight-tip p {
    margin: 0.25rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.dag-insight-tip strong {
    color: var(--accent-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Spark Notice
   ═══════════════════════════════════════════════════════════════════════════ */

.spark-notice {
    background: rgba(255, 170, 0, 0.1);
    border: 1px solid var(--accent-warning);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.spark-notice strong {
    color: var(--accent-warning);
    font-size: 1rem;
}

.spark-notice p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.spark-notice ul {
    margin: 0.5rem 0 0 1.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.spark-notice li {
    margin: 0.25rem 0;
}

.export-note {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.placement-groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.placement-group {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: all 0.2s ease;
}

/* Removed hover effect - cards are display-only, not interactive */

.group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.group-icon {
    font-size: 1.25rem;
}

.group-name {
    font-weight: 600;
    color: var(--accent-primary);
    font-family: var(--font-mono);
}

.group-count {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
}

.group-tasks {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    font-family: var(--font-mono);
}

/* Export Section */
.export-section {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05) 0%, rgba(0, 212, 170, 0.05) 100%);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.export-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.export-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.export-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
}

.export-btn.spark-config-btn {
    border-color: #ff9f43;
    color: #ff9f43;
}

.export-btn.spark-config-btn:hover {
    background: #ff9f43;
    color: var(--bg-primary);
    border-color: #ff9f43;
}

.export-btn.argo-config-btn {
    border-color: #00b4d8;
    color: #00b4d8;
}

.export-btn.argo-config-btn:hover {
    background: #00b4d8;
    color: var(--bg-primary);
    border-color: #00b4d8;
}

.export-btn.airflow-config-btn {
    border-color: #017CEE;
    color: #017CEE;
}

.export-btn.airflow-config-btn:hover {
    background: #017CEE;
    color: white;
    border-color: #017CEE;
}

.export-btn .export-icon {
    font-size: 1.1rem;
}

/* Export Notification */
.export-notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--accent-primary);
    color: var(--bg-primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.export-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Responsive */
@media (max-width: 600px) {
    .placement-groups {
        grid-template-columns: 1fr;
    }
    
    .export-buttons {
        flex-direction: column;
    }
    
    .export-btn {
        width: 100%;
        justify-content: center;
    }
}
