/* ============================================================================
   GOSTOL PLAN / TOC ENTERPRISE MODULE
   Compact professional TOC + TOC Admin styling
   Loaded separately from views.templ to keep the main template maintainable.
   ============================================================================ */

:root {
    --toc-red: #cc2027;
    --toc-red-dark: #a81a20;
    --toc-blue: #155ca8;
    --toc-ink: #172033;
    --toc-muted: #536170;
    --toc-border: #cbd5e1;
    --toc-panel: #ffffff;
    --toc-canvas-bg: #f8fafc;
    --toc-grid-dot: #d8dee9;
    --toc-soft: #eef3f9;
}

/* -------------------- TOC tab density -------------------- */
#tab-tp {
    padding: 6px 8px !important;
    overflow: hidden !important;
    font-size: 11.5px;
    line-height: 1.25;
}

#tab-tp .toc-topbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 8px;
    align-items: center;
    margin-bottom: 5px;
}

#tab-tp .toc-title h2 {
    font-size: 18px !important;
    line-height: 1.05;
    margin: 0 0 1px 0 !important;
    color: var(--toc-ink);
    letter-spacing: -0.03em;
}

#tab-tp .toc-subtitle,
#tab-tp .toc-breadcrumbs {
    font-size: 10px !important;
    line-height: 1.2;
    color: var(--toc-muted);
}

#tab-tp .toc-breadcrumbs {
    margin: 0 0 5px 0 !important;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#tab-tp .toc-breadcrumbs a {
    color: var(--toc-blue);
    text-decoration: none;
    font-weight: 700;
}

#tab-tp .toc-actions {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: nowrap;
}

#tab-tp .toc-actions .filter-select {
    height: 30px;
    min-width: 260px;
    padding: 4px 8px !important;
    font-size: 11px !important;
    border-radius: 5px;
}

#tab-tp .toc-actions .btn,
#tab-tp .btn {
    padding: 6px 9px !important;
    font-size: 11px !important;
    line-height: 1.15;
    border-radius: 5px;
    min-height: 28px;
}

#tab-tp .toc-workarea {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 7px;
    min-height: 0;
}

#tab-tp .toc-control-panel {
    padding: 8px 9px !important;
    margin: 0 !important;
    border-radius: 7px !important;
    max-height: calc(100vh - 170px);
    overflow: auto;
}

#tab-tp .toc-control-panel h3 {
    font-size: 12px !important;
    padding-bottom: 5px !important;
    margin-bottom: 7px !important;
    letter-spacing: -0.01em;
}

#tab-tp .view-label {
    font-size: 8.5px !important;
    line-height: 1.05 !important;
    margin-bottom: 2px !important;
    letter-spacing: .04em;
}

#tab-tp .view-value {
    font-size: 11px !important;
    line-height: 1.16 !important;
    margin-bottom: 5px !important;
}

#tab-tp .view-desc-box {
    padding: 6px 7px !important;
    font-size: 10.5px !important;
    line-height: 1.2 !important;
    margin-bottom: 7px !important;
    border-radius: 5px;
    max-height: 58px;
    overflow: auto;
}

#tab-tp .mini-link {
    font-size: 10px !important;
    padding: 4px 0 !important;
    display: flex;
    justify-content: space-between;
    gap: 5px;
    align-items: center;
}

#tab-tp .dept-dot {
    width: 8px !important;
    height: 8px !important;
    display: inline-block;
    border-radius: 999px;
    margin-right: 4px;
    vertical-align: middle;
}

#tab-tp .toc-canvas-column {
    min-width: 0;
    min-height: 0;
}

#tab-tp .tp-canvas-wrapper {
    height: calc(100vh - 156px) !important;
    min-height: calc(100vh - 156px) !important;
    border-radius: 6px !important;
    background: #d8dee8 !important;
    overflow: auto !important;
}

#tab-tp .tp-canvas {
    width: 3000px !important;
    height: 2000px !important;
    background-color: var(--toc-canvas-bg) !important;
    background-image: radial-gradient(var(--toc-grid-dot) .8px, transparent .8px) !important;
    background-size: 28px 28px !important;
}

#tab-tp .tp-bubble {
    width: 155px !important;
    padding: 6px 7px !important;
    border-width: 1px !important;
    border-left-width: 5px !important;
    border-radius: 5px !important;
    box-shadow: 0 4px 10px rgba(15,23,42,.12) !important;
}

#tab-tp .bubble-owner {
    font-size: 7.5px !important;
    line-height: 1.08 !important;
    margin: -6px -7px 4px -7px !important;
    padding: 5px 7px 4px 7px !important;
    letter-spacing: .02em !important;
}

/* Department identity is shown as a full-width top band. The problem/type
   accent on the card edge remains unchanged and keeps its original meaning. */
#tab-tp .tp-bubble .department-header {
    border-bottom: 0 !important;
    border-radius: 4px 4px 0 0;
    font-weight: 900 !important;
    text-shadow: none;
}

/* -------------------- Multilingual node content -------------------- */
.toc-content-language-control {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    color: #475569;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

.toc-content-language-select {
    min-width: 118px;
    height: 26px;
    padding: 2px 5px;
    border: 1px solid #94a3b8;
    border-radius: 4px;
    background: #fff;
    color: #172033;
    font-size: 10px;
    font-weight: 800;
}

.toc-legacy-language-field {
    display: none !important;
}

.toc-multilingual-editor {
    margin: 10px 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    overflow: hidden;
}

.toc-language-editor-heading {
    padding: 9px 11px;
    background: #eef2f7;
    border-bottom: 1px solid #cbd5e1;
    color: #334155;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.toc-language-tabs {
    display: flex;
    gap: 3px;
    padding: 8px 8px 0;
    background: #fff;
}

.toc-language-tab {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-bottom: 3px solid transparent;
    border-radius: 6px 6px 0 0;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    font-weight: 800;
}

.toc-language-tab.active {
    border-bottom-color: #cc2027;
    background: #fff;
    color: #cc2027;
}

.toc-language-panels {
    padding: 12px;
    background: #fff;
}

.toc-language-panel {
    display: none;
}

.toc-language-panel.active {
    display: grid;
    gap: 6px;
}

.toc-language-panel label {
    margin-top: 4px;
    color: #475569;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .04em;
}

.toc-language-panel input,
.toc-language-panel textarea {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
    color: #172033;
    font: inherit;
}

.toc-language-panel textarea {
    min-height: 92px;
    resize: vertical;
}

#tab-tp .bubble-title {
    font-size: 10.5px !important;
    line-height: 1.12 !important;
    margin-bottom: 3px !important;
    font-weight: 800 !important;
}

