/* ==========================================
   A220 Synoptic Pages - Styles
   ========================================== */

:root {
    /* Colors - Airbus ECAM */
    --color-green: #00ff00;
    --color-amber: #ffbf00;
    --color-red: #ff0000;
    --color-cyan: #00ffff;
    --color-white: #ffffff;
    --color-yellow: #ffff00;
    --color-light-gray: #aaaaaa;
    --color-dark-gray: #555555;
    
    /* UI Colors */
    --bg-primary: #0d0d1a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #252540;
    --bg-hover: #2d2d4a;
    --bg-active: #3d3d5c;
    --border-color: #3d3d5c;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #666680;
    --accent-primary: #4a9eff;
    --accent-hover: #6db3ff;
    --danger: #ff4757;
    --danger-hover: #ff6b7a;
    
    /* Sizing */
    --header-height: 56px;
    --sidebar-width: 280px;
    --toolbar-height: 44px;
    --panel-padding: 12px;
    --border-radius: 6px;
    --border-radius-sm: 4px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow: hidden;
    height: 100vh;
}

.hidden {
    display: none !important;
}

/* ==========================================
   Header
   ========================================== */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    padding: 0 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 100;
}

.header__left,
.header__right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mode-switch {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    padding: 4px;
    gap: 4px;
}

.mode-switch__btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--border-radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mode-switch__btn:hover {
    color: var(--text-primary);
}

.mode-switch__btn--active {
    background: var(--accent-primary);
    color: white;
}

.header__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--border-radius);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.header__btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.header__controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 12px;
}

.header__control-group {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-tertiary);
}

.header__label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.header__select {
    min-width: 140px;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.header__select:hover {
    border-color: var(--accent-primary);
}

.header__select:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-hover);
}

/* ==========================================
   View Mode
   ========================================== */

.view-mode {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: calc(100vh - var(--header-height));
    padding: 20px;
    background: var(--bg-primary);
    overflow: hidden;
}

.view-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    height: 100%;
    max-height: 100%;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: #000;
    overflow: hidden;
    width: fit-content;
    margin: 0 auto;
}

.synoptic-display {
    background: #000;
    border: none;
    border-radius: 0;
    overflow: hidden;
    aspect-ratio: 0.7 / 1;
    height: calc(100vh - var(--header-height) - 40px);
    max-height: calc(100vh - var(--header-height) - 40px);
    width: auto;
    flex-shrink: 0;
    position: relative;
}

.synoptic-display:first-of-type::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #666666;
    z-index: 10;
}

.synoptic-display svg {
    display: block;
    width: 100%;
    height: 100%;
}

.view-controls {
    display: flex;
    gap: 20px;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.view-controls__row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-controls__label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.view-controls__select {
    min-width: 180px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
}

.view-controls__select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* ==========================================
   Edit Mode Layout
   ========================================== */

.edit-mode {
    display: flex;
    height: calc(100vh - var(--header-height));
}

/* ==========================================
   Sidebar
   ========================================== */

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-color: var(--border-color);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar--left {
    border-right: 1px solid var(--border-color);
}

.sidebar--right {
    border-left: 1px solid var(--border-color);
}

/* ==========================================
   Panels
   ========================================== */

.panel {
    border-bottom: 1px solid var(--border-color);
}

.panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px var(--panel-padding);
    background: var(--bg-tertiary);
}

.panel__header--clickable {
    cursor: pointer;
    user-select: none;
}

.panel__header--clickable:hover {
    background: var(--bg-hover);
}

.panel__title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.panel__chevron {
    transition: transform var(--transition-fast);
}

.panel__chevron.rotated {
    transform: rotate(180deg);
}

.panel__content {
    padding: var(--panel-padding);
}

.panel__content--collapsed {
    display: none;
}

/* ==========================================
   Tool Grid
   ========================================== */

.tool-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.tool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tool-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.tool-btn--active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* ==========================================
   Colors Panel
   ========================================== */

.color-section {
    margin-bottom: 12px;
}

.color-section:last-child {
    margin-bottom: 0;
}

.color-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.color-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-input {
    width: 40px;
    height: 30px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: transparent;
    cursor: pointer;
    padding: 2px;
}

.color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input {
    cursor: pointer;
}

.color-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

/* Gradient Editor */
.gradient-editor {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    padding: 10px;
    margin-bottom: 12px;
}

