/* Professional Image Editor Styles — Phase 2 */

/* ─── Editor Layout ─── */
.editor-container {
    display: grid;
    grid-template-columns: 220px 1fr 280px;
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas:
        "toolbar   toolbar   toolbar"
        "filetabs  filetabs  filetabs"
        "left      canvas    right"
        "export    export    export";
    height: calc(100vh - 120px);
    max-width: 100%;
    overflow: hidden;
}

/* ─── Toolbar ─── */
.editor-toolbar {
    grid-area: toolbar;
    display: flex; align-items: center; gap: 4px;
    padding: 6px 12px;
    background: var(--bg-secondary); border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.toolbar-group {
    display: flex; align-items: center; gap: 2px;
    padding: 0 6px;
    border-right: 1px solid var(--border);
}
.toolbar-group:last-child { border-right: none; }
.tool-btn {
    width: 32px; height: 32px; border: 1px solid transparent; background: transparent;
    color: var(--text-secondary); border-radius: var(--radius-xs); cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 14px;
    transition: var(--transition); position: relative;
}
.tool-btn svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.tool-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border); }
.tool-btn.active { background: var(--accent-subtle); color: var(--accent); border-color: var(--accent); }
.tool-btn[title]::after {
    content: attr(title); position: absolute; bottom: -26px; left: 50%;
    transform: translateX(-50%); padding: 2px 6px; background: var(--bg-primary);
    border: 1px solid var(--border); border-radius: 4px; font-size: 9px;
    white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.15s;
    color: var(--text-secondary); z-index: 20;
}
.tool-btn:hover[title]::after { opacity: 1; }
.tool-btn .shortcut {
    position: absolute; bottom: 1px; right: 2px; font-size: 7px;
    color: var(--text-muted); font-weight: 700; font-family: var(--font-mono);
}
.toolbar-sep { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }
.toolbar-label { font-size: 10px; color: var(--text-muted); margin: 0 4px; font-weight: 600; }

/* Tool options inline */
.tool-options {
    display: flex; align-items: center; gap: 6px; margin-left: 8px;
    padding-left: 8px; border-left: 1px solid var(--border);
}
.tool-opt-input {
    width: 50px; padding: 3px 6px; border: 1px solid var(--border);
    background: var(--bg-tertiary); color: var(--text-primary);
    border-radius: 4px; font-size: 11px; font-family: var(--font-mono); text-align: center;
}
.tool-opt-color {
    width: 28px; height: 28px; border: 2px solid var(--border); border-radius: 4px;
    cursor: pointer; padding: 0; background: none;
}
.tool-opt-color::-webkit-color-swatch-wrapper { padding: 0; }
.tool-opt-color::-webkit-color-swatch { border: none; border-radius: 2px; }

/* ─── Left Panel (Layers + Colors) ─── */
.editor-left {
    grid-area: left;
    background: var(--bg-secondary); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden;
    min-height: 0;
}
.panel-section {
    border-bottom: 1px solid var(--border);
}
.panel-header {
    padding: 8px 12px; font-size: 10px; font-weight: 700;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; user-select: none;
}
.panel-header:hover { color: var(--text-secondary); }
.panel-body { padding: 8px 10px; }

