/* Starship - Space Theme Styles */

/* ===== ROOT VARIABLES ===== */
:root {
    /* Background Colors */
    --bg-deep: #0a0e17;
    --bg-surface: rgba(13, 21, 32, 0.7);
    --bg-card: rgba(13, 21, 32, 0.85);
    --bg-elevated: rgba(20, 30, 48, 0.9);

    /* Accent Colors */
    --primary: #00d4ff;
    --primary-dark: #00a8cc;
    --primary-glow: rgba(0, 212, 255, 0.3);
    --secondary: #8b5cf6;
    --secondary-glow: rgba(139, 92, 246, 0.3);

    /* Semantic Colors */
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.3);
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.3);

    /* Text Colors */
    --text: #ffffff;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    /* Border & Effects */
    --border: rgba(30, 58, 95, 0.5);
    --border-glow: rgba(0, 212, 255, 0.2);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.15);

    /* Glass Effect */
    --glass-blur: blur(12px);
    --glass-border: 1px solid rgba(0, 212, 255, 0.1);
}

/* ===== RESET & BASE ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-deep);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ===== ANIMATED STARFIELD BACKGROUND ===== */
body::before,
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: -1;
}

/* Stars layer 1 - small distant stars */
body::before {
    background-image:
        radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 50px 160px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 160px 120px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 200px 150px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 250px 50px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 300px 100px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 350px 180px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 400px 60px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 450px 130px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 500px 200px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 550px 90px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 600px 170px, rgba(255,255,255,0.5), transparent);
    background-repeat: repeat;
    background-size: 650px 220px;
    animation: twinkle 8s ease-in-out infinite;
}

/* Stars layer 2 - larger closer stars */
body::after {
    background-image:
        radial-gradient(2px 2px at 100px 50px, rgba(0, 212, 255, 0.6), transparent),
        radial-gradient(2px 2px at 300px 150px, rgba(139, 92, 246, 0.5), transparent),
        radial-gradient(2px 2px at 500px 80px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(2px 2px at 180px 200px, rgba(0, 212, 255, 0.4), transparent),
        radial-gradient(2px 2px at 420px 120px, rgba(139, 92, 246, 0.6), transparent),
        radial-gradient(2px 2px at 600px 250px, rgba(255, 255, 255, 0.5), transparent);
    background-repeat: repeat;
    background-size: 700px 300px;
    animation: twinkle 12s ease-in-out infinite reverse;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Subtle gradient overlay */
.container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top, rgba(0, 212, 255, 0.03) 0%, transparent 50%),
                radial-gradient(ellipse at bottom right, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
}

/* ===== HEADER ===== */
header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text);
    text-shadow: 0 0 30px var(--primary-glow);
    letter-spacing: 0.02em;
}

header .subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 0.25rem;
}

/* ===== SERVICE STATUS PANEL ===== */
.service-status-panel {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.service-status-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.service-status-header:hover {
    background: var(--bg-elevated);
}

.service-status-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.service-status-summary {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text);
}

