:root {
    --sidebar-bg: #2c3e50;
    --panel-bg: #34495e;
    --accent: #3498db;
    --accent-hover: #2980b9;
    --muted: #95a5a6;
    --danger: #e74c3c;
    --success: #27ae60;
    --warn: #f1c40f;
    --warn-stroke: #f39c12;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    height: 100vh;
    background-color: #f8f9fa;
}

#sidebar {
    width: 360px;
    background-color: var(--sidebar-bg);
    color: white;
    padding: 16px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}

#visualization {
    flex-grow: 1;
    position: relative;
    background-color: white;
}

h2 { margin: 0; font-size: 1.45rem; }
h3 { margin: 0 0 8px 0; font-size: 1rem; border-bottom: 1px solid #7f8c8d; padding-bottom: 4px; }

.panel {
    background-color: var(--panel-bg);
    padding: 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dashboard-item { font-size: 0.88rem; }
.dashboard-value { font-weight: bold; color: var(--accent); }

.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.82rem;
}

.field input, .field select, .field textarea {
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid #1f2d3a;
    background: #ecf0f1;
    color: #2c3e50;
    font-size: 0.88rem;
    font-family: inherit;
}

.field textarea { min-height: 60px; resize: vertical; }

.inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

button {
    padding: 8px;
    border: none;
    border-radius: 5px;
    background-color: var(--accent);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.88rem;
}

button:hover:not(:disabled) { background-color: var(--accent-hover); }
button:disabled { background-color: #7f8c8d; cursor: not-allowed; }
.btn-secondary { background-color: var(--muted); }

.button-row { display: flex; gap: 8px; }
.button-row button { flex: 1; }

details {
    background: rgba(0,0,0,0.15);
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 0.82rem;
}

details summary {
    cursor: pointer;
    font-weight: bold;
}

.trans-editor {
    margin-top: 6px;
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
    font-size: 0.78rem;
}

.trans-degree-sep {
    color: #ecf0f1;
    font-weight: bold;
    margin-top: 6px;
    border-bottom: 1px dashed #7f8c8d;
}

.trans-row {
    display: grid;
    grid-template-columns: 90px 12px 60px 1fr;
    gap: 4px;
    align-items: center;
}

.trans-input { color: #ecf0f1; }

.trans-row select,
.trans-row input {
    padding: 3px 4px;
    border-radius: 3px;
    border: 1px solid #1f2d3a;
    background: #ecf0f1;
    color: #2c3e50;
    font-size: 0.78rem;
    font-family: inherit;
}

.trans-port { width: 50px; }

code {
    background: rgba(0,0,0,0.25);
    padding: 1px 4px;
    border-radius: 3px;
    font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
}

.legend {
    font-size: 0.78rem;
    color: #bdc3c7;
    line-height: 1.45;
    margin: 0;
}
