/* Network Planner theme shell.
   The Python layout keeps operational colors for states/routes; this layer
   changes neutral surfaces, text, tables, tabs, forms, charts and popovers. */

body.npl-theme-dark {
    --bg: #0d1117;
    --line: #30363d;
    --text: #c9d1d9;
    --muted: #8b949e;
    --npl-bg: #0d1117;
    --npl-surface: #161b22;
    --npl-surface-2: #0b1220;
    --npl-surface-3: #111827;
    --npl-border: #30363d;
    --npl-text: #c9d1d9;
    --npl-muted: #8b949e;
    --npl-strong: #ffffff;
    --npl-chart-grid: rgba(148, 163, 184, 0.22);
    background: #0d1117 !important;
}

body.npl-theme-light {
    --bg: #f5f3ec;
    --line: #cfc7b8;
    --text: #172033;
    --muted: #64748b;
    --npl-bg: #f5f3ec;
    --npl-surface: #ffffff;
    --npl-surface-2: #f0eadf;
    --npl-surface-3: #e7dfd0;
    --npl-border: #cfc7b8;
    --npl-text: #172033;
    --npl-muted: #64748b;
    --npl-strong: #0f172a;
    --npl-chart-grid: rgba(100, 116, 139, 0.22);
    background: #f5f3ec !important;
    color: #172033 !important;
}

#npl-workspace-root.npl-theme-dark {
    --npl-bg: #0d1117;
    --npl-surface: #161b22;
    --npl-surface-2: #0b1220;
    --npl-surface-3: #111827;
    --npl-border: #30363d;
    --npl-text: #c9d1d9;
    --npl-muted: #8b949e;
    --npl-strong: #ffffff;
    --npl-chart-grid: rgba(148, 163, 184, 0.22);
}

#npl-workspace-root.npl-theme-light {
    --npl-bg: #f5f3ec;
    --npl-surface: #ffffff;
    --npl-surface-2: #f0eadf;
    --npl-surface-3: #e7dfd0;
    --npl-border: #cfc7b8;
    --npl-text: #172033;
    --npl-muted: #64748b;
    --npl-strong: #0f172a;
    --npl-chart-grid: rgba(100, 116, 139, 0.22);
    background-color: var(--npl-bg) !important;
    color: var(--npl-text) !important;
}

#npl-workspace-root.npl-theme-light .npl-kpi-card,
#npl-workspace-root.npl-theme-light .npl-plan-shell,
#npl-workspace-root.npl-theme-light .npl-plan-header-panel,
#npl-workspace-root.npl-theme-light .npl-create-edit-zone,
#npl-workspace-root.npl-theme-light .npl-replicate-zone,
#npl-workspace-root.npl-theme-light .npl-action-group,
#npl-workspace-root.npl-theme-light .npl-network-map-section,
#npl-workspace-root.npl-theme-light .npl-network-map-card,
#npl-workspace-root.npl-theme-light .accordion-item,
#npl-workspace-root.npl-theme-light .card,
#npl-workspace-root.npl-theme-light details,
#npl-workspace-root.npl-theme-light .offcanvas,
#npl-workspace-root.npl-theme-light .modal-content,
#npl-workspace-root.npl-theme-light .toast {
    background-color: var(--npl-surface) !important;
    border-color: var(--npl-border) !important;
    color: var(--npl-text) !important;
}

#npl-workspace-root.npl-theme-light .npl-kpi-card div,
#npl-workspace-root.npl-theme-light .npl-plan-shell div[style*="color"],
#npl-workspace-root.npl-theme-light .npl-plan-shell span[style*="color"],
#npl-workspace-root.npl-theme-light .npl-plan-shell label[style*="color"],
#npl-workspace-root.npl-theme-light .npl-zone-title,
#npl-workspace-root.npl-theme-light .npl-field-label,
#npl-workspace-root.npl-theme-light .npl-action-group-title,
#npl-workspace-root.npl-theme-light .npl-network-map-title,
#npl-workspace-root.npl-theme-light summary,
#npl-workspace-root.npl-theme-light label,
#npl-workspace-root.npl-theme-light .form-check-label {
    color: var(--npl-text) !important;
}

