/* =========================================================
   SECOND PAGE: ER WAR ROOM / MEDICORE OS STYLES
   ========================================================= */
.no-scrollbar::-webkit-scrollbar { display: none; }

/* Main Tab Views */
#warroom-modal .tab-content { display: none !important; width: 100%; height: 100%; flex-direction: column; overflow-y: auto; overflow-x: hidden; padding-bottom: 2.5rem; }
#warroom-modal .tab-content.active { display: flex !important; animation: fadeInWarRoom 0.25s ease-out; }
@keyframes fadeInWarRoom { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* Sidebar Navigation */
#warroom-modal .nav-item { cursor: pointer; padding: 0.55rem 0.85rem; border-radius: 0.5rem; font-size: 0.8125rem; color: #94A3B8; font-weight: 500; transition: all 0.18s; display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.2rem; user-select: none; }
#warroom-modal .nav-item:hover { color: #FFFFFF; background: #1E293B; }
#warroom-modal .nav-item.active { color: #FFFFFF; background: #1E293B; font-weight: 600; box-shadow: inset 3px 0 0 #38BDF8; }

/* Isometric 3D Hub & Agent Topology */
.iso-viewport { position: relative; width: 100%; min-height: 440px; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; background: radial-gradient(circle at center, #1E293B 0%, #020617 100%); cursor: grab; border-radius: 1rem; border: 1px solid #334155; box-shadow: inset 0 0 60px rgba(0,0,0,0.5); }
.iso-viewport:active { cursor: grabbing; }
.iso-world { transform-style: preserve-3d; transform: rotateX(60deg) rotateZ(-45deg); width: 820px; height: 620px; position: relative; transition: transform 0.15s ease-out; }
.iso-floor { position: absolute; inset: 0; background-color: rgba(15, 23, 42, 0.78); border: 1px solid rgba(56, 189, 248, 0.25); border-radius: 20px; box-shadow: 0 0 50px rgba(0,94,184,0.18), inset 0 0 80px rgba(0,0,0,0.8); background-image: linear-gradient(rgba(56, 189, 248, 0.14) 1px, transparent 1px), linear-gradient(90deg, rgba(56, 189, 248, 0.14) 1px, transparent 1px); background-size: 40px 40px; }

.iso-beams { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.iso-beam-track { fill: none; stroke: rgba(148, 163, 184, 0.22); stroke-width: 1.5; stroke-dasharray: 4 6; }
.iso-beam-pulse { fill: none; stroke-width: 2.5; stroke-dasharray: 14 26; stroke-linecap: round; animation: iso-beam-flow 2.2s linear infinite; filter: drop-shadow(0 0 6px currentColor); }
.iso-hub-ring { fill: none; stroke: rgba(56, 189, 248, 0.45); stroke-width: 1.5; transform-origin: 410px 310px; animation: iso-hub-pulse 3.2s ease-out infinite; }
.iso-hub-ring-delayed { animation-delay: 1.6s; }
@keyframes iso-beam-flow { to { stroke-dashoffset: -40; } }
@keyframes iso-hub-pulse {
    0% { transform: scale(0.75); opacity: 0.75; }
    100% { transform: scale(1.65); opacity: 0; }
}

.iso-node { --pod-color: rgba(56, 189, 248, 0.55); --pod-glow: rgba(56, 189, 248, 0.28); position: absolute; width: 48px; height: 48px; transform-style: preserve-3d; margin-left:-24px; margin-top:-24px; z-index: 10; transition: z-index 0.2s; will-change: transform; }
.iso-node:hover { z-index: 50; animation-play-state: paused !important; }

.flat-agent-card { 
    position: absolute; top: 50%; left: 50%; transform: rotateZ(45deg) rotateX(-60deg) translate(-50%, -50%);
    background: rgba(15, 23, 42, 0.92); backdrop-filter: blur(12px); 
    border-radius: 12px; padding: 8px 13px; display: flex; align-items: center; gap: 10px;
    box-shadow: 0 12px 25px -5px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.14); width: max-content; transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
    pointer-events: auto; cursor: pointer; color: white;
    animation: iso-levitate 4.4s ease-in-out infinite;
}
.iso-node:hover .flat-agent-card {
    animation-play-state: paused;
    transform: rotateZ(45deg) rotateX(-60deg) translate(-50%, -68px) scale(1.07);
    border-color: var(--pod-color);
    box-shadow: 0 22px 34px -6px rgba(0, 0, 0, 0.65), 0 0 22px var(--pod-glow);
}
.floor-tether { position: absolute; top: 50%; left: 50%; width: 2px; height: 42px; background: linear-gradient(to top, var(--pod-color), transparent); transform: rotateZ(45deg) rotateX(-60deg) translate(-50%, -20px); transform-origin: bottom center; pointer-events: none; }
.floor-shadow { position: absolute; top: 50%; left: 50%; width: 38px; height: 20px; border-radius: 50%; background: var(--pod-glow); box-shadow: 0 0 16px var(--pod-color); transform: translate(-50%, -50%); pointer-events: none; animation: iso-shadow-pulse 4.4s ease-in-out infinite; }

@keyframes iso-levitate {
    0%, 100% { margin-top: 0px; }
    50% { margin-top: -8px; }
}
@keyframes iso-shadow-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
    50% { transform: translate(-50%, -50%) scale(0.84); opacity: 0.55; }
}

/* Smooth 60fps GPU-accelerated orbital drift around tethered floor pads */
@keyframes orbit-sw {
    0%, 100% { transform: translate3d(0px, 0px, 0); }
    25% { transform: translate3d(14px, -12px, 0); }
    50% { transform: translate3d(4px, -22px, 0); }
    75% { transform: translate3d(-12px, -8px, 0); }
}
@keyframes orbit-ne {
    0%, 100% { transform: translate3d(0px, 0px, 0); }
    25% { transform: translate3d(-14px, 12px, 0); }
    50% { transform: translate3d(-6px, 22px, 0); }
    75% { transform: translate3d(12px, 8px, 0); }
}
@keyframes orbit-nw {
    0%, 100% { transform: translate3d(0px, 0px, 0); }
    25% { transform: translate3d(12px, 14px, 0); }
    50% { transform: translate3d(-6px, 18px, 0); }
    75% { transform: translate3d(-14px, 4px, 0); }
}
@keyframes orbit-se {
    0%, 100% { transform: translate3d(0px, 0px, 0); }
    25% { transform: translate3d(-14px, -12px, 0); }
    50% { transform: translate3d(4px, -20px, 0); }
    75% { transform: translate3d(14px, -6px, 0); }
}
@keyframes orbit-s {
    0%, 100% { transform: translate3d(0px, 0px, 0); }
    33% { transform: translate3d(14px, -14px, 0); }
    66% { transform: translate3d(-14px, -10px, 0); }
}

/* Mini Robot Agent Avatars */
.bot-avatar {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; position: relative;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 12px rgba(0, 0, 0, 0.35);
}
.bot-eye { transform-box: fill-box; transform-origin: center; animation: bot-blink 4.5s ease-in-out infinite; }
.bot-beacon { animation: bot-pulse 1.8s ease-in-out infinite; }
@keyframes bot-blink {
    0%, 92%, 100% { transform: scaleY(1); }
    96% { transform: scaleY(0.15); }
}
@keyframes bot-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.log-entry { animation: slideDownFade 0.25s ease-out; }
@keyframes slideDownFade { 0% { opacity: 0; transform: translateY(-8px); } 100% { opacity: 1; transform: translateY(0); } }

/* Modals */
.modal-overlay { opacity: 0; pointer-events: none; transition: opacity 0.25s ease; z-index: 9999; }
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-content { transform: scale(0.96); transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.modal-overlay.active .modal-content { transform: scale(1); }

/* Pure CSS Non-Blocking Tooltip Engine */
[data-tooltip] { position: relative; cursor: help; border-bottom: 1px dashed rgba(100, 116, 139, 0.6); }
[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute; bottom: 125%; left: 50%; transform: translateX(-50%);
    background-color: #0F172A; color: #F8FAFC; padding: 7px 11px; border-radius: 8px;
    font-size: 11px; font-weight: 500; line-height: 1.35; font-family: 'Inter', sans-serif;
    text-align: left; white-space: normal; width: 230px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.45); z-index: 9999;
    pointer-events: none;
}
.warroom-top-status [data-tooltip]:hover::after {
    bottom: auto;
    top: 145%;
}
.warroom-top-status [data-tooltip-right]:hover::after {
    left: auto;
    right: 0;
    transform: none;
}

@media (max-width: 768px) {
    .iso-viewport { min-height: 360px; }
}

/* Audio Visualizer Bars */
.audio-bar { width: 3px; border-radius: 3px; background-color: #10B981; margin: 0 1.5px; animation: sound 0ms -800ms linear infinite alternate; display: inline-block; }
@keyframes sound { 0% { height: 4px; } 100% { height: 24px; } }

/* Brain SVG Lines */
#brain-svg-container { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.pulse-line { stroke-dasharray: 8; animation: dash 0.8s linear infinite; stroke: #0284C7 !important; stroke-width: 2.5px !important; }
@keyframes dash { to { stroke-dashoffset: -16; } }

/* Expandable RPM Row */
.expandable-row > td { padding-top: 0; padding-bottom: 0; border-bottom-width: 0; }
.expandable-row.open > td { padding-top: 0.5rem; padding-bottom: 0.75rem; border-bottom-width: 1px; }
.expandable-content { display: none; }
.expandable-row.open .expandable-content { display: flex; }

/* Zen Mode (In-Window Fullscreen Fallback) */
body.zen-mode #left-sidebar { width: 0; overflow: hidden; border: none; }
body.zen-mode #right-sidebar { display: none; }