/* Layers */
.layer-list { display: flex; flex-direction: column; gap: 2px; }
.layer-item {
    display: flex; align-items: center; gap: 6px; padding: 5px 8px;
    border: 1px solid transparent; border-radius: var(--radius-xs);
    cursor: pointer; font-size: 11px; transition: var(--transition);
}
.layer-item:hover { background: var(--bg-hover); }
.layer-item.active { background: var(--accent-subtle); border-color: var(--accent); }
.layer-thumb {
    width: 28px; height: 28px; border-radius: 3px; background: var(--bg-tertiary);
    border: 1px solid var(--border); overflow: hidden; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.layer-thumb img { width: 100%; height: 100%; object-fit: cover; }
.layer-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.layer-vis {
    width: 20px; height: 20px; border: none; background: transparent;
    color: var(--text-muted); cursor: pointer; font-size: 11px;
    display: flex; align-items: center; justify-content: center; border-radius: 3px;
    opacity: 0.6;
}
.layer-vis:hover { opacity: 1; background: var(--bg-hover); }
.layer-vis.hidden-layer { opacity: 0.3; }

/* Color Palette */
.color-palette {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
}
.color-swatch-item {
    aspect-ratio: 1; border-radius: var(--radius-xs); cursor: pointer;
    border: 2px solid transparent; transition: var(--transition);
    position: relative;
}
.color-swatch-item:hover { border-color: var(--text-primary); transform: scale(1.1); }
.color-swatch-item .color-pct {
    position: absolute; bottom: 1px; right: 2px; font-size: 7px;
    color: white; text-shadow: 0 1px 2px rgba(0,0,0,0.8); font-weight: 700;
}

/* Color analysis */
.color-analysis {
    display: flex; flex-direction: column; gap: 4px; margin-top: 6px;
}
.color-stat {
    display: flex; justify-content: space-between; font-size: 10px;
    padding: 3px 6px; background: var(--bg-tertiary); border-radius: 3px;
}
.color-stat-label { color: var(--text-muted); }
.color-stat-value { color: var(--text-primary); font-weight: 600; font-family: var(--font-mono); }

/* Text detection results */
.text-results { font-size: 11px; }
.text-result-line {
    padding: 4px 8px; margin: 2px 0; background: var(--bg-tertiary);
    border-radius: 3px; border-left: 3px solid var(--accent);
    font-family: var(--font-mono);
}

/* Start panel (upload + recent files) */
.editor-start-panel {
    display: flex; flex-direction: column; align-items: center;
    max-width: 560px; width: 90%;
}
.editor-start-panel .editor-upload-zone {
    width: 100%;
}

/* Recent file list (start screen) */
.recent-file-list {
    display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto;
    width: 100%;
}
.recent-file-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); transition: var(--transition); cursor: pointer;
}
.recent-file-item:hover { border-color: var(--accent); background: var(--bg-hover); }
.recent-file-item.active { border-color: var(--accent); background: var(--accent-subtle); }
.recent-file-thumb {
    width: 44px; height: 44px; border-radius: 6px; overflow: hidden;
    background: var(--bg-tertiary); flex-shrink: 0; border: 1px solid var(--border);
}
.recent-file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recent-file-info { flex: 1; min-width: 0; }
.recent-file-name {
    font-size: 13px; font-weight: 600; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.recent-file-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.recent-file-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* Sidebar file list (compact, in left panel) */
.sidebar-file-list {
    display: flex; flex-direction: column; gap: 3px; max-height: 200px; overflow-y: auto;
}
.sidebar-file-item {
    display: flex; align-items: center; gap: 6px; padding: 5px 7px;
    border: 1px solid transparent; border-radius: var(--radius-xs);
    cursor: pointer; font-size: 11px; transition: var(--transition);
}
.sidebar-file-item:hover { background: var(--bg-hover); border-color: var(--border); }
.sidebar-file-item.active { background: var(--accent-subtle); border-color: var(--accent); }
.sidebar-file-thumb {
    width: 26px; height: 26px; border-radius: 4px; overflow: hidden;
    background: var(--bg-tertiary); flex-shrink: 0;
}
.sidebar-file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-file-name {
    flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; font-weight: 500; color: var(--text-primary);
}
.sidebar-file-size { font-size: 9px; color: var(--text-muted); font-family: var(--font-mono); }
.sidebar-file-del {
    width: 18px; height: 18px; border: none; background: transparent;
    color: var(--text-muted); cursor: pointer; border-radius: 3px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; opacity: 0; transition: var(--transition);
}
.sidebar-file-item:hover .sidebar-file-del { opacity: 1; }
.sidebar-file-del:hover { color: var(--danger); background: var(--danger-bg); }

/* Shortcuts panel */
.shortcut-list { display: flex; flex-direction: column; gap: 1px; }
.sc-group-label {
    font-size: 9px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 0;
}
.sc-row {
    display: flex; align-items: center; gap: 8px; padding: 2px 0;
    font-size: 11px;
}
.sc-key {
    display: inline-block; min-width: 54px;
    padding: 1px 6px; background: var(--bg-tertiary); border: 1px solid var(--border);
    border-radius: 4px; font-family: var(--font-mono); font-size: 10px;
    font-weight: 600; color: var(--text-secondary); text-align: center;
}
.sc-desc { color: var(--text-muted); font-size: 11px; }

/* ─── File Tabs ─── */
.editor-file-tabs {
    grid-area: filetabs;
    display: flex; align-items: center;
    background: var(--bg-secondary); border-bottom: 1px solid var(--border);
    min-height: 34px; overflow: hidden;
}
.file-tabs-scroll {
    display: flex; gap: 2px; flex: 1; overflow-x: auto; padding: 4px 6px;
    scrollbar-width: none;
}
.file-tabs-scroll::-webkit-scrollbar { display: none; }
.file-tab {
    display: flex; align-items: center; gap: 6px; padding: 5px 12px;
    background: var(--bg-tertiary); border: 1px solid var(--border);
    border-radius: var(--radius-xs) var(--radius-xs) 0 0;
    cursor: pointer; font-size: 11px; font-weight: 500; color: var(--text-muted);
    white-space: nowrap; max-width: 180px; transition: var(--transition);
    position: relative;
}
.file-tab:hover { background: var(--bg-hover); color: var(--text-secondary); }
.file-tab.active {
    background: var(--bg-primary); color: var(--text-primary); font-weight: 600;
    border-bottom-color: var(--bg-primary);
}
.file-tab-name {
    overflow: hidden; text-overflow: ellipsis; max-width: 120px;
}
.file-tab-close {
    width: 16px; height: 16px; border: none; background: transparent;
    color: var(--text-muted); cursor: pointer; border-radius: 3px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; opacity: 0; transition: var(--transition); flex-shrink: 0;
}
.file-tab:hover .file-tab-close { opacity: 0.7; }
.file-tab-close:hover { opacity: 1; color: var(--danger); background: var(--danger-bg); }
.file-tab-add {
    width: 28px; height: 28px; border: 1px dashed var(--border); background: transparent;
    color: var(--text-muted); cursor: pointer; border-radius: var(--radius-xs);
    font-size: 16px; display: flex; align-items: center; justify-content: center;
    margin: 0 6px; flex-shrink: 0; transition: var(--transition);
}
.file-tab-add:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-subtle); }