.service-status-toggle {
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.service-status-panel.expanded .service-status-toggle {
    transform: rotate(180deg);
}

.service-status-details {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    background: var(--bg-deep);
}

.service-status-details.hidden {
    display: none;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    font-size: 0.85rem;
}

.service-icon {
    font-size: 1rem;
    width: 1.5rem;
    text-align: center;
}

.service-name {
    font-weight: 500;
    color: var(--text);
    width: 5rem;
}

.service-state {
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.service-state[data-state="ready"] {
    background: var(--success-glow);
    color: var(--success);
}

.service-state[data-state="available"] {
    background: var(--warning-glow);
    color: var(--warning);
}

.service-state[data-state="unavailable"],
.service-state[data-state="error"] {
    background: var(--danger-glow);
    color: var(--danger);
}

.service-state[data-state="checking"] {
    background: var(--bg-elevated);
    color: var(--text-muted);
}

.service-detail {
    flex: 1;
    font-size: 0.75rem;
    color: var(--text-dim);
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.service-status-details .btn-small {
    margin-top: 0.5rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
}

/* ===== GLASS CARD MIXIN ===== */
.glass-card,
section,
.archive-section,
.processing-section {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

section:hover,
.archive-section:hover,
.processing-section:hover {
    box-shadow: var(--shadow), var(--shadow-glow);
    border-color: rgba(0, 212, 255, 0.2);
}

section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text);
    font-weight: 600;
}

/* ===== STATUS BANNER ===== */
.status-banner {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
    backdrop-filter: var(--glass-blur);
}

.status-banner.info {
    background: rgba(0, 212, 255, 0.15);
    color: var(--primary);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.status-banner.error {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-banner.success {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.hidden {
    display: none !important;
}

/* ===== INPUT CONTROLS ===== */
.input-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.record-controls,
.upload-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.divider {
    color: var(--text-dim);
    font-size: 0.875rem;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn .icon {
    font-size: 0.875rem;
}

/* Primary/Analyze Button - Gradient */
.btn-analyze {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-analyze:hover {
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.5);
    transform: translateY(-1px);
}

.btn-analyze:disabled {
    background: var(--text-dim);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Record Button */
.btn-record {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 15px var(--danger-glow);
}

.btn-record:hover {
    background: #dc2626;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.btn-record.recording {
    animation: pulse-record 1.5s infinite;
    box-shadow: 0 0 20px var(--danger-glow);
}

@keyframes pulse-record {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 20px var(--danger-glow);
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 30px rgba(239, 68, 68, 0.6);
    }
}

/* Upload/Secondary Button */
.btn-upload {
    background: var(--bg-elevated);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-upload:hover {
    background: rgba(30, 58, 95, 0.5);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Download Button */
.btn-download {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    box-shadow: 0 4px 15px var(--success-glow);
}

.btn-download:hover {
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Icon Buttons */
.btn-icon {
    padding: 0.4rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.btn-icon:hover {
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.btn-icon.delete:hover {
    color: var(--danger);
    border-color: var(--danger);
    box-shadow: 0 0 10px var(--danger-glow);
}

/* ===== RECORD TIME & FILE NAME ===== */
.record-time {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 1rem;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

.file-name {
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== AUDIO PREVIEW ===== */
.audio-preview {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.audio-preview audio {
    flex: 1;
    min-width: 200px;
    border-radius: 0.5rem;
    background: var(--bg-elevated);
}

/* Style audio element for dark theme */
audio::-webkit-media-controls-panel {
    background: var(--bg-elevated);
}

.preview-buttons {
    display: flex;
    gap: 0.5rem;
}

/* ===== RESULTS HEADER ===== */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.results-header h2 {
    margin-bottom: 0;
}

.download-buttons {
    display: flex;
    gap: 0.5rem;
}

/* ===== ARCHIVE SECTION ===== */
.archive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.archive-header h2 {
    margin: 0;
}

.archive-list {
    max-height: 300px;
    overflow-y: auto;
}

/* Custom scrollbar for archive */
.archive-list::-webkit-scrollbar {
    width: 6px;
}

.archive-list::-webkit-scrollbar-track {
    background: var(--bg-deep);
    border-radius: 3px;
}

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

.archive-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.archive-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    background: var(--bg-surface);
    transition: all 0.2s ease;
}

.archive-item:hover {
    background: var(--bg-elevated);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.archive-item-info {
    flex: 1;
}

.archive-item-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.archive-item-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.archive-item-meta span {
    margin-right: 1rem;
}

.archive-item-actions {
    display: flex;
    gap: 0.5rem;
}

/* ===== PROCESSING SECTION ===== */
.processing-section h2 {
    margin-bottom: 1rem;
    text-align: center;
}

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

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-deep);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-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: shimmer 2s infinite;
}

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

.progress-percent {
    font-weight: 600;
    color: var(--primary);
    min-width: 45px;
    text-align: right;
    text-shadow: 0 0 10px var(--primary-glow);
}

.progress-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-dim);
    transition: all 0.2s ease;
    background: transparent;
}

.step.active {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.step.completed {
    color: var(--success);
}

.step.completed .step-icon {
    color: var(--success);
    text-shadow: 0 0 10px var(--success-glow);
}

.step-icon {
    font-size: 1rem;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
    overflow-x: auto;
}

.tab {
    padding: 0.625rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

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

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    text-shadow: 0 0 15px var(--primary-glow);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ===== STATS BAR ===== */
.stats-bar {
    display: flex;
    gap: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-surface);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    border: 1px solid var(--border);
}

.stats-bar strong {
    color: var(--primary);
}

/* ===== TRANSCRIPT ===== */
.transcript-content {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

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

.transcript-content::-webkit-scrollbar-track {
    background: var(--bg-deep);
    border-radius: 3px;
}

.transcript-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.transcript-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.segment {
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    transition: border-color 0.2s ease;
}

.segment:hover {
    border-color: rgba(0, 212, 255, 0.3);
}

.segment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.segment-speaker {
    font-weight: 600;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

.segment-text {
    font-size: 0.9375rem;
    color: var(--text);
}

.full-text-section h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.full-text {
    padding: 1rem;
    background: var(--bg-surface);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

/* ===== SPEAKERS ===== */
.speakers-content {
    display: grid;
    gap: 1rem;
}

.speaker-card {
    padding: 1rem;
    background: var(--bg-surface);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.speaker-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 15px var(--primary-glow);
}

.speaker-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
}

.speaker-role {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 1rem;
    font-weight: 400;
}

.speaker-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    font-size: 0.875rem;
}

.speaker-stat {
    color: var(--text-muted);
}

.speaker-stat strong {
    display: block;
    color: var(--primary);
    font-size: 1.125rem;
}

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

.quality-metric {
    text-align: center;
    padding: 1rem;
    background: var(--bg-surface);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.quality-metric:hover {
    border-color: rgba(0, 212, 255, 0.3);
}

.quality-metric .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.quality-metric .label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.quality-metric.effective .value {
    color: var(--success);
    text-shadow: 0 0 15px var(--success-glow);
}

.quality-metric.improvement .value {
    color: var(--warning);
    text-shadow: 0 0 15px var(--warning-glow);
}

.patterns-section h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.pattern-list {
    list-style: none;
}

.pattern-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pattern-item:last-child {
    border-bottom: none;
}

.pattern-name {
    font-size: 0.875rem;
    color: var(--text);
}

.pattern-count {
    background: var(--bg-elevated);
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
}

/* ===== SCORECARDS ===== */
.scorecards-content {
    display: grid;
    gap: 1.5rem;
}

.scorecard {
    background: var(--bg-surface);
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--border);
}

.scorecard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.scorecard-header h3 {
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
}

.overall-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 15px var(--primary-glow);
}

.score-grid {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.score-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
    background: var(--bg-elevated);
    border-radius: 0.375rem;
    border: 1px solid var(--border);
}

.score-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.score-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

.score-value {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.score-evidence {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.score-quotes {
    margin-top: 0.5rem;
}

.score-quotes details summary {
    font-size: 0.75rem;
    color: var(--primary);
    cursor: pointer;
    user-select: none;
}

.score-quotes details summary:hover {
    text-decoration: underline;
}

.quote-list {
    list-style: none;
    margin-top: 0.5rem;
    padding-left: 0;
}

.quote-list .quote {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--text-muted);
    padding: 0.375rem 0.5rem;
    margin-bottom: 0.25rem;
    background: var(--bg-deep);
    border-radius: 0.25rem;
    border-left: 2px solid var(--primary);
}

.quote-time {
    font-family: 'SF Mono', Monaco, monospace;
    font-style: normal;
    color: var(--primary);
    margin-right: 0.25rem;
}

.quote-conf {
    font-style: normal;
    color: var(--text-dim);
    font-size: 0.7rem;
}

.example-quotes-section {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.example-quotes-section summary {
    font-size: 0.8rem;
    color: var(--primary);
    cursor: pointer;
}

.score-dots {
    display: flex;
    gap: 2px;
}

.score-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-deep);
    border: 1px solid var(--border);
}

.score-dot.filled {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
}

.score-dot.filled.score-1 { background: #ef4444; border-color: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,0.5); }
.score-dot.filled.score-2 { background: #f97316; border-color: #f97316; box-shadow: 0 0 8px rgba(249,115,22,0.5); }
.score-dot.filled.score-3 { background: #eab308; border-color: #eab308; box-shadow: 0 0 8px rgba(234,179,8,0.5); }
.score-dot.filled.score-4 { background: #84cc16; border-color: #84cc16; box-shadow: 0 0 8px rgba(132,204,22,0.5); }
.score-dot.filled.score-5 { background: #22c55e; border-color: #22c55e; box-shadow: 0 0 8px rgba(34,197,94,0.5); }

.strengths-weaknesses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.strengths h4, .weaknesses h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.strengths ul, .weaknesses ul {
    list-style: none;
    font-size: 0.875rem;
}

.strengths li {
    color: var(--text);
}

.strengths li::before {
    content: "+";
    color: var(--success);
    margin-right: 0.5rem;
    font-weight: 700;
}

.weaknesses li {
    color: var(--text);
}

.weaknesses li::before {
    content: "-";
    color: var(--warning);
    margin-right: 0.5rem;
    font-weight: 700;
}

/* ===== LEARNING ===== */
.learning-content {
    display: grid;
    gap: 1.5rem;
}

.learning-section {
    background: var(--bg-surface);
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--border);
}

.learning-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.kirkpatrick-levels {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.kirk-level {
    text-align: center;
    padding: 0.75rem;
    background: var(--bg-elevated);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.kirk-level:hover {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.kirk-level .level-num {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.kirk-level .level-name {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.kirk-level .level-score {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

.framework-scores {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.framework-score {
    text-align: center;
    padding: 1rem;
    background: var(--bg-elevated);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.framework-score .framework-name {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.framework-score .framework-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 15px var(--primary-glow);
}

.framework-score .framework-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== CONFIDENCE DISTRIBUTION ===== */
.confidence-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.confidence-section h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.confidence-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.confidence-stats strong {
    color: var(--primary);
}

.confidence-buckets {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 80px;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-elevated);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.confidence-bucket {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.bucket-bar {
    width: 100%;
    background: linear-gradient(to top, var(--primary), var(--secondary));
    border-radius: 0.25rem 0.25rem 0 0;
    min-height: 4px;
    transition: height 0.3s ease;
    box-shadow: 0 0 10px var(--primary-glow);
}

.bucket-label {
    font-size: 0.625rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    white-space: nowrap;
}

.bucket-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
}

/* ===== RECOMMENDATIONS ===== */
.recommendations-list {
    list-style: none;
    padding: 0;
}

.recommendations-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text);
}

.recommendations-list li:last-child {
    border-bottom: none;
}

.recommendations-list li::before {
    content: "→";
    color: var(--primary);
    margin-right: 0.5rem;
    font-weight: 700;
}

/* ===== EMPTY STATE ===== */
.empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 1rem;
    color: var(--text-dim);
    font-size: 0.875rem;
}

footer p {
    text-shadow: 0 0 20px var(--primary-glow);
}

/* ===== 7 HABITS ASSESSMENT ===== */
.habits-content {
    display: grid;
    gap: 1.5rem;
}

.habits-overview {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-surface);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.habits-overview h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.overall-score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: conic-gradient(var(--primary) var(--score), var(--bg-deep) var(--score));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 30px var(--primary-glow);
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    background: var(--bg-card);
    border-radius: 50%;
}

.score-circle .score-value {
    position: relative;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 15px var(--primary-glow);
}

.score-circle .score-max {
    position: relative;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.score-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

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

.habit-card {
    background: var(--bg-surface);
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.habit-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 15px var(--primary-glow);
}

.habit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.habit-number {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.habit-score {
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
}

.habit-score.score-1 { background: rgba(239,68,68,0.2); color: #fca5a5; }
.habit-score.score-2 { background: rgba(249,115,22,0.2); color: #fdba74; }
.habit-score.score-3 { background: rgba(234,179,8,0.2); color: #fde047; }
.habit-score.score-4 { background: rgba(34,197,94,0.2); color: #86efac; }
.habit-score.score-5 { background: rgba(34,197,94,0.3); color: #4ade80; }

.habit-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.habit-observations {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.habit-interpretation {
    font-size: 0.875rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.habit-tip {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.5rem;
    background: var(--bg-elevated);
    border-radius: 0.25rem;
    border-left: 3px solid var(--primary);
}

.habits-section {
    background: var(--bg-surface);
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--border);
}

.habits-section h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.habits-section.strengths h3 { color: var(--success); }
.habits-section.growth-areas h3 { color: var(--warning); }

.habits-list {
    list-style: none;
}

.habits-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.habits-list li:last-child {
    border-bottom: none;
}

.habits-list li p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.dev-tip {
    font-size: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-elevated);
    border-radius: 0.25rem;
    margin-top: 0.5rem;
    color: var(--text-muted);
}

/* ===== TRAINING RECOMMENDATIONS ===== */
.training-content {
    display: grid;
    gap: 1.5rem;
}

.training-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.training-header h3 {
    font-size: 1.125rem;
    margin: 0;
    color: var(--text);
}

.total-count {
    font-size: 0.875rem;
    color: var(--text-muted);
    background: var(--bg-elevated);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.training-section {
    background: var(--bg-surface);
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--border);
}

.training-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

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

.recommendation-card {
    background: var(--bg-elevated);
    border-radius: 0.5rem;
    padding: 1rem;
    border-left: 4px solid var(--primary);
    transition: all 0.2s ease;
}

.recommendation-card:hover {
    box-shadow: 0 0 15px var(--primary-glow);
}

.recommendation-card.priority-critical {
    border-left-color: #ef4444;
}

.recommendation-card.priority-high {
    border-left-color: #f97316;
}

.recommendation-card.priority-medium {
    border-left-color: #eab308;
}

.recommendation-card.priority-low {
    border-left-color: #22c55e;
}

.rec-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.rec-priority {
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

.priority-critical .rec-priority { background: rgba(239,68,68,0.2); color: #fca5a5; }
.priority-high .rec-priority { background: rgba(249,115,22,0.2); color: #fdba74; }
.priority-medium .rec-priority { background: rgba(234,179,8,0.2); color: #fde047; }
.priority-low .rec-priority { background: rgba(34,197,94,0.2); color: #86efac; }

.rec-category {
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    background: var(--bg-surface);
    border-radius: 0.25rem;
    color: var(--text-muted);
}

.recommendation-card h4 {
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.recommendation-card p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.rec-connection {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-surface);
    border-radius: 0.25rem;
    margin-bottom: 0.25rem;
    color: var(--text-muted);
}

.rec-connection.scout {
    border-left: 2px solid var(--success);
}

.rec-connection.habit {
    border-left: 2px solid var(--primary);
}

.rec-success {
    font-size: 0.75rem;
    color: var(--success);
    margin-top: 0.5rem;
}

.drills-list {
    display: grid;
    gap: 1rem;
}

.drill-card {
    background: var(--bg-elevated);
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--border);
}

.drill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.drill-header h4 {
    font-size: 1rem;
    margin: 0;
    color: var(--text);
}

.drill-duration {
    font-size: 0.75rem;
    background: var(--bg-surface);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    color: var(--text-muted);
}

.drill-purpose {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.drill-steps, .drill-debrief {
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
}

.drill-steps strong, .drill-debrief strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.drill-steps ol, .drill-debrief ul {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-muted);
}

.topics-list {
    display: grid;
    gap: 0.75rem;
}

.topic-card {
    background: var(--bg-elevated);
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--border);
}

.topic-card h4 {
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.topic-question {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.topic-scout {
    font-size: 0.75rem;
    color: var(--success);
}

.framework-alignment {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.alignment-group {
    background: var(--bg-elevated);
    border-radius: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
}

.alignment-group h4 {
    font-size: 0.8125rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.alignment-group ul {
    list-style: none;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.alignment-group li {
    padding: 0.125rem 0;
}

/* ===== QUOTE LIST STYLES ===== */
.quote-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
}

.quote-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-elevated);
    border-radius: 0.375rem;
    border-left: 3px solid var(--primary);
    font-size: 0.875rem;
}

.quote-speaker {
    font-weight: 600;
    color: var(--primary);
    margin-right: 0.5rem;
}

.quote-text {
    font-style: italic;
    color: var(--text);
}

.quote-time {
    font-size: 0.75rem;
    color: var(--primary);
    margin-right: 0.5rem;
    font-family: 'SF Mono', Monaco, monospace;
}

.quote-confidence {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.quote-assessment {
    display: block;
    font-size: 0.75rem;
    color: var(--success);
    margin-top: 0.25rem;
    font-style: normal;
}

/* ===== EXAMPLE QUOTES SECTION ===== */
.example-quotes {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.example-quotes h4 {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

/* ===== HABIT EXAMPLES ===== */
.habit-examples {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
}

.habit-examples strong {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ===== PATTERN CARD STYLES ===== */
.pattern-card {
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--bg-surface);
    border-radius: 0.5rem;
    border-left: 3px solid var(--border);
}

.pattern-card.effective {
    border-left-color: var(--success);
}

.pattern-card.needs_improvement {
    border-left-color: var(--warning);
}

.pattern-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.pattern-name {
    font-weight: 600;
    color: var(--text);
}

.pattern-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.pattern-examples {
    margin-top: 0.75rem;
}

.pattern-examples strong {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== SECTION DESCRIPTION ===== */
.section-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* ===== SPEAKER STATS GRID ===== */
.speaker-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.speaker-stat-card {
    padding: 0.75rem;
    background: var(--bg-elevated);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    border: 1px solid var(--border);
}

.speaker-stat-card strong {
    display: block;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

/* ===== COLLAPSIBLE SECTIONS ===== */
.collapsible-section {
    margin-bottom: 1rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-elevated);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
    user-select: none;
}

.section-header:hover {
    background: rgba(30, 58, 95, 0.6);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.section-header h2 {
    margin: 0;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header .badge {
    font-size: 0.75rem;
    background: var(--primary);
    color: var(--bg-deep);
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-weight: 600;
}

.collapse-icon {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    color: var(--text-muted);
}

.collapsible-section.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.section-content {
    padding: 1rem;
    background: var(--bg-card);
    border: var(--glass-border);
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    animation: slideDown 0.2s ease;
}

.collapsible-section.collapsed .section-content {
    display: none;
}

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

/* ===== SUMMARY TAB ===== */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    background: var(--bg-surface);
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.summary-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 15px var(--primary-glow);
}

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

.summary-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 15px var(--primary-glow);
    line-height: 1;
}

.summary-card .label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.summary-card.success .value {
    color: var(--success);
    text-shadow: 0 0 15px var(--success-glow);
}

.summary-card.warning .value {
    color: var(--warning);
    text-shadow: 0 0 15px var(--warning-glow);
}

.key-metrics {
    background: var(--bg-surface);
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

.key-metrics h4 {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.metric-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

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

.metric-label {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.metric-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    min-width: 50px;
    text-align: right;
}

.metric-bar {
    flex: 2;
    height: 8px;
    background: var(--bg-deep);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.metric-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.metric-bar-fill.success {
    background: linear-gradient(90deg, var(--success), #059669);
}

.metric-bar-fill.warning {
    background: linear-gradient(90deg, var(--warning), #d97706);
}

/* ===== ARCHIVE ENHANCEMENTS ===== */
.archive-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.archive-search {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    color: var(--text);
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s ease;
}

.archive-search:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.archive-search::placeholder {
    color: var(--text-dim);
}

.filter-btn {
    padding: 0.5rem 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--bg-surface);
    border-color: var(--primary);
    color: var(--primary);
}

.archive-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    background: var(--bg-surface);
    transition: all 0.2s ease;
}

.archive-item:hover {
    background: var(--bg-elevated);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.archive-item.starred {
    border-left: 3px solid var(--warning);
}

.archive-item-info {
    flex: 1;
    min-width: 0;
}

.archive-item-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.star-indicator {
    color: var(--warning);
    font-size: 0.875rem;
}

.archive-item-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.archive-item-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.archive-item-actions {
    display: flex;
    gap: 0.375rem;
    flex-shrink: 0;
}

/* ===== CURRENT ANALYSIS INFO ===== */
.current-analysis-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-surface);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.analysis-title-input {
    flex: 1;
    padding: 0.375rem 0.5rem;
    background: var(--bg-elevated);
    border: 1px solid transparent;
    border-radius: 0.25rem;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    transition: all 0.2s ease;
}

.analysis-title-input:hover {
    background: var(--bg-deep);
    border-color: var(--border);
}

.analysis-title-input:focus {
    background: var(--bg-deep);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.analysis-title-input::placeholder {
    color: var(--text-dim);
}

.star-btn {
    padding: 0.375rem 0.5rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.star-btn:hover {
    background: var(--bg-elevated);
    color: var(--warning);
    border-color: var(--warning);
}

.star-btn.starred {
    color: var(--warning);
    text-shadow: 0 0 10px var(--warning-glow);
}

.analysis-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.75rem;
}

/* ===== EVIDENCE PANELS ===== */
.evidence-panel {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-deep);
    border-radius: 0.375rem;
    border: 1px solid var(--border);
    font-size: 0.8125rem;
}

.evidence-panel h5 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.evidence-panel p {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.evidence-panel p:last-child {
    margin-bottom: 0;
}

.evidence-panel strong {
    color: var(--text);
}

details.evidence-toggle {
    margin-top: 0.5rem;
}

details.evidence-toggle summary {
    font-size: 0.75rem;
    color: var(--primary);
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-elevated);
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

details.evidence-toggle summary:hover {
    background: var(--bg-surface);
}

details.evidence-toggle summary::marker,
details.evidence-toggle summary::-webkit-details-marker {
    display: none;
}

details.evidence-toggle summary::before {
    content: "▶";
    font-size: 0.625rem;
    transition: transform 0.2s ease;
}

details.evidence-toggle[open] summary::before {
    transform: rotate(90deg);
}

.evidence-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.evidence-list li {
    padding: 0.375rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
}

.evidence-list li:last-child {
    border-bottom: none;
}

.evidence-count {
    color: var(--primary);
    font-weight: 600;
}

/* ===== PROGRESS STEPS ENHANCEMENT ===== */
.progress-steps-container {
    margin-top: 1rem;
}

.progress-steps-container h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .input-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .divider {
        text-align: center;
    }

    .quality-summary {
        grid-template-columns: 1fr;
    }

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

    .framework-scores {
        grid-template-columns: 1fr;
    }

    .habits-grid {
        grid-template-columns: 1fr;
    }

    .recommendations-grid {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .strengths-weaknesses {
        grid-template-columns: 1fr;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .archive-filters {
        flex-direction: column;
    }

    .current-analysis-info {
        flex-direction: column;
        align-items: stretch;
    }

    .analysis-meta {
        flex-direction: column;
        gap: 0.25rem;
    }

    .section-header {
        padding: 0.5rem 0.75rem;
    }

    .section-header h2 {
        font-size: 1rem;
    }
}
