:root {
    --bg: #000000;
    --panel: #0a0a0a;
    --border: #1a1a1a;
    --accent: #00f0ff;
    --accent-dim: rgba(0, 240, 255, 0.1);
    --text: #ffffff;
    --text-dim: #666666;
    --success: #00ff9d;
    --alert: #ff0055;
    --mono: 'JetBrains Mono', monospace;
    --head: 'Space Grotesk', sans-serif;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--head);
    height: 100vh;
    overflow: hidden;
    user-select: none;
}

/* AUTH LAYER */
.gatekeeper {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gate-form {
    text-align: center;
    width: 280px;
}

.gate-logo {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 10px;
    margin-bottom: 30px;
}

.gate-form input {
    width: 100%;
    padding: 12px;
    background: #0a0a0a;
    border: 1px solid #222;
    color: var(--accent);
    text-align: center;
    outline: none;
    margin-bottom: 20px;
    font-family: var(--head);
    border-radius: 4px;
    border-bottom: 2px solid var(--accent);
}

.gate-form button {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
    border-radius: 4px;
}

.gate-form button:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 20px var(--accent-dim);
}

/* MAIN SHELL */
.op-shell {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* SLIM SIDEBAR */
.sidebar {
    width: 60px;
    background: #050505;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.side-logo {
    font-size: 24px;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 50px;
}

.side-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.menu-btn {
    background: none;
    border: none;
    color: #444;
    cursor: pointer;
    font-size: 20px;
    transition: 0.3s;
    padding: 10px;
}

.menu-btn:hover,
.menu-btn.active {
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent);
}

.exit-btn {
    border: 1px solid #333;
    color: #333;
    padding: 5px;
    font-size: 10px;
    border-radius: 4px;
    cursor: pointer;
}

/* VIEWPORT */
.viewport {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.view-header {
    height: 50px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
}

.view-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 2px;
}

.view-stats {
    display: flex;
    gap: 20px;
    align-items: center;
}

.stat-box {
    font-size: 10px;
}

.stat-box .label {
    color: #555;
}

.stat-box .value.success {
    color: var(--success);
}

.clock {
    font-family: var(--mono);
    color: var(--accent);
    font-size: 12px;
}

/* GRID CONTENT */
.view-content {
    flex: 1;
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 15px;
    padding: 15px;
    overflow: hidden;
}

.ops-panel,
.widget {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.modal-body::-webkit-scrollbar {
    width: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.op-item {
    transition: 0.2s;
}

.op-item:hover {
    background: rgba(0, 240, 255, 0.08) !important;
    border-color: var(--accent) !important;
}

.ops-header,
.widget-header {
    padding: 10px 15px;
    font-size: 9px;
    font-weight: 800;
    color: #444;
    border-bottom: 1px solid var(--border);
    letter-spacing: 1px;
}

/* AGENT LIST */
.agent-compact-box {
    padding: 12px 15px;
    border-bottom: 1px solid #111;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agent-compact-box h4 {
    font-size: 11px;
    font-weight: 600;
}

.agent-compact-box .status {
    font-size: 9px;
    color: var(--accent);
}

/* TERMINAL */
.col-center {
    display: flex;
    flex-direction: column;
}

.terminal-box {
    flex: 1;
    background: #020202;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.term-header {
    padding: 10px;
    font-size: 9px;
    border-bottom: 1px solid #111;
    color: #333;
}

.term-body {
    flex: 1;
    padding: 15px;
    font-family: var(--mono);
    font-size: 12px;
    color: #888;
    overflow-y: auto;
    line-height: 1.5;
}

.line {
    margin-bottom: 3px;
}

.line.success {
    color: var(--success);
}

.line.warning {
    color: var(--accent);
}

.line.station {
    color: var(--success);
    font-weight: bold;
}

.line.core {
    color: var(--accent);
    font-weight: bold;
}

.line.stealth {
    color: #bf00ff;
}

/* MINI MAP WIDGET */
.mini-map {
    height: 180px;
    margin-bottom: 15px;
}

.map-area {
    flex: 1;
    position: relative;
    background: url('https://upload.wikimedia.org/wikipedia/commons/e/ec/World_map_blank_without_borders.svg') no-repeat center center;
    background-size: cover;
    filter: invert(1) brightness(0.2);
}

.proxy-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        opacity: 1;
    }
}

/* RESOURCE BARS */
.resource-info {
    padding: 15px;
}

.res-bar {
    margin-top: 15px;
}

.res-label {
    font-size: 10px;
    color: #555;
    margin-bottom: 5px;
}

.res-track {
    height: 2px;
    background: #111;
    border-radius: 2px;
}

.res-fill {
    height: 100%;
    background: var(--accent);
    transition: 0.5s;
    width: 0;
}

/* MODAL LAYER */
.modal-layer {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-window {
    width: 600px;
    background: #0a0a0a;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 1);
}

.modal-top {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-top span {
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.modal-body {
    padding: 20px;
    color: #ccc;
}

.close-modal {
    background: none;
    border: none;
    color: #444;
    font-size: 24px;
    cursor: pointer;
}

/* Icons Placeholder */
[class^="icon-"] {
    width: 1.2em;
    height: 1.2em;
    display: inline-block;
    border: 1px solid currentColor;
    border-radius: 2px;
}