#npl-workspace-root.npl-theme-light small,
#npl-workspace-root.npl-theme-light .text-muted,
#npl-workspace-root.npl-theme-light .npl-network-map-subtitle,
#npl-workspace-root.npl-theme-light .npl-network-map-card-subtitle {
    color: var(--npl-muted) !important;
}

#npl-workspace-root.npl-theme-light .nav-tabs {
    border-color: var(--npl-border) !important;
}

#npl-workspace-root.npl-theme-light .nav-tabs .nav-link {
    background-color: transparent !important;
    border-color: transparent !important;
    color: var(--npl-text) !important;
}

#npl-workspace-root.npl-theme-light .nav-tabs .nav-link:hover {
    border-color: var(--npl-border) !important;
}

#npl-workspace-root.npl-theme-light .nav-tabs .nav-link.active {
    background-color: var(--npl-surface-3) !important;
    border-color: var(--npl-border) var(--npl-border) var(--npl-surface-3) !important;
    color: var(--npl-strong) !important;
}

#npl-workspace-root.npl-theme-light input,
#npl-workspace-root.npl-theme-light textarea,
#npl-workspace-root.npl-theme-light select,
#npl-workspace-root.npl-theme-light .form-control,
#npl-workspace-root.npl-theme-light .Select-control,
#npl-workspace-root.npl-theme-light .Select-menu-outer,
#npl-workspace-root.npl-theme-light .Select-menu,
#npl-workspace-root.npl-theme-light .DateInput_input,
#npl-workspace-root.npl-theme-light .DateRangePickerInput,
#npl-workspace-root.npl-theme-light .npl-picker-button,
#npl-workspace-root.npl-theme-light .npl-date-picker-popover,
#npl-workspace-root.npl-theme-light .npl-time-picker-popover {
    background-color: var(--npl-surface) !important;
    border-color: var(--npl-border) !important;
    color: var(--npl-text) !important;
}

#npl-workspace-root.npl-theme-light .Select-value-label,
#npl-workspace-root.npl-theme-light .Select-placeholder,
#npl-workspace-root.npl-theme-light .Select-input > input,
#npl-workspace-root.npl-theme-light .Select-option,
#npl-workspace-root.npl-theme-light .DateInput_input {
    color: var(--npl-text) !important;
}

#npl-workspace-root.npl-theme-light .Select-option {
    background-color: var(--npl-surface) !important;
}

#npl-workspace-root.npl-theme-light .Select-option.is-focused,
#npl-workspace-root.npl-theme-light .npl-time-picker-option:hover,
#npl-workspace-root.npl-theme-light .npl-date-picker-day:hover {
    background-color: var(--npl-surface-2) !important;
}

#npl-workspace-root.npl-theme-light .dash-table-container,
#npl-workspace-root.npl-theme-light .dash-table-container .dash-spreadsheet-container,
#npl-workspace-root.npl-theme-light .dash-table-container .dash-spreadsheet-inner,
#npl-workspace-root.npl-theme-light .dash-table-container .dash-spreadsheet-inner table {
    background-color: var(--npl-surface) !important;
    color: var(--npl-text) !important;
}

#npl-workspace-root.npl-theme-light .dash-table-container .dash-spreadsheet-inner th,
#npl-workspace-root.npl-theme-light .dash-table-container .dash-header {
    background-color: #e6dcca !important;
    border-color: var(--npl-border) !important;
    color: var(--npl-strong) !important;
}

#npl-workspace-root.npl-theme-light .dash-table-container .dash-spreadsheet-inner td,
#npl-workspace-root.npl-theme-light .dash-table-container .dash-cell,
#npl-workspace-root.npl-theme-light .dash-table-container .dash-filter {
    background-color: var(--npl-surface) !important;
    border-color: #ded6c8 !important;
    color: var(--npl-text) !important;
}

#npl-workspace-root.npl-theme-light .dash-table-container .dash-cell.focused,
#npl-workspace-root.npl-theme-light .dash-table-container .dash-cell.cell--selected {
    background-color: #edf7fb !important;
    border-color: #0ea5e9 !important;
}

