/* 
   Luminous Phoenix Design System - "Zen Cyberpunk"
   Version: 12.5 (Premium Clean)
*/

:root {
    /* Core Neutrals */
    --bg-deep: #020408;
    --bg-surface: #0a0e17;
    --bg-card: rgba(16, 20, 30, 0.7);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(192, 132, 252, 0.2);
    
    /* Semantic Palette */
    --accent-primary: #c084fc;        /* Lavender Crystal */
    --accent-secondary: #2dd4bf;      /* Mint Flow */
    --accent-gold: rgba(251, 191, 36, 0.9); /* Muse Aura */
    --accent-ghost: #cbd5e1;          /* Stealth Smoke */
    --accent-amber: #f59e0b;          /* Harbinger Prophecy */
    --accent-ruby: #e11d48;           /* Alchemist Ruby */
    --accent-danger: #f43f5e;         /* Guardian Alert */
    --glass-bg: rgba(10, 14, 23, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-glow: rgba(192, 132, 252, 0.15);
    
    /* [v15.5] Specialist Palette */
    --accent-neuron: #0ea5e9;        /* Electric Cyan */
    --accent-avenger: #84cc16;       /* Tactical Lime */
    --accent-avenger-alt: #facc15;   /* Tactical Gold */
    --accent-core: #f59e0b;          /* Energy Amber */
    --accent-cell: #10b981;          /* Bio Emerald */
    
    /* Text */
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --text-muted: #64748b;
    
    /* Shadows & Glows */
    --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.5);
    --glow-primary: 0 0 20px rgba(192, 132, 252, 0.3);
    
    /* Transitions */
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --anim-speed: 0.4s;
}

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

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(192, 132, 252, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(45, 212, 191, 0.05) 0%, transparent 50%);
}

/* Background Systems */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.15; /* Zen 감성을 위해 투명도 더욱 낮춤 */
    pointer-events: none;
}

/* Layout Wrapper */
.dashboard-wrapper {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 0.8s var(--ease-out);
}

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

/* --- Header Section --- */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 0.5rem;
}

.system-role-badge {
    padding: 0.4rem 1.2rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
}

.role-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--accent-secondary);
    text-shadow: 0 0 10px rgba(45, 212, 191, 0.3);
}

.role-tag.master { color: var(--accent-primary); text-shadow: 0 0 10px rgba(192, 132, 252, 0.4); }
.role-tag.observer { color: var(--accent-secondary); text-shadow: 0 0 10px rgba(45, 212, 191, 0.3); }

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* --- [v18.8] Autonomous Aether Sync Hub (Future Cyber-Glass) --- */
.aether-sync-hub {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.6rem 1.2rem;
    background: rgba(10, 14, 23, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    box-shadow: 
        0 4px 30px rgba(0, 0, 0, 0.5),
        inset 0 0 15px rgba(192, 132, 252, 0.05);
    transition: all 0.5s var(--ease-out);
    /* [v18.8] UI 안정성: 충분한 공간 확보 (기존 240px -> 280px로 확장) */
    min-width: 280px;
    flex-shrink: 0;
}

.aether-sync-hub:hover {
    border-color: rgba(192, 132, 252, 0.2);
    box-shadow: 0 0 25px rgba(192, 132, 252, 0.1);
}

.node-core {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.node-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1.5px solid transparent;
    border-top-color: var(--accent-secondary);
    border-radius: 50%;
    animation: nodeRotate 2s linear infinite;
}

.node-ring:nth-child(2) {
    width: 70%;
    height: 70%;
    border-top-color: var(--accent-primary);
    animation: nodeRotateReverse 1.5s linear infinite;
}

.node-glow {
    width: 6px;
    height: 6px;
    background: var(--accent-secondary);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent-secondary);
    transition: all 0.5s;
}

/* States */
.node-core.searching .node-glow {
    background: var(--text-muted);
    box-shadow: none;
    animation: nodePulse 1.5s infinite;
}

.node-core.established .node-glow {
    background: var(--accent-secondary);
    box-shadow: 0 0 20px var(--accent-secondary);
    animation: none;
}

.node-core.established .node-ring {
    border-color: rgba(45, 212, 191, 0.2);
    border-top-color: var(--accent-secondary);
}

/* Info Text */
.node-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.node-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 2.5px;
    color: var(--text-dim);
    line-height: 1;
}

.node-status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    letter-spacing: 1px;
    color: var(--accent-secondary);
    opacity: 0.8;
}

@keyframes nodeRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes nodeRotateReverse {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

@keyframes nodePulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.5); opacity: 0.8; }
}

