* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: #111827;
    color: #e5e7eb;
}

.topbar {
    height: 64px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0b1220;
    border-bottom: 1px solid #273244;
}

.topbar h1 {
    margin: 0;
    font-size: 19px;
}

.topbar span {
    font-size: 12px;
    color: #94a3b8;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
}

.workspace {
    height: calc(100vh - 64px);
    display: grid;
    grid-template-columns: 220px 1fr 330px;
}

.sidebar,
.tools-panel {
    background: #111827;
    padding: 14px;
    overflow-y: auto;
}

.sidebar {
    border-right: 1px solid #273244;
}

.tools-panel {
    border-left: 1px solid #273244;
}

.panel {
    margin-bottom: 22px;
}

.panel h2,
.tool-view h2 {
    margin-top: 0;
    font-size: 15px;
}

.tool-btn {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 7px;
    border: 1px solid #334155;
    border-radius: 6px;
    background: #1e293b;
    color: #e5e7eb;
    text-align: left;
    cursor: pointer;
}

.tool-btn:hover {
    background: #263449;
}

.system-row {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    font-size: 13px;
    color: #94a3b8;
}

.online {
    color: #22c55e;
}

.map-area {
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

.map-overlay {
    position: absolute;
    z-index: 1000;
    top: 14px;
    left: 14px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 10px 12px;
}

.map-overlay strong {
    display: block;
    font-size: 13px;
}

.map-overlay span {
    font-size: 11px;
    color: #94a3b8;
}

.tool-view {
    display: none;
}

.tool-view.active {
    display: block;
}

label {
    display: block;
    margin-top: 12px;
    margin-bottom: 5px;
    font-size: 12px;
    color: #94a3b8;
}

input,
textarea {
    width: 100%;
    padding: 9px;
    border: 1px solid #334155;
    border-radius: 5px;
    background: #0f172a;
    color: #e5e7eb;
}

textarea {
    min-height: 100px;
    resize: vertical;
    font-family: monospace;
    font-size: 12px;
}

button {
    margin-top: 12px;
    padding: 9px 14px;
    border: 0;
    border-radius: 5px;
    background: #2563eb;
    color: white;
    cursor: pointer;
}

button:hover {
    background: #1d4ed8;
}

pre {
    white-space: pre-wrap;
    word-break: break-word;
    margin-top: 14px;
    padding: 10px;
    border-radius: 5px;
    background: #020617;
    color: #cbd5e1;
    font-size: 11px;
}

@media (max-width: 1000px) {
    .workspace {
        grid-template-columns: 180px 1fr;
    }

    .tools-panel {
        display: none;
    }
}
