/* DSV MISSION CONTROL — Modern Design System */
:root {
    --bg: #0F172A;
    --bg-elevated: #1E293B;
    --bg-card: #1a2332;
    --bg-input: #0c1220;
    --border: #334155;
    --border-light: rgba(51, 65, 85, 0.5);
    --text: #F8FAFC;
    --text-muted: #94A3B8;
    --text-dim: #64748B;
    --accent: #22C55E;
    --accent-glow: rgba(34, 197, 94, 0.2);
    --purple: #8B5CF6;
    --purple-glow: rgba(139, 92, 246, 0.2);
    --cyan: #06B6D4;
    --orange: #F59E0B;
    --red: #EF4444;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.4);
    --transition: 0.2s ease;
}

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

body {
    font-family: 'Fira Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* PARTICLES */
#particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* NAVBAR */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-logo {
    width: 32px;
    height: 32px;
    color: var(--accent);
}

.navbar-title {
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.navbar-subtitle {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 16px;
    background: var(--bg-elevated);
    border-radius: var(--radius-xs);
    border: 1px solid var(--border-light);
}

.navbar-stat-label {
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.navbar-stat-value {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

.status-online { color: var(--accent) !important; }

.btn-logout {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-logout:hover {
    border-color: var(--red);
    color: var(--red);
}

/* TICKER */
.ticker {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 24px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-light);
    overflow: hidden;
}

.ticker-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
    padding: 4px 10px;
    background: var(--accent-glow);
    border-radius: var(--radius-xs);
}

.ticker-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.ticker-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    flex: 1;
    scrollbar-width: none;
}

.ticker-track::-webkit-scrollbar { display: none; }

.ticker-item {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-left: 2px solid var(--border);
}

.ticker-time {
    font-size: 0.7rem;
    color: var(--text-dim);
}

/* TABS / SECTION NAV */
.tabs {
    display: flex;
    gap: 4px;
    padding: 12px 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
    overflow-x: auto;
    position: sticky;
    top: 0;
    z-index: 99;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.tab-btn:hover {
    background: var(--bg-elevated);
    color: var(--text);
}

.tab-btn.active {
    background: var(--bg-elevated);
    color: var(--accent);
    border: 1px solid var(--border);
}

/* CONTENT SECTIONS (single page scroll) */
.content-section {
    padding: 32px;
    position: relative;
    z-index: 10;
    scroll-margin-top: 120px;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 2px;
    margin-bottom: 24px;
    text-transform: uppercase;
}

/* STATS ROW - COMPACT with marquee */
.stats-row-compact {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    align-items: stretch;
}

.stat-mini {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 14px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    min-height: 72px;
    flex: 1;
    min-width: 140px;
}

.stat-mini-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: nowrap;
}

.stat-mini-value {
    font-family: 'Fira Code', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
}

/* Marquee stat */
.marquee-container {
    flex: 3;
    min-width: 300px;
    overflow: hidden;
    position: relative;
    padding: 0;
    justify-content: flex-start;
    align-items: center;
}

.marquee-container::before,
.marquee-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 2;
    pointer-events: none;
}

.marquee-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-card), transparent);
}

.marquee-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-card), transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 30s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

.marquee-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--orange);
    letter-spacing: 2px;
    white-space: nowrap;
    padding: 0 40px;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* GAME SECTION — Superhero HQ Canvas */
.game-section {
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-frame {
    width: 100%;
    max-width: 1400px;
    height: 66vh;
    min-height: 500px;
    background: #0a0a14;
    border-radius: 16px;
    border: 2px solid rgba(61, 21, 81, 0.6);
    box-shadow: 0 0 30px rgba(61, 21, 81, 0.3), 0 0 60px rgba(61, 21, 81, 0.1), inset 0 0 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
}

.game-frame canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* AGENT FLEET SECTION */
.agent-fleet-section {
    margin-bottom: 32px;
    padding: 0 24px;
}

.fleet-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--orange);
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.fleet-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 0 16px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.fleet-row::-webkit-scrollbar { height: 4px; }
.fleet-row::-webkit-scrollbar-track { background: transparent; }
.fleet-row::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.fleet-row .agent-card {
    flex: 0 0 200px;
    background: rgba(30, 35, 50, 0.3);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(245, 166, 35, 0.3);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: unset;
}

