#app .il-page.active { display: flex; flex-direction: column; min-height: 0; }
.il-view:not(.active) { display: none !important; }
#tab-craft .il-view.active { display: contents; }

.il-kpis { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
#heists-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.il-kpis .il-kpi { position: relative; display: flex; flex-direction: row; align-items: center; gap: 12px; min-height: 0; padding: 10px 14px 10px 17px; background: rgba(0, 0, 0, .28); overflow: hidden; font: inherit; text-align: left; cursor: pointer; transition: background .12s, border-color .12s; }
.il-kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--pl-accent); }
.il-kpi:not(.static):hover { background: rgba(255, 255, 255, .05); border-color: var(--border-color-strong); }
.il-kpi.active { background: rgba(255, 255, 255, .08); border-color: var(--pl-accent); }
.il-kpi.static { cursor: default; opacity: 1; color: inherit; }
.il-kpi-ic { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, .06); color: var(--pl-accent); }
.il-kpi-ic svg { width: 19px; height: 19px; }
.il-kpi-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.il-kpi strong { font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--pl-accent); }
.il-kpi small { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.il-layout { display: flex; gap: 14px; flex: 1; min-height: 0; overflow: hidden; }
.il-list { flex: 0 0 360px; width: 360px; display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--border-color); border-radius: 6px; background: var(--bg-surface); overflow: hidden; }
.il-list.il-list-wide { flex: 1; width: auto; }
.il-list > .scroll-area { flex: 1; min-height: 0; }
.il-list-head { display: flex; align-items: center; gap: 8px; padding: 11px 12px; border-bottom: 1px solid var(--border-color); }
.il-list-head .ic { display: inline-flex; color: var(--text-secondary); }
.il-list-head svg { width: 16px; height: 16px; }
.il-list-title { font-size: 14px; font-weight: 650; color: var(--text-primary); white-space: nowrap; }
.il-list-head .count-badge { margin-right: auto; }
.il-list-head .btn { height: 28px; min-width: 0; padding: 0 10px; }
.il-list-tools { display: flex; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border-color); }
.il-list-tools select.input-field { width: 130px; height: 32px; }
.il-search { position: relative; flex: 1; min-width: 0; }
.il-search .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); display: inline-flex; color: var(--text-muted); pointer-events: none; }
.il-search svg { width: 14px; height: 14px; }
.il-search .input-field { width: 100%; height: 32px; padding-left: 32px; }