.gradient-preview-container {
    position: relative;
    margin-bottom: 12px;
}

.gradient-preview {
    height: 30px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    background: linear-gradient(90deg, #00ff00 0%, #ff0000 100%);
}

.gradient-stops {
    position: relative;
    height: 20px;
    margin-top: 4px;
}

.gradient-stop {
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid var(--text-primary);
    border-radius: 50%;
    cursor: pointer;
    transform: translateX(-50%);
    top: 4px;
    transition: transform var(--transition-fast);
}

.gradient-stop:hover {
    transform: translateX(-50%) scale(1.2);
}

.gradient-stop.active {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-primary);
}

.btn--small {
    padding: 4px 10px;
    font-size: 14px;
    font-weight: bold;
    min-width: 28px;
}

.color-preset {
    width: 28px;
    height: 28px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.color-preset:hover {
    transform: scale(1.1);
    border-color: var(--text-primary);
}

.range-input {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background: var(--bg-tertiary);
    border-radius: 2px;
    cursor: pointer;
}

.range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
}

.range-value {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 40px;
    text-align: right;
}

.panel-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
}

.panel-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* ==========================================
   Symbols Library
   ========================================== */

.symbols-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.symbols-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.symbols-empty {
    grid-column: 1 / -1;
    padding: 10px;
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 12px;
    text-align: center;
}

.symbol-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: grab;
    transition: all var(--transition-fast);
}

.symbol-item__actions {
    position: absolute;
    top: 6px;
    right: 6px;
    display: none;
    gap: 6px;
    z-index: 2;
}

.symbol-item:hover .symbol-item__actions {
    display: flex;
}

.symbol-action {
    width: 22px;
    height: 22px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 20px;
    cursor: pointer;
}

.symbol-action:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.symbol-item:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.symbol-item:active {
    cursor: grabbing;
}

.symbol-item svg {
    width: 40px;
    height: 40px;
}

.symbol-item span {
    font-size: 10px;
    color: var(--text-secondary);
    text-align: center;
}

/* ==========================================
   Editor Main Area
   ========================================== */

.editor-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-primary);
}

/* ==========================================
   Toolbar
   ========================================== */

.toolbar {
    display: flex;
    align-items: center;
    height: var(--toolbar-height);
    padding: 0 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    gap: 4px;
}

.toolbar__group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.toolbar__divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 8px;
}

.toolbar__spacer {
    flex: 1;
}

.toolbar__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    min-width: 32px;
    padding: 0 8px;
    border: none;
    border-radius: var(--border-radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.toolbar__btn:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.toolbar__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.toolbar__btn--primary {
    background: var(--accent-primary);
    color: white;
}

.toolbar__btn--primary:hover:not(:disabled) {
    background: var(--accent-hover);
    color: white;
}

.toolbar__checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

.toolbar__checkbox input {
    cursor: pointer;
}

.toolbar__input {
    width: 50px;
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 12px;
    text-align: center;
}

.toolbar__input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.toolbar__zoom {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 50px;
    text-align: center;
}

/* ==========================================
   Canvas Container
   ========================================== */

.canvas-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
}

.canvas-wrapper {
    position: relative;
    transform-origin: center center;
}

.editor-canvas {
    display: block;
    width: 672px;
    height: 960px;
    background: #000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    cursor: crosshair;
}

/* Ensure SVG elements are clickable */
.editor-canvas .layer > * {
    cursor: pointer;
    pointer-events: all;
}

.editor-canvas .layer path,
.editor-canvas .layer line {
    pointer-events: stroke;
}

.editor-canvas .layer rect,
.editor-canvas .layer ellipse,
.editor-canvas .layer circle,
.editor-canvas .layer text {
    pointer-events: all;
}

/* Symbol groups - ensure all nested content is clickable */
.editor-canvas .layer g {
    pointer-events: all;
}

.editor-canvas .layer g * {
    pointer-events: all;
    cursor: pointer;
}

/* Selection overlay and drawing preview should not block clicks */
#selectionOverlay {
    pointer-events: none;
}

#selectionOverlay .selection-handle {
    pointer-events: all;
    cursor: pointer;
}

#drawingPreview {
    pointer-events: none;
}

/* Grid should not block clicks on elements */
#gridOverlay {
    pointer-events: none;
}