#tab-tp .bubble-text {
    font-size: 9.5px !important;
    line-height: 1.16 !important;
}

#tab-tp .bubble-meta {
    font-size: 7.2px !important;
    line-height: 1.12 !important;
    margin-top: 4px !important;
}

#tab-tp .bubble-actions {
    margin-top: 4px !important;
    gap: 4px !important;
    opacity: .55 !important;
}

#tab-tp .bubble-actions button {
    width: 18px !important;
    height: 18px !important;
    font-size: 10px !important;
    line-height: 1 !important;
    border-radius: 4px !important;
    padding: 0 !important;
}

#tab-tp .node-linked-pill {
    font-size: 7px !important;
    line-height: 1 !important;
    padding: 2px 4px !important;
    margin-top: 4px !important;
}

#tab-tp .zoom-controls {
    width: 96px !important;
    padding: 4px !important;
    bottom: 8px !important;
    left: calc(100% - 108px) !important;
    border-radius: 6px !important;
}

#tab-tp .zoom-btn {
    width: 22px !important;
    height: 22px !important;
    font-size: 11px !important;
}

#tab-tp .zoom-text {
    font-size: 10px !important;
}

#tab-tp .toc-help-line {
    display: none !important;
}

/* -------------------- True fullscreen TOC map only -------------------- */
body.toc-focus-mode .sidebar,
body.toc-focus-mode .tabs-header,
body.toc-focus-mode .mobile-header {
    display: none !important;
}

body.toc-focus-mode {
    display: block !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
    background: #0f172a !important;
}

body.toc-focus-mode .main-content {
    width: 100vw !important;
    height: 100vh !important;
    display: block !important;
    overflow: hidden !important;
    background: #0f172a !important;
}

body.toc-focus-mode .tab-content {
    display: none !important;
}

body.toc-focus-mode #tab-tp {
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #0f172a !important;
}

body.toc-focus-mode #tab-tp .toc-topbar,
body.toc-focus-mode #tab-tp .toc-control-panel,
body.toc-focus-mode #tab-tp .toc-help-line,
body.toc-focus-mode #tab-tp .toc-breadcrumbs {
    display: none !important;
}

body.toc-focus-mode #tab-tp .toc-workarea,
body.toc-focus-mode #tab-tp .toc-canvas-column,
body.toc-focus-mode #tab-tp .tp-canvas-wrapper {
    display: block !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--toc-canvas-bg) !important;
    overflow: auto !important;
}

body.toc-focus-mode #tab-tp .zoom-controls {
    position: fixed !important;
    right: 12px !important;
    bottom: 12px !important;
    left: auto !important;
    z-index: 99999 !important;
}

body.toc-focus-mode #tab-tp .tp-bubble {
    width: 145px !important;
    padding: 5px 6px !important;
}

body.toc-focus-mode #tab-tp .bubble-title { font-size: 10px !important; }
body.toc-focus-mode #tab-tp .bubble-text { font-size: 9px !important; }
body.toc-focus-mode #tab-tp .bubble-owner { font-size: 7px !important; }

/* -------------------- TOC Admin density -------------------- */
#tab-toc-admin {
    padding: 10px 12px !important;
    font-size: 12px;
    line-height: 1.25;
}

#tab-toc-admin > h2 {
    font-size: 18px !important;
    line-height: 1.05;
    margin-bottom: 10px !important;
    letter-spacing: -0.03em;
}

#tab-toc-admin .feature-card {
    padding: 12px 14px !important;
    margin-bottom: 10px !important;
    border-radius: 7px !important;
}

#tab-toc-admin .feature-card h3 {
    font-size: 15px !important;
    margin-bottom: 8px !important;
    padding-bottom: 6px !important;
}

#tab-toc-admin .list-group {
    max-height: 255px !important;
    margin-bottom: 10px !important;
}

#tab-toc-admin .list-item {
    padding: 6px 8px !important;
    font-size: 11px !important;
}

#tab-toc-admin .form-group {
    margin-bottom: 8px !important;
}

#tab-toc-admin .form-group label,
#tab-toc-admin .view-label {
    font-size: 9px !important;
    margin-bottom: 3px !important;
    letter-spacing: .04em;
}

#tab-toc-admin input,
#tab-toc-admin select,
#tab-toc-admin textarea {
    padding: 6px 7px !important;
    min-height: 28px;
    font-size: 11px !important;
    border-radius: 5px !important;
}

#tab-toc-admin input[type="color"] {
    padding: 0 !important;
    height: 28px !important;
    min-height: 28px !important;
}

#tab-toc-admin .btn {
    padding: 6px 9px !important;
    min-height: 28px;
    font-size: 11px !important;
    line-height: 1.1;
    border-radius: 5px !important;
}

#tab-toc-admin .gantt-th {
    padding: 6px 8px !important;
    font-size: 9px !important;
}

#tab-toc-admin .gantt-td {
    padding: 6px 8px !important;
    font-size: 10.5px !important;
}

@media (max-width: 1200px) {
    #tab-tp .toc-workarea { grid-template-columns: 190px minmax(0, 1fr); }
    #tab-tp .toc-actions .filter-select { min-width: 210px; }
}

/* ==========================================================================
   TOC-only industrial density / print / plotter formatting
   ========================================================================== */
