/* Структурная схема предприятия (NIPI-008) */
.org-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; }
.org-toolbar-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.org-zoom { min-width: 44px; text-align: center; color: var(--muted); font-size: 13px; }
.org-toggle { font-weight: 500; }
.org-edit-hint { background: #fff8e1; border: 1px solid #f5d77a; color: #6b5300; border-radius: 8px; padding: 8px 14px; font-size: 13px; }

.org-layout { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.org-canvas-card { padding: 0; overflow: hidden; min-width: 0; }
.org-canvas { overflow: auto; max-height: 72vh; min-height: 260px; background:
  radial-gradient(circle, #e3e8ef 1px, transparent 1px) 0 0 / 18px 18px, #fbfcfe; }
.org-svg { display: block; }
.org-node { cursor: pointer; }
.org-node:hover rect:first-child { filter: brightness(1.04); }
.org-dragging { opacity: 0.85; cursor: grabbing; }
.org-drop-target rect:first-child { stroke: #f5b300 !important; stroke-width: 4 !important; }
.org-link { cursor: pointer; }
.org-empty { padding: 48px 24px; }

.org-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12px; }
.org-legend-item { display: inline-flex; align-items: center; gap: 6px; }

.org-panel { width: 320px; position: sticky; top: 16px; max-height: 80vh; overflow-y: auto; }
.org-panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.org-panel-head h3 { flex: 1; font-size: 16px; }
.org-swatch { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; border: 1px solid rgba(0, 0, 0, .1); }
.org-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 8px; font-size: 13px; }
.org-facts dt { color: var(--muted); }
.org-facts dd { margin: 0; font-weight: 500; }
.org-panel-section { border-top: 1px solid var(--border); padding: 12px 0 4px; display: flex; flex-direction: column; gap: 8px; }
.org-panel-section.org-row { flex-direction: row; }
.org-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.org-space { justify-content: space-between; }
.org-panel input[type=color], .org-design input[type=color] { padding: 2px; height: 36px; width: 100%; }
.org-link-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.org-link-list li { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.org-link-list li > span:nth-child(2) { flex: 1; min-width: 160px; }
.org-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.org-design .org-design-sub { margin-left: 24px; display: grid; gap: 6px; }

@media (max-width: 1100px) {
  .org-layout { grid-template-columns: 1fr; }
  .org-panel { width: auto; position: static; max-height: none; }
}

/* Печать: только схема */
@media print {
  body.org-printing .sidebar, body.org-printing .topbar, body.org-printing .org-toolbar,
  body.org-printing .org-edit-hint, body.org-printing .org-panel, body.org-printing #org-links,
  body.org-printing .toast { display: none !important; }
  body.org-printing .layout, body.org-printing .main, body.org-printing .content { display: block; padding: 0; background: #fff; }
  body.org-printing .org-canvas { max-height: none; overflow: visible; background: #fff; }
  body.org-printing .org-canvas-card { border: none; box-shadow: none; }
  body.org-printing .org-svg { max-width: 100%; height: auto; }
}
