    :root {
      --win-bg: #d0d8e2;
      --panel: #f6f8fb;
      --panel2: #ecf0f6;
      --toolbar: #ebebed;
      --toolbar2: #dde0e4;
      --border: #a8b8cc;
      --border-light: #c4cfd8;
      --accent: #1565c0;
      --accent-hover: #0d47a1;
      --accent-light: #e3eefb;
      --accent-text: #0d3a7c;
      --text: #1a1e24;
      --text-muted: #4e5d6c;
      --text-dim: #7c8a98;
      --grid-head: #edf0f4;
      --grid-stripe: #f5f7fa;
      --row-hover: #e8f0f8;
      --sel: #c5d8ef;
      --status: #e0e4e9;
      --chip-green: #1b7f3e;
      --chip-green-bg: #d6f0e0;
      --chip-amber: #7a5200;
      --chip-amber-bg: #ffefc0;
      --chip-gray: #4a5668;
      --chip-gray-bg: #dde2e8;
      --f: 'Segoe UI', 'Inter', system-ui, Arial, sans-serif;
      --fm: 'Consolas', 'Courier New', 'Lucida Console', monospace;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }
    body { font-family: var(--f); background: var(--win-bg); font-size: 15px; }
    html, body { height: 100%; width: 100%; overflow: hidden; }

    /* ── Desktop Frame ────────────────────────────────── */
    .desktop-frame {
      display: flex;
      flex-direction: column;
      height: 100vh;
      width: 100vw;
      background: var(--win-bg);
      font-size: 1.08em;
      border: 1px solid #9fa8b2;
      box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
      border-radius: 0;
    }

    /* ── Title Bar ──────────────────────────────────── */
    .titlebar-desktop {
      background: linear-gradient(180deg, #1f3f6d 0%, #1c3557 100%);
      border-bottom: 2px solid #152b45;
      height: 30px;
      display: flex;
      align-items: center;
      padding: 0 8px;
      gap: 6px;
      -webkit-user-select: none;
      user-select: none;
      flex-shrink: 0;
    }

    .tb-icon { width: 16px; height: 16px; }
    .tb-appname { font-size: 12px; font-weight: 600; color: #d8e4f0; flex: 1; letter-spacing: 0.02em; }
    .tb-winbtns { display: flex; gap: 1px; margin-left: 4px; }
    .tb-wb { width: 28px; height: 22px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); font-size: 10px; color: #c8d8e8; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 0; font-family: var(--f); }
    .tb-wb:hover { background: rgba(255,255,255,0.2); color: #fff; border-color: rgba(255,255,255,0.4); }
    .tb-wb.close:hover { background: #c42b1c; color: #fff; border-color: #a82218; }

    /* ── Menu Bar ────────────────────────────────────── */
    .menubar-desktop {
      background: linear-gradient(180deg, #f3f4f6 0%, #e8eaec 100%);
      border-bottom: 1px solid #b8c2cc;
      height: 24px;
      display: flex;
      align-items: stretch;
      padding: 0 6px;
      flex-shrink: 0;
    }

    .mb-item-desktop {
      font-size: 12px;
      color: #1a1e24;
      padding: 0 10px;
      display: flex;
      align-items: center;
      cursor: pointer;
      border-radius: 0;
      transition: background 0.1s;
    }

    .mb-item-desktop:hover { background: #0078d4; color: #ffffff; }

    /* ── Toolbar ────────────────────────────────────── */
    .toolbar-desktop {
      background: linear-gradient(180deg, #f5f6f8 0%, #eaebee 100%);
      border-bottom: 1px solid #b8c2cc;
      padding: 3px 8px;
      display: flex;
      align-items: center;
      gap: 2px;
      flex-shrink: 0;
      overflow-x: auto;
    }
    .tb-proj-pill {
      display: flex; align-items: center; gap: 6px;
      padding: 4px 9px; border-radius: 4px; flex-shrink: 0;
      background: rgba(21,101,192,0.08); border: 1px solid #bac8d8;
      cursor: pointer; transition: background 0.15s, border-color 0.15s;
      max-width: 180px;
    }
    .tb-proj-pill:hover { background: rgba(21,101,192,0.17); border-color: #7baade; }
    .tb-proj-lbl { font-size: 8.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; line-height: 1; }
    .tb-proj-name { font-size: 12px; font-weight: 700; color: var(--accent); font-family: var(--f); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; line-height: 1.3; }

    .tb-btn-desktop {
      min-width: 34px;
      height: 46px;
      background: transparent;
      border: 1px solid transparent;
      border-radius: 3px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 3px;
      cursor: pointer;
      padding: 5px 5px 4px;
      transition: background 0.12s, border-color 0.12s;
    }
    .tb-btn-lbl {
      font-size: 7.5px;
      color: #5a6878;
      font-family: var(--f);
      line-height: 1;
      white-space: nowrap;
      pointer-events: none;
      user-select: none;
      letter-spacing: 0.01em;
    }

    .tb-btn-desktop:hover { background: #dce8f5; border-color: #7baade; }
    .tb-btn-desktop:hover .tb-btn-lbl { color: #1565c0; }
    .tb-btn-desktop:active { background: #c5d9ef; border-color: #4a8ec8; }
    .tb-sep-desktop { width: 1px; height: 38px; background: #b8c2cc; margin: 0 5px; }
    .tb-label-desktop { font-size: 11px; color: var(--text-muted); padding: 0 6px; }

    /* ── Stats Bar ────────────────────────────────────── */
    .stats-bar-desktop {
      background: linear-gradient(180deg, #eef1f6 0%, #e6e9ee 100%);
      border-bottom: 1px solid #c4ccd6;
      padding: 4px 12px;
      display: flex;
      gap: 0;
      flex-shrink: 0;
    }

    .stat-cell { padding: 2px 18px 2px 0; border-right: 1px solid var(--border-light); margin-right: 18px; }
    .stat-cell:last-child { border-right: none; }
    #projectBadge { transition: all 0.2s ease; border-radius: 4px; padding: 2px 6px; }
    #projectBadge:hover { background: rgba(21, 101, 192, 0.1); }
    .stat-lbl { font-size: 9.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.09em; font-weight: 500; }
    .stat-val { font-size: 15px; font-weight: 700; color: var(--accent); font-family: var(--fm); line-height: 1.25; }
    .stat-note { font-size: 9.5px; color: var(--text-muted); }

    /* ── Main Body Layout ────────────────────────────── */
    .workspace-desktop {
      display: flex;
      flex: 1;
      overflow: hidden;
      min-height: 0;
    }

    .sidebar-desktop {
      width: 240px;
      background: var(--panel2);
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      flex-shrink: 0;
      overflow: hidden;
    }

    .sb-head { background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 8px 12px; letter-spacing: 0.06em; text-transform: uppercase; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
    .sb-tree { flex: 1; overflow-y: auto; padding: 6px 0; }
    .sb-branch { font-size: 11.5px; }
    .sb-parent { display: flex; align-items: center; gap: 4px; padding: 5px 12px; color: var(--text); cursor: pointer; -webkit-user-select: none; user-select: none; font-weight: 600; transition: all 0.15s ease; }
    .sb-parent:hover { background: var(--row-hover); border-left: 2px solid var(--accent); padding-left: 10px; }
    .sb-parent.open { font-weight: 700; color: var(--accent-text); background: var(--accent-light); }
    .sb-arr { font-size: 8px; color: var(--text-dim); width: 8px; }
    .sb-child { display: flex; align-items: center; gap: 4px; padding: 4px 12px 4px 28px; font-size: 11.5px; color: var(--text-muted); cursor: pointer; font-weight: 500; transition: all 0.1s ease; }
    .sb-child:hover { background: var(--row-hover); color: var(--accent-text); padding-left: 26px; }
    .sb-child.active { background: var(--sel); color: var(--accent-text); font-weight: 700; border-left: 3px solid var(--accent); padding-left: 25px; }
    .sb-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-dim); flex-shrink: 0; }
    .sb-child.active .sb-dot { background: var(--accent); }

    /* ── Main Panel ──────────────────────────────────── */
    .main-panel-desktop {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      min-width: 0;
    }

    .main-head-desktop {
      background: var(--panel);
      border-bottom: 1px solid var(--border-light);
      padding: 5px 10px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .mh-title { font-size: 13px; font-weight: 700; color: var(--text); }
    .mh-path { font-size: 11px; color: var(--text-dim); }
    .mh-flex { flex: 1; }
    .grid-wrap-desktop { flex: 1; overflow: auto; }

    /* ── Properties Panel ────────────────────────────– */
    .props-panel-desktop {
      width: 260px;
      background: var(--panel);
      border-left: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      flex-shrink: 0;
    }

    .pp-head { background: var(--grid-head); border-bottom: 2px solid var(--accent); padding: 8px 12px; font-size: 12px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.07em; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
    .pp-row { display: flex; border-bottom: 1px solid var(--border-light); transition: background 0.1s ease; }
    .pp-row:hover { background: var(--row-hover); }
    .pp-key { width: 90px; min-width: 90px; font-size: 11px; color: var(--text-muted); padding: 6px 10px; background: var(--grid-head); border-right: 1px solid var(--border-light); font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
    .pp-val { flex: 1; font-size: 11px; color: var(--text); padding: 6px 10px; font-family: var(--f); font-weight: 500; }
    .pp-val.acc { color: var(--accent-text); font-weight: 700; }

    /* ── Status Bar ──────────────────────────────────– */
    .statusbar-desktop {
      background: linear-gradient(180deg, #e6e9ed 0%, #d8dce1 100%);
      border-top: 1px solid #b0b8c4;
      height: 20px;
      display: flex;
      align-items: center;
      padding: 0 8px;
      gap: 0;
      flex-shrink: 0;
    }

    .sb-seg { font-size: 10.5px; color: #3a4a58; padding: 0 10px; border-right: 1px solid rgba(100,120,140,0.3); font-family: var(--fm); display: flex; align-items: center; gap: 4px; }
    .sb-seg:first-child { padding-left: 4px; }
    .sb-seg:last-child { border-right: none; }
    .sb-seg .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
    .sb-seg .dot.g { background: #1b8a3e; box-shadow: 0 0 3px rgba(27,138,62,0.5); }
    .sb-seg .dot.a { background: #d48000; }
    .sb-flex { flex: 1; }

    /* ── ISO Standard Sash Subtype Tabs ─────────────────────────── */
    .az-sash-subtabs {
      display: flex;
      align-items: stretch;
      background: #fff;
      border-bottom: 2px solid #d1d5db;
      margin: 4px 0 12px;
      gap: 0;
      overflow-x: auto;
    }
    .az-sash-subtab {
      display: flex;
      align-items: center;
      padding: 8px 15px;
      font-size: 11.5px;
      font-weight: 600;
      color: #6b7280;
      background: transparent;
      border: none;
      border-bottom: 3px solid transparent;
      margin-bottom: -2px;
      cursor: pointer;
      white-space: nowrap;
      transition: color .15s, border-color .15s, background .15s;
      letter-spacing: 0.01em;
    }
    .az-sash-subtab:hover { color: #1d4ed8; background: #eff6ff; }
    .az-sash-subtab.active { color: #1d4ed8; border-bottom-color: #1d4ed8; background: transparent; font-weight: 700; }

    /* ── Interlock System Sub-Tabs ───────────────────────────────── */
    .az-int-tabs {
      display: flex;
      align-items: stretch;
      background: #e8f0fe;
      border: 1px solid #93c5fd;
      border-bottom: none;
      border-radius: 6px 6px 0 0;
      gap: 0;
      overflow-x: auto;
    }
    .az-int-tab {
      display: flex;
      align-items: center;
      padding: 7px 18px;
      font-size: 11px;
      font-weight: 600;
      color: #374151;
      background: transparent;
      border: none;
      border-bottom: 3px solid transparent;
      margin-bottom: -1px;
      cursor: pointer;
      white-space: nowrap;
      transition: color .12s, background .12s;
    }
    .az-int-tab:hover { background: #dbeafe; color: #1d4ed8; }
    .az-int-tab.active { color: #1d4ed8; border-bottom-color: #1d4ed8; background: #fff; font-weight: 700; }
    .az-int-tab-content { display: block; }

    /* Template Editor Tabs */
    .az-tpl-tabs { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 0; }
    .az-tpl-tabs-nav { display: flex; gap: 0; border-bottom: 2px solid #e2e8f0; flex-shrink: 0; background: #f8fafc; }
    .az-tpl-tab-btn { 
      padding: 10px 16px; 
      border: none; 
      background: transparent; 
      color: #64748b; 
      font-weight: 600; 
      font-size: 12px; 
      cursor: pointer; 
      border-bottom: 3px solid transparent;
      transition: all 0.2s;
    }
    .az-tpl-tab-btn:hover { color: #334155; background: #eef2f7; }
    .az-tpl-tab-btn.active { color: #1d4ed8; border-bottom-color: #1d4ed8; background: #fff; }
    .az-tpl-tab-pane { display: none; flex: 1; min-height: 0; }
    .az-tpl-tab-pane.active { display: flex; flex: 1; min-height: 0; }

    /* Template Option Checkboxes */
    .tpl-option-checkbox { 
      display: flex; 
      align-items: center; 
      gap: 8px; 
      padding: 8px; 
      background: #fff; 
      border: 1px solid #e2e8f0; 
      border-radius: 6px; 
      cursor: pointer; 
      transition: all 0.2s;
    }
    .tpl-option-checkbox:hover { background: #f1f5f9; border-color: #cbd5e1; }
    .tpl-option-checkbox input[type="checkbox"] { cursor: pointer; }
    .tpl-option-checkbox label { cursor: pointer; flex: 1; margin: 0; font-size: 12px; font-weight: 600; color: #334155; }
    .tpl-option-checkbox.checked { background: #ecfdf5; border-color: #6ee7b7; }

    /* Custom Options List */
    .tpl-custom-opt-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px;
      background: #fff;
      border: 1px solid #fed7aa;
      border-radius: 6px;
      font-size: 12px;
    }
    .tpl-custom-opt-item-info {
      display: flex;
      flex-direction: column;
      gap: 2px;
      flex: 1;
    }
    .tpl-custom-opt-item-label { font-weight: 700; color: #92400e; }
    .tpl-custom-opt-item-type { font-size: 11px; color: #a16207; }
    .tpl-custom-opt-delete { 
      padding: 4px 8px;
      background: #fee2e2;
      color: #991b1b;
      border: 1px solid #fecaca;
      border-radius: 4px;
      cursor: pointer;
      font-size: 11px;
      font-weight: 600;
      transition: all 0.2s;
    }
    .tpl-custom-opt-delete:hover { background: #fecaca; }

    /* ── Toolbar Search ──────────────────────────────── */
    .tb-search-group {
      position: relative;
      display: flex;
      align-items: center;
      margin-left: 8px;
      flex-shrink: 0;
      width: 180px;
    }
    .tb-search-icon {
      position: absolute;
      left: 7px;
      pointer-events: none;
      color: #7a8ea0;
      z-index: 1;
    }
    .tb-search-input {
      width: 100%;
      height: 24px;
      background: #ffffff;
      border: 1px solid #a8b8cc;
      border-radius: 3px;
      padding: 0 28px 0 26px;
      font-size: 12px;
      color: var(--text);
      font-family: var(--f);
      outline: none;
      transition: border-color 0.15s, box-shadow 0.15s;
    }
    .tb-search-input:focus {
      border-color: #0078d4;
      box-shadow: 0 0 0 2px rgba(0,120,212,0.18);
    }
    .tb-search-input::placeholder { color: #9aaab8; }
    .tb-search-clear {
      position: absolute;
      right: 6px;
      background: none;
      border: none;
      cursor: pointer;
      color: #9aaab8;
      font-size: 13px;
      line-height: 1;
      padding: 0;
      display: none;
      align-items: center;
      justify-content: center;
    }
    .tb-search-clear.visible { display: flex; }
    .tb-search-clear:hover { color: #3a4a58; }

    /* Hide old hub.css elements that conflict */
    .workspace { display: none !important; }

    /* ── Menu Dropdowns ─────────────────────────────── */
    .menubar-desktop { position: relative; z-index: 1000; }
    /* Override: items with dropdown handle hover via .mb-label */
    .mb-item.mb-item-desktop:hover { background: none !important; color: inherit !important; }
    .mb-item .mb-label {
      display: flex; align-items: center;
      height: 100%; padding: 0 10px;
      cursor: pointer; font-size: 12px; color: #1a1e24;
    }
    .mb-item .mb-label:hover { background: #0078d4; color: #fff; }
    .mb-item.open > .mb-label { background: #0078d4; color: #fff; }
    .mb-drop {
      display: none;
      position: absolute;
      top: 100%; left: 0;
      min-width: 215px;
      background: #f0f1f3;
      border: 1px solid #8a9aaa;
      border-top: none;
      box-shadow: 3px 4px 10px rgba(0,0,0,0.22);
      z-index: 9999;
      padding: 3px 0;
    }
    .mb-item.open > .mb-drop { display: block; }
    .mb-opt {
      font-size: 12px; color: #1a1e24;
      padding: 5px 22px 5px 14px;
      cursor: pointer; white-space: nowrap;
      user-select: none;
    }
    .mb-opt:hover { background: #0078d4; color: #fff; }
    .mb-opt.disabled {
      color: #9aaab8; cursor: default; pointer-events: none;
    }
    .mb-opt.mb-opt--indent { padding-left: 26px; }
    .mb-opt.mb-opt--planned { color: #9aaab8; font-style: italic; pointer-events: none; }
    .mb-sep { height: 1px; background: #c0cad4; margin: 3px 0; }
    .mb-group-label {
      font-size: 10px; font-weight: 700; color: #7a8ea0;
      padding: 6px 14px 2px;
      text-transform: uppercase; letter-spacing: 0.09em;
      pointer-events: none; user-select: none;
    }

    /* ── Top Toolbar buttons (file ops only — compact) ── */
    .tb-btn-desktop {
      min-width: 34px; height: 36px;
      background: transparent; border: 1px solid transparent; border-radius: 3px;
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      gap: 2px; cursor: pointer; padding: 3px 6px 2px;
      transition: background 0.12s, border-color 0.12s;
    }
    .tb-btn-lbl { font-size: 7.5px; color: #5a6878; font-family: var(--f); line-height: 1; white-space: nowrap; pointer-events: none; user-select: none; }
    .tb-btn-desktop:hover { background: #dce8f5; border-color: #7baade; }
    .tb-btn-desktop:hover .tb-btn-lbl { color: #1565c0; }
    .tb-btn-desktop:active { background: #c5d9ef; border-color: #4a8ec8; }
    .tb-sep-desktop { width: 1px; height: 26px; background: #b8c2cc; margin: 0 5px; }
    .tb-label-desktop { font-size: 11px; color: var(--text-muted); padding: 0 6px; }
    /* Temporarily hidden toolbar items — remove class to re-show */
    .tb-suppressed { display: none !important; }

    .tree-group-header.zone-coming .badge-soon {
      text-transform: none;
      letter-spacing: 0;
      font-size: 8px;
      white-space: nowrap;
    }

    /* ── Material-Zone quick-tab strip (in main toolbar) ── */
    .mz-tabstrip {
      display: flex; align-items: center; gap: 4px;
      margin: 0 6px 0 4px; padding: 2px;
      background: linear-gradient(180deg,#f8fafc 0%,#eef2f7 100%);
      border: 1px solid #c8d2dd; border-radius: 5px;
    }
    .mz-tab {
      display: inline-flex; align-items: center; gap: 5px;
      height: 28px; padding: 0 9px;
      background: #fff; color: #334155;
      border: 1px solid #d6dee8; border-radius: 4px;
      font: 600 11px/1 var(--f); cursor: pointer; white-space: nowrap;
      transition: transform .08s, box-shadow .12s, background .12s, border-color .12s;
    }
    .mz-tab svg { flex-shrink: 0; }
    .mz-ico, .tr-ico { display: flex; align-items: center; justify-content: center; flex-shrink: 0; line-height: 0; }
    .mz-ico svg, .tr-ico svg, .mz-ico img, .tr-ico img { display: block; }
    .mz-tab:hover { background: #f1f5fb; border-color: #93b6db; box-shadow: 0 1px 3px rgba(21,101,192,.18); transform: translateY(-1px); }
    .mz-tab:active { transform: translateY(0); }
    .mz-tab--inv  { box-shadow: inset 0 -2px 0 #1976d2; }
    .mz-tab--proj { box-shadow: inset 0 -2px 0 #10b981; }
    .mz-tab--ord  { box-shadow: inset 0 -2px 0 #f59e0b; }
    .mz-tab--low  { box-shadow: inset 0 -2px 0 #ef4444; }
    .mz-tab--cut  { box-shadow: inset 0 -2px 0 #7c3aed; }
    .mz-tab--dxf  { box-shadow: inset 0 -2px 0 #0ea5e9; }
    .mz-tab--dxs  { box-shadow: inset 0 -2px 0 #64748b; }
    .mz-tab--door { box-shadow: inset 0 -2px 0 #1e40af; }
    @media (max-width: 1400px) {
      .mz-tab span { display:none; }
      .mz-tab { padding: 0 7px; }
    }

    /* ── Tools Ribbon (below stats bar) ──────────────── */
    .tools-ribbon-desktop {
      background: linear-gradient(180deg, #eeeff2 0%, #e4e6ea 100%);
      border-bottom: 1px solid #c8d0da;
      padding: 3px 10px 3px;
      display: flex;
      align-items: center;
      gap: 1px;
      flex-shrink: 0;
      overflow-x: auto;
    }
    .tools-ribbon-desktop::-webkit-scrollbar { height: 4px; }
    .tools-ribbon-desktop::-webkit-scrollbar-thumb { background: #b8c2cc; border-radius: 2px; }
    .tr-btn {
      min-width: 54px; height: 60px;
      background: transparent; border: 1px solid transparent; border-radius: 4px;
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      gap: 5px; cursor: pointer; padding: 6px 8px 5px; flex-shrink: 0;
      transition: background 0.12s, border-color 0.12s;
    }
    .tr-btn:hover { background: #d8e8f8; border-color: #6fa8de; box-shadow: 0 1px 3px rgba(21,101,192,0.15); }
    .tr-btn:hover .tr-lbl { color: #1565c0; }
    .tr-btn:active { background: #c2d6ef; border-color: #4a8ec8; }
    .tr-lbl {
      font-size: 9.5px; color: #3a4a58; font-family: var(--f); line-height: 1;
      white-space: nowrap; pointer-events: none; user-select: none; font-weight: 500; letter-spacing: 0.01em;
    }
    .tr-sep { width: 1px; height: 50px; background: #b8c2cc; margin: 0 6px; flex-shrink: 0; }
    .tr-spacer { flex: 1 1 auto; min-width: 12px; }
    .tr-btn.tr-right-grp { background: #f1f5fb; border-color: #d6e1ee; }
    .tr-btn.tr-right-grp:hover { background: #dde9f7; border-color: #6fa8de; }
    .tr-group-lbl {
      font-size: 7.5px; color: #8a9ab0; font-family: var(--f); text-transform: uppercase;
      letter-spacing: 0.08em; padding: 0 3px; align-self: flex-end; margin-bottom: 8px;
      white-space: nowrap; writing-mode: horizontal-tb;
    }

    /* ── Logikal-Style Create Project Dialog ─────────── */
    .projdlg-card {
      width: 1280px; max-width: 90vw; max-height: 93vh;
      background: #f0f1f3; border: 1px solid #7a8a9a; border-radius: 3px;
      box-shadow: 0 10px 40px rgba(0,0,0,0.45);
      display: flex; flex-direction: column; overflow: hidden;
      font-size: 11.5px; font-family: var(--f); color: #1a1e24;
    }
    .projdlg-titlebar {
      background: linear-gradient(180deg, #3a69b2 0%, #264f96 100%);
      color: #fff; padding: 7px 10px;
      display: flex; align-items: center; gap: 8px;
      font-size: 12.5px; font-weight: 600; flex-shrink: 0;
    }
    .projdlg-close {
      margin-left: auto; background: none; border: none; color: #b8d0f0;
      font-size: 18px; cursor: pointer; padding: 0 2px; line-height: 1;
    }
    .projdlg-close:hover { color: #fff; }
    .projdlg-body { display: flex; flex: 1; overflow: hidden; min-height: 0; }
    .projdlg-left { flex: 1; display: flex; flex-direction: column; overflow: hidden; border-right: 1px solid #bcc8d4; }
    .projdlg-right { width: 230px; flex-shrink: 0; display: flex; flex-direction: column; background: #e6e8ec; }
    .projdlg-hfields {
      background: #e6e8ec; border-bottom: 1px solid #c0cad4;
      padding: 9px 14px 7px; display: flex; flex-direction: column; gap: 5px; flex-shrink: 0;
    }
    .projdlg-row { display: flex; align-items: center; gap: 7px; min-height: 22px; }
    .projdlg-lbl { width: 130px; font-size: 11px; color: #2a3a4a; text-align: right; flex-shrink: 0; }
    .projdlg-lbl.r { color: #1a4a9a; font-weight: 700; }
    .projdlg-inp {
      flex: 1; height: 21px; border: 1px solid #8a9aaa; border-radius: 1px;
      background: #fff; font-size: 11.5px; font-family: var(--f); color: #1a1e24;
      padding: 0 5px; outline: none;
    }
    .projdlg-inp:focus { border-color: #1565c0; box-shadow: 0 0 0 2px rgba(21,101,192,0.18); }
    .projdlg-inp-sm { flex: 1; min-width: 140px; max-width: 260px; }
    select.projdlg-inp { cursor: pointer; padding: 0 3px; }
    .projdlg-newbtn {
      height: 21px; padding: 0 10px; font-size: 11px; font-family: var(--f);
      background: #e0e3e8; border: 1px solid #9aaabb; border-radius: 2px;
      cursor: pointer; white-space: nowrap; color: #1a1e24;
    }
    .projdlg-newbtn:hover { background: #ccd8e8; }
    /* Tabs */
    .projdlg-tabs { display: flex; background: #d4d8dc; border-bottom: 1px solid #b0bac4; flex-shrink: 0; }
    .projdlg-tab {
      padding: 5px 18px; font-size: 11.5px; cursor: pointer;
      border: 1px solid transparent; border-bottom: none; margin-bottom: -1px;
      background: transparent; color: #3a4a58; user-select: none;
    }
    .projdlg-tab.active { background: #f0f1f3; border-color: #b0bac4; color: #1a1e24; font-weight: 600; }
    .projdlg-tab:hover:not(.active) { background: #c4ced8; }
    .projdlg-tabcontent { display: none; flex: 1; overflow-y: auto; flex-direction: column; }
    .projdlg-tabcontent.active { display: flex; }
    /* Customer form */
    .projdlg-cform { padding: 6px 14px 2px; display: flex; flex-direction: column; gap: 3px; }
    .projdlg-crow { display: flex; align-items: center; gap: 7px; min-height: 21px; }
    .projdlg-clbl { width: 120px; font-size: 11px; color: #3a4a58; text-align: right; flex-shrink: 0; }
    .projdlg-clbl.h { color: #1565c0; font-weight: 700; }
    .projdlg-cinp {
      flex: 1; height: 19px; border: 1px solid #8a9aaa; border-radius: 1px;
      background: #fff; font-size: 11.5px; font-family: var(--f); color: #1a1e24;
      padding: 0 5px; outline: none;
    }
    .projdlg-cinp:focus { border-color: #1565c0; }
    select.projdlg-cinp { cursor: pointer; }
    .projdlg-addrbtn {
      height: 21px; padding: 0 10px; font-size: 11px; font-family: var(--f);
      background: #dce8f8; border: 2px solid #4a7ab8; border-radius: 2px;
      cursor: pointer; color: #1a3a6a; font-weight: 600;
    }
    .projdlg-addrbtn:hover { background: #c8d8f0; }
    /* Discounts */
    .projdlg-discblock { padding-left: 127px; display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
    .projdlg-discrow { display: flex; align-items: center; gap: 4px; }
    .projdlg-disc-num { width: 36px; height: 18px; border: 1px solid #9aaabb; border-radius: 1px; background: #eef0f3; font-size: 11px; font-family: var(--fm); text-align: right; padding: 0 3px; color: #3a4a58; }
    .projdlg-disc-max { width: 52px; height: 18px; border: 1px solid #9aaabb; border-radius: 1px; background: #eef0f3; font-size: 11px; font-family: var(--fm); text-align: right; padding: 0 3px; color: #6a7a8a; }
    /* Info bar */
    .projdlg-infobar { border-top: 1px solid #c0cad4; padding: 5px 14px; display: flex; align-items: center; gap: 7px; flex-shrink: 0; background: #e6e8ec; }
    /* Right panel */
    .projdlg-rpsect { display: flex; flex-direction: column; border-bottom: 1px solid #c0cad4; min-height: 0; }
    .projdlg-rpsect:last-child { border-bottom: none; }
    .projdlg-rptitle { background: #d4d8dc; border-bottom: 1px solid #b8c4d0; padding: 5px 10px; font-size: 11.5px; font-weight: 700; color: #1a2a3a; flex-shrink: 0; }
    .projdlg-rptbar { padding: 3px 8px; background: #e0e3e8; border-bottom: 1px solid #c8d0d8; display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
    .projdlg-rpbtn { width: 22px; height: 22px; background: none; border: 1px solid transparent; border-radius: 2px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
    .projdlg-rpbtn:hover { background: #c8d8e8; border-color: #90aac0; }
    .projdlg-rpcontent { flex: 1; background: #fafbfc; overflow: auto; display: flex; flex-direction: column; }
    /* Checks */
    .projdlg-checks { border-top: 1px solid #c0cad4; padding: 7px 14px 6px; display: flex; flex-direction: column; gap: 5px; background: #e6e8ec; flex-shrink: 0; }
    .projdlg-check { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: #1a2a3a; cursor: pointer; user-select: none; }
    .projdlg-check input[type=checkbox] { width: 13px; height: 13px; cursor: pointer; }
    /* Footer */
    .projdlg-footer { background: #dde0e5; border-top: 1px solid #b0bac4; padding: 7px 12px; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
    .projdlg-prefbtn { height: 26px; padding: 0 14px; font-size: 11.5px; font-family: var(--f); background: #e8eaed; border: 1px solid #9aacbc; border-radius: 2px; cursor: pointer; color: #1a1e24; }
    .projdlg-prefbtn:hover { background: #d0dce8; }
    .projdlg-sp { flex: 1; }
    .projdlg-okbtn { height: 26px; padding: 0 30px; font-size: 11.5px; font-family: var(--f); font-weight: 600; background: #e4eaf4; border: 2px solid #2a5ab0; border-radius: 2px; cursor: pointer; color: #1a2a4a; }
    .projdlg-okbtn:hover { background: #c0d4f0; }
    .projdlg-cancelbtn { height: 26px; padding: 0 16px; font-size: 11.5px; font-family: var(--f); background: #e8eaed; border: 1px solid #9aacbc; border-radius: 2px; cursor: pointer; color: #1a1e24; }
    .projdlg-cancelbtn:hover { background: #d4d8dc; }