/* End of implementations */

.logo-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 10px var(--accent-primary));
}

.logo-title h1 {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(90deg, #fff, var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(192, 132, 252, 0.3);
}

.v-tag {
    font-size: 0.65rem;
    color: var(--accent-primary);
    background: rgba(192, 132, 252, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border-glow);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    border: 1px solid var(--border-subtle);
    font-size: 0.75rem;
}

.status-badge .dot {
    width: 6px;
    height: 6px;
    background: var(--accent-secondary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-secondary);
}

.status-badge.pulse .dot {
    animation: pulseSync 2s infinite;
}

.mastery-badge {
    border-color: var(--accent-primary);
    background: rgba(192, 132, 252, 0.1);
    color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(192, 132, 252, 0.2);
}

/* --- [v18.6] Visual Sync Billboard --- */
.billboard {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    pointer-events: none;
}

.sync-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(10, 14, 23, 0.8);
    backdrop-filter: blur(10px);
    padding: 6px 16px;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.5s var(--ease-out);
}

.billboard.active .sync-indicator {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 20px rgba(45, 212, 191, 0.15);
}

.sync-core {
    width: 14px;
    height: 14px;
    border: 2px solid var(--text-muted);
    border-top-color: var(--accent-secondary);
    border-radius: 50%;
    position: relative;
    transition: all 0.3s;
}

.billboard.active .sync-core {
    animation: syncRotate 1s linear infinite, syncPulse 2s ease-in-out infinite;
    border-color: rgba(45, 212, 191, 0.3);
    border-top-color: var(--accent-secondary);
}

.sync-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-muted);
    text-transform: uppercase;
    transition: all 0.3s;
}

.billboard.active .sync-label {
    color: var(--accent-secondary);
    text-shadow: 0 0 8px rgba(45, 212, 191, 0.5);
}

@keyframes syncRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes syncPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 5px var(--accent-secondary); }
    50% { opacity: 0.7; box-shadow: 0 0 15px var(--accent-secondary); }
}

@keyframes pulseSync {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.mastery-badge .dot {
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

@keyframes pulseSync {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.timestamp {
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* [v18.0] Macro Regime Badges */
.regime-badge {
    transition: all 0.5s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.regime-badge .label {
    font-weight: 800;
    letter-spacing: 1px;
}

.regime-goldilocks {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(251, 191, 36, 0.1)) !important;
    border-color: var(--accent-cell) !important;
    color: var(--accent-cell) !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.regime-goldilocks .dot {
    background: var(--accent-cell) !important;
    box-shadow: 0 0 10px var(--accent-cell) !important;
}

.regime-stagflation {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(244, 63, 94, 0.1)) !important;
    border-color: var(--accent-core) !important;
    color: var(--accent-core) !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

.regime-stagflation .dot {
    background: var(--accent-core) !important;
    box-shadow: 0 0 10px var(--accent-core) !important;
    animation: pulseSync 1s infinite !important;
}

.regime-recession {
    background: linear-gradient(135deg, rgba(225, 29, 72, 0.1), rgba(2, 4, 8, 0.5)) !important;
    border-color: var(--accent-ruby) !important;
    color: var(--accent-ruby) !important;
    box-shadow: 0 0 20px rgba(225, 29, 72, 0.3);
}

.regime-recession .dot {
    background: var(--accent-ruby) !important;
    box-shadow: 0 0 12px var(--accent-ruby) !important;
    animation: alertPulse 0.5s infinite alternate !important;
}

@keyframes alertBreathing {
    0%, 100% { background: var(--accent-ruby); opacity: 1; }
    50% { background: #800000; opacity: 0.8; }
}

@keyframes alertPulse {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(1.3); opacity: 0.6; }
}

.anim-pulse-glow {
    animation: pulseGlow 2s ease-out;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0px transparent; }
    50% { box-shadow: 0 0 30px currentColor; }
    100% { box-shadow: 0 0 0px transparent; }
}

/* Vitality Mode Styles */
.vitality-ultra {
    color: var(--accent-secondary) !important;
    text-shadow: 0 0 10px rgba(45, 212, 191, 0.5);
}

.vitality-eco {
    color: var(--accent-gold) !important;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.vitality-sleep {
    color: var(--accent-danger) !important;
    text-shadow: 0 0 10px rgba(244, 63, 94, 0.4);
    animation: alertPulse 2s infinite alternate;
}

#vitality-card.ultra-active { border-color: var(--accent-secondary); box-shadow: 0 0 20px rgba(45, 212, 191, 0.15); }
#vitality-card.eco-active { border-color: var(--accent-gold); box-shadow: 0 0 20px rgba(251, 191, 36, 0.1); }
#vitality-card.sleep-active { border-color: var(--accent-danger); box-shadow: 0 0 20px rgba(244, 63, 94, 0.15); }

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* [v18.5] Zen Chronograph System */
.dual-clock-container {
    display: flex;
    gap: 1.25rem;
    padding: 0.25rem 0;
}

.analog-clock .clock-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.analog-clock .label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.analog-clock .date {
    font-size: 0.6rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    opacity: 0.6;
}

.analog-clock .face {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.03), transparent), var(--bg-surface);
    border: 1.5px solid var(--glass-border);
    position: relative;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), inset 0 0 12px rgba(255, 255, 255, 0.01);
    transition: all 0.8s var(--ease-out);
}

/* Day/Night Bezel Logic - Zen Refinement */
.analog-clock.day .face {
    border-color: rgba(251, 191, 36, 0.4); /* Muse Aura/Gold */
    box-shadow: 
        0 0 30px rgba(251, 191, 36, 0.1),
        0 15px 45px rgba(0, 0, 0, 0.5),
        inset 0 0 15px rgba(251, 191, 36, 0.05);
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.05), transparent), #0f172a;
}