.editor-canvas.panning {
    cursor: grab;
}

.editor-canvas.panning:active {
    cursor: grabbing;
}

/* ==========================================
   Layers Panel
   ========================================== */

.layers-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.layer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--bg-tertiary);
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.layer-item:hover {
    background: var(--bg-hover);
}

.layer-item--active {
    border-color: var(--accent-primary);
    background: var(--bg-active);
}

.layer-visibility,
.layer-lock {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: var(--border-radius-sm);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.layer-visibility:hover,
.layer-lock:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.layer-visibility[data-visible="false"],
.layer-lock[data-locked="true"] {
    color: var(--text-muted);
}

.layer-name {
    flex: 1;
    font-size: 13px;
}

/* ==========================================
   Scenario Controls
   ========================================== */

.scenario-section {
    margin-bottom: 12px;
}

.scenario-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.panel-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 13px;
}

.panel-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.scenario-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.panel-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.panel-btn:hover {
    background: var(--bg-hover);
}

.panel-btn--primary {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.panel-btn--primary:hover {
    background: var(--accent-hover);
}

.panel-btn--danger {
    color: var(--danger);
    border-color: var(--danger);
}

.panel-btn--danger:hover {
    background: var(--danger);
    color: white;
}

.panel-btn--small {
    flex: none;
    padding: 6px 10px;
    font-size: 12px;
}

.background-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bg-opacity-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.bg-opacity-row .range-input {
    flex: 1;
}

/* Background Transform Controls */
.bg-transform-controls {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.bg-transform-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.bg-transform-row label {
    min-width: 16px;
}

.bg-transform-row .panel-input--small {
    width: 55px;
    padding: 3px 6px;
    font-size: 11px;
}

.bg-transform-row .checkbox-label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    flex: 1;
}

.bg-transform-row .checkbox-label input {
    cursor: pointer;
}

.panel-btn--tiny {
    padding: 2px 6px;
    font-size: 10px;
}

/* Background Resize Handles */
.bg-resize-handle {
    pointer-events: all;
}

.bg-resize-handle:hover {
    fill: #fff;
    stroke: #00bfff;
    stroke-width: 2;
}

/* Curve Tool Handles */
.curve-handles .curve-handle,
.curve-edit-handles .curve-edit-handle {
    cursor: move;
    pointer-events: all;
}

.curve-handles .curve-handle:hover,
.curve-edit-handles .curve-edit-handle:hover {
    filter: brightness(1.3);
}

.curve-handles .curve-handle[data-point-index="0"][data-handle-type="main"] {
    cursor: pointer;
}

/* ==========================================
   Inspector Panel
   ========================================== */

.inspector-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

.inspector-properties {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.inspector-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inspector-row label {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 20px;
}

.inspector-input {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 12px;
    text-align: center;
}

.inspector-input--wide {
    width: 100px;
}

.inspector-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.inspector-select {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 12px;
}

/* ==========================================
   Preview Overlay
   ========================================== */

.preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    font-size: 16px;
    font-weight: 500;
}

.preview-close {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.preview-close:hover {
    background: var(--bg-hover);
}

.preview-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.preview-container svg {
    background: #000;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    aspect-ratio: 0.7 / 1;
    height: calc(100vh - 120px);
    max-height: calc(100vh - 120px);
    width: auto;
}

/* ==========================================
   Modals
   ========================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
}

.modal__content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    min-width: 320px;
}

.modal__title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.modal__row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.modal__row label {
    font-size: 14px;
    color: var(--text-secondary);
    min-width: 80px;
}

.modal__input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 14px;
}

.modal__input--small {
    flex: none;
    width: 80px;
}

.modal__input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.modal__select {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 14px;
}

.modal__buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.modal__btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal__btn--cancel {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal__btn--cancel:hover {
    background: var(--bg-hover);
}

.modal__btn--confirm {
    background: var(--accent-primary);
    color: white;
}

.modal__btn--confirm:hover {
    background: var(--accent-hover);
}

/* ==========================================
   Toast Notifications
   ========================================== */

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 14px;
    z-index: 1200;
    animation: toastIn 0.3s ease;
}

.toast--success {
    border-color: var(--color-green);
}

.toast--error {
    border-color: var(--danger);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ==========================================
   Selection Handles
   ========================================== */

.selection-box {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 1;
    stroke-dasharray: 4 2;
    pointer-events: none;
}

.selection-handle {
    fill: white;
    stroke: var(--accent-primary);
    stroke-width: 1;
    cursor: pointer;
}

.selection-handle--nw { cursor: nw-resize; }
.selection-handle--n { cursor: n-resize; }
.selection-handle--ne { cursor: ne-resize; }
.selection-handle--e { cursor: e-resize; }
.selection-handle--se { cursor: se-resize; }
.selection-handle--s { cursor: s-resize; }
.selection-handle--sw { cursor: sw-resize; }
.selection-handle--w { cursor: w-resize; }

.group-indicator {
    fill: none;
    stroke: var(--color-cyan);
    stroke-width: 2;
    stroke-dasharray: 6 3;
    pointer-events: none;
}

/* ==========================================
   Link Areas in Editor
   ========================================== */

.link-area {
    fill: rgba(74, 158, 255, 0.2);
    stroke: var(--accent-primary);
    stroke-width: 1;
    stroke-dasharray: 4 2;
}

.link-area:hover {
    fill: rgba(74, 158, 255, 0.4);
}

/* ==========================================
   Fullscreen Mode
   ========================================== */

body.fullscreen .header {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    transform: translateY(calc(-1 * (var(--header-height) - 10px)));
    transition: transform var(--transition-normal);
}

body.fullscreen .header:hover,
body.fullscreen .header:focus-within {
    transform: translateY(0);
}

/* Small hover handle area on the top edge */
body.fullscreen .header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 10px;
}

body.fullscreen .view-mode {
    height: 100vh;
    padding: 10px;
}

body.fullscreen .synoptic-display {
    height: calc(100vh - 80px);
    max-height: calc(100vh - 80px);
}

/* ==========================================
   Scrollbar Styling
   ========================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-active);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ==========================================
   Responsive Adjustments
   ========================================== */

@media (max-width: 1200px) {
    .sidebar {
        width: 240px;
    }
}

@media (max-width: 900px) {
    .sidebar--left {
        display: none;
    }
    
    .sidebar--right {
        width: 260px;
    }
}


/* ==========================================
   OHP (Overhead Panel) - Header Button
   ========================================== */

.ohp-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ohp-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.ohp-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

/* ==========================================
   OHP Overlay Mode
   ========================================== */

.ohp-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ohp-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

.ohp-overlay__panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 95vw;
    height: 95vh;
    max-width: none;
    max-height: 95vh;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.ohp-overlay__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.ohp-overlay__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.ohp-overlay__actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ohp-overlay__action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ohp-overlay__action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.ohp-overlay__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ohp-overlay__close:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.ohp-overlay__body {
    flex: 1;
    overflow: auto;
    padding: 0;
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: center;
    min-height: 0;
}

.ohp-overlay__footer {
    padding: 8px 14px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    font-size: 12px;
    color: var(--text-muted);
}

.ohp-match-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.ohp-match-status.matched {
    color: var(--color-green);
}

.ohp-match-status.unmatched {
    color: var(--color-amber);
}

/* ==========================================
   OHP Docked Mode
   ========================================== */

.view-mode.ohp-docked-active {
    flex-direction: row;
}

.ohp-docked {
    display: flex;
    flex-direction: column;
    width: 280px;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border-right: 2px solid var(--accent-primary);
    overflow: hidden;
}

.ohp-docked__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.ohp-docked__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.ohp-docked__actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ohp-docked__action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ohp-docked__action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.ohp-docked__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ohp-docked__close:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.ohp-docked__body {
    flex: 1;
    overflow: auto;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ohp-docked__footer {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    font-size: 11px;
    color: var(--text-muted);
}

/* ==========================================
   SVG Container
   ========================================== */

.ohp-svg-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    line-height: 0;
}

.ohp-svg-container svg {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.ohp-control-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ohp-control-overlay svg {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}

/* ==========================================
   Control Hotspots
   ========================================== */

.ohp-hotspot {
    position: absolute;
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    transition: all var(--transition-fast);
    pointer-events: all;
}

.ohp-hotspot:hover {
    background: rgba(74, 158, 255, 0.15);
    border-color: rgba(74, 158, 255, 0.6);
}

.ohp-hotspot.active {
    background: rgba(74, 158, 255, 0.25);
    border-color: var(--accent-primary);
}

.ohp-hotspot__indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
}

.ohp-hotspot__backlight {
    position: absolute;
    inset: 0;
    border-radius: 3px;
    opacity: 0.7;
    pointer-events: none;
}

.ohp-hotspot__backlight--green {
    box-shadow: inset 0 0 6px var(--color-green);
}

.ohp-hotspot__backlight--amber {
    box-shadow: inset 0 0 6px var(--color-amber);
}

.ohp-hotspot__backlight--red {
    box-shadow: inset 0 0 6px var(--color-red);
}

.ohp-hotspot__backlight--cyan {
    box-shadow: inset 0 0 6px var(--color-cyan);
}

/* ==========================================
   Control Editor Toolbar
   ========================================== */

.ohp-editor-toolbar {
    position: fixed;
    top: calc(var(--header-height) + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1010;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.ohp-editor-toolbar__btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.ohp-editor-toolbar__btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.ohp-editor-toolbar__btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

.ohp-editor-toolbar__btn--save {
    background: var(--color-green);
    border-color: var(--color-green);
    color: #000;
    font-weight: 600;
}

.ohp-editor-toolbar__btn--save:hover {
    opacity: 0.85;
    background: var(--color-green);
    border-color: var(--color-green);
    color: #000;
}

.ohp-editor-toolbar__sep {
    width: 1px;
    height: 20px;
    background: var(--border-color);
    margin: 0 2px;
}

/* ==========================================
   Editor Properties Panel
   ========================================== */

.ohp-editor-panel {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: 270px;
    height: calc(100vh - var(--header-height));
    z-index: 1010;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    overflow: hidden;
}

.ohp-editor-panel__header {
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
}

/* ==========================================
   Editor Hotspot States
   ========================================== */

.ohp-hotspot.editing {
    pointer-events: all;
    cursor: move;
}

.ohp-hotspot.editing:hover {
    background: rgba(74, 158, 255, 0.2);
    border-color: var(--accent-primary);
}

.ohp-hotspot.selected {
    background: rgba(74, 158, 255, 0.3);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.4);
}

.ohp-hotspot__label {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 2px 6px;
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
    pointer-events: none;
    z-index: 1;
}

.ohp-hotspot.drawing {
    cursor: crosshair;
}

/* ==========================================
   Scenario Conditions Editor
   ========================================== */

.conditions-section {
    padding: 10px 0;
}

.conditions-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    margin-bottom: 6px;
}

.conditions-section__title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.conditions-section__count {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 1px 6px;
    border-radius: var(--border-radius-sm);
}

.condition-row {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    margin: 0 10px 6px;
    overflow: hidden;
}

.condition-row__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: var(--bg-primary);
    font-size: 11px;
    color: var(--text-muted);
}