.toc-only-tabs .tab-btn { padding: 9px 14px; font-size: 0.82rem; }
.toc-only-nav .nav-item { padding: 8px 14px; font-size: 0.82rem; }
.toc-topbar { padding: 8px 0 10px; gap: 8px; }
.toc-title h2 { font-size: 1.05rem; line-height: 1.1; }
.toc-subtitle { font-size: 0.72rem; }
.toc-actions { gap: 5px; }
.toc-actions .btn, .toc-actions select { font-size: 0.72rem; padding: 6px 8px; height: 32px; }
.toc-workarea { grid-template-columns: 230px minmax(0, 1fr); gap: 8px; }
.toc-control-panel { padding: 9px !important; }
.toc-control-panel h3 { font-size: 0.82rem !important; padding-bottom: 6px !important; margin-bottom: 6px !important; }
.toc-control-panel .view-label { font-size: 0.58rem; margin-bottom: 2px; }
.toc-control-panel .view-value { font-size: 0.72rem; margin-bottom: 5px; }
.toc-control-panel .view-desc-box { font-size: 0.68rem; padding: 6px; margin-bottom: 7px; line-height: 1.25; }
.toc-control-panel .btn { font-size: 0.68rem; padding: 5px 7px; }
.toc-side-link-list { max-height: 160px; overflow:auto; border:1px solid var(--border); border-radius:6px; background:#f8fafc; }
.toc-node-link-mini { font-size: 0.62rem; padding: 5px; align-items:center; }
.toc-node-link-mini .btn { padding: 3px 5px; font-size: 0.6rem; }
.tp-canvas-wrapper { min-height: calc(100vh - 182px); }
.tp-bubble { width: 150px !important; padding: 6px !important; border-width: 1px !important; border-left-width: 5px !important; border-radius: 5px !important; }
.bubble-owner { font-size: 0.48rem !important; line-height: 1.05 !important; padding-bottom: 3px !important; margin-bottom: 3px !important; }
.bubble-title { font-size: 0.68rem !important; line-height: 1.15 !important; margin-bottom: 3px !important; }
.bubble-text { font-size: 0.62rem !important; line-height: 1.16 !important; }
.bubble-meta { font-size: 0.48rem !important; line-height: 1.05 !important; margin-top: 4px !important; }
.bubble-actions { gap: 4px !important; margin-top: 4px !important; }
.bubble-actions button { font-size: 0.72rem !important; width: 18px; height: 18px; padding:0; }
.node-linked-pill { font-size: 0.54rem !important; padding: 2px 4px !important; margin-top: 3px !important; }
.zoom-controls { transform: scale(0.82); transform-origin: top right; }
.modal-wide { max-width: 920px !important; }

.toc-print-page { background:#f4f7fb; padding: 12px; }
.toc-print-toolbar { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:10px; }
.toc-print-toolbar h2 { font-size:1.1rem; margin:0; }
.print-document { background:white; border:1px solid var(--border); border-radius:8px; padding:14px; box-shadow: var(--shadow-soft); }
.print-cover { border-bottom:2px solid var(--border); margin-bottom:12px; padding-bottom:10px; }
.print-cover h1 { font-size:1.35rem; margin-bottom:5px; }
.print-meta-line { font-size:0.78rem; margin-bottom:3px; }
.print-section { margin: 12px 0 16px; page-break-inside: avoid; }
.print-section h3 { font-size:0.95rem; color:var(--gostol-red); margin-bottom:6px; }
.toc-print-table { width:100%; border-collapse:collapse; font-size:0.68rem; background:white; }
.toc-print-table th { text-align:left; background:#e8eef6; border:1px solid #b8c4d4; padding:5px; font-size:0.62rem; text-transform:uppercase; letter-spacing:.03em; }
.toc-print-table td { border:1px solid #cdd6e2; padding:5px; vertical-align:top; line-height:1.22; }
.toc-print-table.compact td { padding:3px 4px; }
.toc-print-table small { color:#475569; font-size:0.58rem; }


/* ============================================================================
   BRAND NEW: Printing the Visual Canvas
   ============================================================================ */
@media print {
    @page { size: A3 landscape; margin: 9mm; }
    body { display:block !important; overflow:visible !important; background:white !important; }
    .sidebar, .mobile-header, .tabs-header, .no-print, .toast { display:none !important; }
    .main-content { display:block !important; overflow:visible !important; background:white !important; }
    .tab-content { display:none !important; overflow:visible !important; padding:0 !important; }
    
    /* Standard Table Printing */
    #tab-toc-map.active, #tab-toc-map { display:block !important; }
    .print-document { border:none !important; box-shadow:none !important; padding:0 !important; }
    .toc-print-table { font-size:8pt; }
    .toc-print-table th { font-size:7pt; padding:3pt; }
    .toc-print-table td { padding:3pt; }
    .print-cover h1 { font-size:18pt; }
    .print-section h3 { font-size:11pt; color:#000; }

    /* Visual Canvas Printing Overrides (Triggered by JS) */
    body.printing-canvas-mode #tab-toc-map { display: none !important; }
    body.printing-canvas-mode #tab-tp { display: block !important; padding: 0 !important; }
    body.printing-canvas-mode .toc-workarea { display: block !important; }
    body.printing-canvas-mode .toc-control-panel { display: none !important; }
    body.printing-canvas-mode .tp-canvas-wrapper {
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
        border: none !important;
        background: white !important;
        box-shadow: none !important;
    }
    body.printing-canvas-mode .tp-canvas {
        /* Let the browser scale the explicit width/height we set in JS to fit the paper */
        transform: scale(1) !important;
        background-image: none !important; /* Save Ink! */
        background-color: white !important;
    }
    body.printing-canvas-mode .zoom-controls { display: none !important; }
}

/* ============================================================================
   SURGICAL FIX: TOC MAP FULLSCREEN / FOCUS MODE
   ============================================================================ */

body.toc-focus-mode {
    overflow: hidden !important;
}

body.toc-focus-mode #sidebar,
body.toc-focus-mode .sidebar,
body.toc-focus-mode .topbar,
body.toc-focus-mode .main-topbar,
body.toc-focus-mode .no-print:not(.zoom-controls) {
    display: none !important;
}

body.toc-focus-mode #main-content,
body.toc-focus-mode .main-content,
body.toc-focus-mode .content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    max-width: none !important;
}

body.toc-focus-mode #tab-tp {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
    display: block !important;
    width: 100vw !important;
    height: 100vh !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #d8dee8 !important;
    overflow: hidden !important;
}

body.toc-focus-mode #tab-tp .toc-topbar,
body.toc-focus-mode #tab-tp .toc-control-panel,
body.toc-focus-mode #tab-tp .toc-breadcrumbs,
body.toc-focus-mode #tab-tp > h2,
body.toc-focus-mode #tab-tp > .toc-subtitle {
    display: none !important;
}

body.toc-focus-mode #tab-tp .toc-workarea {
    display: block !important;
    width: 100vw !important;
    height: 100vh !important;
}

body.toc-focus-mode #tab-tp .toc-canvas-column {
    width: 100vw !important;
    height: 100vh !important;
}

body.toc-focus-mode #tab-tp .tp-canvas-wrapper,
#tab-tp .tp-canvas-wrapper.toc-real-fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    min-height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
    overflow: auto !important;
    background: #d8dee8 !important;
}

body.toc-focus-mode #tab-tp .zoom-controls,
#tab-tp .tp-canvas-wrapper.toc-real-fullscreen .zoom-controls {
    position: fixed !important;
    top: 12px !important;
    right: 16px !important;
    z-index: 100000 !important;
}

/* ============================================================================
   SEMANTIC TOC CONNECTION COLORS
   ============================================================================ */

