#view-sketch {
    display: none;
    flex-direction: column;
    height: 100%;
    padding: 0;
    position: relative;
    background: var(--bg-app);
}

#view-sketch.active {
    display: flex;
}

.sketch-main {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.sketch-toolbar {
    width: 48px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    gap: 2px;
    overflow-y: auto;
    flex-shrink: 0;
}

.sketch-tool-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.15s;
    position: relative;
}

.sketch-tool-btn:hover {
    background: var(--bg-app);
    color: var(--text-main);
}

.sketch-tool-btn.active {
    background: var(--primary);
    color: #fff;
}

.sketch-tool-btn svg {
    width: 20px;
    height: 20px;
}

.sketch-tool-separator {
    width: 28px;
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

.sketch-canvas-container {
    flex: 1;
    position: relative;
    min-width: 0;
    overflow: hidden;
}

#sketchCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fafafa;
}

[data-theme="dark"] #sketchCanvas {
    background: #1e1e2e;
}

#sketchSvg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: all;
    cursor: default;
}

.sketch-properties {
    width: 240px;
    background: var(--bg-surface);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
}

.sketch-properties-title {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 12px 14px 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sketch-constraint-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 14px;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}

.sketch-constraint-btn:hover {
    background: var(--bg-app);
}

.sketch-constraint-btn svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.sketch-status-bar {
    height: 28px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    flex-shrink: 0;
}

.sketch-ext-line {
    stroke: #888;
    stroke-width: 0.5;
    stroke-dasharray: 3, 2;
}

.sketch-dim-line {
    stroke: #666;
    stroke-width: 1;
}

.sketch-dim-text {
    font-size: 10px;
    fill: #666;
    font-family: 'Inter', sans-serif;
    text-anchor: middle;
    dominant-baseline: middle;
}

.sketch-glyph {
    stroke: #9b59b6;
    stroke-width: 1.5;
    fill: none;
}

.sketch-glyph-rect {
    fill: none;
    stroke: #9b59b6;
    stroke-width: 1.5;
}

.sketch-dim-input {
    width: 80px;
    height: 28px;
    border: 2px solid #4285f4;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    text-align: center;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    outline: none;
}

[data-theme="dark"] .sketch-dim-input {
    background: #2a2a3a;
    color: #eee;
    border-color: #5a8af4;
}

.sketch-dim-text {
    cursor: pointer;
}

.sketch-dim-text:hover {
    fill: #4285f4;
}

@media (max-width: 768px) {
    .sketch-properties {
        display: none;
    }
    .sketch-toolbar {
        width: 40px;
    }
    .sketch-tool-btn {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }
}
