/* --- THEME CONFIG --- */
:root {
    --bg-deep: #010203;
    --mpc-red: #FF1F40; 
    --mpc-blue: #0044BB;
    --mpc-cyan: #00A3FF;
    --mpc-white: #F0F4FF;
    --equip-fill: #040810;
    
    --font-tech: 'Rajdhani', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
}

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

/* --- MAIN LAYOUT --- */
body { 
    background-color: var(--bg-deep); 
    color: var(--mpc-white); 
    font-family: var(--font-tech); 
    height: 100vh; width: 100vw; 
    overflow: hidden; 
    display: flex; flex-direction: row; 
}

/* --- LAYERS --- */
.layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.grid-hex { background-image: radial-gradient(var(--mpc-blue) 1px, transparent 1px); background-size: 40px 40px; opacity: 0.2; }
.scanline { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: repeating-linear-gradient(to bottom, transparent 0px, transparent 2px, rgba(0,0,0,0.5) 3px); opacity: 0.5; pointer-events: none; z-index: 100; }
.radar-sweep { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 150vmax; height: 150vmax; background: conic-gradient(from 0deg, transparent 0deg, rgba(0, 163, 255, 0.05) 60deg, transparent 100deg); animation: radar-spin 15s linear infinite; opacity: 0.8; pointer-events: none; z-index: 0; }

/* --- PANELS --- */
.vis-panel {
    flex: 1; height: 100%; position: relative;
    display: flex; justify-content: center; align-items: center;
    border-right: 2px solid var(--mpc-blue);
    background: radial-gradient(circle at 50% 50%, rgba(0, 68, 187, 0.1) 0%, transparent 80%);
    overflow: hidden; transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.ui-panel {
    width: 450px; min-width: 450px; height: 100%; padding: 40px; 
    display: flex; flex-direction: column; justify-content: center;
    background: linear-gradient(90deg, #020408 0%, rgba(0, 68, 187, 0.15) 100%);
    z-index: 20; border-left: 1px solid rgba(0, 163, 255, 0.3);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), min-width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), padding 0.4s ease;
}
.ui-panel.collapsed { width: 80px; min-width: 80px; padding: 10px; align-items: center; }