.toc-edge-color-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toc-edge-color-input {
    width: 74px !important;
    height: 44px;
    padding: 3px !important;
    cursor: pointer;
    background: #fff;
}

.toc-edge-color-preview {
    min-width: 104px;
    padding: 8px 12px;
    border-radius: 6px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 900;
    text-align: center;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(15, 23, 42, 0.2);
}

.toc-edge-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.toc-edge-color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #94a3b8;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.toc-edge-color-swatch:hover,
.toc-edge-color-swatch:focus-visible {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px #0f172a;
    outline: none;
}

.toc-edge-inline-editor {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    padding-left: 6px;
}

.toc-edge-inline-dot {
    display: inline-block;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.35);
    flex: 0 0 auto;
}

.toc-edge-inline-form {
    display: inline-flex;
    margin: 0;
}

.toc-edge-inline-input {
    width: 27px !important;
    height: 25px !important;
    padding: 1px !important;
    border-radius: 4px !important;
    cursor: pointer;
    background: #fff;
}

.toc-semantic-legend {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding-left: 10px;
    border-left: 1px solid #cbd5e1;
}

.toc-semantic-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 750;
    white-space: nowrap;
}

.toc-semantic-legend-item i {
    display: inline-block;
    width: 15px;
    height: 4px;
    border-radius: 999px;
}

.tp-edge-path,
.wf-edge-path {
    transition: stroke-width 0.15s ease, opacity 0.15s ease;
}

.tp-edge-path:hover,
.wf-edge-path:hover {
    stroke-width: 4.5 !important;
    opacity: 0.88;
}

@media (max-width: 768px) {
    .toc-semantic-legend {
        width: 100%;
        padding-left: 0;
        padding-top: 7px;
        border-left: 0;
        border-top: 1px solid #cbd5e1;
    }
}

/* ============================================================================
   TOC DESKTOP UX v0.6.0 — INDUSTRIAL PROCESS WORKSPACE
   Full-width desktop workspace, compact process cards, inspector, modes.
   ============================================================================ */

:root {
    --toc-v060-navy: #203044;
    --toc-v060-navy-2: #33465d;
    --toc-v060-line: #d5dde7;
    --toc-v060-soft: #f4f7fa;
    --toc-v060-blue: #2563a6;
    --toc-v060-amber: #c77b00;
    --toc-v060-red: #b4232a;
    --toc-v060-green: #2a7a44;
    --toc-v060-inspector-w: 390px;
}

/* Desktop no longer wastes permanent width on the duplicate left navigation. */
@media (min-width: 769px) {
    body.toc-industrial-v060 > .sidebar,
    body.toc-industrial-v060 > .sidebar-overlay,
    body.toc-industrial-v060 > .mobile-header {
        display: none !important;
    }
    body.toc-industrial-v060 {
        display: block !important;
    }
    body.toc-industrial-v060 > .main-content {
        width: 100vw !important;
        max-width: none !important;
        height: 100vh !important;
    }
}

body.toc-industrial-v060 .tabs-header {
    min-height: 42px;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    position: sticky;
    top: 0;
    z-index: 80;
    box-shadow: 0 1px 0 rgba(15,23,42,.05);
}
body.toc-industrial-v060 .tab-btn {
    padding: 12px 16px !important;
    font-size: .88rem !important;
    white-space: nowrap;
}

body.toc-industrial-v060 #tab-tp {
    position: relative;
    padding: 8px 10px !important;
    background: #edf2f7;
}

body.toc-industrial-v060 #tab-tp .toc-topbar {
    grid-template-columns: minmax(260px,1fr) auto;
    padding: 0 0 7px;
    margin-bottom: 0;
}
body.toc-industrial-v060 #tab-tp .toc-title h2 {
    font-size: 17px !important;
    font-weight: 850;
}
body.toc-industrial-v060 #tab-tp .toc-subtitle,
body.toc-industrial-v060 #tab-tp .toc-breadcrumbs {
    color: #66758a;
}

/* The old map-management panel is now an on-demand drawer. */
body.toc-industrial-v060 #tab-tp .toc-workarea {
    display: block !important;
    position: relative;
    min-height: 0;
}
body.toc-industrial-v060 #tab-tp .toc-control-panel {
    display: none !important;
    position: absolute !important;
    left: 8px;
    top: 8px;
    width: 290px;
    max-height: calc(100vh - 170px);
    z-index: 95;
    background: rgba(255,255,255,.985) !important;
    border: 1px solid #c9d4df !important;
    box-shadow: 0 18px 44px rgba(15,23,42,.20) !important;
}
body.toc-industrial-v060.toc-controls-open #tab-tp .toc-control-panel {
    display: block !important;
}
body.toc-industrial-v060 #tab-tp .toc-canvas-column {
    width: 100% !important;
}
body.toc-industrial-v060 #tab-tp .tp-canvas-wrapper {
    height: calc(100vh - 165px) !important;
    min-height: calc(100vh - 165px) !important;
    border: 1px solid #cbd5df !important;
    border-radius: 8px !important;
    background: #dfe5ec !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}