.fleet-row .agent-card:hover {
    border-color: rgba(245, 166, 35, 0.7);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(245, 166, 35, 0.15);
}

.fleet-row .agent-card .agent-avatar {
    width: 56px;
    height: 56px;
    margin-bottom: 10px;
    border: 2px solid rgba(245, 166, 35, 0.4);
}

.fleet-row .agent-card .agent-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.fleet-row .agent-card .agent-codename {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.6rem;
    color: var(--orange);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.fleet-row .agent-card .agent-task {
    font-size: 0.65rem;
    color: var(--text-muted);
    padding: 8px;
    background: rgba(12, 18, 32, 0.5);
    border-radius: var(--radius-xs);
    width: 100%;
    margin-top: 8px;
}

.fleet-row .agent-card .agent-meta {
    display: none;
}

.fleet-card {
    flex: 0 0 200px;
    background: rgba(30, 35, 50, 0.3);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(245, 166, 35, 0.3);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.fleet-card:hover {
    border-color: rgba(245, 166, 35, 0.7);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(245, 166, 35, 0.15);
}

.fleet-card-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 10px;
    border: 2px solid rgba(245, 166, 35, 0.4);
}

.fleet-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fleet-card-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.fleet-card-role {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.6rem;
    color: var(--orange);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.fleet-card-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.fleet-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.fleet-status-dot.active { background: #00ff88; box-shadow: 0 0 6px #00ff88; }
.fleet-status-dot.busy { background: #f5a623; box-shadow: 0 0 6px #f5a623; }

/* SERVER STATS SECTION */
.server-stats-section {
    margin-bottom: 32px;
    padding: 0 24px;
}

.server-stats-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--orange);
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.server-stats-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 0 16px 0;
}

.server-stat-card {
    flex: 0 0 180px;
    background: rgba(30, 35, 50, 0.3);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(245, 166, 35, 0.2);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
}

.server-stat-card:hover {
    border-color: rgba(245, 166, 35, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(245, 166, 35, 0.1);
}

.server-stat-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.server-stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--orange);
    line-height: 1;
    margin-bottom: 4px;
}

.server-stat-sub {
    font-family: 'Fira Code', monospace;
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* GAME SECTION (legacy, kept for compatibility) */
.game-section {
    margin-bottom: 24px;
}

.game-area {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    background: #08080f;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: 1px solid var(--border-light);
}

#dsv-game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.scanline-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,0,0,0.1) 3px, rgba(0,0,0,0.1) 6px);
    animation: scanMove 0.2s linear infinite;
    z-index: 10;
}

@keyframes scanMove { 0% { transform: translateY(0); } 100% { transform: translateY(6px); } }

.gameboy-frame {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 100%;
    background: linear-gradient(145deg, #4a4a5a, #2a2a3a);
    border-radius: 16px 16px 40px 16px;
    box-shadow:
        inset 0 0 0 3px rgba(255,255,255,0.15),
        inset 0 0 0 6px rgba(0,0,0,0.4),
        0 10px 40px rgba(0,0,0,0.6);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gameboy-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px;
}

.gameboy-logo {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(6,182,212,0.7);
    letter-spacing: 2px;
}

.gameboy-dots { display: flex; gap: 6px; }
.gb-dot { width: 10px; height: 10px; border-radius: 50%; }
.gb-red { background: #EF4444; box-shadow: 0 0 8px #EF4444; }
.gb-yellow { background: #F59E0B; box-shadow: 0 0 8px #F59E0B; }
.gb-green { background: #22C55E; box-shadow: 0 0 8px #22C55E; }

.gameboy-frame #dsv-game-canvas {
    flex: 1 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    border-radius: 4px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.gameboy-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 60px;
}

.gameboy-dpad {
    position: relative;
    width: 60px;
    height: 60px;
}

.dpad-h, .dpad-v {
    position: absolute;
    background: #1a1a2a;
    border-radius: 2px;
}

.dpad-h { top: 50%; left: 0; right: 0; height: 20px; transform: translateY(-50%); }
.dpad-v { left: 50%; top: 0; bottom: 0; width: 20px; transform: translateX(-50%); }

.gameboy-buttons { display: flex; gap: 12px; transform: rotate(-25deg); }
.gb-btn { width: 30px; height: 30px; border-radius: 50%; font-family: 'Fira Code', monospace; font-size: 0.65rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.gb-a { background: #aa2244; color: #fff; box-shadow: 0 3px 0 #661122; }
.gb-b { background: #aa2244; color: #fff; box-shadow: 0 3px 0 #661122; }

/* KNOWLEDGE GRAPH - SECTION */
.section-knowledge-full {
    padding: 0 !important;
    min-height: 80vh;
}

.section-knowledge-full .section-title {
    padding: 32px 32px 0 32px;
}

#knowledge-section {
    display: flex;
    flex-direction: column;
    min-height: 80vh;
    height: 80vh;
    width: 100%;
}

.knowledge-graph-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
}

.knowledge-title {
    font-family: 'Fira Code', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 2px;
}

.knowledge-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.knowledge-controls input {
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text);
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.8rem;
    outline: none;
    transition: border-color var(--transition);
    width: 200px;
}

.knowledge-controls input:focus { border-color: var(--accent); }

.knowledge-graph-container {
    flex: 1;
    position: relative;
    background: #0a0f1a;
    overflow: hidden;
    width: 100%;
    min-height: 400px;
}

.knowledge-graph-container #knowledge-graph {
    width: 100%;
    height: 100%;
    display: block;
}

/* Knowledge graph node styles */
.kg-link {
    stroke: #334155;
    stroke-opacity: 0.25;
    stroke-width: 1.5;
    filter: url(#link-glow);
}

.kg-node {
    cursor: pointer;
}

/* Detail panel for knowledge graph */
.node-detail-panel {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 300px;
    max-height: 80%;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transform: translateX(340px);
    transition: transform 0.3s ease;
    z-index: 20;
}

.node-detail-panel.active { transform: translateX(0); }

.close-detail {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    transition: color var(--transition);
    display: flex;
}

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

.node-detail-panel h3 {
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-right: 24px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.detail-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-value {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--text);
}

.detail-connections {
    margin-top: 12px;
}

.detail-connections .detail-label {
    display: block;
    margin-bottom: 8px;
}

.connection-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.conn-tag {
    padding: 4px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: 99px;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: 'Fira Code', monospace;
}

/* LEGACY STATS ROW (for agents tab) */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.stat-card:hover {
    border-color: var(--border);
    box-shadow: var(--shadow);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--accent-glow);
    border-radius: var(--radius-sm);
    color: var(--accent);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-family: 'Fira Code', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

/* CARDS */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 24px;
    overflow: hidden;
}

.card.full-height { min-height: 600px; }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

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

.card-header-row h2 {
    font-family: 'Fira Code', monospace;
    font-size: 1.1rem;
    font-weight: 600;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.card-body { padding: 20px; }

.btn-refresh {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}

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

/* AGENT CARDS */
.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.agent-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.agent-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.agent-card.coming-soon {
    opacity: 0.5;
    border-style: dashed;
}

.agent-status-dot {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--bg-elevated);
}

.agent-status-dot.online { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.agent-status-dot.working { background: var(--orange); box-shadow: 0 0 8px var(--orange); }
.agent-status-dot.sleeping { background: var(--text-dim); }

.agent-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 12px;
    border: 2px solid var(--border);
}

.agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agent-name {
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.agent-codename {
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.agent-task {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 10px;
    background: var(--bg-input);
    border-radius: var(--radius-xs);
    width: 100%;
    margin-top: 8px;
}

.agent-task-label {
    font-size: 0.65rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.agent-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 10px;
}

/* CRM */
.crm-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.crm-stat {
    text-align: center;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}

.crm-stat.loading {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.stat-num {
    font-family: 'Fira Code', monospace;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.crm-businesses h4 {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.crm-businesses ul {
    list-style: none;
    max-height: 120px;
    overflow-y: auto;
}

.crm-businesses li {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.crm-businesses li span { color: var(--accent); }

/* KNOWLEDGE GRAPH */
.graph-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.graph-controls input,
.graph-controls select {
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text);
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.8rem;
    outline: none;
    transition: border-color var(--transition);
}

.graph-controls input:focus,
.graph-controls select:focus {
    border-color: var(--accent);
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: all var(--transition);
}

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

.node-detail-panel {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transform: translateX(320px);
    transition: transform 0.3s ease;
    z-index: 20;
}

.node-detail-panel.active { transform: translateX(0); }

.close-detail {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    transition: color var(--transition);
}

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

.node-detail-panel h3 {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 12px;
}

/* OKR KANBAN */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.kanban-column {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px;
    min-height: 300px;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.column-title {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.column-count {
    background: var(--bg-input);
    color: var(--text-dim);
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 600;
}

.column-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.okr-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 14px;
    cursor: pointer;
    transition: all var(--transition);
}

.okr-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.okr-title {
    font-size: 0.85rem;
    color: var(--text);
    margin-bottom: 8px;
    font-weight: 500;
}

.okr-meta {
    font-size: 0.7rem;
    color: var(--text-dim);
    display: flex;
    justify-content: space-between;
}

.okr-progress {
    height: 4px;
    background: var(--bg-input);
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}

.okr-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--cyan));
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* TERMINAL */
.badge-live {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--accent);
    padding: 4px 12px;
    background: var(--accent-glow);
    border-radius: 99px;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse-dot 2s ease-in-out infinite;
}

.terminal-container {
    height: 400px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.terminal-iframe-wrapper {
    width: 100%;
    height: 100%;
}

.terminal-iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* COMMAND PANEL */
.command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.cmd-btn {
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

.cmd-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.cmd-btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
    font-weight: 600;
}

.cmd-btn-accent:hover {
    box-shadow: 0 4px 16px var(--accent-glow);
}

.custom-command {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.custom-command input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text);
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    outline: none;
    transition: border-color var(--transition);
}

.custom-command input:focus { border-color: var(--accent); }

.command-history h4 {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.command-history ul { list-style: none; }

.command-history li {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.cmd-time {
    color: var(--text-dim);
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
}

/* BUTTONS */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-xs);
    color: var(--bg);
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-primary:hover {
    box-shadow: 0 4px 16px var(--accent-glow);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 8px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition);
}

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

.full-width { width: 100%; justify-content: center; }

/* MODALS */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active { display: flex; }

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.2s ease;
}

.modal-sm { max-width: 440px; }

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    transition: color var(--transition);
    display: flex;
}

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

.modal-header {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.modal-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border);
}

.modal-avatar img { width: 100%; height: 100%; object-fit: cover; }

.modal-header h3 {
    font-family: 'Fira Code', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

#modal-agent-codename {
    display: block;
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 1px;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 0.7rem;
    margin-top: 4px;
}

.status-badge.online { background: var(--accent-glow); color: var(--accent); }
.status-badge.working { background: rgba(245, 158, 11, 0.2); color: var(--orange); }
.status-badge.sleeping { background: rgba(100, 100, 100, 0.2); color: var(--text-dim); }

.modal-body { display: flex; flex-direction: column; gap: 20px; }

.modal-section h4 {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 4px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: 99px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

.api-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-input);
    border-radius: var(--radius-xs);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.api-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.api-status.up { background: var(--accent); box-shadow: 0 0 8px var(--accent); }

.logs {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xs);
    padding: 14px;
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    max-height: 150px;
    overflow-y: auto;
}

/* FORM */
.modal-title {
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.form-group label {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text);
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.85rem;
    outline: none;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus { border-color: var(--accent); }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* RESPONSIVE */
@media (max-width: 1200px) {
    .kanban-board { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 12px; padding: 12px 16px; }
    .navbar-actions { width: 100%; justify-content: space-between; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .agents-grid { grid-template-columns: 1fr; }
    .kanban-board { grid-template-columns: 1fr; }
    .tab-panel { padding: 16px; }
    .crm-stats { grid-template-columns: 1fr; }
    .command-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .stats-row { grid-template-columns: 1fr; }
    .tabs { padding: 8px 12px; }
    .tab-btn { padding: 8px 12px; font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ================================================================
   DSV MISSION CONTROL — STARK TOWER REDESIGN
   ================================================================ */

/* TOP BAR */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(245, 166, 35, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-area .logo {
    width: 36px;
    height: 36px;
    color: #22C55E;
    filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.4));
}

.logo-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #F8FAFC;
}

.logo-subtitle {
    display: block;
    font-size: 0.65rem;
    color: #64748B;
    letter-spacing: 1px;
}

.agent-count {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: #22C55E;
    padding: 6px 14px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 8px;
    white-space: nowrap;
    margin-left: 12px;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #94A3B8;
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    border-color: #EF4444;
    color: #EF4444;
}

/* DASHBOARD SECTIONS — Base glassmorphism */
.dashboard-section {
    background: rgba(10, 10, 20, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(245, 166, 35, 0.2);
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.section-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(61, 21, 81, 0.4), rgba(0, 0, 0, 0.4));
    border-bottom: 1px solid rgba(245, 166, 35, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #F8FAFC;
    text-transform: uppercase;
}

.floor-indicator, .last-update, .agent-count-badge {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    color: #64748B;
    letter-spacing: 1px;
}

.agent-count-badge {
    color: #22C55E;
    padding: 4px 12px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 6px;
}

/* FINANCE GRID */
.finance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
}

.finance-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.finance-card:hover {
    border-color: rgba(245, 166, 35, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 166, 35, 0.08);
}

.finance-card .card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: #f5a623;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.asset-chart {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-bottom: 12px;
    color: #64748B;
    font-size: 0.8rem;
}

.asset-list div {
    font-size: 0.8rem;
    color: #94A3B8;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.pnl-positive {
    font-family: 'Fira Code', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: #22C55E;
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.budget-bar {
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f5a623, #f97316);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.ticker-text {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #06B6D4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* REVOPS METRICS */
.revops-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    padding: 20px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.metric-card:hover {
    border-color: rgba(245, 166, 35, 0.3);
    transform: translateY(-2px);
}

.metric-value {
    display: block;
    font-family: 'Fira Code', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: #f5a623;
    text-shadow: 0 0 20px rgba(245, 166, 35, 0.2);
}

.metric-label {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.6rem;
    color: #64748B;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 6px;
}

.calendar-section {
    padding: 20px;
}

.calendar-section .card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: #f5a623;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.calendar-view {
    min-height: 80px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 16px;
    color: #64748B;
    font-size: 0.85rem;
}

/* STORYBOARD GRID */
.storyboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    padding: 20px;
}

.storyboard-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.storyboard-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.08);
}

.scene-title {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: #F8FAFC;
    margin-bottom: 8px;
}

.image-prompt {
    font-size: 0.75rem;
    color: #64748B;
    font-style: italic;
    margin-bottom: 12px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

.storyboard-image {
    aspect-ratio: 16/9;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: #64748B;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.video-prompt {
    font-size: 0.75rem;
    color: #94A3B8;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    margin-bottom: 8px;
}

.batch-id {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    color: #64748B;
    margin-bottom: 10px;
}

.send-to-thor, .new-storyboard-btn {
    padding: 8px 16px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    color: #8B5CF6;
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.send-to-thor:hover, .new-storyboard-btn:hover {
    background: rgba(139, 92, 246, 0.25);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.15);
}

/* VIDEO CAROUSEL */
.video-carousel {
    display: flex;
    gap: 20px;
    padding: 20px;
    overflow-x: auto;
}

.video-card {
    flex: 0 0 280px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.video-card:hover {
    border-color: rgba(245, 166, 35, 0.3);
    transform: translateY(-4px);
}

.video-thumbnail {
    height: 160px;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.video-title {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 12px 12px 4px;
    color: #F8FAFC;
}

.video-stats {
    font-size: 0.7rem;
    color: #64748B;
    padding: 0 12px 12px;
}

.video-actions {
    display: flex;
    gap: 8px;
    padding: 0 12px 12px;
}

.video-actions button {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #94A3B8;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.video-actions button:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #F8FAFC;
}

/* CAPTAIN AMERICA OKR OVERVIEW */
.okr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.okr-overview {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 20px !important;
    border-radius: 16px !important;
}

.okr-overview .okr-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #F8FAFC;
    margin-bottom: 12px;
}

.okr-overview .okr-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.progress-bar {
    flex: 1;
    height: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: var(--progress, 65%);
    background: linear-gradient(90deg, #22C55E, #06B6D4);
    border-radius: 5px;
    transition: width 0.5s ease;
}

.key-results {
    margin-bottom: 12px;
}

.key-results div {
    font-size: 0.8rem;
    color: #94A3B8;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.monday-link {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    color: #64748B;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.new-okr-btn {
    padding: 8px 16px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    color: #22C55E;
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.new-okr-btn:hover {
    background: rgba(34, 197, 94, 0.25);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.15);
}

/* VISION AI */
.ai-insights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    padding: 20px;
}

.insight-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    font-size: 0.85rem;
    color: #94A3B8;
    transition: all 0.3s ease;
}

.insight-card:hover {
    border-color: rgba(6, 182, 212, 0.3);
    transform: translateY(-2px);
}

/* HULK TERMINAL */
.hulk-terminal-window {
    margin: 20px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.terminal-header {
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.25);
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: #22C55E;
    border-bottom: 1px solid rgba(34, 197, 94, 0.15);
}

.terminal-body {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: #94A3B8;
    min-height: 80px;
}

.terminal-body div {
    padding: 2px 0;
}

.terminal-input {
    width: 100%;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.25);
    border: none;
    border-top: 1px solid rgba(34, 197, 94, 0.15);
    color: #22C55E;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    outline: none;
}

.hulk-feed {
    padding: 0 20px 20px;
}

.feed-item {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: #94A3B8;
    transition: all 0.2s ease;
}

.feed-item:hover {
    border-color: rgba(34, 197, 94, 0.2);
    background: rgba(34, 197, 94, 0.04);
}

/* CAPTAIN'S BARRACKS — SOP Drive */
.sop-intro {
    padding: 0 20px;
    font-size: 0.8rem;
    color: #64748B;
    margin-top: 12px;
}

.sop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    padding: 20px;
}