/* Transparent canvas bg pattern */
.editor-canvas-area.transparent-bg {
    background-image:
        linear-gradient(45deg, #e0e0e0 25%, transparent 25%),
        linear-gradient(-45deg, #e0e0e0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e0e0e0 75%),
        linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    background-color: #f0f0f0;
}
[data-theme="dark"] .editor-canvas-area.transparent-bg {
    background-image:
        linear-gradient(45deg, var(--bg-tertiary) 25%, transparent 25%),
        linear-gradient(-45deg, var(--bg-tertiary) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, var(--bg-tertiary) 75%),
        linear-gradient(-45deg, transparent 75%, var(--bg-tertiary) 75%);
    background-color: var(--bg-primary);
}

/* ─── Canvas Wrapper (rulers + canvas) ─── */
.editor-canvas-wrapper {
    grid-area: canvas;
    display: grid;
    grid-template-columns: 24px 1fr;
    grid-template-rows: 24px 1fr;
    overflow: hidden;
    position: relative;
    min-height: 0;
}
.ruler-corner {
    background: var(--bg-secondary); border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border); display: flex; align-items: center;
    justify-content: center; z-index: 12;
}
.ruler {
    background: var(--bg-secondary); display: block;
}
.ruler-h {
    grid-column: 2; grid-row: 1; width: 100%; height: 24px;
    border-bottom: 1px solid var(--border);
}
.ruler-v {
    grid-column: 1; grid-row: 2; width: 24px; height: 100%;
    border-right: 1px solid var(--border);
}
.ruler.hidden { display: none; }
.ruler-corner.hidden { display: none; }
.editor-canvas-wrapper.no-rulers {
    grid-template-columns: 0 1fr;
    grid-template-rows: 0 1fr;
}

/* ─── Canvas Area ─── */
.editor-canvas-area {
    grid-column: 2; grid-row: 2;
    position: relative; overflow: hidden;
    background: var(--bg-primary);
    background-image:
        linear-gradient(45deg, var(--bg-tertiary) 25%, transparent 25%),
        linear-gradient(-45deg, var(--bg-tertiary) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, var(--bg-tertiary) 75%),
        linear-gradient(-45deg, transparent 75%, var(--bg-tertiary) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}
.editor-canvas-area canvas { display: block; }
/* Upload overlay centers itself, canvas fills via JS */
.editor-canvas-area .editor-upload-overlay {
    display: flex; align-items: center; justify-content: center;
}

/* Grid overlay */
.grid-overlay {
    position: absolute; inset: 0; pointer-events: none; z-index: 4;
    width: 100%; height: 100%;
}

/* Info bar (bottom of canvas) */
.canvas-info-bar {
    position: absolute; bottom: 0; left: 0; right: 0; z-index: 10;
    display: flex; align-items: center; gap: 16px; padding: 5px 12px;
    background: rgba(12, 14, 20, 0.85); backdrop-filter: blur(6px);
    font-size: 11px; font-family: var(--font-mono); color: var(--text-muted);
    border-top: 1px solid var(--border);
}
.canvas-info-bar span { white-space: nowrap; }
#cursor-pos { color: var(--text-secondary); min-width: 110px; }
#selection-size { color: var(--accent); }
#canvas-dims { color: var(--text-muted); margin-left: auto; }
#editor-zoom-label { color: var(--text-secondary); font-weight: 700; }

/* Upload overlay for editor */
.editor-upload-overlay {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 12px; z-index: 5;
}
.editor-upload-zone {
    border: 2px dashed var(--border-light); border-radius: var(--radius);
    padding: 40px 30px; text-align: center; cursor: pointer;
    transition: var(--transition); background: var(--bg-card);
    max-width: 400px;
}
.editor-upload-zone:hover { border-color: var(--accent); background: var(--accent-subtle); }

/* ─── Right Panel (Properties + Filters) ─── */
.editor-right {
    grid-area: right;
    background: var(--bg-secondary); border-left: 1px solid var(--border);
    display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden;
    min-height: 0;
}

/* Properties */
.prop-row {
    display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
}
.prop-label {
    font-size: 10px; color: var(--text-muted); min-width: 50px;
    font-weight: 600; text-transform: uppercase;
}
.prop-input {
    flex: 1; padding: 4px 8px; border: 1px solid var(--border);
    background: var(--bg-tertiary); color: var(--text-primary);
    border-radius: 4px; font-size: 11px; font-family: var(--font);
}
.prop-input:focus { outline: none; border-color: var(--accent); }
.prop-color {
    width: 32px; height: 26px; border: 1px solid var(--border);
    border-radius: 4px; cursor: pointer; padding: 0;
}
.prop-range {
    flex: 1; height: 4px;
}

/* Filters grid */
.filter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.filter-chip {
    padding: 6px 4px; border: 1px solid var(--border); background: var(--bg-tertiary);
    color: var(--text-secondary); border-radius: var(--radius-xs); cursor: pointer;
    font-size: 9px; font-weight: 600; text-align: center; text-transform: capitalize;
    transition: var(--transition);
}
.filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.filter-chip.active { border-color: var(--accent); background: var(--accent-subtle); color: var(--accent); }

/* Adjustment sliders */
.adjust-group { margin-bottom: 8px; }
.adjust-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 2px;
}
.adjust-label { font-size: 10px; color: var(--text-secondary); font-weight: 500; }
.adjust-value { font-size: 10px; color: var(--accent); font-family: var(--font-mono); font-weight: 600; }

/* ─── Export Bar ─── */
.editor-export-bar {
    grid-area: export;
    display: flex; align-items: center; gap: 6px;
    padding: 8px 12px;
    background: var(--bg-secondary); border-top: 1px solid var(--border);
}
.export-bar-info {
    flex: 1; font-size: 10px; color: var(--text-muted); font-family: var(--font-mono);
}

/* ─── Phase 3: Analysis Panel ─── */

/* Quality Score Card */
.quality-score-card {
    text-align: center; padding: 12px 8px;
    background: var(--bg-tertiary); border-radius: var(--radius-sm);
    border: 1px solid var(--border); margin-bottom: 10px;
}
.quality-overall {
    font-size: 36px; font-weight: 800; font-family: var(--font-mono);
    line-height: 1;
}
.quality-overall.grade-A { color: #22c55e; }
.quality-overall.grade-B { color: #84cc16; }
.quality-overall.grade-C { color: #f59e0b; }
.quality-overall.grade-D { color: #f97316; }
.quality-overall.grade-F { color: #ef4444; }
.quality-grade-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Score Bars */
.score-bar-list { display: flex; flex-direction: column; gap: 6px; }
.score-bar-item { display: flex; align-items: center; gap: 6px; }
.score-bar-label { font-size: 9px; color: var(--text-muted); min-width: 62px; text-transform: uppercase; font-weight: 600; }
.score-bar-track {
    flex: 1; height: 6px; background: var(--bg-primary);
    border-radius: 3px; overflow: hidden; border: 1px solid var(--border);
}
.score-bar-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }
.score-bar-fill.high { background: #22c55e; }
.score-bar-fill.mid { background: #f59e0b; }
.score-bar-fill.low { background: #ef4444; }
.score-bar-value { font-size: 10px; font-family: var(--font-mono); color: var(--text-secondary); width: 24px; text-align: right; }

/* Recommendations */
.rec-list { display: flex; flex-direction: column; gap: 3px; }
.rec-item {
    display: flex; align-items: flex-start; gap: 6px; padding: 5px 8px;
    border-radius: var(--radius-xs); font-size: 10px;
    border: 1px solid var(--border);
}
.rec-icon { font-size: 12px; flex-shrink: 0; line-height: 1.3; }
.rec-item.warn .rec-icon { color: #f59e0b; }
.rec-item.info .rec-icon { color: #3b82f6; }
.rec-item.pass .rec-icon { color: #22c55e; }

/* Color Harmony */
.harmony-section { margin-bottom: 10px; }
.harmony-label { font-size: 9px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; margin-bottom: 3px; }
.harmony-desc { font-size: 9px; color: var(--text-muted); margin-bottom: 4px; font-style: italic; }
.harmony-row { display: flex; gap: 3px; }
.harmony-swatch {
    flex: 1; height: 24px; border-radius: 4px; cursor: pointer;
    border: 1px solid var(--border); transition: transform 0.15s;
    position: relative;
}
.harmony-swatch:hover { transform: scaleY(1.4); z-index: 1; }
.harmony-swatch-label {
    position: absolute; bottom: -14px; left: 50%; transform: translateX(-50%);
    font-size: 7px; font-family: var(--font-mono); color: var(--text-muted);
    white-space: nowrap; display: none;
}
.harmony-swatch:hover .harmony-swatch-label { display: block; }

/* Histogram Canvas */
.histogram-panel-canvas {
    width: 100%; height: 100px;
    background: var(--bg-primary); border-radius: var(--radius-xs);
    border: 1px solid var(--border);
}
.histogram-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin-top: 6px;
}
.hist-stat {
    text-align: center; padding: 3px; background: var(--bg-tertiary);
    border-radius: 3px; border: 1px solid var(--border);
}
.hist-stat-label { font-size: 7px; color: var(--text-muted); text-transform: uppercase; font-weight: 700; }
.hist-stat-value { font-size: 10px; font-family: var(--font-mono); color: var(--text-primary); }
.hist-stat.ch-r { border-color: rgba(239,68,68,0.3); }
.hist-stat.ch-g { border-color: rgba(34,197,94,0.3); }
.hist-stat.ch-b { border-color: rgba(59,130,246,0.3); }
.hist-stat.ch-l { border-color: rgba(255,255,255,0.2); }

/* Color Space Converter */
.cs-input-row { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.cs-result { display: flex; flex-direction: column; gap: 3px; }
.cs-row {
    display: flex; justify-content: space-between; padding: 4px 8px;
    background: var(--bg-tertiary); border-radius: 3px; font-size: 10px;
    border: 1px solid var(--border);
}
.cs-label { color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.cs-value { color: var(--text-primary); font-family: var(--font-mono); }

/* CMYK Proof Toolbar Badge */
.proof-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 8px; border-radius: 10px; font-size: 9px; font-weight: 700;
    background: rgba(255, 0, 255, 0.12); color: #e879f9;
    border: 1px solid rgba(255, 0, 255, 0.25);
}
.gamut-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 8px; border-radius: 10px; font-size: 9px; font-weight: 700;
    background: rgba(245, 158, 11, 0.12); color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Before/After Slider (in editor) */
.ba-container {
    position: relative; overflow: hidden; border-radius: var(--radius-sm);
    cursor: ew-resize; user-select: none; border: 1px solid var(--border);
}
.ba-container img { display: block; width: 100%; }
.ba-after { position: absolute; top: 0; left: 0; height: 100%; overflow: hidden; }
.ba-slider {
    position: absolute; top: 0; width: 2px; height: 100%;
    background: white; cursor: ew-resize; z-index: 5;
}
.ba-slider::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); width: 24px; height: 24px;
    border-radius: 50%; background: white; box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.ba-label {
    position: absolute; top: 6px; padding: 2px 8px;
    background: rgba(0,0,0,0.6); color: white; font-size: 9px;
    font-weight: 700; border-radius: 10px; z-index: 3;
}
.ba-label.original { left: 6px; }
.ba-label.edited { right: 6px; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .editor-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto 1fr auto;
        grid-template-areas: "toolbar" "filetabs" "left" "canvas" "export";
    }
    .editor-left, .editor-right { max-height: 200px; overflow-y: auto; }
    .editor-right { display: none; }
    .editor-canvas-area { min-height: 400px; }
}