/* --- SVG ELEMENTS --- */
svg.schematic { width: 100%; height: 100%; filter: drop-shadow(0 0 8px rgba(0, 68, 187, 0.4)); z-index: 1; transition: opacity 0.5s ease; position: absolute; }
.schematic.faded { opacity: 0.05; filter: blur(4px); } 
.eq-body { fill: var(--equip-fill); stroke: var(--mpc-blue); stroke-width: 2; }
.eq-body-hot { fill: var(--equip-fill); stroke: var(--mpc-red); stroke-width: 2; }
.pipe-base { fill: none; stroke: var(--mpc-blue); stroke-width: 3; opacity: 0.4; stroke-linecap: round; stroke-linejoin: round; }
.pipe-flow { fill: none; stroke: var(--mpc-cyan); stroke-width: 2; stroke-dasharray: 8 8; animation: flow 1.5s linear infinite; stroke-linecap: round; }
.pipe-hot { stroke: var(--mpc-red); animation: flow 1s linear infinite; }
.widget-line { fill: none; stroke: var(--mpc-blue); stroke-width: 1; opacity: 0.4; }
.widget-txt { font-family: var(--font-code); font-size: 9px; fill: var(--mpc-cyan); opacity: 0.7; }
.target-brack { fill: none !important; stroke: var(--mpc-cyan); stroke-width: 2; animation: bracket-pulse 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.target-brack-hot { stroke: var(--mpc-red); }
.hud-glass { fill: rgba(4, 8, 16, 0.95); stroke: var(--mpc-cyan); stroke-width: 1.5; filter: drop-shadow(0 0 10px rgba(0, 163, 255, 0.2)); }
.hud-glass-hot { fill: rgba(4, 8, 16, 0.95); stroke: var(--mpc-red); stroke-width: 1.5; filter: drop-shadow(0 0 10px rgba(255, 31, 64, 0.3)); }
.lbl { font-family: var(--font-code); font-size: 10px; fill: var(--mpc-cyan); letter-spacing: 1px; text-transform: uppercase; }
.val { font-family: var(--font-code); font-size: 16px; font-weight: 800; fill: #fff; }
.conn { fill: none; stroke: var(--mpc-cyan); stroke-width: 1; stroke-dasharray: 4 2; opacity: 0.6; }
.ticker { font-family: var(--font-code); font-size: 8px; fill: var(--mpc-blue); animation: ticker-scroll 8s linear infinite; white-space: nowrap; }

/* --- ANIMATED ROBOTS --- */
.drone-group { pointer-events: none; animation-timing-function: linear; animation-iteration-count: infinite; }
.drone-body { fill: #fff; filter: drop-shadow(0 0 5px var(--mpc-cyan)); }
.drone-arm { stroke: var(--mpc-blue); stroke-width: 1; }
.drone-prop { fill: var(--mpc-cyan); opacity: 0.6; transform-box: fill-box; transform-origin: center; animation: prop-spin 0.1s linear infinite; }
.drone-scan-beam { fill: url(#droneGradient); opacity: 0; animation: beam-flash 4s ease-in-out infinite; transform-origin: top center; }
.drone-1 { animation-name: flight-path-alpha; animation-duration: 30s; }
.drone-2 { animation-name: flight-path-beta; animation-duration: 45s; animation-direction: reverse; }
.robodog-group { pointer-events: none; animation-timing-function: linear; animation-iteration-count: infinite; }
.dog-body { fill: #1a1a1a; stroke: var(--mpc-cyan); stroke-width: 1; }
.dog-head { fill: #1a1a1a; stroke: var(--mpc-cyan); stroke-width: 1; }
.dog-eye { fill: var(--mpc-red); animation: blink 2s infinite; }
.dog-leg { stroke: var(--mpc-white); stroke-width: 2; stroke-linecap: round; transform-box: fill-box; transform-origin: top center; animation: walk-cycle 0.5s ease-in-out infinite alternate; }
.dog-leg-back { animation-delay: 0.25s; }
.dog-1 { animation-name: patrol-ground-1; animation-duration: 20s; }
.dog-2 { animation-name: patrol-ground-2; animation-duration: 25s; }

/* --- CONTENT MODULES --- */
#content-container { position: relative; z-index: 10; width: 95%; height: 95%; display: flex; flex-direction: column; overflow-y: auto; pointer-events: none; padding-right: 15px; margin: 20px; }
#content-container > * { pointer-events: auto; }
.module-view { display: none; width: 100%; height: 100%; animation: fadeIn 0.4s ease-out; flex-direction: column; }
.module-view.active { display: flex; }
.module-header { margin-bottom: 30px; border-bottom: 2px solid var(--mpc-blue); padding-bottom: 10px; display: flex; flex-direction: column; }
.module-title { font-size: 2.5rem; color: #fff; text-transform: uppercase; letter-spacing: 4px; font-weight: 800; text-shadow: 0 0 10px var(--mpc-blue); }

/* --- BUTTONS & CONTROLS --- */
.title-block { margin-bottom: 40px; position: relative; text-align: center; }
h1 { font-size: 4rem; font-weight: 800; text-transform: uppercase; line-height: 1; margin: 0; color: #fff; letter-spacing: 4px; cursor: pointer; transition: 0.3s; }
.title-accent-bar { width: 60px; height: 6px; background: var(--mpc-red); margin-top: 15px; box-shadow: 0 0 15px var(--mpc-red); margin-left: auto; margin-right: auto;}
.ui-panel.collapsed .title-accent-bar { width: 30px; margin-top: 10px; }
.section-label { font-family: var(--font-code); font-size: 0.8rem; color: var(--mpc-cyan); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 20px; border-bottom: 1px solid var(--mpc-blue); padding-bottom: 5px; opacity: 0.8; }
.ui-panel.collapsed .section-label { display: none; }
.btn { height: 70px; display: flex; align-items: center; padding: 0 25px; margin-bottom: 15px; background: rgba(0, 4, 10, 0.6); border: 1px solid var(--mpc-blue); border-left: 4px solid var(--mpc-blue); width: 100%; cursor: pointer; transition: 0.2s ease-in-out; }
.btn:hover { background: rgba(0, 68, 187, 0.3); border-color: var(--mpc-cyan); border-left-color: var(--mpc-cyan); transform: translateX(5px); box-shadow: 0 0 15px rgba(0, 163, 255, 0.2); }
.btn.active { background: rgba(255, 31, 64, 0.15); border-color: var(--mpc-red); border-left-color: var(--mpc-red); box-shadow: 0 0 10px rgba(255, 31, 64, 0.3); }
.btn-txt { font-size: 1.1rem; text-transform: uppercase; font-weight: 700; letter-spacing: 2px; margin-left: 15px; white-space: nowrap; color: #fff;}
.btn-icon { font-size: 1.4rem; opacity: 1; color: var(--mpc-cyan); transition: 0.3s;}
.btn:hover .btn-icon { color: #fff; filter: drop-shadow(0 0 5px #fff); }
.ui-panel.collapsed .btn-txt { display: none; }
.ui-panel.collapsed .btn { justify-content: center; padding: 0; transform: none; width: 50px; height: 50px; border-radius: 4px; border-left-width: 1px; }
.ui-panel.collapsed .btn:hover { transform: scale(1.1); border-color: var(--mpc-cyan); }
.module-navbar { display: flex; gap: 15px; margin-bottom: 25px; border-bottom: 1px solid var(--mpc-blue); padding-bottom: 15px; }
.nav-btn { background: transparent; border: 1px solid var(--mpc-blue); color: var(--mpc-cyan); padding: 8px 16px; font-family: var(--font-tech); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; transition: 0.2s; font-size: 0.9rem; }
.nav-btn:hover { background: rgba(0, 163, 255, 0.2); border-color: var(--mpc-cyan); box-shadow: 0 0 10px rgba(0, 163, 255, 0.3); }
.nav-btn.active { background: var(--mpc-cyan); color: #000; box-shadow: 0 0 10px var(--mpc-cyan); }
.btn-mini-add { background: transparent; border: 1px solid var(--mpc-cyan); color: var(--mpc-cyan); padding: 5px 10px; font-family: var(--font-tech); font-weight: bold; cursor: pointer; font-size: 0.8rem; transition: 0.2s; white-space: nowrap;}
.btn-mini-add:hover { background: var(--mpc-cyan); color: #000; box-shadow: 0 0 10px var(--mpc-cyan); }
.btn-delete { background: transparent; border: none; color: var(--mpc-red); cursor: pointer; font-size: 1.2rem; opacity: 0.5; padding: 0 5px; transition: 0.2s; }
.btn-delete:hover { opacity: 1; text-shadow: 0 0 5px var(--mpc-red); transform: scale(1.2); }
.icon-btn { background: var(--mpc-blue); color: #fff; border: none; width: 30px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--mpc-cyan); }
.icon-btn-edit { background: transparent; border: 1px solid var(--mpc-blue); color: var(--mpc-cyan); width: 25px; cursor: pointer; font-size: 0.8rem; display: flex; align-items: center; justify-content: center; margin-left: 2px; transition: 0.2s; }
.icon-btn-edit:hover { background: var(--mpc-blue); color: #fff; }

/* --- WIDGET & LAYOUT --- */
.split-row { display: flex; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; align-items: stretch; height: auto; }
.split-col { flex: 1; display: flex; flex-direction: column; gap: 20px; min-width: 450px; }
.widget-box { background: rgba(4, 8, 16, 0.9); border: 1px solid var(--mpc-blue); padding: 20px; display: flex; flex-direction: column; flex-grow: 1; width: 100%; box-sizing: border-box; height: auto; max-height: 650px; }
.widget-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--mpc-blue); padding-bottom: 10px; margin-bottom: 15px; flex-shrink: 0; }
.widget-title { color: var(--mpc-cyan); text-transform: uppercase; font-size: 1.1rem; letter-spacing: 2px; font-weight: 700; }
#notes-list, #financials-list, .action-table-container, #gantt-container { overflow-y: auto; overflow-x: auto; flex-grow: 1; min-height: 100px; }

/* --- TABLES & INPUTS --- */
.action-table { width: 100%; min-width: 1000px; border-collapse: collapse; margin-top: 20px; font-family: var(--font-code); font-size: 0.85rem; table-layout: auto; }
.action-table th { text-align: left; padding: 12px; border-bottom: 2px solid var(--mpc-cyan); color: var(--mpc-cyan); text-transform: uppercase; background: rgba(0, 68, 187, 0.1); cursor: pointer; white-space: nowrap; }
.action-table td { padding: 10px; border-bottom: 1px solid rgba(0, 68, 187, 0.3); background: rgba(0, 68, 187, 0.05); vertical-align: middle;}
.action-table tr:hover td { background: rgba(0, 163, 255, 0.15); }
.action-table th:first-child, .action-table td:first-child { width: 30%; min-width: 250px; }
.status-badge { padding: 4px 10px; border-radius: 2px; font-size: 0.7rem; text-transform: uppercase; font-weight: bold; }
select.table-input { font-weight: bold; border-radius: 4px; padding: 4px; background-color: #020408; color: #fff; border:none; cursor: pointer; }
select.table-input option { background-color: #020408; color: #fff; padding: 10px; }
.prio-high { color: #ff1f40 !important; font-weight: 800; }
.prio-medium { color: #ffeb3b !important; }
.prio-low { color: #00ff00 !important; }
.table-input { background: transparent; border: none; color: #fff; width: 100%; font-family: var(--font-code); font-size: 0.85rem; }

/* --- OTHER ELEMENTS --- */
.project-container { display: flex; flex-direction: column; gap: 30px; padding-bottom: 50px; }
.project-header-row { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--mpc-blue); padding-bottom: 15px; margin-bottom: 10px; }
.project-title { font-size: 2rem; color: #fff; text-transform: uppercase; font-weight: 800; letter-spacing: 2px; }
.info-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; background: rgba(0, 68, 187, 0.1); padding: 15px; border: 1px solid var(--mpc-blue); }
.input-group { display: flex; flex-direction: column; gap: 5px; }
.input-label { font-size: 0.7rem; color: var(--mpc-cyan); font-family: var(--font-code); font-weight: bold; letter-spacing: 1px;}
.input-field { background: rgba(0,0,0,0.5); border: 1px solid var(--mpc-blue); color: #fff; padding: 8px; font-family: var(--font-tech); font-size: 1rem; }
.scope-label { color: #fff; font-size: 0.8rem; margin-bottom: 5px; margin-top: 10px; opacity: 0.8; }
.scope-text { width: 100%; height: 120px; background: rgba(0,0,0,0.3); border: 1px solid rgba(0, 68, 187, 0.5); color: var(--mpc-white); font-family: var(--font-code); font-size: 0.85rem; padding: 10px; resize: vertical; opacity: 1 !important; line-height: 1.4;}
.note-item { border: 1px solid rgba(0, 163, 255, 0.2); margin-bottom: 10px; background: rgba(0,0,0,0.2); }
.note-header { padding: 10px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; background: rgba(0, 68, 187, 0.1); font-family: var(--font-code); font-size: 0.9rem; }
.note-body { padding: 10px; display: none; font-size: 0.85rem; line-height: 1.4; color: #ccc; border-top: 1px solid rgba(0, 163, 255, 0.2); }
.note-item.open .note-body { display: block; }
.note-input-title { background: transparent; border: none; color: #fff; font-family: var(--font-code); font-weight: bold; width: 70%; }
.note-input-body { background: transparent; border: none; color: #ccc; font-family: var(--font-tech); width: 100%; resize: vertical; min-height: 50px; }
.wo-item { border: 1px solid rgba(0, 68, 187, 0.3); margin-bottom: 10px; background: rgba(0,0,0,0.3); }
.wo-header { padding: 10px; background: rgba(0, 68, 187, 0.15); display: flex; justify-content: space-between; align-items: center; font-family: var(--font-code); font-size: 0.9rem; cursor: pointer;}
.wo-body { padding: 10px; display: none; border-top: 1px solid rgba(0, 68, 187, 0.2); }
.wo-item.open .wo-body { display: block; }
.year-item { margin-top: 10px; border-left: 2px solid var(--mpc-blue); margin-left: 10px; }
.year-header { background: rgba(255, 255, 255, 0.05); padding: 5px 10px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-tech); font-weight: bold; font-size: 0.9rem; color: #fff; }
.year-body { display: none; padding: 5px; }
.year-item.open .year-body { display: block; }
.fin-table { width: 100%; font-size: 0.8rem; border-collapse: collapse; }
.fin-table th { text-align: left; color: var(--mpc-cyan); padding: 5px; }
.fin-table td { padding: 4px; border-bottom: 1px solid rgba(0, 68, 187, 0.2); }
.fin-input { width: 80px; background: rgba(0,0,0,0.5); border: 1px solid var(--mpc-blue); color: #fff; text-align: right; font-family: var(--font-code); }
.po-item { margin-top: 5px; margin-left: 20px; border-left: 2px solid var(--mpc-red); padding-left: 10px; font-size: 0.8rem; display: flex; justify-content: space-between; opacity: 0.8; }
.gantt-wrapper { display: grid; grid-template-columns: 200px 1fr; border: 1px solid var(--mpc-blue); height: 100%; background: rgba(0,0,0,0.3); } 
.gantt-sidebar { border-right: 1px solid var(--mpc-blue); background: rgba(0, 68, 187, 0.1); overflow-y: hidden; display: flex; flex-direction: column; }
.gantt-sidebar-header { height: 30px; border-bottom: 1px solid var(--mpc-blue); padding: 5px; font-weight: bold; color: var(--mpc-cyan); font-size: 0.8rem; }
.gantt-item-name { height: 30px; display: flex; align-items: center; padding-left: 10px; font-size: 0.75rem; border-bottom: 1px solid rgba(0,68,187,0.2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.gantt-timeline-area { position: relative; overflow-x: auto; overflow-y: hidden; background-image: linear-gradient(to right, rgba(0, 68, 187, 0.1) 1px, transparent 1px); background-size: 50px 100%; }
.gantt-timeline-header { position: absolute; top:0; left:0; height: 30px; width: 100%; border-bottom: 1px solid var(--mpc-blue); display: flex; }
.gantt-date-marker { flex: 1; border-right: 1px solid rgba(0,68,187,0.3); font-size: 0.7rem; color: var(--mpc-cyan); text-align: center; line-height: 30px; }
.gantt-bar-row { position: absolute; height: 30px; width: 100%; border-bottom: 1px solid rgba(0,68,187,0.1); }
.gantt-bar { position: absolute; height: 18px; top: 6px; border-radius: 2px; opacity: 0.9; box-shadow: 0 0 5px currentColor; cursor: pointer; font-size: 0.7rem; color: #000; padding-left: 5px; overflow: hidden; white-space: nowrap; }
.gantt-milestone { position: absolute; width: 14px; height: 14px; top: 8px; transform: rotate(45deg); border: 2px solid currentColor; background: #000; box-shadow: 0 0 5px currentColor; cursor: pointer; z-index: 5; }
.gantt-open { background-color: #fff; color: #fff; }
.gantt-pending { background-color: #ffeb3b; color: #ffeb3b; }
.gantt-in-progress { background-color: #00e5ff; color: #00e5ff; }
.gantt-complete { background-color: #00ff00; color: #00ff00; }
.gantt-on-hold { background-color: #ff9800; color: #ff9800; }
.gantt-not-started { background-color: #888; color: #888; }
.goals-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; width: 100%; box-sizing: border-box; }
.goal-card { background: rgba(4, 8, 16, 0.9); border: 1px solid var(--mpc-blue); padding: 25px; position: relative; transition: 0.3s; }
.goal-card:hover { border-color: var(--mpc-cyan); box-shadow: 0 0 15px rgba(0, 68, 187, 0.5); transform: translateY(-2px); }
.fill-space { flex-grow: 1; min-height: 0; display: grid; grid-template-rows: 1fr; }
.portfolio-tile { height: 100%; min-height: 0; display: flex; flex-direction: column; padding: 0 !important; overflow: hidden; background: rgba(4, 8, 16, 0.9); border: 1px solid var(--mpc-blue); position: relative; }
.tile-header { background: rgba(0, 68, 187, 0.2); padding: 20px; border-bottom: 1px solid var(--mpc-blue); display: flex; justify-content: space-between; align-items: center; }
.tile-title { margin: 0; color: #fff; font-size: 1.2rem; text-transform: uppercase; letter-spacing: 2px; }
.tile-body { padding: 20px; flex-grow: 1; overflow-y: auto; }
.portfolio-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 10px; border-bottom: 1px solid rgba(0, 163, 255, 0.2); transition: 0.2s; font-family: var(--font-code); font-size: 0.85rem; }
.portfolio-item:hover { background: rgba(0, 163, 255, 0.1); padding-left: 15px; }
.item-info { display: flex; flex-direction: column; gap: 4px; }
.item-id { color: var(--mpc-cyan); font-weight: bold; font-size: 0.75rem; }
.item-name { color: #fff; }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(5px); z-index: 2000; display: none; justify-content: center; align-items: center; }
.modal-overlay.active { display: flex; }
.modal-box { background: rgba(2, 5, 12, 0.95); border: 1px solid var(--mpc-blue); border-left: 4px solid var(--mpc-cyan); padding: 30px; width: 400px; box-shadow: 0 0 30px rgba(0, 68, 187, 0.4); display: flex; flex-direction: column; gap: 20px; }
.modal-title { font-size: 1.5rem; color: #fff; text-transform: uppercase; margin-bottom: 10px; }
.modal-input { background: rgba(0,0,0,0.5); border: 1px solid var(--mpc-blue); color: #fff; padding: 10px; font-family: var(--font-tech); font-size: 1rem; width: 100%; }
.modal-input:focus { border-color: var(--mpc-cyan); outline: none; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.wm-toolbar { display: flex; gap: 15px; margin-bottom: 20px; background: rgba(0, 68, 187, 0.1); padding: 15px; border: 1px solid var(--mpc-blue); align-items: center; flex-wrap: wrap; width: 100%; }
.search-box { flex-grow: 1; background: rgba(0,0,0,0.5); border: 1px solid var(--mpc-blue); color: #fff; padding: 8px 12px; font-family: var(--font-tech); }
.filter-select { background: #020408; border: 1px solid var(--mpc-blue); color: var(--mpc-cyan); padding: 8px; font-family: var(--font-tech); cursor: pointer; min-width: 120px; }
.tool-btn { clip-path: none !important; width: 100% !important; height: auto !important; min-height: 100px !important; justify-content: flex-start !important; background: rgba(0, 68, 187, 0.2) !important; border: 1px solid var(--mpc-cyan) !important; border-left: 4px solid var(--mpc-cyan) !important; padding: 20px 30px !important; display: flex !important; flex-direction: row !important; align-items: center !important; }
.tool-btn:hover { background: rgba(0, 163, 255, 0.3) !important; transform: translateY(-5px) !important; box-shadow: 0 10px 20px rgba(0,0,0,0.5) !important; }
.tool-btn .btn-txt { display: block !important; white-space: normal !important; font-size: 1.1rem; line-height: 1.3; text-align: left; }
.tool-btn .btn-icon { font-size: 2rem; margin-right: 15px; }

@media (max-width: 1200px) { body { flex-direction: column; overflow-y: auto; } .vis-panel { width: 100%; height: 65vh; } .ui-panel { width: 100%; height: auto; } }

/* --- TOOLS SECTION --- */
.tool-category {
    display: flex; flex-direction: column; 
    background: rgba(4, 8, 16, 0.9); border: 1px solid var(--mpc-blue); padding: 20px;
    height: 100%;
}
.tools-body {
    display: flex; flex-direction: column; gap: 15px; flex-grow: 1; overflow-y: auto; margin-top: 15px;
}
.tool-subsection {
    border-left: 2px solid var(--mpc-blue); padding-left: 10px; margin-bottom: 10px;
}
.subsection-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
}
.subsection-title {
    color: #fff; font-family: var(--font-code); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.8;
}
.subsection-links {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px;
}
.tool-btn-wrapper {
    display: flex; align-items: center; gap: 5px; background: rgba(0, 68, 187, 0.1); border: 1px solid var(--mpc-blue); padding: 0; height: 35px; overflow: hidden;
}
.tool-btn.compact {
    flex-grow: 1; height: 100% !important; margin: 0 !important; padding: 0 10px !important; background: transparent !important; border: none !important; display: flex; align-items: center; text-decoration: none;
}
.btn-txt-compact {
    font-size: 0.8rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-code);
}
.tool-icon-btn {
    background: transparent; border: none; color: var(--mpc-cyan); width: 25px; height: 100%; cursor: pointer; display: flex; align-items: center; justify-content: center; border-left: 1px solid rgba(0, 68, 187, 0.3); font-size: 0.8rem;
}
.tool-icon-btn:hover { background: rgba(0, 163, 255, 0.2); color: #fff; }
.tool-icon-btn.delete:hover { background: rgba(255, 31, 64, 0.2); color: var(--mpc-red); }

/* --- SPECIFIC COMPACT SCHEDULE OVERRIDES --- */
.schedule-table { 
    width: 100%; 
    min-width: 0 !important; 
    table-layout: fixed; /* STRICT LAYOUT */
}
.schedule-table th, .schedule-table td { 
    padding: 8px 12px; /* INCREASED PADDING */
    font-size: 0.8rem; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}
.schedule-type-btn { cursor: pointer; width: 100%; height: 20px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--mpc-blue); background: rgba(0,0,0,0.3); border-radius: 2px; transition: 0.2s; }
.schedule-type-btn:hover { border-color: var(--mpc-cyan); }
.icon-bar { width: 14px; height: 6px; background-color: var(--mpc-cyan); border-radius: 1px; }
.icon-diamond { width: 8px; height: 8px; background-color: #fff; transform: rotate(45deg); border: 1px solid var(--mpc-cyan); }
.schedule-table .table-input { font-size: 0.75rem; padding: 2px; height: 20px; }
.schedule-table .btn-delete { font-size: 1rem; padding: 0 2px; }
.schedule-table select.table-input { padding: 0 2px; height: 20px; }
.schedule-table input[type="date"] { padding: 0 2px; height: 20px; }
.schedule-table th:nth-child(1) { width: 8%; }  
.schedule-table th:nth-child(2) { width: 25%; } 
.schedule-table th:nth-child(3) { width: 22%; } 
.schedule-table th:nth-child(4) { width: 22%; } 
.schedule-table th:nth-child(5) { width: 18%; } 
.schedule-table th:nth-child(6) { width: 5%; }  

/* ANIMATION KEYFRAMES (BOTTOM) */
@keyframes radar-spin { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes flow { 100% { stroke-dashoffset: -20; } }
@keyframes pulse-heat { 0%, 100% { fill-opacity: 0.4; stroke-opacity: 0.7; } 50% { fill-opacity: 0.9; stroke-opacity: 1; } }
@keyframes bracket-pulse { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.05); opacity: 1; } }
@keyframes ticker-scroll { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes prop-spin { 100% { transform: rotate(360deg); } }
@keyframes beam-flash { 0%, 90% { opacity: 0; transform: scaleY(0); } 95% { opacity: 0.5; transform: scaleY(1); } 100% { opacity: 0; } }
@keyframes flight-path-alpha { 0% { transform: translate(100px, 150px); } 25% { transform: translate(400px, 100px); } 50% { transform: translate(800px, 200px); } 75% { transform: translate(500px, 300px); } 100% { transform: translate(100px, 150px); } }
@keyframes flight-path-beta { 0% { transform: translate(900px, 100px); } 33% { transform: translate(600px, 400px); } 66% { transform: translate(200px, 250px); } 100% { transform: translate(900px, 100px); } }
@keyframes walk-cycle { from { transform: translateY(0); } to { transform: translateY(-3px); } }
@keyframes patrol-ground-1 { 0% { transform: translate(50px, 580px) scaleX(1); } 45% { transform: translate(450px, 580px) scaleX(1); } 50% { transform: translate(450px, 580px) scaleX(-1); } 95% { transform: translate(50px, 580px) scaleX(-1); } 100% { transform: translate(50px, 580px) scaleX(1); } }
@keyframes patrol-ground-2 { 0% { transform: translate(900px, 580px) scaleX(-1); } 45% { transform: translate(550px, 580px) scaleX(-1); } 50% { transform: translate(550px, 580px) scaleX(1); } 95% { transform: translate(900px, 580px) scaleX(1); } 100% { transform: translate(900px, 580px) scaleX(-1); } }