.condition-row__inputs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    flex-wrap: wrap;
}

.condition-row__select {
    flex: 1;
    min-width: 80px;
    padding: 4px 6px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 12px;
    outline: none;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.condition-row__select:hover,
.condition-row__select:focus {
    border-color: var(--accent-primary);
}

.condition-add {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    margin: 4px 10px;
    background: transparent;
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    width: calc(100% - 20px);
    transition: all var(--transition-fast);
}

.condition-add:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(74, 158, 255, 0.05);
}

.conditions-priority {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    font-size: 12px;
    color: var(--text-muted);
}

.conditions-match-preview {
    margin: 6px 10px;
    padding: 8px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 11px;
    color: var(--text-muted);
}

.conditions-match-preview.match {
    border-color: var(--color-green);
    color: var(--color-green);
}

.conditions-match-preview.no-match {
    border-color: var(--color-amber);
    color: var(--color-amber);
}

/* ==========================================
   Mapping Overview Modal
   ========================================== */

.mapping-overview {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mapping-overview__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

.mapping-overview__modal {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 90vw;
    max-width: 700px;
    max-height: 80vh;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.mapping-overview__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.mapping-overview__body {
    flex: 1;
    overflow: auto;
    padding: 12px;
}

.mapping-overview__footer {
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.mapping-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.mapping-table th {
    text-align: left;
    padding: 6px 10px;
    background: var(--bg-primary);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 11px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1;
}

.mapping-table td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    vertical-align: middle;
}

.mapping-table tr:last-child td {
    border-bottom: none;
}

.mapping-table tr:hover td {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* ==========================================
   OHP SVG Editor
   ========================================== */

.ohp-svgedit {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}
.ohp-svgedit__toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.ohp-svgedit__btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: var(--border-radius-sm);
    font-size: 11px;
    cursor: pointer;
}
.ohp-svgedit__btn:hover { background: var(--bg-primary); color: #fff; }
.ohp-svgedit__btn.active { background: var(--accent-primary); color: #fff; }
.ohp-svgedit__btn--save { color: var(--color-green); font-weight: 600; }
.ohp-svgedit__sep { width: 1px; height: 20px; background: var(--border-color); }
.ohp-svgedit__zoom-label { font-size: 11px; color: var(--text-secondary); }
.ohp-svgedit__body {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
}
.ohp-svgedit__canvas {
    flex: 1;
    overflow: auto;
    position: relative;
    cursor: default;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ohp-svgedit__canvas svg { transform-origin: 0 0; }
.ohp-svgedit__props {
    width: 260px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
}
.ohp-svgedit__props-header {
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-primary);
    border-bottom: 1px solid var(--border-color);
}
.svgedit-prop-row {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border-bottom: 1px solid var(--bg-primary);
    gap: 8px;
}
.svgedit-prop-row label {
    color: var(--text-muted);
    font-size: 10px;
    min-width: 55px;
    text-transform: uppercase;
}
.svgedit-prop-row input[type="text"],
.svgedit-prop-row input[type="number"] {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 3px 6px;
    border-radius: var(--border-radius-sm);
    font-size: 11px;
    box-sizing: border-box;
}
.svgedit-prop-row input[type="color"] {
    width: 28px;
    height: 22px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
}
.svgedit-prop-row input[type="range"] { flex: 1; }
.svgedit-prop-row .prop-value { color: #fff; min-width: 30px; text-align: right; }

/* ==========================================
   OHP Visual Template Editor
   ========================================== */

.ohp-visedit {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}
.ohp-visedit__toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    flex-wrap: wrap;
}
.ohp-visedit__btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: var(--border-radius-sm);
    font-size: 11px;
    cursor: pointer;
}
.ohp-visedit__btn:hover { background: var(--bg-primary); }
.ohp-visedit__btn.active { background: var(--accent-primary); color: #fff; }
.ohp-visedit__btn--save { color: var(--color-green); font-weight: 600; }
.ohp-visedit__sep { width: 1px; height: 20px; background: var(--border-color); }
.ohp-visedit__color-label { font-size: 10px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.ohp-visedit__color-label input[type="color"] { width: 24px; height: 20px; border: 1px solid var(--border-color); border-radius: 3px; padding: 0; cursor: pointer; }
.ohp-visedit__body {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
}
.ohp-visedit__sidebar {
    width: 220px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 10px;
    overflow-y: auto;
    flex-shrink: 0;
}
.ohp-visedit__sidebar-header {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
}
.ohp-visedit__type-select {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 5px 6px;
    border-radius: var(--border-radius-sm);
    font-size: 11px;
}
.ohp-visedit__state-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ohp-visedit__state-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: var(--border-radius-sm);
    font-size: 11px;
    cursor: pointer;
    text-align: left;
}
.ohp-visedit__state-btn:hover { border-color: var(--accent-primary); }
.ohp-visedit__state-btn.active { background: var(--accent-primary); color: #fff; border-color: var(--accent-primary); }
.ohp-visedit__preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}
.ohp-visedit__preview-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 4px;
    text-align: center;
    min-width: 60px;
}
.ohp-visedit__preview-item svg { display: block; margin: 0 auto; }
.ohp-visedit__preview-label { font-size: 8px; color: var(--text-muted); margin-top: 2px; }
.ohp-visedit__canvas-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #222;
}
.ohp-visedit__canvas-info {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(0,0,0,0.5);
    padding: 3px 10px;
    border-radius: var(--border-radius-sm);
    z-index: 1;
}
.ohp-visedit__canvas {
    width: 300px;
    height: 450px;
    background: #333;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
}
.ohp-visedit__canvas svg {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}
.ohp-visedit__props {
    width: 220px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    overflow-y: auto;
    flex-shrink: 0;
}
.ohp-visedit__props-header {
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-primary);
    border-bottom: 1px solid var(--border-color);
}
.ohp-visedit__props-body { font-size: 11px; }