#npl-workspace-root.npl-theme-light .popover,
#npl-workspace-root.npl-theme-light .npl-kpi-popover,
#npl-workspace-root.npl-theme-light .npl-action-popover,
body.npl-theme-light .popover,
body.npl-theme-light .npl-kpi-popover,
body.npl-theme-light .npl-action-popover {
    --bs-popover-bg: var(--npl-surface);
    --bs-popover-border-color: var(--npl-border);
    --bs-popover-header-bg: var(--npl-surface-2);
    --bs-popover-header-color: var(--npl-strong);
    --bs-popover-body-color: var(--npl-text);
    background-color: var(--npl-surface) !important;
    border-color: var(--npl-border) !important;
    color: var(--npl-text) !important;
}

#npl-workspace-root.npl-theme-light .popover-header,
#npl-workspace-root.npl-theme-light .npl-kpi-popover-header,
#npl-workspace-root.npl-theme-light .npl-action-popover-header,
body.npl-theme-light .popover-header,
body.npl-theme-light .npl-kpi-popover-header,
body.npl-theme-light .npl-action-popover-header {
    background-color: var(--npl-surface-2) !important;
    border-color: var(--npl-border) !important;
    color: var(--npl-strong) !important;
}

#npl-workspace-root.npl-theme-light .popover-body,
#npl-workspace-root.npl-theme-light .npl-kpi-popover-body,
#npl-workspace-root.npl-theme-light .npl-action-popover-body,
body.npl-theme-light .popover-body,
body.npl-theme-light .npl-kpi-popover-body,
body.npl-theme-light .npl-action-popover-body {
    color: var(--npl-text) !important;
}

body.npl-theme-light .fb-navbar {
    background: rgba(245, 243, 236, 0.9) !important;
    border-color: var(--npl-border) !important;
}

body.npl-theme-light .fb-brand-subtitle,
body.npl-theme-light .fb-nav-logout,
body.npl-theme-light .fb-navbar a {
    color: var(--npl-muted) !important;
}

body.npl-theme-light .logo-invert {
    filter: none !important;
    opacity: 0.92 !important;
}

#npl-workspace-root.npl-theme-light .js-plotly-plot,
#npl-workspace-root.npl-theme-light .js-plotly-plot .plotly,
#npl-workspace-root.npl-theme-light .js-plotly-plot .main-svg,
#npl-workspace-root.npl-theme-light .js-plotly-plot .bg,
#npl-workspace-root.npl-theme-light .js-plotly-plot .plotbg {
    background: transparent !important;
    fill: transparent !important;
}

#npl-workspace-root.npl-theme-light .js-plotly-plot text {
    fill: var(--npl-text) !important;
}

#npl-workspace-root.npl-theme-light .js-plotly-plot .xgrid,
#npl-workspace-root.npl-theme-light .js-plotly-plot .ygrid,
#npl-workspace-root.npl-theme-light .js-plotly-plot .zerolinelayer path {
    stroke: var(--npl-chart-grid) !important;
}

#npl-workspace-root.npl-theme-light #npl-language-toggle,
#npl-workspace-root.npl-theme-light #npl-theme-toggle,
#npl-workspace-root.npl-theme-light #npl-help-mode-toggle,
body.npl-theme-light #npl-language-toggle,
body.npl-theme-light #npl-theme-toggle,
body.npl-theme-light #npl-help-mode-toggle {
    background-color: rgba(255, 255, 255, 0.74) !important;
    border-color: rgba(100, 116, 139, 0.26) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66) !important;
    color: var(--npl-text) !important;
}

body.npl-theme-light .npl-segmented-toggle:hover {
    background-color: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(14, 165, 233, 0.42) !important;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.78) !important;
}

body.npl-theme-light .npl-segmented-option,
body.npl-theme-light .npl-state-toggle-label {
    color: var(--npl-muted) !important;
}

body.npl-theme-light .npl-segmented-option.active,
body.npl-theme-light .npl-state-toggle-value {
    background-color: #FFFFFF !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(100, 116, 139, 0.14) !important;
    color: #111827 !important;
}

body.npl-theme-light .npl-state-toggle-value.active {
    background-color: #DDF4FF !important;
    color: #0B3558 !important;
}

