body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    margin: 0;
    padding: 0;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 250px;
    background: #252525;
    border-right: 2px solid #333;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #444;
}

.map-item {
    padding: 12px 20px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
}

.map-item:hover {
    background: #333;
}

.map-item.active {
    background: #007bff;
    color: white;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-editor {
    flex: 1;
    padding: 20px;
    overflow: auto;
    border-bottom: 2px solid #333;
}

.bottom-viz {
    height: 400px;
    background: #111;
    padding: 10px;
}

.upload-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.upload-card {
    background: #252525;
    padding: 40px;
    border-radius: 12px;
    width: 400px;
    text-align: center;
}

table {
    border-collapse: collapse;
    user-select: none;
}

td {
    border: 1px solid #444;
    padding: 0;
}

td input {
    width: 70px;
    background: transparent;
    color: #0f0;
    border: none;
    padding: 8px;
    text-align: center;
    font-family: monospace;
    outline: none;
}

td.selected {
    background: rgba(0, 123, 255, 0.4);
}

td.selected input {
    background: rgba(0, 123, 255, 0.2);
}

.context-menu {
    position: absolute;
    background: #333;
    border: 1px solid #555;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    z-index: 2000;
    width: 180px;
}

.context-menu-item {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 13px;
}

.context-menu-item:hover {
    background: #007bff;
}

.hidden { display: none !important; }

.btn-bar {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

button {
    background: #444;
    color: white;
    border: 1px solid #555;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

button:hover { background: #555; }
button.primary { background: #007bff; border-color: #0056b3; }
button.success { background: #28a745; border-color: #1e7e34; }