.analog-clock.night .face {
    border-color: rgba(14, 165, 233, 0.4); /* Ice Blue / Neuron Blue */
    box-shadow: 
        0 0 30px rgba(14, 165, 233, 0.2),
        0 15px 45px rgba(0, 0, 0, 0.5),
        inset 0 0 15px rgba(14, 165, 233, 0.1);
    background: radial-gradient(circle at 30% 30%, rgba(14, 165, 233, 0.05), transparent), #020408;
}

.analog-clock .hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    border-radius: 99px;
    transition: transform 0.1s cubic-bezier(0.4, 2, 0.5, 1);
}

.analog-clock .hand.hour {
    width: 3px;
    height: 28px;
    background: #f8fafc;
    z-index: 3;
    box-shadow: 0 0 8px rgba(255,255,255,0.2);
}

.analog-clock .hand.min {
    width: 2px;
    height: 43px;
    background: var(--text-dim);
    z-index: 2;
}

.analog-clock .hand.sec {
    width: 1px;
    height: 48px;
    background: var(--accent-primary);
    z-index: 4;
}

.analog-clock.us .hand.sec {
    background: var(--accent-secondary);
}

.analog-clock .center {
    width: 4px;
    height: 4px;
    background: var(--text-main);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* Tick Marks (12 Scale Zen Chronograph) */
.analog-clock .face::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    background: 
        repeating-conic-gradient(from -0.5deg, var(--glass-border) 0deg 1deg, transparent 1deg 30deg),
        radial-gradient(circle at center, transparent 85%, rgba(192, 132, 252, 0.05) 85%);
    mask: radial-gradient(circle at center, transparent 82%, black 82%);
    -webkit-mask: radial-gradient(circle at center, transparent 82%, black 82%);
    pointer-events: none;
    opacity: 0.7;
}

.analog-clock.us .face::after {
    background: 
        repeating-conic-gradient(from -0.5deg, var(--glass-border) 0deg 1deg, transparent 1deg 30deg),
        radial-gradient(circle at center, transparent 85%, rgba(45, 212, 191, 0.05) 85%);
}

.analog-clock .clock-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.analog-clock .city {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.analog-clock:hover .city {
    color: var(--text-main);
}

.analog-clock.kr .city { border-bottom: 2px solid var(--accent-primary); }
.analog-clock.us .city { border-bottom: 2px solid var(--accent-secondary); }

.analog-clock .date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.8;
}

.audio-switch {
    background: none;
    border: 1px solid var(--border-subtle);
    color: var(--text-dim);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--anim-speed) var(--ease-out);
}

.audio-switch:hover {
    border-color: var(--accent-primary);
    color: var(--text-main);
}

/* --- Performance Matrix --- */
.matrix-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.vitality-hub {
    display: flex;
    justify-content: flex-end;
}

.vitality-hub .matrix-card {
    min-width: 300px;
}

.matrix-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 1.25rem;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all var(--anim-speed) var(--ease-out);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.02);
}

.matrix-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
}

.matrix-card .label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.matrix-card .value {
    font-size: 1.5rem;
    font-weight: 700;
}

.value-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

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

.value.positive, .sub-value.positive { color: var(--accent-secondary); }
.value.negative, .sub-value.negative { color: var(--accent-danger); }

