:root {
  --ink: #17232f;
  --muted: #6e7b86;
  --line: #dce3e7;
  --panel: #ffffff;
  --bg: #f2f5f6;
  --orange: #f36b2b;
  --orange-dark: #d95319;
  --teal: #157f7b;
  --teal-soft: #eaf6f4;
  --navy: #132a3a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); min-width: 920px; }
button, input, select { font: inherit; }
.topbar { height: 82px; display: flex; align-items: center; padding: 0 30px; background: #fff; border-bottom: 1px solid var(--line); gap: 14px; }
.topbar h1 { font-size: 22px; margin: 0; line-height: 1; letter-spacing: -.5px; }
.topbar h1 span { color: var(--orange); }
.brand-mark { width: 37px; height: 37px; background: var(--navy); border-radius: 9px; display: flex; align-items: end; justify-content: center; gap: 3px; padding: 9px; transform: rotate(-2deg); }
.brand-mark span { width: 5px; border-radius: 1px; background: var(--orange); }
.brand-mark span:nth-child(1) { height: 12px; }.brand-mark span:nth-child(2) { height: 20px; }.brand-mark span:nth-child(3) { height: 16px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.privacy { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.status-dot { width: 8px; height: 8px; background: #26a876; border-radius: 50%; box-shadow: 0 0 0 4px #e3f6ee; }
.language-picker { position: relative; color: var(--muted); }
.language-trigger { width: 166px; height: 38px; display: grid; grid-template-columns: 26px 1fr 10px; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafb; color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; text-align: left; }
.language-trigger:hover, .language-trigger[aria-expanded="true"] { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(21,127,123,.1); background: #fff; }
.language-trigger img, .language-menu img { width: 24px; height: 16px; display: block; object-fit: cover; border: 1px solid rgba(20,35,47,.14); border-radius: 2px; box-shadow: 0 1px 2px rgba(20,35,47,.08); }
.language-chevron { width: 7px; height: 7px; border-right: 2px solid #50616b; border-bottom: 2px solid #50616b; transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.language-trigger[aria-expanded="true"] .language-chevron { transform: rotate(225deg) translate(-1px,-1px); }
.language-menu { position: absolute; z-index: 100; top: calc(100% + 6px); right: 0; width: 190px; max-height: min(430px, calc(100vh - 100px)); overflow-y: auto; padding: 5px; border: 1px solid #cfd8dc; border-radius: 9px; background: #fff; box-shadow: 0 12px 30px rgba(18,42,58,.18); }
.language-menu[hidden] { display: none; }
.language-menu button { width: 100%; min-height: 34px; display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 9px; padding: 6px 9px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); font-size: 12px; text-align: left; cursor: pointer; }
.language-menu button:hover, .language-menu button:focus-visible { background: #eef7f6; outline: none; }
.language-menu button[aria-selected="true"] { background: var(--teal-soft); color: #0d6865; font-weight: 750; }
.language-native-select { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; padding: 0 !important; margin: -1px !important; }
[dir="rtl"] .language-trigger, [dir="rtl"] .language-menu button { text-align: right; }
[dir="rtl"] .language-menu { right: auto; left: 0; }
.app-shell { display: grid; grid-template-columns: 340px 1fr; height: calc(100vh - 116px); min-height: 630px; }
.sidebar { padding: 20px; overflow-y: auto; background: #f8fafb; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.step-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 17px; box-shadow: 0 2px 10px rgba(17, 39, 52, .035); }
.step-card.active { border-top: 3px solid var(--orange); padding-top: 15px; }
.section-title { display: flex; gap: 11px; align-items: center; margin-bottom: 14px; }
.step-number { width: 25px; height: 25px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.section-title h2 { font-size: 14px; margin: 0; }.section-title p { font-size: 11px; color: var(--muted); margin: 2px 0 0; }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tool-button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; height: 66px; padding: 0; border: 1px solid #cfd8dc; border-radius: 9px; background: #fff; color: #3f505a; font-size: 10.5px; font-weight: 650; cursor: pointer; text-align: center; }
.tool-button:hover { border-color: var(--teal); background: var(--teal-soft); }
.tool-button.active { border-color: var(--orange); background: #fff3ec; color: var(--orange-dark); box-shadow: 0 0 0 2px rgba(243,107,43,.12); }
.tool-icon { display: flex; align-items: center; justify-content: center; width: 100%; font-size: 19px; line-height: 1; }
.tool-hint { margin: 11px 2px 0; font-size: 10.5px; line-height: 1.5; color: var(--muted); min-height: 32px; }
.field-grid { display: grid; gap: 10px; }.field-grid.two { grid-template-columns: 1fr 1fr; }
label { color: #4f5e68; font-size: 10px; font-weight: 650; }
input, select { width: 100%; border: 1px solid #cfd8dc; border-radius: 6px; background: #fff; color: var(--ink); padding: 8px 9px; margin-top: 5px; outline: none; }
input:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(21,127,123,.1); }
.checkbox-field { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.checkbox-field input { width: auto; margin-top: 0; }
.wide-field { display: block; margin-top: 11px; }
.properties-card { border-top: 3px solid var(--teal); }
#propertiesSubtitle { color: var(--teal); font-weight: 700; }
.danger-button { width: 100%; height: 36px; margin-top: 12px; border: 1px solid #eecfca; border-radius: 7px; background: #fff5f2; color: #b23b31; font-size: 11px; font-weight: 700; cursor: pointer; }
.danger-button:hover { background: #ffe6e0; }
.sidebar-actions { display: flex; gap: 8px; }
.icon-text-button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 52px; padding: 0; border: 1px solid #cfd8dc; border-radius: 8px; background: #fff; color: #3f505a; font-size: 9.5px; font-weight: 650; cursor: pointer; text-align: center; }
.icon-text-button span:first-child { font-size: 16px; }
.icon-text-button:hover:not(:disabled) { border-color: var(--teal); background: var(--teal-soft); }
.icon-text-button:disabled { opacity: .4; cursor: not-allowed; }
.secondary-button { height: 38px; border: 1px solid #cfd8dc; border-radius: 8px; background: #fff; color: #3f505a; font-size: 11px; font-weight: 700; cursor: pointer; }
.secondary-button.wide { flex: 1; }
.secondary-button:hover { border-color: var(--teal); background: var(--teal-soft); }
.message { font-size: 11px; line-height: 1.4; min-height: 18px; margin: 2px 4px; color: var(--muted); }.message.error { color: #b23b31; }.message.success { color: #177052; }
.workspace { min-width: 0; display: grid; grid-template-rows: 72px 1fr; padding: 0 25px 20px; background: #eef2f3; }
.workspace-toolbar { display: flex; align-items: center; }.workspace-toolbar h2 { font-size: 17px; margin: 0; }.workspace-toolbar p { color: var(--muted); font-size: 11px; margin: 3px 0 0; }.toolbar-actions { margin-left: auto; display: flex; gap: 8px; }
.toolbar-actions button { height: 34px; border-radius: 6px; padding: 0 13px; font-size: 11px; font-weight: 700; cursor: pointer; }.toolbar-actions button:disabled { opacity: .4; cursor: not-allowed; }
.icon-button { border: 1px solid #cfd8dc; background: #fff; color: #3f505a; min-width: 34px; padding: 0 !important; font-size: 17px !important; }
.export-button { background: var(--navy); color: #fff; border: 1px solid var(--navy); }
.canvas-wrap { position: relative; min-height: 320px; overflow: hidden; border: 1px solid #d8e0e3; border-radius: 10px; background-color: #f8fafb; background-image: radial-gradient(#d5dcdf 1px, transparent 1px); background-size: 18px 18px; box-shadow: inset 0 0 30px rgba(18,45,61,.025); }
#drawCanvas { width: 100%; height: 100%; display: block; cursor: crosshair; }
.canvas-wrap.panning #drawCanvas { cursor: grabbing; }
.canvas-wrap.select-mode #drawCanvas { cursor: default; }
.empty-state { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; pointer-events: none; }.empty-state.hidden { display: none; }.empty-state h3 { font-size: 14px; margin: 14px 0 4px; }.empty-state p { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 0; }
.empty-graphic { width: 103px; height: 67px; position: relative; }.empty-graphic span { position: absolute; border: 2px solid #bdc8cc; border-radius: 3px; background: rgba(255,255,255,.65); }.empty-graphic span:nth-child(1) { width: 68px; height: 50px; left: 8px; top: 12px; transform: rotate(-7deg); }.empty-graphic span:nth-child(2) { width: 61px; height: 45px; left: 32px; top: 4px; border-color: #93aaa9; transform: rotate(8deg); }.empty-graphic span:nth-child(3) { width: 16px; height: 16px; left: 52px; top: 22px; border-radius: 50%; border-color: var(--orange); background: transparent; }
.coord-readout { position: absolute; left: 10px; bottom: 8px; font-size: 9px; color: #87949b; background: rgba(255,255,255,.82); border: 1px solid #e1e6e8; border-radius: 4px; padding: 4px 7px; font-variant-numeric: tabular-nums; }
.zoom-hint { position: absolute; right: 10px; bottom: 8px; font-size: 9px; color: #87949b; background: rgba(255,255,255,.82); border: 1px solid #e1e6e8; border-radius: 4px; padding: 4px 7px; }
.draw-tooltip { position: absolute; transform: translate(14px, -50%); font-size: 10px; font-weight: 700; color: #fff; background: var(--navy); border-radius: 5px; padding: 4px 8px; pointer-events: none; white-space: nowrap; }
.draw-tooltip[hidden] { display: none; }
footer { height: 34px; padding: 0 30px; background: #fff; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: #89959b; font-size: 9px; }
@media(max-width:1050px){ .app-shell{grid-template-columns:300px 1fr}.sidebar{padding:14px}.workspace{padding:0 15px 15px}.privacy{display:none}.top-actions{gap:8px} }