body.toc-industrial-v060 #tab-tp .tp-canvas {
    background-color: #f7f9fb !important;
    background-image:
        linear-gradient(rgba(87,104,124,.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(87,104,124,.055) 1px, transparent 1px),
        radial-gradient(#c7d0db .7px, transparent .7px) !important;
    background-size: 140px 140px, 140px 140px, 28px 28px !important;
}

/* Industrial workspace toolbar */
.toc-v060-toolbar {
    min-height: 43px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 8px;
    margin: 0 0 7px;
    background: #fff;
    border: 1px solid #cdd6e0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(15,23,42,.04);
}
.toc-v060-toolbar-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.toc-v060-toolbar-spacer { flex: 1; }
.toc-v060-btn {
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 9px;
    border: 1px solid #c7d1dc;
    border-radius: 6px;
    background: #fff;
    color: #34465b;
    font-size: 10.5px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}
.toc-v060-btn:hover { background: #f3f6f9; border-color: #aebbc9; }
.toc-v060-btn.active {
    background: var(--toc-v060-navy);
    border-color: var(--toc-v060-navy);
    color: #fff;
}
.toc-v060-btn.settings.active { background: #eef4fb; color: #225b93; border-color: #7ca4c8; }
.toc-v060-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: #617086;
    font-size: 10px;
    font-weight: 700;
}
.toc-v060-status b { color: #26384d; }
.toc-v060-status .dot {
    width: 7px; height: 7px; border-radius: 50%; background: #2a7a44;
}
.toc-v060-divider { width:1px; height:22px; background:#d7dfe8; margin:0 2px; }

/* Compact process cards: details stay in DOM and move to the inspector. */
body.toc-industrial-v060 #tab-tp .tp-bubble {
    width: 218px !important;
    min-height: 96px;
    padding: 0 10px 9px !important;
    border: 1px solid #bac6d2 !important;
    border-left: 5px solid #52667c !important;
    border-radius: 8px !important;
    background: #fff !important;
    box-shadow: 0 6px 16px rgba(15,23,42,.11) !important;
    overflow: visible;
    transition: box-shadow .14s ease, transform .14s ease, border-color .14s ease;
}
body.toc-industrial-v060 #tab-tp .tp-bubble:hover {
    box-shadow: 0 10px 24px rgba(15,23,42,.16) !important;
}
body.toc-industrial-v060 #tab-tp .tp-bubble.toc-v060-selected {
    border-color: #2b6ea8 !important;
    box-shadow: 0 0 0 2px rgba(43,110,168,.18), 0 10px 24px rgba(15,23,42,.16) !important;
}
body.toc-industrial-v060 #tab-tp .bubble-owner {
    margin: 0 -10px 8px -10px !important;
    padding: 5px 9px !important;
    min-height: 24px;
    display: flex;
    align-items: center;
    border-radius: 7px 7px 0 0 !important;
    background: #3f536a !important;
    color: #fff !important;
    font-size: 7.5px !important;
    font-weight: 900 !important;
    letter-spacing: .055em !important;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.toc-industrial-v060 #tab-tp .bubble-title {
    margin: 0 0 7px !important;
    color: #1d2d40 !important;
    font-size: 12.2px !important;
    line-height: 1.16 !important;
    font-weight: 850 !important;
    letter-spacing: -.01em;
}
body.toc-industrial-v060 #tab-tp .bubble-text,
body.toc-industrial-v060 #tab-tp .bubble-meta {
    display: none !important;
}
.toc-v060-summary {
    display: grid;
    gap: 4px;
}
.toc-v060-summary-row {
    display: grid;
    grid-template-columns: 15px minmax(0,1fr);
    align-items: start;
    gap: 5px;
    min-width: 0;
    color: #53657a;
    font-size: 8.4px;
    line-height: 1.22;
}
.toc-v060-summary-row i {
    font-style: normal;
    text-align: center;
    color: #73859a;
}
.toc-v060-summary-row span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.toc-v060-node-flags {
    position: absolute;
    top: 5px;
    right: 6px;
    display: flex;
    gap: 3px;
    z-index: 3;
}
.toc-v060-flag {
    min-width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: rgba(255,255,255,.92);
    color: #41566d;
    font-size: 9px;
    font-weight: 900;
    box-shadow: 0 0 0 1px rgba(255,255,255,.4);
}
.toc-v060-flag.warn { background:#fff3df; color:#9a5c00; }
.toc-v060-flag.problem { background:#ffe8e8; color:#a52127; }
body.toc-industrial-v060 #tab-tp .bubble-actions {
    display: none !important;
    position: absolute;
    left: 7px;
    right: 7px;
    bottom: -27px;
    padding: 4px;
    border: 1px solid #cad4df;
    border-radius: 6px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 5px 14px rgba(15,23,42,.12);
    z-index: 20;
    opacity: 1 !important;
}
body.toc-industrial-v060.toc-mode-edit #tab-tp .tp-bubble:hover .bubble-actions,
body.toc-industrial-v060.toc-mode-edit #tab-tp .tp-bubble.toc-v060-selected .bubble-actions {
    display: flex !important;
}
body.toc-industrial-v060:not(.toc-mode-edit) #tab-tp .tp-bubble { cursor: pointer !important; }
body.toc-industrial-v060.toc-mode-edit #tab-tp .tp-bubble { cursor: move !important; }

/* Decision/gateway cards stay readable but are visually unmistakable. */
body.toc-industrial-v060 #tab-tp .tp-bubble[data-type="DECISION"],
body.toc-industrial-v060 #tab-tp .tp-bubble.toc-v060-decision {
    width: 206px !important;
    border-left-color: var(--toc-v060-amber) !important;
    background: #fffdf7 !important;
}
body.toc-industrial-v060 #tab-tp .tp-bubble[data-type="DECISION"]::before,
body.toc-industrial-v060 #tab-tp .tp-bubble.toc-v060-decision::before {
    content: '◇';
    position: absolute;
    left: -14px;
    top: 36px;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: #fff4d8;
    color: #a96700;
    border: 1px solid #d8a74d;
    font-size: 17px;
    font-weight: 900;
    transform: rotate(45deg);
}
body.toc-industrial-v060 #tab-tp .tp-bubble[data-type="DECISION"]::after,
body.toc-industrial-v060 #tab-tp .tp-bubble.toc-v060-decision::after {
    content: 'ODLOČITEV';
    position: absolute;
    left: 13px;
    top: 28px;
    color: #9c6507;
    font-size: 6.7px;
    font-weight: 950;
    letter-spacing: .06em;
}

body.toc-industrial-v060.toc-mode-analyze #tab-tp .tp-bubble.toc-v060-has-problem {
    border-color: #d4979a !important;
    box-shadow: 0 0 0 2px rgba(180,35,42,.10), 0 6px 16px rgba(15,23,42,.10) !important;
}
body.toc-industrial-v060.toc-mode-analyze #tab-tp .tp-bubble.toc-v060-decision {
    box-shadow: 0 0 0 2px rgba(199,123,0,.12), 0 6px 16px rgba(15,23,42,.10) !important;
}