.sop-folder {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sop-folder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sop-folder:hover::before {
    opacity: 1;
}

.sop-folder:hover {
    border-color: rgba(245, 166, 35, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(245, 166, 35, 0.1);
}

.sop-folder-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.sop-folder-name {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: #F8FAFC;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.sop-folder-count {
    font-size: 0.7rem;
    color: #64748B;
    position: relative;
    z-index: 1;
}

/* Drive File Viewer Modal */
.drive-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.drive-modal.active {
    display: flex;
}

.drive-modal-content {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(245, 166, 35, 0.2);
    border-radius: 20px;
    width: 100%;
    max-width: 640px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: driveModalIn 0.25s ease;
}

@keyframes driveModalIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.drive-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(245, 166, 35, 0.15);
}

.drive-modal-header h3 {
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: #F8FAFC;
}

.drive-modal-close {
    background: none;
    border: none;
    color: #64748B;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.drive-modal-close:hover {
    color: #F8FAFC;
    background: rgba(255, 255, 255, 0.06);
}

.drive-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.drive-loading {
    text-align: center;
    padding: 40px 0;
    color: #64748B;
    font-size: 0.85rem;
}

.drive-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drive-file:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(245, 166, 35, 0.25);
    transform: translateX(4px);
}

.drive-file-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.drive-file-info {
    flex: 1;
    min-width: 0;
}