.status-indicator {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-primary);
}

/* --- Squad Monitor (Simplified Summary v18.5) --- */
.squad-monitor-container {
    margin-bottom: 1.5rem;
}

.squad-summary {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    backdrop-filter: blur(10px);
}

.summary-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px dashed rgba(0, 255, 157, 0.1);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

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

.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent-secondary);
    text-shadow: 0 0 15px rgba(0, 255, 157, 0.3);
}

.summary-ledger {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.ledger-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.01);
    border-radius: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.ledger-data {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-main);
    font-weight: 600;
}

.insight-brief {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
}

.brief-container {
    padding: 1rem;
    background: rgba(0, 255, 157, 0.03);
    border-left: 3px solid var(--accent-primary);
    border-radius: 4px;
}

.brief-text {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-dim);
}

.brief-text.scanning {
    color: var(--accent-secondary);
    font-style: italic;
    animation: textPulse 2s infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0.4; }
}

#card-the_ghost { border-left: 3px solid var(--accent-ghost); }
#card-the_harbinger { border-left: 3px solid var(--accent-amber); }
#card-the_alchemist { border-left: 3px solid var(--accent-ruby); }

#card-the_neuron { border-left: 3px solid var(--accent-neuron); }
#card-the_avenger { border-left: 3px solid var(--accent-avenger); }
#card-the_core { border-left: 3px solid var(--accent-core); }
#card-the_cell { border-left: 3px solid var(--accent-cell); }

/* Space Optimization for Mobile */
@media (max-width: 1024px) {
    .matrix-grid { grid-template-columns: repeat(2, 1fr); padding: 0.5rem; }
    .squad-container { grid-template-columns: repeat(2, 1fr); }
    .main-content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .dashboard-wrapper { padding: 0.75rem; gap: 1rem; }
    .main-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .header-right { width: 100%; justify-content: space-between; }
    
    .matrix-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .squad-container { grid-template-columns: 1fr; gap: 0.75rem; }
    
    .matrix-card { padding: 1rem; }
    .matrix-card .value { font-size: 1.2rem; }
    .logo-title h1 { font-size: 1.1rem; }
}

@media (max-width: 480px) {
    .matrix-grid { grid-template-columns: 1fr; }
    .header-left { gap: 1rem; }
    .logo-title h1 { display: none; } /* Hide large title on small phones */
}

/* [v18.0] Enhanced Macro Grid */
.macro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.macro-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.macro-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    opacity: 0;
    transition: 0.4s;
}

.macro-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-glow);
    background: rgba(255, 255, 255, 0.05);
}

.macro-card:hover::before {
    opacity: 1;
}

.macro-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.macro-value-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.macro-value {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(to right, #fff, var(--text-dim));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.macro-change {
    font-size: 0.85rem;
    font-weight: 600;
}

.macro-change.positive { color: var(--accent-secondary); }
.macro-change.negative { color: var(--accent-danger); }
.macro-change.neutral { color: var(--text-muted); }

/* --- Main Content Grid --- */
.main-content-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 1.5rem;
}

.data-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-height: 500px;
}

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

.panel-header h3 {
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.panel-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
}

.p-label { color: var(--text-muted); }

.iq-evolution-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 150px;
}

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

.mastery-lv {
    font-size: 0.65rem;
    color: var(--accent-primary);
    font-weight: 800;
    letter-spacing: 1px;
}

.xp-bar-container {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.xp-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    box-shadow: 0 0 10px rgba(192, 132, 252, 0.5);
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mastery-score-tag {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-align: right;
}
.portfolio-list-modern {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    max-height: 400px;
}

.portfolio-item-modern {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--anim-speed) var(--ease-out);
}

.portfolio-item-modern:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-glow);
}

.p-main { display: flex; flex-direction: column; gap: 0.25rem; }
.p-symbol { font-weight: 700; font-size: 1rem; }
.p-qty { font-size: 0.65rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }

.p-sub { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; }
.p-value { font-weight: 600; font-size: 0.9rem; }
.p-pl { font-size: 0.75rem; font-weight: 700; }

/* --- Intelligence Layer --- */
.intel-panel {
    background: radial-gradient(circle at top right, rgba(192, 132, 252, 0.05), transparent);
}

.chart-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
    height: 250px;
}

