.gsp-app, .gsp-app * { box-sizing: border-box; }
.gsp-app { --gsp-border:#d9dee5; --gsp-muted:#667085; --gsp-bg:#f7f8fa; --gsp-primary:#0d7a3b; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color:#15171a; border:1px solid var(--gsp-border); border-radius:14px; overflow:hidden; background:white; }
.gsp-topbar { display:flex; justify-content:space-between; gap:16px; align-items:center; padding:14px 16px; background:#111827; color:white; }
.gsp-brand { display:flex; flex-direction:column; gap:2px; }
.gsp-brand span { color:#cbd5e1; font-size:12px; }
.gsp-actions, .gsp-button-row { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.gsp-layout { display:grid; grid-template-columns:320px minmax(0,1fr); height:min(760px, calc(100vh - 120px)); min-height:560px; }
.gsp-sidebar { background:var(--gsp-bg); border-right:1px solid var(--gsp-border); padding:14px; overflow:auto; }
.gsp-sidebar section { background:white; border:1px solid var(--gsp-border); border-radius:12px; padding:10px; margin-bottom:10px; box-shadow:0 1px 2px rgba(16,24,40,.04); }
.gsp-sidebar h3 { margin:0 0 10px; font-size:15px; }
.gsp-sidebar label { display:block; font-size:12px; color:#344054; margin:8px 0; }
.gsp-sidebar input, .gsp-sidebar select, .gsp-sidebar textarea { width:100%; border:1px solid #cbd5e1; border-radius:8px; padding:7px 8px; background:white; font:inherit; font-size:13px; }
.gsp-sidebar input[type="checkbox"] { width:auto; }
.gsp-sidebar input[type="range"] { padding:0; }
.gsp-sidebar input[type="color"] { padding:2px; height:36px; }
.gsp-sidebar textarea { resize:vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.gsp-grid2 { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.gsp-grid2 label { margin:0; }
.gsp-check { display:flex !important; align-items:center; gap:8px; }
.gsp-app button, .gsp-file-btn { border:1px solid #cbd5e1; background:white; color:#111827; border-radius:8px; padding:8px 10px; font-size:13px; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; gap:6px; line-height:1; }
.gsp-topbar button, .gsp-topbar .gsp-file-btn { border-color:#334155; background:#1f2937; color:white; }
.gsp-primary { background:var(--gsp-primary) !important; border-color:var(--gsp-primary) !important; color:white !important; width:100%; margin-top:8px; }
.gsp-danger { color:#b42318 !important; border-color:#fecdca !important; background:#fff5f5 !important; }
.gsp-wide { width:100%; }
.gsp-file-btn input { display:none; }
.gsp-main { min-width:0; display:flex; flex-direction:column; gap:8px; background:#e7ebf0; padding:12px; }
.gsp-canvas-wrap { flex:1; min-height:0; overflow:auto; background:transparent; }
.gsp-hint { font-size:12px; color:#475467; margin-bottom:8px; }
.gsp-svg { width:100%; min-width:0; height:100%; min-height:360px; display:block; background:white; border:1px solid #cbd5e1; border-radius:12px; box-shadow:0 8px 22px rgba(16,24,40,.08); touch-action:none; }
.gsp-item { cursor:move; }
.gsp-item rect.gsp-body { stroke:#111827; stroke-width:.035; vector-effect:non-scaling-stroke; }
.gsp-item.gsp-selected rect.gsp-body { stroke:#f97316; stroke-width:.09; }
.gsp-label { font-size:.62px; font-weight:700; fill:#111827; paint-order:stroke; stroke:white; stroke-width:.08; stroke-linejoin:round; pointer-events:none; }
.gsp-dim { font-size:.32px; fill:#475467; pointer-events:none; }
.gsp-door { fill:none; stroke:#ffffff; stroke-width:.04; vector-effect:non-scaling-stroke; opacity:.9; }
.gsp-door-panel { fill:#ffffff; opacity:.88; stroke:#111827; stroke-width:.02; vector-effect:non-scaling-stroke; }
.gsp-boundary { fill:rgba(16,185,129,.06); stroke:#ef4444; stroke-width:.055; vector-effect:non-scaling-stroke; }
.gsp-fence-line { stroke:#334155; stroke-width:.08; vector-effect:non-scaling-stroke; stroke-linecap:round; }
.gsp-fence-post { fill:#334155; }
.gsp-gate-leaf { stroke:#0f766e; stroke-width:.08; vector-effect:non-scaling-stroke; stroke-linecap:round; }
.gsp-gate-label { font-size:.34px; font-weight:700; fill:#0f172a; paint-order:stroke; stroke:white; stroke-width:.06; }
.gsp-gate-direction { font-size:.26px; fill:#0f766e; font-weight:700; }
.gsp-refdim-line, .gsp-refdim-arrow { stroke:#6b7280; stroke-width:.05; vector-effect:non-scaling-stroke; }
.gsp-refdim-tick { stroke:#6b7280; stroke-width:.04; vector-effect:non-scaling-stroke; }
.gsp-refdim-label { font-size:.28px; fill:#374151; font-weight:600; paint-order:stroke; stroke:#ffffff; stroke-width:.05; }
.gsp-grid-line { stroke:#e5e7eb; stroke-width:.02; vector-effect:non-scaling-stroke; }
.gsp-grid-major { stroke:#cbd5e1; stroke-width:.035; vector-effect:non-scaling-stroke; }
.gsp-axis-label { font-size:.28px; fill:#98a2b3; }
.gsp-bg-image { pointer-events:none; }
@media (max-width: 1100px) { .gsp-stats-inline { grid-template-columns:repeat(3,minmax(120px,1fr)); } .gsp-draw-tools { grid-template-columns:1fr; } }
@media (max-width: 900px) { .gsp-layout { grid-template-columns:1fr; height:auto; min-height:0; } .gsp-sidebar { border-right:0; border-bottom:1px solid var(--gsp-border); max-height:none; } .gsp-topbar { align-items:flex-start; flex-direction:column; } .gsp-main { min-height:620px; } .gsp-svg { min-height:460px; } .gsp-stats-inline { grid-template-columns:repeat(2,minmax(130px,1fr)); } .gsp-draw-tools { grid-template-columns:1fr; } }
@media print { body * { visibility:hidden !important; } .gsp-app, .gsp-app * { visibility:visible !important; } .gsp-app { position:absolute; left:0; top:0; width:100%; border:0; } .gsp-sidebar, .gsp-topbar, .gsp-hint, .gsp-summary-panel { display:none !important; } .gsp-layout { display:block; min-height:0; height:auto; } .gsp-main, .gsp-canvas-wrap { padding:0; background:white; } .gsp-svg { width:100%; height:95vh; min-width:0; border:0; box-shadow:none; } }

.gsp-span-2 { grid-column:1 / -1; }
.gsp-stats { display:grid; gap:6px; }
.gsp-summary-panel { background:#fff; border:1px solid var(--gsp-border); border-radius:12px; padding:8px 10px; box-shadow:0 1px 2px rgba(16,24,40,.04); flex:0 0 auto; }
.gsp-summary-panel h3 { margin:0 0 6px; font-size:14px; }
.gsp-stats-inline { grid-template-columns:repeat(6,minmax(100px,1fr)); }
.gsp-stat { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:3px; padding:7px 9px; border:1px solid #e5e7eb; border-radius:10px; background:#fff; min-height:58px; }
.gsp-stat span { font-size:11px; color:#475467; }
.gsp-stat strong { font-size:13px; color:#111827; }

.gsp-note { margin:0 0 10px; font-size:12px; color:#475467; line-height:1.35; }

.gsp-draw-tools { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:8px; }
.gsp-draw-status { margin:8px 0 0; font-size:12px; color:#475467; line-height:1.35; }
.gsp-draw-line { fill:none; stroke:#f97316; stroke-width:.08; stroke-dasharray:.22 .14; vector-effect:non-scaling-stroke; }
.gsp-draw-point { fill:#f97316; stroke:#ffffff; stroke-width:.05; vector-effect:non-scaling-stroke; }
.gsp-draw-index { font-size:.28px; fill:#b45309; font-weight:700; paint-order:stroke; stroke:#ffffff; stroke-width:.05; }