/* Right-hand node inspector */
.toc-v060-inspector {
    position: absolute;
    top: 0;
    right: 0;
    width: var(--toc-v060-inspector-w);
    max-width: min(92vw, var(--toc-v060-inspector-w));
    height: calc(100vh - 125px);
    z-index: 110;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-left: 1px solid #cbd5df;
    box-shadow: -16px 0 42px rgba(15,23,42,.16);
    transform: translateX(calc(100% + 20px));
    transition: transform .18s ease;
}
.toc-v060-inspector.open { transform: translateX(0); }
.toc-v060-inspector-head {
    padding: 13px 14px 11px;
    border-bottom: 1px solid #dde4ec;
    background: #f8fafc;
}
.toc-v060-inspector-kicker {
    color:#718096;
    font-size:8px;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
}
.toc-v060-inspector-title {
    margin-top:4px;
    color:#1f3044;
    font-size:16px;
    line-height:1.2;
    font-weight:850;
}
.toc-v060-inspector-close {
    position:absolute;
    top:10px;
    right:10px;
    width:28px;
    height:28px;
    border:1px solid #cbd5df;
    border-radius:6px;
    background:#fff;
    cursor:pointer;
    color:#516176;
}
.toc-v060-inspector-body {
    flex:1;
    overflow:auto;
    padding:12px 14px 18px;
}
.toc-v060-inspector-section {
    padding:9px 0;
    border-bottom:1px solid #edf1f5;
}
.toc-v060-inspector-section:last-child { border-bottom:0; }
.toc-v060-inspector-label {
    color:#718096;
    font-size:8px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.055em;
    margin-bottom:4px;
}
.toc-v060-inspector-value {
    color:#2f4054;
    font-size:11px;
    line-height:1.42;
    white-space:pre-wrap;
    word-break:break-word;
}
.toc-v060-inspector-actions {
    display:flex;
    gap:6px;
    flex-wrap:wrap;
    padding:10px 14px;
    border-top:1px solid #dde4ec;
    background:#f8fafc;
}
.toc-v060-inspector-actions button {
    min-height:29px;
    padding:0 9px;
    border:1px solid #c6d0db;
    border-radius:6px;
    background:#fff;
    color:#34465b;
    font-size:9.5px;
    font-weight:850;
    cursor:pointer;
}

/* Map counters / industrial bottom status */
.toc-v060-mapstatus {
    position:absolute;
    left:12px;
    bottom:12px;
    z-index:22;
    display:flex;
    align-items:center;
    gap:8px;
    padding:6px 9px;
    border:1px solid #cbd5df;
    border-radius:7px;
    background:rgba(255,255,255,.95);
    color:#5a6a7e;
    font-size:8.5px;
    font-weight:800;
    box-shadow:0 4px 12px rgba(15,23,42,.08);
}
.toc-v060-mapstatus b { color:#26394e; }

/* Keep edge labels restrained. Generic flow arrows need no loud technical label. */
body.toc-industrial-v060 .tp-edge-label[data-edge-type="PROCEEDS_TO"] { display:none !important; }
body.toc-industrial-v060 .tp-edge-label {
    font-size:8px !important;
    font-weight:800 !important;
}

/* View-mode presentation can dedicate every possible pixel to the process. */
body.toc-industrial-v060.toc-mode-view #tab-tp .toc-help-line { display:none !important; }
body.toc-industrial-v060.toc-mode-view #tab-tp .toc-breadcrumbs { opacity:.75; }

@media (max-width: 1100px) {
    .toc-v060-toolbar .toc-v060-status { display:none; }
    .toc-v060-btn .toc-v060-long { display:none; }
}
@media (max-width: 768px) {
    body.toc-industrial-v060 #tab-tp .tp-canvas-wrapper {
        height: calc(100vh - 220px) !important;
        min-height: calc(100vh - 220px) !important;
    }
    .toc-v060-toolbar { overflow-x:auto; }
    .toc-v060-inspector {
        position:fixed;
        top:auto;
        bottom:0;
        width:100vw;
        max-width:100vw;
        height:68vh;
        border-left:0;
        border-top:1px solid #cbd5df;
        transform:translateY(calc(100% + 20px));
    }
    .toc-v060-inspector.open { transform:translateY(0); }
}

@media print {
    .toc-v060-toolbar,
    .toc-v060-inspector,
    .toc-v060-mapstatus { display:none !important; }
}

/* Keep the old global navigation available as an off-canvas utility drawer
   (language/login/admin links) without consuming workspace width. */
@media (min-width: 769px) {
    body.toc-industrial-v060 > .sidebar {
        display:flex !important;
        position:fixed !important;
        left:0 !important;
        top:0 !important;
        height:100vh !important;
        width:270px !important;
        transform:translateX(-105%) !important;
        transition:transform .18s ease !important;
        box-shadow:12px 0 35px rgba(15,23,42,.18);
        z-index:220 !important;
    }
    body.toc-industrial-v060.toc-nav-open > .sidebar {
        transform:translateX(0) !important;
    }
    body.toc-industrial-v060 > .sidebar-overlay {
        display:none !important;
        position:fixed !important;
        inset:0 !important;
        background:rgba(15,23,42,.34) !important;
        z-index:210 !important;
    }
    body.toc-industrial-v060.toc-nav-open > .sidebar-overlay {
        display:block !important;
    }
}

/* Swimlane background (generated from performer/role captured on Android). */
.toc-v060-swimlanes {
    position:absolute;
    inset:0 auto auto 0;
    width:100%;
    min-width:2800px;
    pointer-events:none;
    z-index:0;
}
.toc-v060-swimlane {
    position:absolute;
    left:0;
    width:100%;
    border-top:1px solid #d7e0e9;
    border-bottom:1px solid #e5ebf1;
    background:rgba(237,242,247,.35);
}
.toc-v060-swimlane:nth-child(even) { background:rgba(255,255,255,.32); }
.toc-v060-swimlane-label {
    position:absolute;
    left:12px;
    top:10px;
    max-width:185px;
    padding:5px 8px;
    border-radius:5px;
    background:rgba(48,67,88,.92);
    color:#fff;
    font-size:8px;
    font-weight:900;
    letter-spacing:.04em;
    text-transform:uppercase;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
body.toc-industrial-v060 #tab-tp .tp-bubble { z-index:10; }
body.toc-industrial-v060 #tab-tp .tp-svg-layer { z-index:5; }

/* ============================================================================
   TOC DESKTOP UX v0.6.1 — INDUSTRIAL TOC MAP WORKBENCH
   Dense engineering registry, not a simplified dashboard.
   ============================================================================ */
body.toc-industrial-v061 #tab-toc-map {
    position: relative;
    padding: 10px 12px 24px !important;
    background: #e9eef4 !important;
    min-height: calc(100vh - 44px);
}
body.toc-industrial-v061 #tab-toc-map .toc-v061-legacy-toolbar {
    margin: 0 0 8px !important;
    padding: 7px 8px !important;
    border: 1px solid #c8d2dd !important;
    background: #fff !important;
    border-radius: 8px !important;
}
body.toc-industrial-v061 #tab-toc-map .toc-v061-legacy-toolbar .toc-title { display:none; }
body.toc-industrial-v061 #tab-toc-map .toc-v061-legacy-toolbar > div:last-child { width:100%; justify-content:flex-end; }
body.toc-industrial-v061 #tab-toc-map .toc-v061-legacy-toolbar select { min-width: 420px; height:34px; padding:5px 9px !important; font-size:11px; }
body.toc-industrial-v061 #tab-toc-map .toc-v061-legacy-toolbar .btn { height:34px; padding:0 10px !important; font-size:10px; }