.chart-container-half {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.chart-label {
    position: absolute;
    bottom: 20px;
    font-size: 0.6rem;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.chart-container-full {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1rem;
}

/* --- Tactical Terminal --- */
.tactical-terminal-modern {
    border-top: 1px solid var(--border-subtle);
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.terminal-head .tag {
    font-size: 0.6rem;
    background: var(--accent-primary);
    color: black;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 800;
}

.terminal-body {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-dim);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.terminal-line {
    display: flex;
    gap: 0.75rem;
    opacity: 0.9;
    animation: slideIn 0.3s var(--ease-out);
}

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

.terminal-line .time { color: var(--text-muted); }
.terminal-line .agent-tag { font-weight: 700; min-width: 80px; }
.terminal-line .commander { color: var(--accent-primary); }
.terminal-line .sentinel { color: var(--accent-danger); }
.terminal-line .flow { color: var(--accent-secondary); }
.terminal-line .oracle { color: var(--accent-gold); }
.terminal-line .the_ghost { color: var(--accent-ghost); }

/* --- Target Alert Overlay --- */
.target-alert-overlay {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    transform: translateX(120%);
    transition: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.target-alert-overlay.active {
    transform: translateX(0);
}

.target-alert-content {
    padding: 1.5rem;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    border: 1px solid var(--accent-secondary);
}

.target-symbol {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-secondary);
    margin: 1rem 0;
}

.target-metrics {
    display: flex;
    gap: 1.5rem;
    border-top: 1px solid var(--border-subtle);
    padding-top: 1rem;
}

.target-metrics .metric {
    display: flex;
    flex-direction: column;
}

.target-metrics .m-label {
    font-size: 0.6rem;
    color: var(--text-muted);
}

/* --- Strategic Audit Panel --- */
/* --- [v18.6] Strategic Audit Feed (Divine Sight) --- */
.audit-panel {
    background: linear-gradient(135deg, rgba(16, 20, 30, 0.9), rgba(2, 4, 8, 0.95));
    border: 1px solid var(--border-glow);
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(192, 132, 252, 0.05);
}

.audit-panel::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(192, 132, 252, 0.03), transparent);
    animation: scanLine 8s linear infinite;
    pointer-events: none;
}

@keyframes scanLine {
    0% { top: -100%; }
    100% { top: 100%; }
}

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

.audit-panel h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.15rem;
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(192, 132, 252, 0.4);
}

.audit-content {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-main);
    max-height: 350px;
    overflow-y: auto;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.01em;
}

.oracle-badge {
    font-size: 0.6rem;
    padding: 5px 14px;
    background: rgba(192, 132, 252, 0.15);
    color: var(--accent-primary);
    font-weight: 800;
    border-radius: 4px;
    border: 1px solid var(--accent-primary);
    box-shadow: 0 0 15px rgba(192, 132, 252, 0.2);
    letter-spacing: 1px;
}

/* --- Mobile & Responsive Fixes --- */
@media (max-width: 1024px) {
    .matrix-grid { grid-template-columns: repeat(2, 1fr); }
    .squad-container { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .dashboard-wrapper { padding: 0.75rem; gap: 0.75rem; }
    .main-header { flex-direction: column; align-items: stretch; gap: 1rem; }
    .header-left { flex-direction: column; align-items: center; text-align: center; gap: 0.5rem; }
    .header-right { width: 100%; justify-content: center; gap: 1rem; }
    
    .matrix-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .squad-container { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .main-content-grid { grid-template-columns: 1fr; gap: 0.75rem; }
    
    .matrix-card { padding: 0.75rem; border-radius: 12px; }
    .matrix-card .value { font-size: 1.15rem; }
    .matrix-card .label { font-size: 0.6rem; }
    
    .agent-card { padding: 1rem; }
    .agent-brief { font-size: 0.75rem; min-height: auto; }
    
    .data-panel { padding: 1rem; min-height: auto; }
    .chart-layout { grid-template-columns: 1fr; height: auto; gap: 1rem; }
    .chart-container-half { height: 180px; }
    
    .audit-panel { padding: 1rem; margin-top: 1rem; }
    .audit-content { font-size: 0.85rem; max-height: 200px; }
}

@media (max-width: 480px) {
    .matrix-grid { grid-template-columns: 1fr; }
    .squad-container { grid-template-columns: 1fr; }
    .logo-title h1 { font-size: 1.1rem; }
    .status-badge { font-size: 0.65rem; padding: 0.35rem 0.75rem; }
}

/* Animations */
.anim-slide-up {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Typing Cursor Effect */
.typewriter::after {
    content: '|';
    animation: blink 1s infinite;
    color: var(--accent-primary);
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; } /* Subtle breathing instead of full binary blink */
}

.audit-msg {
    padding: 0.75rem;
    background: rgba(192, 132, 252, 0.03);
    border-radius: 8px;
    border-left: 3px solid var(--accent-primary);
    margin-bottom: 0.75rem;
    animation: fadeIn 0.5s var(--ease-out);
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.01em;
}

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

/* [v14.0] Wide Nexus Panorama */
.wide-nexus-container {
    margin-top: 2rem;
    width: 100%;
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* --- [v18.6] Intelligence Nexus (Neural Activation) --- */
.intelligence-nexus-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.nexus-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-subtle);
}

.nexus-title {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text-main);
}

