/**
 * office.css - Connect AI / AETHER DYNAMICS 2D Warm Pixel Virtual Office Stylesheet v3.0
 * Matching the exact warm pastel isometric pixel art & sleek dark sidebar UI
 */

:root {
    color-scheme: dark;
    --bg-darkest: #050811;
    --bg-sidebar: #090e1c;
    --bg-card: rgba(14, 21, 40, 0.85);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(16, 185, 129, 0.4);
    
    --neon-green: #10b981;
    --neon-cyan: #06b6d4;
    --neon-gold: #f59e0b;
    --neon-red: #ef4444;
    --neon-purple: #8b5cf6;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'Fira Code', monospace;
    --font-pixel: 'Press Start 2P', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--bg-darkest);
    color: #f1f5f9;
    font-family: var(--font-body);
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
}

/* --- Main Layout --- */
.office-app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    background: var(--bg-darkest);
}

/* ==================== LEFT SIDEBAR ==================== */
.office-sidebar {
    width: 340px;
    min-width: 340px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    padding: 18px 16px;
    gap: 14px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.office-sidebar::-webkit-scrollbar {
    width: 4px;
}
.office-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.brand-logo-pixel {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(16, 185, 129, 0.2) 100%);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: 0.3px;
}

.brand-tagline {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
}

/* Quick Actions Section */
.sidebar-actions-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-btn-compact-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.btn-compact-cmd {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 8px 4px;
    color: #cbd5e1;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.btn-compact-cmd:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #fff;
    transform: translateY(-1px);
}

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

.cmd-txt {
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Prompt Input Section */
.input-label-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.input-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #fbbf24;
}

.prompt-input-wrapper {
    background: #04060d;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.textarea-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.pixel-textarea {
    flex: 1;
    height: 64px;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.82rem;
    resize: none;
    line-height: 1.45;
}
.pixel-textarea::placeholder {
    color: #475569;
}

.btn-pixel-send {
    background: #10b981;
    color: #04060d;
    border: none;
    border-radius: 8px;
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.btn-pixel-send:hover {
    background: #34d399;
    transform: scale(1.05);
}

.input-helpers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    width: 100%;
}

.btn-tag {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 6px;
    padding: 5px 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #cbd5e1;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.15s ease;
}
.btn-tag:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-1px);
}

