.sl-workspace { color: #243248; font-family: inherit; padding: 24px; background: #f5f7fa; }
.sl-workspace *, .sl-editor * { box-sizing: border-box; }
.sl-workspace h2, .sl-workspace h3, .sl-editor h3 { margin: 4px 0 8px; font-weight: 700; }
.sl-workspace h2 { font-size: 24px; }
.sl-workspace h3, .sl-editor h3 { font-size: 17px; }
.sl-workspace p, .sl-editor p { font-size: 13px; line-height: 1.6; color: #64748b; margin: 6px 0 14px; }
.sl-workspace button, .sl-editor button { min-height: 40px; border: 1px solid #d9e1eb; border-radius: 8px; background: #fff; color: #334155; padding: 8px 12px; font: inherit; font-size: 12px; cursor: pointer; }
.sl-workspace button:hover, .sl-editor button:hover { background: #eff6ff; border-color: #93c5fd; }
.sl-workspace button:disabled, .sl-editor button:disabled { opacity: .45; cursor: default; }
.sl-workspace button.sl-primary, .sl-editor button.sl-primary { color: #fff; background: #2563eb; border-color: #2563eb; }
.sl-workspace button.sl-danger { color: #be123c; }
.sl-workspace :focus-visible, .sl-editor :focus-visible { outline: 3px solid #8b5cf6; outline-offset: 3px; }
.sl-header, .sl-section-heading, .sl-searchbar, .sl-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sl-eyebrow { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.6px; color: #64748b; }
.sl-demo-badge, .sl-tag { border-radius: 999px; background: #e0e7ff; color: #4338ca; font-size: 10px; padding: 6px 10px; white-space: nowrap; }
.sl-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.sl-stats > div { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; }
.sl-stats strong { display: block; font-size: 25px; }
.sl-stats span { font-size: 11px; color: #64748b; }
.sl-searchbar { margin-bottom: 18px; }
.sl-searchbar .sl-field { flex: 1; min-width: 200px; margin: 0; }
.sl-field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; font-size: 11px; font-weight: 600; color: #475569; }
.sl-field input, .sl-field select { min-height: 42px; width: 100%; border: 1px solid #cbd5e1; border-radius: 8px; padding: 9px 10px; background: #fff; color: #1e293b; font: inherit; font-size: 13px; }
.sl-search-results { display: grid; gap: 6px; margin-bottom: 16px; }
.sl-search-results button { display: flex; gap: 12px; justify-content: space-between; text-align: left; flex-wrap: wrap; }
.sl-search-results small { color: #64748b; }
.sl-content { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; }
.sl-sidebar, .sl-main, .sl-guide, .sl-slotting { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; min-width: 0; }
.sl-sidebar { align-self: start; }
.sl-ancestors { display: flex; flex-direction: column; gap: 5px; padding-bottom: 12px; border-bottom: 1px solid #e2e8f0; }
.sl-ancestors button { display: flex; align-items: center; gap: 12px; text-align: left; }
.sl-ancestors small { width: 46px; color: #64748b; }
.sl-ancestors .sl-selected { background: #eff6ff; border-color: #93c5fd; }
.sl-child-list { display: grid; gap: 5px; margin-top: 12px; max-height: 450px; overflow: auto; }
.sl-child-list button { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; padding: 10px; }
.sl-child-list strong, .sl-child-list small, .sl-slot-row small, .sl-slot-candidates small { display: block; }
.sl-child-list small { margin-top: 4px; font-size: 10px; color: #64748b; }
.sl-child-count { font-size: 9px; color: #64748b; text-align: right; line-height: 1.6; white-space: nowrap; }
.sl-main > .sl-section-heading { align-items: start; margin-bottom: 12px; }
.sl-actions { justify-content: flex-start; gap: 6px; }
.sl-map { border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; background: #f8fafc; }
.sl-map-tools { display: flex; gap: 6px; align-items: center; padding: 8px; background: #fff; border-bottom: 1px solid #e2e8f0; flex-wrap: wrap; }
.sl-map-tools span { color: #64748b; font-size: 10px; }
.sl-map-canvas { height: 410px; overflow: hidden; }
.sl-map-canvas > svg { width: 100%; height: 100%; touch-action: none; user-select: none; }
.sl-map-canvas [data-location-id] { cursor: pointer; transition: fill .15s; }
.sl-map-canvas [data-location-id]:hover, .sl-map-canvas [data-location-id]:focus-visible { fill: #93c5fd !important; fill-opacity: .65; stroke-width: 3 !important; }
.sl-map-canvas .sl-shape-stock { fill: #34d399 !important; fill-opacity: .4; stroke: #059669 !important; }
.sl-map-canvas .sl-shape-picks { fill: #fbbf24 !important; fill-opacity: .5; stroke: #d97706 !important; }
.sl-map-canvas .sl-shape-target { fill: #a78bfa !important; fill-opacity: .6; stroke: #7c3aed !important; stroke-width: 4 !important; }
.sl-map-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 10px; padding: 10px; background: #fff; }
.sl-map-legend span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 5px; background: #bfdbfe; }
.sl-map-legend .sl-legend-stock::before { background: #34d399; }
.sl-map-legend .sl-legend-picks::before { background: #fbbf24; }
.sl-map-legend .sl-legend-target::before { background: #a78bfa; }
.sl-workspace p.sl-note, .sl-editor p.sl-note { font-size: 10px; margin: 12px 0 0; }
.sl-workspace .sl-message, .sl-editor .sl-message { padding: 10px 14px; background: #ecfdf5; color: #047857; border-radius: 8px; }
.sl-workspace .sl-error, .sl-editor .sl-error { color: #be123c; background: #fff1f2; }
.sl-empty { padding: 28px 16px; text-align: center; color: #64748b; font-size: 12px; }
.sl-guide { margin-bottom: 18px; background: #faf5ff; }
.sl-guide ol { list-style: none; display: flex; gap: 8px; padding: 0; margin: 12px 0; overflow-x: auto; }
.sl-guide li { flex: 1; min-width: 95px; }
.sl-guide li button { width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; }
.sl-guide li button > span { display: grid; place-items: center; border-radius: 50%; width: 22px; height: 22px; color: #7c3aed; background: #ede9fe; flex-shrink: 0; }
.sl-guide li small, .sl-guide li strong { display: block; }
.sl-guide li small { font-size: 9px; color: #64748b; }
.sl-guide-active button { border-color: #a78bfa; background: #ede9fe; }
.sl-guide-controls { display: flex; align-items: center; justify-content: space-between; font-size: 11px; }
.sl-guide p { margin-bottom: 0; font-size: 11px; }
.sl-slotting { margin-top: 18px; }
.sl-slot-row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #e2e8f0; padding: 12px 0; font-size: 12px; flex-wrap: wrap; }
.sl-slot-row > div { flex: 1; min-width: 150px; }
.sl-slot-row small { color: #64748b; margin-top: 4px; font-size: 10px; }
.sl-slotting > .sl-field { margin-top: 14px; }
.sl-check { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 12px; }
.sl-slot-candidates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sl-slot-candidates button { display: flex; align-items: center; justify-content: space-between; text-align: left; gap: 10px; }
.sl-slot-candidates small { color: #64748b; font-size: 10px; margin-top: 3px; }
.sl-form-backdrop, .sl-editor-backdrop { position: fixed; inset: 0; z-index: 1200; background: #0f172a99; display: flex; align-items: center; justify-content: center; padding: 20px; overflow: auto; }
.sl-form, .sl-editor { width: min(100%, 460px); max-height: calc(100dvh - 40px); overflow-y: auto; border-radius: 14px; padding: 24px; background: #fff; box-shadow: 0 20px 60px #0f172a44; }
.sl-editor { width: min(1200px, 100%); color: #243248; }
.sl-editor-grid { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 20px; }
.sl-editor .sl-map-canvas { height: 530px; }
.sl-fields-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sl-editor-save { margin-top: 18px; }
@media (max-width: 850px) {
    .sl-workspace { padding: 16px; }
    .sl-content { grid-template-columns: 1fr; }
    .sl-ancestors { flex-direction: row; flex-wrap: wrap; }
    .sl-child-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 240px; }
    .sl-editor-grid { grid-template-columns: 1fr; }
    .sl-editor .sl-map-canvas { height: 350px; }
}
@media (max-width: 520px) {
    .sl-header h2 { font-size: 20px; }
    .sl-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .sl-stats > div { padding: 10px; }
    .sl-stats strong { font-size: 20px; }
    .sl-stats span { font-size: 10px; }
    .sl-searchbar > button { flex: 1; }
    .sl-main, .sl-sidebar, .sl-slotting, .sl-guide { padding: 12px; }
    .sl-map-canvas { height: 300px; }
    .sl-map-tools span { width: 100%; }
    .sl-child-list, .sl-slot-candidates { grid-template-columns: 1fr; }
    .sl-form-backdrop, .sl-editor-backdrop { padding: 8px; }
    .sl-form, .sl-editor { padding: 16px; max-height: calc(100dvh - 16px); }
}