.toc-v061-workbench { display:grid; gap:8px; margin-bottom:8px; }
.toc-v061-commandbar {
    min-height:58px; display:flex; align-items:center; gap:12px; justify-content:space-between;
    padding:9px 12px; background:#1e2f43; color:#fff; border:1px solid #172639;
    border-radius:8px 8px 4px 4px; box-shadow:0 3px 10px rgba(15,23,42,.14);
}
.toc-v061-command-left { min-width:0; display:grid; gap:2px; }
.toc-v061-kicker { font-size:8px; font-weight:900; letter-spacing:.16em; color:#9fb4c9; }
.toc-v061-mapname { font-size:15px; line-height:1.15; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:70vw; }
.toc-v061-command-actions { display:flex; gap:5px; align-items:center; }
.toc-v061-btn {
    height:30px; padding:0 9px; border:1px solid #b9c5d1; border-radius:5px; background:#fff;
    color:#30445a; font-size:9px; font-weight:850; letter-spacing:.015em; cursor:pointer; white-space:nowrap;
}
.toc-v061-btn:hover { background:#f1f5f8; border-color:#879bb0; }
.toc-v061-btn.primary { background:#2671ad; color:#fff; border-color:#2671ad; }
.toc-v061-btn.active { background:#243a52; color:#fff; border-color:#243a52; }

.toc-v061-kpis { display:grid; grid-template-columns:repeat(5,minmax(130px,1fr)); gap:6px; }
.toc-v061-kpi { min-height:64px; padding:8px 10px; background:#fff; border:1px solid #cbd5df; border-top:3px solid #60758b; border-radius:5px; display:grid; grid-template-columns:1fr auto; align-items:start; }
.toc-v061-kpi span { font-size:7.5px; font-weight:900; letter-spacing:.08em; color:#697b8f; }
.toc-v061-kpi b { grid-row:1 / span 2; grid-column:2; font-size:23px; line-height:1; color:#26394d; }
.toc-v061-kpi small { font-size:8px; color:#8a99aa; margin-top:5px; }
.toc-v061-kpi.warn { border-top-color:#d08a15; }
.toc-v061-kpi.alarm { border-top-color:#b4232a; }
.toc-v061-kpi.ok { border-top-color:#2d7d4b; }

.toc-v061-filterbar { display:flex; gap:6px; align-items:center; min-height:42px; padding:5px 7px; background:#fff; border:1px solid #cbd5df; border-radius:5px; position:sticky; top:43px; z-index:35; }
.toc-v061-view-tabs { display:flex; gap:3px; align-items:center; }
.toc-v061-visible-count { font-size:8px; font-weight:900; color:#64768a; padding:3px 5px; background:#edf2f6; border-radius:9px; }
.toc-v061-search { margin-left:auto; min-width:300px; max-width:420px; flex:1; height:30px; display:flex; align-items:center; gap:6px; border:1px solid #bcc8d4; border-radius:5px; padding:0 8px; background:#f9fbfc; }
.toc-v061-search span { color:#62758a; font-size:15px; }
.toc-v061-search input { width:100%; border:0; outline:0; background:transparent; font-size:10px; color:#26394d; }
.toc-v061-type { height:30px; min-width:115px; border:1px solid #bcc8d4; border-radius:5px; background:#fff; color:#34495e; font-size:9px; padding:0 7px; }
.toc-v061-check { display:flex; align-items:center; gap:5px; white-space:nowrap; font-size:8.5px; font-weight:750; color:#64758a; }

.toc-v061-overview, .toc-v061-quality-panel { background:transparent; margin-bottom:8px; }
.toc-v061-overview-grid { display:grid; grid-template-columns:1fr 1fr 2fr; gap:8px; }
.toc-v061-overview article { background:#fff; border:1px solid #cbd5df; border-radius:6px; overflow:hidden; }
.toc-v061-overview article header { padding:7px 9px; background:#f3f6f9; border-bottom:1px solid #d7e0e8; font-size:8px; font-weight:900; letter-spacing:.08em; color:#51667d; }
.toc-v061-control-list { padding:5px 9px; }
.toc-v061-control-list div { display:flex; justify-content:space-between; align-items:center; min-height:29px; border-bottom:1px solid #edf1f4; font-size:9px; color:#5c6d80; }
.toc-v061-control-list div:last-child { border-bottom:0; }
.toc-v061-control-list b { color:#26394d; font-size:11px; }
.toc-v061-control-list b.warn { color:#a86806; }
.toc-v061-control-list b.ok { color:#227343; }
.toc-v061-action-cards { display:grid; grid-template-columns:repeat(4,1fr); gap:5px; padding:7px; }
.toc-v061-action-cards button { min-height:64px; text-align:left; display:grid; gap:4px; padding:8px; border:1px solid #cbd5df; border-radius:5px; background:#fff; color:#2b3f54; cursor:pointer; }
.toc-v061-action-cards button:hover { border-color:#6d91b3; background:#f8fbfe; }
.toc-v061-action-cards b { font-size:9.5px; }
.toc-v061-action-cards span { font-size:8px; color:#6b7c8f; line-height:1.3; }

body.toc-industrial-v061 #tab-toc-map .toc-v061-source-document {
    padding:0 !important; background:transparent !important; border:0 !important; box-shadow:none !important;
}
body.toc-industrial-v061 #tab-toc-map .toc-v061-source-document .print-cover { display:none !important; }
body.toc-industrial-v061 #tab-toc-map .toc-v061-source-document.toc-v061-show-source .print-cover { display:block !important; padding:14px !important; margin-bottom:8px !important; }
body.toc-industrial-v061 #tab-toc-map .print-section { margin:0 0 8px !important; padding:0 !important; border:1px solid #cbd5df !important; border-radius:6px !important; overflow:hidden; box-shadow:none !important; background:#fff !important; }
body.toc-industrial-v061 #tab-toc-map .print-section > h3 { margin:0 !important; padding:8px 10px !important; background:#f1f5f8; border-bottom:1px solid #d3dde6 !important; color:#30465c !important; font-size:10px !important; }
body.toc-industrial-v061 #tab-toc-map .gantt-scroll-wrapper { max-height:calc(100vh - 310px); overflow:auto; }
body.toc-industrial-v061 #tab-toc-map .toc-print-table { table-layout:fixed; width:100%; font-size:9px; }
body.toc-industrial-v061 #tab-toc-map .toc-print-table thead { position:sticky; top:0; z-index:3; }
body.toc-industrial-v061 #tab-toc-map .toc-print-table th { height:30px; padding:5px 7px !important; background:#26394d !important; color:#fff !important; border-color:#3d5268 !important; font-size:7.5px !important; letter-spacing:.055em; }
body.toc-industrial-v061 #tab-toc-map .toc-print-table td { padding:6px 7px !important; border-color:#dce3e9 !important; line-height:1.28 !important; color:#33485e; vertical-align:top; }
body.toc-industrial-v061 #tab-toc-map .toc-print-table tbody tr { cursor:default; }
body.toc-industrial-v061 #tab-toc-map .toc-v061-node-registry tbody tr { cursor:pointer; }
body.toc-industrial-v061 #tab-toc-map .toc-v061-node-registry tbody tr:hover { background:#eef5fb !important; }
body.toc-industrial-v061 #tab-toc-map .toc-v061-node-registry tbody tr.selected { background:#e3f0fb !important; box-shadow:inset 4px 0 #2876b4; }
body.toc-industrial-v061 #tab-toc-map .toc-v061-row-warning { background:#fffaf1; }
body.toc-industrial-v061 #tab-toc-map .toc-v061-node-registry th:nth-child(1), body.toc-industrial-v061 #tab-toc-map .toc-v061-node-registry td:nth-child(1) { width:48px; }
body.toc-industrial-v061 #tab-toc-map .toc-v061-node-registry th:nth-child(2), body.toc-industrial-v061 #tab-toc-map .toc-v061-node-registry td:nth-child(2) { width:165px; }
body.toc-industrial-v061 #tab-toc-map .toc-v061-node-registry th:nth-child(3), body.toc-industrial-v061 #tab-toc-map .toc-v061-node-registry td:nth-child(3) { width:96px; }
body.toc-industrial-v061 #tab-toc-map .toc-v061-node-registry th:nth-child(4), body.toc-industrial-v061 #tab-toc-map .toc-v061-node-registry td:nth-child(4) { width:245px; }
body.toc-industrial-v061 #tab-toc-map .toc-v061-node-registry th:nth-child(5), body.toc-industrial-v061 #tab-toc-map .toc-v061-node-registry td:nth-child(5) { width:auto; }
body.toc-industrial-v061 #tab-toc-map .toc-v061-node-registry th:nth-child(6), body.toc-industrial-v061 #tab-toc-map .toc-v061-node-registry td:nth-child(6) { width:160px; }
body.toc-industrial-v061 #tab-toc-map .toc-v061-node-registry th:nth-child(7), body.toc-industrial-v061 #tab-toc-map .toc-v061-node-registry td:nth-child(7) { width:150px; }
.toc-v061-title-cell strong { font-size:10px; color:#172b3f; }
.toc-v061-logic-cell { max-width:none !important; }
.toc-v061-logic-cell { display:table-cell; }
.toc-v061-logic-cell { color:#506174 !important; }
.toc-v061-logic-cell { overflow:hidden; }
.toc-v061-logic-cell { position:relative; }
.toc-v061-missing { display:inline-flex; align-items:center; padding:3px 6px; border-radius:4px; background:#fff0d8; color:#955b00; border:1px solid #e5c78f; font-size:7px; font-weight:900; letter-spacing:.04em; }
.toc-v061-empty-section { opacity:.65; }

.toc-v061-quality-panel { background:#fff; border:1px solid #cbd5df; border-radius:6px; overflow:hidden; }
.toc-v061-quality-head { min-height:70px; display:flex; align-items:center; justify-content:space-between; padding:9px 12px; background:#1e2f43; color:#fff; }
.toc-v061-quality-head span { font-size:7.5px; font-weight:900; letter-spacing:.12em; color:#9fb4c9; }
.toc-v061-quality-head h3 { margin:3px 0 0; font-size:13px; }
.toc-v061-quality-score { text-align:right; display:grid; }
.toc-v061-quality-score b { font-size:22px; line-height:1; }
.toc-v061-quality-score span { margin-top:3px; }
.toc-v061-quality-body { max-height:calc(100vh - 310px); overflow:auto; }
.toc-v061-quality-row { display:grid; grid-template-columns:70px minmax(220px,1fr) minmax(240px,1fr); gap:8px; align-items:center; min-height:40px; padding:6px 10px; border-bottom:1px solid #e3e8ed; }
.toc-v061-quality-row code { color:#65788c; font-size:8px; }
.toc-v061-quality-row strong { color:#293e54; font-size:9px; }
.toc-v061-quality-row span { color:#a26608; font-size:8.5px; }
.toc-v061-quality-ok { padding:20px; color:#247343; font-weight:800; font-size:10px; }

.toc-v061-registry-inspector { position:fixed; top:43px; right:0; width:430px; max-width:92vw; height:calc(100vh - 43px); z-index:150; background:#fff; border-left:1px solid #bcc8d4; box-shadow:-18px 0 42px rgba(15,23,42,.20); transform:translateX(105%); transition:transform .16s ease; display:flex; flex-direction:column; }
.toc-v061-registry-inspector.open { transform:translateX(0); }
.toc-v061-inspector-close { position:absolute; top:9px; right:9px; width:28px; height:28px; border:1px solid #8799ab; border-radius:4px; background:#fff; color:#40566d; font-size:18px; cursor:pointer; }
.toc-v061-inspector-head { padding:15px 48px 12px 14px; background:#1e2f43; color:#fff; }
.toc-v061-inspector-head span { font-size:7px; font-weight:900; letter-spacing:.13em; color:#a8bbce; }
.toc-v061-inspector-head h3 { margin:4px 0 0; font-size:15px; line-height:1.2; }
.toc-v061-inspector-body { flex:1; overflow:auto; padding:8px 12px 24px; }
.toc-v061-inspector-body section { display:grid; grid-template-columns:130px 1fr; gap:9px; padding:8px 2px; border-bottom:1px solid #e5eaee; }
.toc-v061-inspector-body label { font-size:7.5px; font-weight:900; letter-spacing:.04em; text-transform:uppercase; color:#718295; }
.toc-v061-inspector-body div { font-size:9.5px; line-height:1.4; color:#30465c; white-space:pre-wrap; }

@media (max-width: 1050px) {
    .toc-v061-kpis { grid-template-columns:repeat(3,1fr); }
    .toc-v061-overview-grid { grid-template-columns:1fr; }
    .toc-v061-action-cards { grid-template-columns:repeat(2,1fr); }
    .toc-v061-filterbar { flex-wrap:wrap; position:static; }
    .toc-v061-search { min-width:240px; margin-left:0; }
}