.drive-file-name {
    font-size: 0.85rem;
    color: #F8FAFC;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drive-file-meta {
    font-size: 0.65rem;
    color: #64748B;
    margin-top: 2px;
}

.drive-file-open {
    padding: 6px 12px;
    background: rgba(245, 166, 35, 0.1);
    border: 1px solid rgba(245, 166, 35, 0.2);
    border-radius: 6px;
    color: #f5a623;
    font-size: 0.7rem;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.drive-file-open:hover {
    background: rgba(245, 166, 35, 0.2);
}

.drive-error {
    text-align: center;
    padding: 40px 0;
    color: #EF4444;
    font-size: 0.85rem;
}

.drive-empty {
    text-align: center;
    padding: 40px 0;
    color: #64748B;
    font-size: 0.85rem;
}

.refresh-drive-btn {
    padding: 8px 16px;
    background: rgba(245, 166, 35, 0.1);
    border: 1px solid rgba(245, 166, 35, 0.25);
    border-radius: 8px;
    color: #f5a623;
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.refresh-drive-btn:hover {
    background: rgba(245, 166, 35, 0.2);
    box-shadow: 0 4px 16px rgba(245, 166, 35, 0.1);
}

/* RESPONSIVE OVERRIDES */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }
    .logo-area {
        flex-wrap: wrap;
        justify-content: center;
    }
    .agent-count {
        margin-left: 0;
    }
    .section-header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    .section-header h2 {
        font-size: 0.85rem;
    }
    .finance-grid,
    .revops-metrics,
    .okr-grid,
    .ai-insights {
        grid-template-columns: 1fr;
    }
    .storyboard-grid {
        grid-template-columns: 1fr;
    }
    .video-carousel {
        flex-direction: column;
    }
    .video-card {
        flex: none;
    }
}