.il-rows { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; }
.il-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid transparent; border-radius: 5px; cursor: pointer; }
.il-row:hover { background: var(--staff-hover); border-color: var(--border-color); }
.il-row.selected { background: var(--staff-selected); border-color: var(--border-color-strong); box-shadow: inset 3px 0 var(--il-row-color, var(--brand)); }
.il-row .grow { flex: 1; min-width: 0; }
.il-row-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.il-row-title em { font-style: normal; font-weight: 500; color: var(--text-muted); }
.il-row-title .it-dot { flex: none; margin-right: 0; }
.il-row.is-off .it-dot { background: #d27a7a; }
.il-row-meta { margin-top: 2px; font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.il-row-ic { flex: 0 0 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; background: rgba(255, 255, 255, .06); color: var(--il-row-color, var(--text-secondary)); }
.il-row-ic svg { width: 17px; height: 17px; }
.il-row-img { flex: 0 0 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.il-row-img img { width: 26px; height: 26px; object-fit: contain; }
.il-row-btn { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--border-color); border-radius: 5px; background: rgba(255, 255, 255, .03); color: var(--text-secondary); cursor: pointer; }
.il-row .il-row-btn { opacity: 0; transition: opacity .12s; }
.il-row:hover .il-row-btn, .il-row.selected .il-row-btn { opacity: 1; }
.il-row-btn:hover { background: rgba(255, 255, 255, .1); color: var(--text-primary); }
.il-row-btn.danger:hover { color: #ffabb0; }
.il-row-btn svg { width: 14px; height: 14px; }
.il-tag { flex: none; padding: 1px 6px; border-radius: 4px; background: rgba(227, 169, 122, .16); color: #e9bb95; font-size: 10px; font-weight: 700; letter-spacing: .03em; }
.il-list-empty { padding: 30px 16px; font-size: 12px; line-height: 1.5; text-align: center; color: var(--text-muted); }

.il-editor { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--border-color); border-radius: 6px; background: var(--bg-surface); overflow: hidden; }
.il-editor.hidden { display: none; }
.il-editor > .scroll-area { flex: 1; min-height: 0; }
.il-editor:not(.hidden) ~ .il-empty { display: none; }
#territory-list-view { display: flex; flex-direction: column; flex: 1; min-height: 0; }
#territory-form-col, #gang-tablet-mission-form-col, .heist-form-col { flex: 0 0 440px; width: 440px; display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--border-color); border-radius: 6px; background: var(--bg-surface); overflow: hidden; }
#territory-form-col.hidden, #gang-tablet-mission-form-col.hidden, .heist-form-col.hidden { display: none; }
#territory-form-col > .scroll-area, #gang-tablet-mission-form-col > .scroll-area, .heist-form-col > .scroll-area { flex: 1; min-height: 0; }
.heist-loot-row { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.04); border: 1px solid var(--border-color); border-radius: 6px; padding: 8px 10px; margin-bottom: 6px; }
.heist-loot-row .grow { flex: 1; min-width: 0; }
#territory-map-live { width: 100%; height: 100%; }
#territory-map-section { position: relative; }
.terr-draw-toolbar-wrap { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 500; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; background: rgba(20, 22, 26, 0.92); border: 1px solid var(--border-color); box-shadow: 0 6px 18px rgba(0,0,0,.4); white-space: nowrap; }
.terr-draw-toolbar-wrap .il-zone-text { display: flex; flex-direction: column; margin-right: 4px; }
.terr-draw-toolbar-wrap.hidden { display: none; }
#territory-tab-zones .il-zone .btn { white-space: nowrap; }
.terr-owner-logo img { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; object-fit: cover; }
.terr-map-label { background: rgba(10,12,14,.75); border: 1px solid rgba(255,255,255,.15); color: #fff; font-size: 11px; font-weight: 650; padding: 2px 7px; border-radius: 4px; box-shadow: none; }
.terr-map-label::before { display: none; }
.il-head-ic { color: var(--it-color); }
.il-head .modal-close { flex: none; }
.il-head-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.il-head-actions.hidden { display: none; }
.il-head .btn .ic { display: inline-flex; }
.il-head .btn svg { width: 13px; height: 13px; }
.il-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 20px; text-align: center; color: var(--text-muted); }
.il-empty .ic { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 6px; border-radius: 12px; background: rgba(255, 255, 255, .05); color: var(--text-secondary); }
.il-empty svg { width: 24px; height: 24px; }
.il-empty b { font-size: 14px; color: var(--text-primary); }
.il-empty small { max-width: 320px; font-size: 12px; line-height: 1.5; }

.il-fields { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.il-stack { display: flex; flex-direction: column; gap: 14px; }
.il-stack.hidden, .il-block.hidden { display: none; }
.il-block { display: flex; flex-direction: column; gap: 10px; padding: 0 14px 14px; border: 1px solid var(--border-color); border-radius: 9px; background: rgba(255, 255, 255, .025); }
.il-block-head { display: flex; align-items: center; gap: 9px; margin: 0 -14px 2px; padding: 12px 14px; border-bottom: 1px solid var(--border-color); font-size: 13px; font-weight: 650; color: var(--text-primary); }
.il-block-head .ic { display: inline-flex; color: var(--it-color, var(--text-secondary)); }
.il-block-head svg { width: 15px; height: 15px; }
.il-block .form-group { margin: 0; }
.il-block .form-group > label, .il-coords label { font-size: 11px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.il-block .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.il-block .coords-row { display: flex; align-items: center; gap: 10px; margin: 0; }
.il-block .pos-display { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--border-color); border-radius: 6px; background: rgba(0, 0, 0, .2); font-family: Consolas, monospace; font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.il-block .btn .ic { display: inline-flex; }
.il-block .btn svg { width: 13px; height: 13px; }
.il-coords { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.il-coords label { display: flex; flex-direction: column; gap: 5px; }
.il-coords .input-field { width: 100%; font-family: Consolas, monospace; font-size: 12px; }
.il-mypos { align-self: flex-start; }
.il-hint { margin-top: -2px; font-size: 11.5px; color: var(--text-muted); }
.il-subtitle { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.il-toggle { margin: 0; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: 8px; background: rgba(0, 0, 0, .18); }
.il-toggle span { display: flex; flex-direction: column; font-size: 12.5px; color: var(--text-primary); }
.il-toggle small { font-size: 11px; color: var(--text-muted); }
.il-zone { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: 8px; background: rgba(0, 0, 0, .18); }
.il-zone-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.il-zone-text b { font-size: 12.5px; color: var(--text-primary); }
.il-zone-text small { font-size: 11px; color: var(--text-muted); }
.il-zone .btn { height: 30px; min-width: 0; }
.il-zone-col { flex-direction: column; align-items: stretch; gap: 6px; }
.il-zone-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.il-zone-head b { font-size: 12.5px; color: var(--text-primary); }
.il-zone-help { font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.il-zone-actions { display: flex; gap: 8px; }
.il-zone-actions .btn { flex: 1; }
.il-zone-actions .btn:last-child { flex: none; width: 36px; }

.il-add-row { display: flex; gap: 8px; margin: 0; }
.il-add-row .item-search-wrap { position: relative; flex: 1; min-width: 0; display: flex; gap: 6px; flex-wrap: nowrap; }
.il-add-row .item-search-wrap .input-field { flex: 1; min-width: 0; width: auto; }
.il-add-row .item-search-wrap .btn { flex: none; white-space: nowrap; }

.il-shop-add-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--border-color); border-radius: 8px; background: rgba(0, 0, 0, .18); }
.il-shop-add-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.il-shop-add-row .form-group { margin: 0; min-width: 0; }
.il-shop-add-row .form-group label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; display: block; }
.il-shop-field-type { flex: 0 0 110px; }
.il-shop-field-item { flex: 1; min-width: 180px; }
.il-shop-field-item .item-search-wrap { display: flex; gap: 6px; }
.il-shop-field-item .item-search-wrap .input-field { flex: 1; min-width: 0; }
.il-shop-field-item .item-search-wrap .btn { flex: none; white-space: nowrap; }
.il-shop-field-sm { flex: 1; min-width: 90px; }
.il-shop-add-btn { flex: 0 0 auto; white-space: nowrap; align-self: flex-end; }
.il-add-row > .input-field { flex: 0 0 76px; width: 76px; }
.il-add-row-shop > select.input-field { flex: 0 0 96px; width: 96px; }
.il-add-row .btn { flex: none; min-width: 0; height: 36px; }
.il-sublist { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.il-sublist .ing-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--border-color); border-radius: 6px; background: rgba(0, 0, 0, .18); }
.il-sublist .ing-row .grow { flex: 1; min-width: 0; }
.il-sub-ic { display: inline-flex; color: var(--text-secondary); }
.il-sub-ic svg { width: 15px; height: 15px; }
.il-sub-empty, .il-sublist .empty-state { padding: 12px; border: 1px dashed var(--border-color); border-radius: 6px; font-size: 12px; text-align: center; color: var(--text-muted); }

.il-money { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.il-money > div { padding: 12px 14px; border: 1px solid var(--border-color); border-radius: 8px; background: rgba(0, 0, 0, .18); box-shadow: inset 3px 0 #85cfa9; }
.il-money > div.dirty { box-shadow: inset 3px 0 #b9a3e3; }
.il-money small { display: block; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.il-money b { display: block; margin-top: 4px; font-size: 18px; font-variant-numeric: tabular-nums; color: var(--text-primary); }

.il-drug-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; padding: 14px; }

.gtm-curve-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; padding: 14px; }
.gtm-curve-card { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border: 1px solid var(--border-color); border-radius: 8px; background: rgba(255, 255, 255, .03); }
.gtm-curve-card small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.gtm-curve-card input { width: 100%; }
.il-drug { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border-color); border-radius: 8px; background: rgba(255, 255, 255, .03); }
.il-drug .grow { flex: 1; min-width: 0; }
.il-drug-price { flex: none; text-align: right; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; color: #85cfa9; }
.il-drug-price small { display: block; font-size: 10.5px; font-weight: 400; color: var(--text-muted); }
.il-drug-actions { display: flex; gap: 6px; }

@media (max-width: 1400px) {
  .il-list { flex-basis: 300px; width: 300px; }
  .il-kpi small { display: none; }
  .il-kpi-ic { display: none; }
}
.il-block .coords-row { padding: 0; border: 0; background: none; }
.il-zone .placement-btn { flex: none; width: auto; margin: 0; }
.il-row-ic img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
#gang-logo-block .society-info-row { padding: 10px 12px; }