#npl-workspace-root.npl-theme-light .npl-picker-button:hover {
    background-color: #FFFFFF !important;
    border-color: rgba(14, 165, 233, 0.46) !important;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.10) !important;
}

body.npl-theme-light .npl-action-help-modal .modal-content {
    background: var(--npl-surface) !important;
    border-color: var(--npl-border) !important;
    color: var(--npl-text) !important;
}

body.npl-theme-light .npl-action-help-modal-header,
body.npl-theme-light .npl-action-help-modal-body,
body.npl-theme-light .npl-action-help-modal-footer,
body.npl-theme-light .npl-action-help-lead,
body.npl-theme-light .npl-action-help-line {
    color: var(--npl-text) !important;
    border-color: var(--npl-border) !important;
}

#npl-workspace-root.npl-theme-light .npl-action-button.secondary,
#npl-workspace-root.npl-theme-light .npl-action-button.neutral,
#npl-workspace-root.npl-theme-light button:not(.npl-action-button) {
    border-color: var(--npl-border) !important;
}

.npl-ada-loader {
    --npl-ada-logo-filter-rest: brightness(0) invert(1) drop-shadow(0 0 7px rgba(255, 255, 255, 0.72)) drop-shadow(0 0 16px rgba(34, 197, 94, 0.18));
    --npl-ada-logo-filter-peak: brightness(0) invert(1) drop-shadow(0 0 11px rgba(255, 255, 255, 0.92)) drop-shadow(0 0 24px rgba(34, 197, 94, 0.28));
    --npl-ada-logo-filter-settle: brightness(0) invert(1) drop-shadow(0 0 8px rgba(255, 255, 255, 0.78)) drop-shadow(0 0 18px rgba(34, 197, 94, 0.2));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 12px;
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    box-shadow:
        0 10px 30px rgba(2, 6, 23, 0.24),
        0 0 22px rgba(255, 255, 255, 0.12);
}

.npl-ada-loader-logo {
    width: 34px;
    height: auto;
    object-fit: contain;
    filter: var(--npl-ada-logo-filter-rest);
    transform-origin: center;
    will-change: filter, opacity, transform;
    animation: npl-ada-logo-breathe 3.2s ease-in-out infinite;
}

.npl-ada-loader-text {
    color: #f8fafc;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

@keyframes npl-ada-logo-breathe {
    0%,
    100% {
        filter: var(--npl-ada-logo-filter-rest);
        opacity: 0.88;
        transform: scale(1);
    }

    42% {
        filter: var(--npl-ada-logo-filter-peak);
        opacity: 1;
        transform: scale(1.09);
    }

    62% {
        filter: var(--npl-ada-logo-filter-settle);
        opacity: 0.95;
        transform: scale(1.025);
    }
}

@media (prefers-reduced-motion: reduce) {
    .npl-ada-loader-logo {
        animation: none;
        opacity: 1;
        transform: scale(1);
    }
}

#npl-workspace-root.npl-theme-light .npl-ada-loader,
body.npl-theme-light .npl-ada-loader {
    --npl-ada-logo-filter-rest: saturate(1.15) brightness(0.92) drop-shadow(0 0 6px rgba(34, 197, 94, 0.32));
    --npl-ada-logo-filter-peak: saturate(1.25) brightness(1.06) drop-shadow(0 0 10px rgba(34, 197, 94, 0.44));
    --npl-ada-logo-filter-settle: saturate(1.18) brightness(0.98) drop-shadow(0 0 7px rgba(34, 197, 94, 0.36));
    color: #047857;
    background: rgba(16, 185, 129, 0.09);
    border-color: rgba(34, 197, 94, 0.34);
    box-shadow:
        0 10px 26px rgba(15, 23, 42, 0.08),
        0 0 18px rgba(34, 197, 94, 0.16);
}

#npl-workspace-root.npl-theme-light .npl-ada-loader-text,
body.npl-theme-light .npl-ada-loader-text {
    color: #047857;
}

.npl-compare-loading-region {
    display: grid;
    gap: 12px;
    min-height: 92px;
}

.npl-compare-operation-status {
    min-height: 0;
    color: var(--npl-muted);
    font-size: 11px;
    line-height: 1.45;
}

.npl-compare-operation-status:empty {
    display: none;
}