/* Sidebar Live Log (Full Flex Height) */
.sidebar-log-box {
    flex: 1;
    background: #020409;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    min-height: 180px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

.log-title {
    font-size: 0.76rem;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.log-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.log-stream {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.74rem;
    color: #cbd5e1;
    line-height: 1.45;
    padding-right: 4px;
    word-break: keep-all;
    word-wrap: break-word;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.log-stream::-webkit-scrollbar {
    width: 4px;
}
.log-stream::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
}

.log-item {
    background: rgba(255, 255, 255, 0.025);
    border-left: 3px solid #3b82f6;
    border-radius: 5px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: background 0.15s ease;
    word-break: keep-all;
}

.log-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.log-item-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.log-time-badge {
    color: #64748b;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 600;
}

.log-tag-badge {
    border-radius: 3px;
    padding: 1px 5px;
    font-weight: 700;
    font-size: 0.63rem;
    letter-spacing: 0.2px;
}

.log-tag-badge.directive, .log-item.directive { border-left-color: #f59e0b; }
.log-tag-badge.directive { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

.log-tag-badge.evolution, .log-item.evolution { border-left-color: #10b981; }
.log-tag-badge.evolution { background: rgba(16, 185, 129, 0.2); color: #34d399; }

.log-tag-badge.security, .log-item.security { border-left-color: #6366f1; }
.log-tag-badge.security { background: rgba(99, 102, 241, 0.2); color: #818cf8; }

.log-tag-badge.radar, .log-item.radar { border-left-color: #ec4899; }
.log-tag-badge.radar { background: rgba(236, 72, 153, 0.2); color: #f472b6; }

.log-tag-badge.tech, .log-item.tech { border-left-color: #14b8a6; }
.log-tag-badge.tech { background: rgba(20, 184, 166, 0.2); color: #2dd4bf; }

.log-tag-badge.system, .log-item.system { border-left-color: #64748b; }
.log-tag-badge.system { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

.log-content-text {
    color: #e2e8f0;
    font-size: 0.73rem;
    line-height: 1.45;
    word-break: keep-all;
}

.log-item.agent-aether { border-left-color: #38bdf8; }
.log-item.agent-arche { border-left-color: #10b981; }
.log-item.agent-aegis { border-left-color: #6366f1; }
.log-item.agent-hermes { border-left-color: #f59e0b; }
.log-item.agent-prometheus { border-left-color: #ef4444; }
.log-item.agent-atlas { border-left-color: #06b6d4; }
.log-item.agent-muse { border-left-color: #a855f7; }
.log-item.agent-clio { border-left-color: #ec4899; }
.log-item.agent-argos { border-left-color: #14b8a6; }

/* ==================== RIGHT MAIN STAGE ==================== */
.office-main-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #020408;
    overflow: hidden;
}

/* Top Bar */
.office-top-bar {
    height: 48px;
    min-height: 48px;
    background: #090e1c;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    gap: 6px;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-shrink: 0;
}
.office-top-bar::-webkit-scrollbar {
    display: none;
}

.top-left-zone {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    white-space: nowrap;
}

.company-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 3px 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.comp-icon {
    font-size: 0.95rem;
    flex-shrink: 0;
}

.comp-names {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
    flex-shrink: 0;
}

.comp-main {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 800;
    color: #f1f5f9;
    white-space: nowrap;
}

.comp-sub {
    display: none;
}

.top-stats-zone {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    white-space: nowrap;
}

.top-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #04060d;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 0.70rem;
    font-weight: 600;
    white-space: nowrap !important;
    flex-shrink: 0;
    min-width: max-content;
}

.top-stat-pill.toggle-pill {
    cursor: pointer;
    transition: all 0.2s ease;
}
.top-stat-pill.toggle-pill:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.pill-dot.green { background: #10b981; box-shadow: 0 0 6px #10b981; }
.pill-dot.amber { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }

.stat-icon { font-size: 0.78rem; flex-shrink: 0; }
.stat-k { color: #64748b; font-size: 0.64rem; white-space: nowrap !important; flex-shrink: 0; word-break: keep-all; }
.stat-v { color: #f1f5f9; white-space: nowrap !important; flex-shrink: 0; word-break: keep-all; font-size: 0.70rem; }
.stat-v.mono { font-family: var(--font-mono); color: #38bdf8; }

.text-emerald { color: #10b981 !important; }
.text-cyan { color: #06b6d4 !important; }

.top-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 4px 7px;
    color: #cbd5e1;
    font-size: 0.70rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}
.top-btn:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #fff;
}

.btn-artifact-hub {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.35);
    color: #22d3ee;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-artifact-hub:hover {
    background: #06b6d4;
    color: #04060d;
    transform: scale(1.02);
}

.btn-agents-green {
    background: #10b981;
    color: #04060d;
    font-weight: 800;
    border: none;
}
.btn-agents-green:hover {
    background: #34d399;
    color: #000;
}

.btn-hq-link {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}
.btn-hq-link:hover {
    background: #f59e0b;
    color: #04060d;
}

/* Responsive Top Bar: No horizontal scroll needed at any window width */
@media (max-width: 1280px) {
    .top-left-zone { display: none; }
}

@media (max-width: 1080px) {
    .top-stat-pill { padding: 3px 5px; gap: 3px; font-size: 0.68rem; }
    .top-btn { padding: 3px 6px; font-size: 0.68rem; }
}

@media (max-width: 960px) {
    .top-stat-pill .stat-k { display: none; }
}

/* ==================== 2D CANVAS VIEWPORT ==================== */
.canvas-viewport-wrapper {
    flex: 1;
    position: relative;
    background: #02040a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#office-canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: auto;
    cursor: default;
}

/* Agent Hover Tooltip */
.agent-hover-tooltip {
    position: absolute;
    pointer-events: none;
    background: rgba(9, 14, 28, 0.95);
    border: 1px solid var(--neon-green);
    border-radius: 8px;
    padding: 8px 12px;
    display: none;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 12px rgba(16, 185, 129, 0.3);
    z-index: 100;
    transform: translate(-50%, -120%);
    animation: tooltipFade 0.15s ease;
}

@keyframes tooltipFade {
    from { opacity: 0; transform: translate(-50%, -110%); }
    to { opacity: 1; transform: translate(-50%, -120%); }
}

.tooltip-name {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 800;
    color: #fff;
}

.tooltip-role {
    font-size: 0.72rem;
    color: #94a3b8;
}

.tooltip-action {
    font-size: 0.65rem;
    color: #10b981;
    font-weight: 700;
    margin-top: 2px;
}

/* ==================== MODAL ROSTER & EVOLUTION ==================== */
.office-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.office-modal-overlay.active {
    display: flex;
}

.office-modal-box {
    background: #0b1022;
    border: 1px solid var(--border-accent);
    border-radius: 16px;
    width: 100%;
    max-width: 980px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
}

.btn-modal-close {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.15s ease;
}
.btn-modal-close:hover {
    background: #ef4444;
}

.modal-roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
}

.modal-agent-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-agent-card:hover {
    border-color: var(--card-accent, #10b981);
    background: rgba(255, 255, 255, 0.04);
}

.modal-agent-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-agent-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-accent, #10b981);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.modal-agent-info {
    flex: 1;
}

.modal-agent-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.95rem;
    color: #fff;
}

.modal-agent-level {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--card-accent, #10b981);
    font-weight: 700;
}

.modal-agent-exp-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.modal-agent-exp-fill {
    height: 100%;
    background: var(--card-accent, #10b981);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.modal-quote {
    font-size: 0.74rem;
    color: #cbd5e1;
    font-style: italic;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 10px;
    border-radius: 6px;
    border-left: 2px solid var(--card-accent, #10b981);
}

.modal-skills-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.72rem;
}

.modal-skill-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    padding: 5px 8px;
    border-radius: 4px;
}

.btn-boost-evolve {
    margin-top: 4px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-boost-evolve:hover {
    background: #f59e0b;
    color: #000;
    transform: scale(1.02);
}

/* ==================== IDE SPLIT GUIDE MODAL ==================== */
.ide-guide-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.guide-hero-badge {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.82rem;
    color: #7dd3fc;
    font-weight: 700;
    text-align: center;
}

.guide-steps-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.guide-step-card {
    display: flex;
    gap: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px 14px;
    align-items: flex-start;
}

.step-num {
    width: 28px;
    height: 28px;
    background: #38bdf8;
    color: #04060d;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.step-info {
    flex: 1;
}

.step-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.88rem;
    color: #fff;
    margin-bottom: 2px;
}

.step-desc {
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.45;
}

.step-desc kbd {
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 4px;
    padding: 2px 6px;
    font-family: var(--font-mono);
    color: #f8fafc;
    font-size: 0.74rem;
}

.step-desc code {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
}

/* Toast */
.office-toast {
    position: fixed;
    bottom: 24px;
    left: 360px;
    background: #090e1c;
    border: 1px solid var(--neon-green);
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 600;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(16, 185, 129, 0.3);
    z-index: 2000;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
    pointer-events: none;
}

.office-toast.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== 1:1 DIRECT AGENT BRIEFING MODAL ==================== */
.direct-agent-modal-box {
    max-width: 680px;
    background: #090e1c;
    border: 1.5px solid var(--modal-agent-accent, #38bdf8);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 24px rgba(56, 189, 248, 0.2);
}

.direct-agent-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.direct-agent-hero-card {
    display: flex;
    gap: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 16px;
    align-items: center;
}

.direct-agent-avatar-big {
    width: 64px;
    height: 76px;
    background: rgba(15, 23, 42, 0.9);
    border: 2px solid var(--modal-agent-accent, #38bdf8);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.direct-agent-avatar-big img {
    width: 50px;
    height: 68px;
    object-fit: contain;
    image-rendering: pixelated;
}

.direct-agent-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.direct-agent-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.direct-agent-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
}

.direct-agent-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--modal-agent-accent, #38bdf8);
    border: 1px solid var(--modal-agent-accent, #38bdf8);
}

.direct-agent-role {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 600;
}

.direct-agent-thought-card {
    background: rgba(0, 0, 0, 0.35);
    border-left: 3px solid var(--modal-agent-accent, #38bdf8);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.8rem;
    color: #cbd5e1;
    font-style: italic;
    line-height: 1.45;
}

.direct-actions-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.direct-actions-title {
    font-size: 0.76rem;
    font-weight: 700;
    color: #94a3b8;
}

.direct-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.btn-direct-cmd {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 6px;
    color: #e2e8f0;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.btn-direct-cmd:hover {
    background: var(--modal-agent-accent, #38bdf8);
    color: #04060d;
    transform: translateY(-1px);
}

/* 1:1 Direct Chat Stream */
.direct-chat-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px;
}

.direct-chat-log {
    height: 110px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 4px;
}

.chat-bubble {
    max-width: 85%;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.78rem;
    line-height: 1.45;
    word-break: keep-all;
}

.chat-bubble.chairman {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.1) 100%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fef08a;
}

.chat-bubble.agent {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--modal-agent-accent, #38bdf8);
    color: #f1f5f9;
}

.direct-chat-input-bar {
    display: flex;
    gap: 8px;
}

.direct-chat-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 6px 10px;
    color: #fff;
    font-size: 0.8rem;
    outline: none;
}
.direct-chat-input:focus {
    border-color: var(--modal-agent-accent, #38bdf8);
}

.btn-direct-send {
    background: var(--modal-agent-accent, #38bdf8);
    color: #04060d;
    border: none;
    border-radius: 6px;
    padding: 0 14px;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-direct-send:hover {
    filter: brightness(1.15);
}

/* ==================== REAL-TIME ARTIFACT HUB & KANBAN MODAL ==================== */
.artifact-modal-box {
    max-width: 900px;
    width: 90vw;
    max-height: 85vh;
}

.artifact-nav-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
    margin-bottom: 14px;
}

.artifact-tab-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 6px 12px;
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.artifact-tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.artifact-tab-btn.active {
    background: rgba(6, 182, 212, 0.15);
    border-color: #06b6d4;
    color: #22d3ee;
}

.artifact-tab-body {
    max-height: 58vh;
    overflow-y: auto;
    padding-right: 6px;
}

/* Sound Grid */
.sound-artifact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

.sound-artifact-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s ease;
}
.sound-artifact-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #06b6d4;
    transform: translateY(-1px);
}

.sound-card-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sound-card-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
}
.sound-card-hz {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: #22d3ee;
}

.btn-sound-link {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: #22d3ee;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s ease;
}
.btn-sound-link:hover {
    background: #06b6d4;
    color: #04060d;
}

/* Column Grid */
.column-artifact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

.column-artifact-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.15s ease;
}
.column-artifact-card:hover {
    border-color: #ec4899;
    background: rgba(255, 255, 255, 0.05);
}

.column-card-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
}
.column-card-desc {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.4;
}
.column-card-link {
    margin-top: 4px;
    align-self: flex-start;
    color: #f472b6;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
}
.column-card-link:hover {
    text-decoration: underline;
}

/* Weapon Grid */
.weapon-artifact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

.weapon-artifact-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.weapon-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.weapon-card-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
}
.weapon-status-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Troubleshoot Post-Mortem Whitepaper Grid */
.troubleshoot-artifact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}

.troubleshoot-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid #10b981;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
}
.troubleshoot-card:hover {
    border-color: #38bdf8;
    background: rgba(15, 23, 42, 0.9);
    transform: translateY(-1px);
}

.troubleshoot-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.troubleshoot-card-title {
    font-size: 0.84rem;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.35;
}
.troubleshoot-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
    white-space: nowrap;
}

.troubleshoot-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.72rem;
    line-height: 1.45;
}
.troubleshoot-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.troubleshoot-label {
    font-weight: 800;
    font-size: 0.68rem;
}
.troubleshoot-label.red { color: #f87171; }
.troubleshoot-label.green { color: #34d399; }
.troubleshoot-val { color: #cbd5e1; }

.troubleshoot-status-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 2px;
}
.status-tag {
    font-size: 0.66rem;
    font-weight: 800;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Kanban Board */
.kanban-board-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.kanban-column {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kanban-col-header {
    font-size: 0.78rem;
    font-weight: 800;
    color: #cbd5e1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 6px;
}

.kanban-count-pill {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 0.66rem;
}

.kanban-cards-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kanban-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.kanban-card:hover {
    border-color: #38bdf8;
    background: rgba(255, 255, 255, 0.05);
}

.kanban-card-title {
    font-size: 0.76rem;
    font-weight: 700;
    color: #f1f5f9;
}

.kanban-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.66rem;
    color: #94a3b8;
}

.kanban-card-agent {
    color: #38bdf8;
    font-weight: 600;
}

/* ==================== RADAR & DOCTOR HUD MODALS ==================== */
.radar-modal-body, .doctor-modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: #f1f5f9;
}

.hud-hero-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(56, 189, 248, 0.08) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    padding: 14px 18px;
    gap: 12px;
}
.hud-hero-banner.doctor-banner {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-color: rgba(56, 189, 248, 0.35);
}

.hud-hero-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hud-hero-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.5));
}

.hud-hero-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #f8fafc;
}

.hud-hero-sub {
    font-size: 0.74rem;
    color: #94a3b8;
    margin-top: 2px;
}

.hud-hero-score {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.hud-score-val {
    font-size: 1.3rem;
    font-weight: 900;
    color: #10b981;
    font-family: 'Fira Code', monospace;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}
.hud-hero-banner.doctor-banner .hud-score-val {
    color: #38bdf8;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.hud-score-lbl {
    font-size: 0.68rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hud-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 768px) {
    .hud-grid-2col {
        grid-template-columns: 1fr;
    }
}

.hud-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hud-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 6px;
}

.hud-card-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hud-card-badge {
    font-size: 0.66rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-weight: 700;
}

.hud-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hud-rank-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.74rem;
}
.hud-rank-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(56, 189, 248, 0.3);
}

.hud-rank-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hud-rank-num {
    font-family: 'Fira Code', monospace;
    font-weight: 800;
    color: #f59e0b;
    font-size: 0.72rem;
    width: 14px;
}

.hud-rank-kw {
    color: #f1f5f9;
    font-weight: 600;
}

.hud-cpc-tag {
    font-family: 'Fira Code', monospace;
    font-size: 0.68rem;
    font-weight: 700;
    color: #34d399;
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.hud-action-advice-box {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hud-advice-header {
    font-size: 0.78rem;
    font-weight: 800;
    color: #fbbf24;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hud-advice-text {
    font-size: 0.74rem;
    color: #cbd5e1;
    line-height: 1.5;
}

/* Doctor Check Items */
.doctor-check-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
@media (max-width: 680px) {
    .doctor-check-grid {
        grid-template-columns: 1fr;
    }
}

.doctor-check-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.74rem;
}

.doctor-check-title {
    color: #e2e8f0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.doctor-badge-pass {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.68rem;
    font-weight: 800;
    font-family: 'Fira Code', monospace;
}

.hud-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
}

.btn-hud-primary {
    background: #10b981;
    color: #04060d;
    font-weight: 800;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.76rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-hud-primary:hover {
    background: #34d399;
    transform: translateY(-1px);
}
.btn-hud-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-hud-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ==================== 💎 CRYSTAL MEMORY VAULT STYLES ==================== */
.btn-crystal-memory {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.25) 0%, rgba(16, 185, 129, 0.3) 100%);
    border: 1px solid rgba(6, 182, 212, 0.5) !important;
    color: #38bdf8 !important;
    box-shadow: 0 0 14px rgba(6, 182, 212, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}
.btn-crystal-memory:hover {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.4) 0%, rgba(16, 185, 129, 0.45) 100%);
    border-color: #38bdf8 !important;
    color: #fff !important;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
    transform: translateY(-1px);
}
.crystal-badge {
    background: rgba(6, 182, 212, 0.3);
    color: #38bdf8;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 800;
    margin-left: 2px;
}
.crystal-modal-box {
    max-width: 960px !important;
    width: 92vw !important;
    max-height: 88vh !important;
    display: flex;
    flex-direction: column;
    background: rgba(8, 14, 28, 0.96) !important;
    border: 1px solid rgba(6, 182, 212, 0.4) !important;
    box-shadow: 0 0 40px rgba(6, 182, 212, 0.25) !important;
}
.crystal-modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px 22px;
    overflow-y: auto;
    flex: 1;
}
.crystal-sub-badge {
    font-size: 0.75rem;
    color: #38bdf8;
    background: rgba(6, 182, 212, 0.15);
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid rgba(6, 182, 212, 0.3);
    margin-left: 12px;
    font-weight: 600;
}
.crystal-aether-header {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    padding: 14px 18px;
}
.aether-avatar-circle {
    position: relative;
    width: 58px;
    height: 58px;
    min-width: 58px;
    border-radius: 50%;
    border: 2px solid #10b981;
    overflow: hidden;
    background: #064e3b;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}
.aether-human-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.aether-live-pulse {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid #064e3b;
    animation: pulse 1.5s infinite;
}
.aether-header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.aether-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.aether-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.05rem;
    color: #6ee7b7;
}
.aether-status-badge {
    font-size: 0.72rem;
    color: #10b981;
    background: rgba(16, 185, 129, 0.18);
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: 700;
}
.aether-intro-speech {
    font-size: 0.86rem;
    color: #cbd5e1;
    line-height: 1.45;
}
.crystal-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.crystal-search-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}
.crystal-search-icon {
    position: absolute;
    left: 14px;
    font-size: 1.05rem;
    color: #94a3b8;
    pointer-events: none;
}
.crystal-search-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(6, 182, 212, 0.35);
    border-radius: 10px;
    padding: 12px 42px 12px 42px;
    color: #f8fafc;
    font-family: var(--font-body);
    font-size: 0.92rem;
    outline: none;
    transition: all 0.2s ease;
}
.crystal-search-input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.35);
    background: rgba(15, 23, 42, 1);
}
.crystal-search-clear {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 4px;
}
.crystal-search-clear:hover {
    color: #fff;
}
.crystal-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.crystal-chip {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.crystal-chip:hover {
    background: rgba(51, 65, 85, 0.8);
    color: #f8fafc;
    border-color: rgba(6, 182, 212, 0.4);
}
.crystal-chip.active {
    background: rgba(6, 182, 212, 0.22);
    border-color: #38bdf8;
    color: #38bdf8;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}
.crystal-capsules-stream {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 4px;
}
.crystal-capsule-card {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid #06b6d4;
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
}
.crystal-capsule-card:hover {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(6, 182, 212, 0.4);
    border-left-color: #38bdf8;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}
.capsule-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.capsule-cat-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.cat-architectural_decision { background: rgba(139, 92, 246, 0.2); color: #c084fc; border: 1px solid rgba(139, 92, 246, 0.4); }
.cat-neuro_acoustics { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.4); }
.cat-monetization { background: rgba(245, 158, 11, 0.2); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.4); }
.cat-design_aesthetics { background: rgba(236, 72, 153, 0.2); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.4); }
.cat-historical_conversation { background: rgba(56, 189, 248, 0.2); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.4); }
.cat-luciwer_directive_archive { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.4); }
.cat-default { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.4); }