.nexus-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--accent-secondary);
    background: rgba(45, 212, 191, 0.08);
    padding: 4px 14px;
    border-radius: 99px;
    border: 1px solid var(--accent-secondary);
}

.nexus-timeline {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
}

.nexus-item {
    display: flex;
    gap: 1.5rem;
    padding: 0.75rem 0;
    border-left: 2px solid var(--border-subtle);
    margin-left: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.75rem;
    transition: all 0.3s;
}

.nexus-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: var(--bg-deep);
    border: 2px solid var(--border-subtle);
    border-radius: 50%;
}

/* Status-Based Neural Threading */
.nexus-item.stable { border-left-color: var(--accent-secondary); }
.nexus-item.stable::before { background: var(--accent-secondary); border-color: var(--accent-secondary); box-shadow: 0 0 10px var(--accent-secondary); }

.nexus-item.critical { border-left-color: var(--accent-danger); }
.nexus-item.critical::before { background: var(--accent-danger); border-color: var(--accent-danger); box-shadow: 0 0 12px var(--accent-danger); }

.nexus-time { color: var(--text-muted); min-width: 90px; }
.nexus-msg { color: var(--text-dim); line-height: 1.5; }

.version-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: rgba(0, 198, 255, 0.1);
    border: 1px solid rgba(0, 198, 255, 0.3);
    border-radius: 4px;
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue);
}

/* Responsive Mobile Optimization */
@media screen and (max-width: 1024px) {
    .dashboard-main {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .matrix-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .header-left .logo-title {
        display: none !important;
    }
    .agent-card { padding: 1rem; }
    .wide-nexus-container { margin-top: 1rem; }
}

/* [v15.5] Panorama Strategic Styles */
.radar-container-modern {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
}

.radar-box {
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.panorama-report-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(16, 20, 30, 0.8), rgba(2, 4, 8, 0.9));
    border: 1px solid var(--border-glow);
    min-height: 400px;
}

.sector-focus-tag {
    font-size: 0.7rem;
    padding: 4px 12px;
    background: var(--accent-avenger);
    color: black;
    font-weight: 800;
    border-radius: 4px;
    letter-spacing: 1px;
}

.panorama-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
    padding-top: 1.5rem;
}

.report-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeIn 0.5s var(--ease-out);
}

.report-header {
    display: flex;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.report-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sector-chunk {
    border-left: 2px solid var(--sector-color);
    padding-left: 1rem;
}

.chunk-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--sector-color);
    margin-bottom: 0.5rem;
}

.chunk-content {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.6;
}

.report-meta {
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-style: italic;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.75rem;
}

.report-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Specialist Animations */
.the_neuron.active::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: var(--accent-neuron);
    box-shadow: 0 0 15px var(--accent-neuron);
    animation: scanline 3s linear infinite;
}

@keyframes scanline {
    0% { top: 0%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* [v14.1] Vitality Patch: Dynamic Feedback */
.pulse-vitality {
    animation: pulseGlow 1.5s ease-out;
}

@keyframes pulseGlow {
    0% { filter: drop-shadow(0 0 0px var(--neon-blue)); }
    50% { filter: drop-shadow(0 0 10px var(--neon-blue)); }
    100% { filter: drop-shadow(0 0 0px var(--neon-blue)); }
}

.health-badge.critical {
    color: #e11d48 !important; /* Fixed Crimson */
    background: rgba(225, 29, 72, 0.1);
    padding: 2px 10px;
    border-radius: 4px;
    animation: breathing 3s infinite ease-in-out;
}

.nexus-item {
    transition: all 0.3s var(--ease-out);
    opacity: 1;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nexus-item.new-whisper {
    background: rgba(0, 198, 255, 0.05);
    border-left: 2px solid var(--neon-blue);
    animation: slideInLeft 0.5s var(--ease-out);
}

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

/* Contrast enhancement for long sessions */
.terminal-body {
    scrollbar-width: thin;
    scrollbar-color: var(--neon-blue) transparent;
}


/* [v17.0] Macro-Sentinel UI Styles */
/* --- [v18.6] Macro-Sentinel Global Pulse (Bioluminescent Grid) --- */
.macro-sentinel-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(35px);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
}

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

.macro-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    transition: all 0.4s var(--ease-out);
    overflow: hidden;
}

.macro-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.02), transparent);
    pointer-events: none;
}