.capsule-time {
    font-size: 0.72rem;
    color: #64748b;
    font-family: var(--font-mono);
}
.capsule-title {
    font-family: var(--font-heading);
    font-size: 0.96rem;
    font-weight: 700;
    color: #f1f5f9;
}
.capsule-content {
    font-size: 0.85rem;
    color: #cbd5e1;
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.capsule-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.capsule-tag {
    font-size: 0.7rem;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ==================== 🏎️ F1 PITWALL & TELEMETRY HUB STYLES ==================== */
.btn-f1-pitwall {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(245, 158, 11, 0.3) 100%);
    border: 1px solid rgba(239, 68, 68, 0.5) !important;
    color: #f87171 !important;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}
.btn-f1-pitwall:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.45) 0%, rgba(245, 158, 11, 0.5) 100%);
    border-color: #f87171 !important;
    color: #fff !important;
    box-shadow: 0 0 22px rgba(239, 68, 68, 0.55);
    transform: translateY(-1px);
}
.pitwall-pulse {
    display: inline-block;
    animation: pitwallPulse 1.8s infinite ease-in-out;
}
@keyframes pitwallPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px #ef4444); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 8px #f59e0b); }
}

.f1-modal-box {
    max-width: 980px !important;
    width: 92vw !important;
    max-height: 88vh !important;
    background: rgba(8, 12, 24, 0.97) !important;
    border: 1px solid rgba(239, 68, 68, 0.45) !important;
    box-shadow: 0 0 50px rgba(239, 68, 68, 0.25) !important;
}