.macro-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.macro-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.macro-value-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.macro-value {
    font-size: 1.6rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-main);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.macro-change {
    font-size: 0.85rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.03);
}

.macro-change.up { color: var(--accent-danger); }
.macro-change.down { color: var(--accent-secondary); }

.macro-trend-icon {
    font-size: 0.9rem;
    margin-right: 6px;
}

/* Deep-Dive Modal Link Style */
.deep-dive-trigger {
    font-size: 0.65rem;
    color: var(--accent-primary);
    text-decoration: underline;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.3s;
}

.deep-dive-trigger:hover {
    opacity: 1;
    text-shadow: 0 0 8px var(--accent-primary);
}

/* Fusion Score Visualization */
.fusion-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 800;
    margin-left: 0.5rem;
}

.fusion-high { background: rgba(16, 185, 129, 0.2); color: #10b981; border: 1px solid #10b981; }
.fusion-mid { background: rgba(245, 158, 11, 0.2); color: #f59e0b; border: 1px solid #f59e0b; }
.fusion-low { background: rgba(239, 68, 68, 0.2); color: #ef4444; border: 1px solid #ef4444; }

/* --- [v18.5] Tactical Decision Overlay & Oracle Modal --- */
.tactical-decision-overlay {
    position: fixed;
    bottom: 40px;
    left: 40px;
    z-index: 2000;
    width: 380px;
    display: none; /* Injected by JS */
    pointer-events: auto;
}

.tactical-decision-overlay.active {
    display: block;
}

.overlay-content.glass-panel {
    background: rgba(10, 15, 25, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 4px solid var(--accent-primary);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 
                inset 0 0 20px rgba(255, 255, 255, 0.05);
    border-radius: 4px; /* Strict tactical look */
    padding: 1.5rem;
    color: var(--text-main);
}

.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.8rem;
    margin-bottom: 1rem;
}

.overlay-header h3 {
    font-size: 0.75rem;
    letter-spacing: 0.2rem;
    color: var(--accent-primary);
    margin: 0;
    font-weight: 800;
}

.overlay-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
}

.overlay-close:hover {
    color: var(--text-main);
    transform: rotate(90deg);
}

.decision-hero {
    display: flex;
    align-items: baseline;
    gap: 1.2rem;
    margin: 1.5rem 0;
}

.hero-side {
    font-size: 2rem;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -1px;
    text-transform: uppercase;
}

.hero-side.buy {
    color: #10b981;
    text-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.hero-side.sell {
    color: #ef4444;
    text-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.hero-symbol {
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--text-main);
    opacity: 0.9;
    font-family: var(--font-mono);
}

.nexus-report-mini {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 2px;
    margin-bottom: 1.5rem;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.report-content {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-dim);
    margin: 0;
}

.overlay-footer {
    display: flex;
    gap: 1rem;
}

.btn {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 2px;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.1rem;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-approve {
    background: var(--accent-primary);
    color: #000;
}

.btn-approve:hover {
    background: #fff;
    box-shadow: 0 0 20px var(--accent-primary);
}

.btn-deny {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-deny:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Specific terminal-style lines for left-bottom area */
.terminal-line {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    margin-bottom: 4px;
    display: flex;
    gap: 8px;
    opacity: 0.8;
}

.terminal-line .time { color: var(--text-dim); min-width: 65px; }
.terminal-line .agent-tag {
    padding: 0 4px;
    border-radius: 2px;
    font-size: 0.65rem;
    font-weight: 800;
}

.agent-tag.commander { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.agent-tag.sentinel { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.agent-tag.oracle { background: rgba(168, 85, 247, 0.2); color: #a855f7; }
.agent-tag.hunter { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }

.tactical-feed-scroll {
    height: 120px;
    overflow-y: auto;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tactical-feed-scroll::-webkit-scrollbar { width: 4px; }
.tactical-feed-scroll::-webkit-scrollbar-thumb { background: var(--accent-primary); border-radius: 10px; }

/* Decor for Oracle Modal */
.hero-symbol::after {
    content: '_';
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

.tactical-decision-overlay .btn-approve {
    position: relative;
    overflow: hidden;
}

.tactical-decision-overlay .btn-approve::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: 0.5s;
}

.tactical-decision-overlay .btn-approve:hover::before {
    left: 100%;
}



/* [v18.5] Institutional Summary Dashboard & Polish */
.squad-summary {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: linear-gradient(135deg, rgba(13, 22, 22, 0.8), rgba(18, 18, 25, 0.8));
    border: 1px solid rgba(0, 255, 170, 0.1);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 15px;
}

.summary-header h3 {
    font-family: 'Inter', sans-serif;
    letter-spacing: 2px;
    font-size: 0.8rem;
    color: var(--primary-color);
    margin: 0;
}

.nexus-badge {
    font-size: 0.65rem;
    padding: 2px 8px;
    background: rgba(0, 255, 170, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 2px;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.summary-stats-box, .summary-ledger-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.stat-item, .ledger-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.stat-item:last-child, .ledger-item:last-child {
    margin-bottom: 0;
}

.stat-label, .ledger-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

.stat-value.digital, .ledger-data {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.stat-value.dim {
    color: rgba(255, 255, 255, 0.2);
    text-shadow: none;
}

.insight-brief-modern {
    background: rgba(0, 255, 170, 0.03);
    border-left: 2px solid var(--primary-color);
    padding: 15px;
    margin-top: 5px;
}

.brief-header {
    font-size: 0.6rem;
    color: var(--primary-color);
    margin-bottom: 5px;
    opacity: 0.7;
}

.brief-text-modern {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    font-style: italic;
}

/* Macro Card Glow Effects */
.macro-card.bullish {
    box-shadow: inset 0 0 20px rgba(0, 255, 170, 0.05);
    border-color: rgba(0, 255, 170, 0.3);
}

.macro-card.bearish {
    box-shadow: inset 0 0 20px rgba(255, 61, 113, 0.05);
    border-color: rgba(255, 61, 113, 0.3);
}

/* Refined Typography */
h1, h2, h3, .label, .stat-label {
    letter-spacing: 0.1em;
}

.pulse {
    animation: pulse-op 2s infinite ease-in-out;
}

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

.portfolio-empty {
    text-align: center;
    padding: 40px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: rgba(0, 255, 170, 0.3);
    letter-spacing: 2px;
}

/* Scrollbar Stylings */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 170, 0.2);
    border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 170, 0.4);
}

/* --- [v18.1] Fixed Workspace Layout Update --- */
.fixed-workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    height: calc(100vh - 280px); /* Header + Matrix Grid 공간 제외 */
    min-height: 600px;
    margin-top: 1rem;
}

.fixed-workspace > div {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* --- [v18.1] Terminal Mode (Real-time Log Viewer) --- */
.terminal-mode {
    background: rgba(2, 4, 8, 0.95);
    border: 1px solid var(--accent-primary);
    border-radius: 12px;
    padding: 1rem;
    font-family: 'JetBrains Mono', monospace;
    overflow-y: auto;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), var(--glow-primary);
}

.terminal-mode::-webkit-scrollbar {
    width: 6px;
}

.terminal-mode::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 10px;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.log-item {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.4rem;
    animation: slideInLeft 0.3s var(--ease-out);
}

.log-time { color: var(--text-muted); margin-right: 0.5rem; }
.log-agent { font-weight: 700; margin-right: 0.5rem; }

/* Log Level Colors */
.log-item.info .log-msg { color: var(--accent-secondary); }
.log-item.warn .log-msg { color: var(--accent-amber); }
.log-item.error .log-msg { color: var(--accent-danger); }
.log-item.system .log-msg { color: var(--accent-primary); }
.log-item.report .log-msg { color: var(--accent-neuron); }

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

/* --- [v18.1] Global Toast Notification System --- */
#toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast-notification {
    background: rgba(16, 20, 30, 0.9);
    border-left: 4px solid var(--accent-primary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: var(--text-main);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    min-width: 300px;
    max-width: 450px;
    pointer-events: auto;
    animation: toastIn 0.4s var(--ease-out) forwards;
}

.toast-notification.closing {
    animation: toastOut 0.4s var(--ease-out) forwards;
}

.toast-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.toast-tag {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--accent-primary);
    color: var(--bg-deep);
}

.toast-body {
    font-size: 0.95rem;
    color: var(--text-main);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to { opacity: 0; transform: translateX(30px) scale(0.95); }
}

/* Focus Indicator */
.panel.focused {
    border-color: var(--accent-primary);
    box-shadow: 0 0 30px var(--glass-glow);
}