.f1-hud-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(245, 158, 11, 0.1) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    margin-bottom: 16px;
}
.f1-hero-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.f1-hero-icon {
    font-size: 2rem;
    padding: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.4);
}
.f1-hero-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    font-family: var(--font-heading);
}
.f1-hero-sub {
    font-size: 0.76rem;
    color: #94a3b8;
}
.f1-hero-score {
    text-align: right;
}
.f1-score-val {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 800;
    color: #34d399;
}
.f1-score-lbl {
    font-size: 0.68rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.f1-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 768px) {
    .f1-grid-2col { grid-template-columns: 1fr; }
}

.f1-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
}
.f1-card:hover {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(15, 23, 42, 0.85);
}
.f1-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 6px;
}
.f1-card-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 6px;
}
.f1-card-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}
.f1-spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.76rem;
    padding: 4px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.04);
}
.f1-spec-k { color: #94a3b8; }
.f1-spec-v { font-family: var(--font-mono); font-weight: 700; color: #38bdf8; }
.f1-spec-v.green { color: #34d399; }
.f1-spec-v.amber { color: #fbbf24; }
.f1-spec-v.red { color: #f87171; }
.f1-spec-v.purple { color: #c084fc; }

.f1-quote-box {
    font-size: 0.75rem;
    color: #cbd5e1;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 10px;
    border-radius: 6px;
    border-left: 3px solid #ef4444;
    line-height: 1.45;
    margin-top: 4px;
}


