/*
 * Stitch visual refresh for the Digital Twin dashboard.
 * This file is intentionally presentation-only: no data paths, Firebase logic,
 * chart logic, or command behavior is changed here.
 */

body.stitch-skin.light-mode {
    --bg-primary: #f9f9ff;
    --bg-secondary: rgba(255,255,255,0.86);
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --bg-lighter: #f1f3fe;
    --border-color: rgba(193,198,215,0.72);
    --border-accent: #0058bc;
    --text-primary: #181c23;
    --text-secondary: #414755;
    --text-muted: #717786;
    --text-main: #181c23;
    --accent-blue: #0058bc;
    --accent-green: #16a34a;
    --accent-yellow: #c64f00;
    --accent-red: #ba1a1a;
    --accent-purple: #4c4aca;
    --accent-cyan: #0070eb;
    --sidebar-width: 280px;
    --topbar-height: 64px;
    background:
        radial-gradient(circle at 12% 8%, rgba(216,226,255,0.72), transparent 28%),
        linear-gradient(180deg, #f9f9ff 0%, #f1f3fe 100%) !important;
    color: var(--text-primary) !important;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

body.stitch-skin.light-mode #wrapper,
body.stitch-skin.light-mode #content-wrapper {
    background: transparent !important;
}

body.stitch-skin.light-mode #wrapper .sidebar {
    width: var(--sidebar-width) !important;
    background: rgba(241,243,254,0.88) !important;
    backdrop-filter: blur(24px);
    border-right: 1px solid rgba(193,198,215,0.55);
    box-shadow: 8px 0 28px rgba(0,24,68,0.06);
    padding: 18px 12px !important;
}

body.stitch-skin.light-mode .sidebar-brand {
    min-height: 54px !important;
    padding: 0 8px !important;
    margin-bottom: 14px;
}

body.stitch-skin.light-mode .sidebar-brand-text {
    color: #181c23 !important;
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.02em !important;
    text-shadow: none !important;
}

body.stitch-skin.light-mode .sidebar-brand-text span {
    color: #0058bc !important;
    font-size: 0.65rem !important;
    font-weight: 400 !important;
    letter-spacing: 0.5px !important;
    display: block !important;
    margin-top: 2px !important;
}

body.stitch-skin.light-mode .dt-logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: #0058bc !important;
    box-shadow: 0 8px 18px rgba(0,88,188,0.22);
}

body.stitch-skin.light-mode .sidebar-divider {
    border-top-color: rgba(193,198,215,0.55) !important;
    margin: 8px 0 12px !important;
}

body.stitch-skin.light-mode .sidebar-heading {
    color: #717786 !important;
    padding-left: 12px !important;
}

body.stitch-skin.light-mode .sidebar .nav-item {
    margin: 4px 0;
}

body.stitch-skin.light-mode .sidebar .nav-item .nav-link {
    min-height: 42px !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    color: #414755 !important;
    font-weight: 600;
    letter-spacing: 0;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

body.stitch-skin.light-mode .sidebar .nav-item .nav-link i,
body.stitch-skin.light-mode .sidebar .nav-item .nav-link .material-symbols-outlined {
    color: #414755 !important;
    font-size: 20px;
    width: auto;
    margin: 0 12px 0 0;
    font-variation-settings: 'FILL' 0;
}

body.stitch-skin.light-mode .sidebar .nav-item.active .nav-link {
    background: #6664e4 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(76,74,202,0.22);
}

body.stitch-skin.light-mode .sidebar .nav-item.active .nav-link i,
body.stitch-skin.light-mode .sidebar .nav-item.active .nav-link .material-symbols-outlined {
    color: #ffffff !important;
    font-variation-settings: 'FILL' 1;
}

body.stitch-skin.light-mode .sidebar .nav-item .nav-link:hover {
    background: rgba(224,226,237,0.72) !important;
    color: #181c23 !important;
    transform: translateX(2px);
}

body.stitch-skin.light-mode .topbar {
    min-height: var(--topbar-height) !important;
    height: var(--topbar-height) !important;
    background: rgba(255,255,255,0.84) !important;
    backdrop-filter: blur(22px);
    border-bottom: 1px solid rgba(193,198,215,0.56) !important;
    box-shadow: 0 6px 22px rgba(0,24,68,0.06) !important;
    position: sticky;
    top: 0;
    z-index: 80;
}

body.stitch-skin.light-mode .topbar-stat-label {
    color: #717786 !important;
    font-size: 0.6rem !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.stitch-skin.light-mode .topbar-stat-val {
    color: #181c23 !important;
    font-weight: 800 !important;
}

body.stitch-skin.light-mode .topbar-avatar {
    background: #0058bc !important;
    color: #ffffff !important;
    box-shadow: 0 8px 16px rgba(0,88,188,0.18);
}

body.stitch-skin.light-mode .status-badge {
    border-radius: 999px !important;
    background: #ffffff !important;
    border: 1px solid rgba(193,198,215,0.75) !important;
    color: #0058bc !important;
    box-shadow: 0 3px 10px rgba(0,24,68,0.05);
}

body.stitch-skin.light-mode .container-fluid {
    padding: 22px 26px 34px !important;
}

body.stitch-skin.light-mode .page-header {
    margin: 4px 0 18px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.stitch-skin.light-mode .page-header h1 {
    color: #181c23 !important;
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
}

body.stitch-skin.light-mode .btn-control,
body.stitch-skin.light-mode .ml-action-btn,
body.stitch-skin.light-mode .btn-open-sim,
body.stitch-skin.light-mode .map-btn,
body.stitch-skin.light-mode .trafo-select-btn,
body.stitch-skin.light-mode .chart-filters button {
    border-radius: 999px !important;
    border: 1px solid rgba(193,198,215,0.75) !important;
    background: #ffffff !important;
    color: #414755 !important;
    box-shadow: 0 3px 10px rgba(0,24,68,0.05);
    font-weight: 700 !important;
}

body.stitch-skin.light-mode .btn-control:hover,
body.stitch-skin.light-mode .ml-action-btn:hover,
body.stitch-skin.light-mode .btn-open-sim:hover,
body.stitch-skin.light-mode .map-btn:hover,
body.stitch-skin.light-mode .trafo-select-btn:hover,
body.stitch-skin.light-mode .chart-filters button:hover {
    border-color: rgba(0,88,188,0.34) !important;
    color: #0058bc !important;
    transform: translateY(-1px);
}

body.stitch-skin.light-mode #btnModeToggle,
body.stitch-skin.light-mode .ml-action-primary,
body.stitch-skin.light-mode .chart-filters button.active {
    background: #d8e2ff !important;
    border-color: #adc6ff !important;
    color: #004493 !important;
}

body.stitch-skin.light-mode .btn-reset-sys {
    background: rgba(22,163,74,0.09) !important;
    border-color: rgba(22,163,74,0.2) !important;
    color: #15803d !important;
}

body.stitch-skin.light-mode .btn-danger-sim {
    background: #ffdad6 !important;
    border-color: rgba(186,26,26,0.18) !important;
    color: #ba1a1a !important;
}

body.stitch-skin.light-mode .stat-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 116px;
    background: #ffffff !important;
    border: 1px solid rgba(193,198,215,0.72) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 16px rgba(0,24,68,0.06) !important;
    padding: 18px 16px 14px !important;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.stitch-skin.light-mode .stat-card::before,
body.stitch-skin.light-mode .stat-card::after {
    display: none !important;
}

body.stitch-skin.light-mode .stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(0,24,68,0.1) !important;
}

body.stitch-skin.light-mode .stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

body.stitch-skin.light-mode .stat-card .stat-label {
    color: #717786 !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
}

body.stitch-skin.light-mode .stat-card .stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--card-accent, #0058bc) 12%, white) !important;
    color: var(--card-accent, #0058bc) !important;
    box-shadow: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

body.stitch-skin.light-mode .stat-card .stat-value {
    color: #181c23 !important;
    font-size: 1.58rem !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    text-shadow: none !important;
    letter-spacing: -0.02em;
}

body.stitch-skin.light-mode .stat-card .stat-trend {
    color: #717786 !important;
    font-size: 0.68rem !important;
    font-weight: 500 !important;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

body.stitch-skin.light-mode .stat-card .stat-trend.stat-trend-danger {
    color: #ba1a1a !important;
}

body.stitch-skin.light-mode .stat-blue { --card-accent: #0058bc; }
body.stitch-skin.light-mode .stat-yellow { --card-accent: #c64f00; }
body.stitch-skin.light-mode .stat-cyan { --card-accent: #0070eb; }
body.stitch-skin.light-mode .stat-purple { --card-accent: #4c4aca; }
body.stitch-skin.light-mode .stat-green { --card-accent: #16a34a; }
body.stitch-skin.light-mode .stat-red { --card-accent: #ba1a1a; }

body.stitch-skin.light-mode #page_dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    grid-template-areas:
        "manual manual"
        "map ml"
        "map logs";
    gap: 16px;
    align-items: start;
}

body.stitch-skin.light-mode #manualPanel {
    grid-area: manual;
}

body.stitch-skin.light-mode .dt-map-card {
    grid-area: map;
}

body.stitch-skin.light-mode #mlPanel {
    grid-area: ml;
}

body.stitch-skin.light-mode #scadaLogsPanel {
    grid-area: logs;
}

body.stitch-skin.light-mode #simGangguanPanel {
    display: none !important;
}

body.stitch-skin.light-mode #page_dashboard > .row {
    grid-column: 1 / -1;
}

body.stitch-skin.light-mode .card,
body.stitch-skin.light-mode .ml-panel,
body.stitch-skin.light-mode #manualPanel {
    background: #ffffff !important;
    border: 1px solid rgba(193,198,215,0.72) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 16px rgba(0,24,68,0.06) !important;
}

body.stitch-skin.light-mode .card:hover,
body.stitch-skin.light-mode .ml-panel:hover {
    border-color: rgba(0,88,188,0.24) !important;
    box-shadow: 0 10px 28px rgba(0,24,68,0.09) !important;
}

body.stitch-skin.light-mode .card-header {
    min-height: 48px;
    background: #ffffff !important;
    border-bottom: 1px solid rgba(224,226,237,0.92) !important;
    border-radius: 16px 16px 0 0 !important;
    padding: 12px 16px !important;
}

body.stitch-skin.light-mode .card-header h6 {
    color: #181c23 !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em;
}

body.stitch-skin.light-mode .card-body {
    background: #ffffff !important;
    color: #181c23 !important;
}

body.stitch-skin.light-mode #mynetwork {
    height: 500px !important;
    background:
        radial-gradient(circle, rgba(0,88,188,0.08) 1px, transparent 1.6px) 0 0 / 24px 24px,
        linear-gradient(180deg, #ffffff 0%, #fbfbff 100%) !important;
    border-radius: 0 0 16px 16px;
}

body.stitch-skin.light-mode .map-info-chip,
body.stitch-skin.light-mode .legend-container {
    background: rgba(255,255,255,0.9) !important;
    border-color: rgba(193,198,215,0.72) !important;
    color: #414755 !important;
    box-shadow: 0 3px 10px rgba(0,24,68,0.05);
}

body.stitch-skin.light-mode .legend-container {
    border-top: 1px solid rgba(224,226,237,0.95) !important;
    border-radius: 0 0 16px 16px;
}

body.stitch-skin.light-mode .dt-map-zoom-controls {
    display: none;
}

body.stitch-skin.light-mode.stitch-network-mode .container-fluid {
    padding: 18px 24px 24px !important;
}

body.stitch-skin.light-mode.stitch-network-mode .page-header {
    margin-bottom: 14px !important;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-summary-row,
body.stitch-skin.light-mode.stitch-network-mode #manualPanel,
body.stitch-skin.light-mode.stitch-network-mode #mlPanel,
body.stitch-skin.light-mode.stitch-network-mode #scadaLogsPanel,
body.stitch-skin.light-mode.stitch-network-mode #simGangguanPanel,
body.stitch-skin.light-mode.stitch-network-mode .dt-chart-heading,
body.stitch-skin.light-mode.stitch-network-mode .dt-chart-row-main,
body.stitch-skin.light-mode.stitch-network-mode .dt-chart-row-secondary,
body.stitch-skin.light-mode.stitch-network-mode .dt-history-row,
body.stitch-skin.light-mode.stitch-network-mode .dt-spec-row {
    display: none !important;
}

body.stitch-skin.light-mode.stitch-network-mode #page_dashboard {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "map";
    gap: 0;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-map-card {
    grid-area: map;
    margin: 0 !important;
    min-height: calc(100vh - var(--topbar-height) - 116px);
    overflow: hidden;
    border-radius: 18px !important;
    background: rgba(249,249,255,0.7) !important;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-map-card > .card-header {
    display: none !important;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-map-card > .card-body,
body.stitch-skin.light-mode.stitch-network-mode .map-wrapper {
    min-height: calc(100vh - var(--topbar-height) - 116px);
    height: 100%;
}

body.stitch-skin.light-mode.stitch-network-mode #mynetwork {
    height: calc(100vh - var(--topbar-height) - 116px) !important;
    min-height: 640px;
    border-radius: 18px !important;
    overflow: hidden;
    background:
        linear-gradient(120deg, rgba(255,255,255,0.62), rgba(241,243,254,0.42)),
        radial-gradient(circle at 34% 24%, rgba(0,88,188,0.20) 0 2px, transparent 3px),
        radial-gradient(circle at 65% 38%, rgba(198,79,0,0.30) 0 2px, transparent 3px),
        radial-gradient(circle at 47% 70%, rgba(0,88,188,0.18) 0 2px, transparent 3px),
        repeating-linear-gradient(35deg, rgba(0,88,188,0.055) 0 1px, transparent 1px 44px),
        linear-gradient(180deg, #f9f9ff 0%, #ecedf9 100%) !important;
}

body.stitch-skin.light-mode.stitch-network-mode .map-info-overlay {
    top: 18px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    z-index: 22;
}

body.stitch-skin.light-mode.stitch-network-mode .map-toolbar {
    display: none !important;
}

body.stitch-skin.light-mode.stitch-network-mode .legend-container {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 24;
    width: min(920px, calc(100% - 760px));
    min-width: 420px;
    justify-content: center;
    border: 1px solid rgba(193,198,215,0.58) !important;
    border-radius: 999px !important;
    backdrop-filter: blur(20px);
}

body.stitch-skin.light-mode.stitch-network-mode .dt-network-overlay {
    position: absolute;
    top: 24px;
    bottom: 24px;
    z-index: 23;
    display: flex;
    flex-direction: column;
    gap: 18px;
    pointer-events: none;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-network-left {
    left: 24px;
    width: 340px;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-network-right {
    right: 24px;
    width: 340px;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-network-panel {
    pointer-events: auto;
    background: rgba(255,255,255,0.86);
    border: 1px solid rgba(113,119,134,0.30);
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(0,24,68,0.10);
    backdrop-filter: blur(24px);
    padding: 18px;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-layer-panel,
body.stitch-skin.light-mode.stitch-network-mode .dt-sim-panel {
    flex: 1;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-panel-head strong {
    display: block;
    color: #181c23;
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 800;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-panel-head > i {
    color: #717786;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-panel-kicker {
    display: block;
    color: #717786;
    font-size: 0.66rem;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 3px;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid rgba(193,198,215,0.72);
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 3px 10px rgba(0,24,68,0.04);
}

body.stitch-skin.light-mode.stitch-network-mode .dt-search-box i {
    color: #717786;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #181c23;
    font-size: 0.78rem;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-recent-list {
    display: grid;
    gap: 6px;
    margin-top: 16px;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-recent-list button,
body.stitch-skin.light-mode.stitch-network-mode .dt-layer-row,
body.stitch-skin.light-mode.stitch-network-mode .dt-sim-card {
    border: 1px solid transparent;
    background: transparent;
    color: #414755;
    text-align: left;
    border-radius: 12px;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-recent-list button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    font-weight: 700;
    font-size: 0.78rem;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-recent-list button:hover,
body.stitch-skin.light-mode.stitch-network-mode .dt-layer-row:hover,
body.stitch-skin.light-mode.stitch-network-mode .dt-sim-card:hover,
body.stitch-skin.light-mode.stitch-network-mode .dt-sim-card.active {
    background: rgba(224,226,237,0.58);
    border-color: rgba(193,198,215,0.42);
    transform: translateY(-1px);
}

body.stitch-skin.light-mode.stitch-network-mode .dt-recent-list i:first-child {
    color: #0058bc;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-recent-list button:nth-of-type(2) i {
    color: #c64f00;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-layer-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 10px;
    font-weight: 800;
    font-size: 0.8rem;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-layer-row > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-layer-row i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f1f3fe;
    color: #0058bc;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-toggle {
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #e0e2ed;
    border: 1px solid rgba(193,198,215,0.72);
    position: relative;
    flex-shrink: 0;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-toggle span {
    position: absolute;
    left: 2px;
    top: 2px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #717786;
    box-shadow: 0 2px 4px rgba(0,24,68,0.16);
}

body.stitch-skin.light-mode.stitch-network-mode .dt-layer-row.is-on .dt-toggle {
    background: #0058bc;
    border-color: #0058bc;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-layer-row.is-on .dt-toggle span {
    left: 20px;
    background: #ffffff;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-sim-panel {
    display: flex;
    flex-direction: column;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-sim-card {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #ffffff;
    border: 1px solid rgba(193,198,215,0.58);
    padding: 14px;
    margin-bottom: 12px;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-sim-card > i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #ffdbcc;
    color: #9e3d00;
    flex-shrink: 0;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-sim-card:nth-of-type(2) > i {
    background: rgba(22,163,74,0.10);
    color: #15803d;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-sim-card strong {
    display: block;
    color: #181c23;
    font-size: 0.86rem;
    line-height: 1.25;
    margin-bottom: 4px;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-sim-card small {
    display: block;
    color: #717786;
    font-size: 0.72rem;
    line-height: 1.45;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-timeline-control {
    margin-top: auto;
    border-top: 1px solid rgba(193,198,215,0.55);
    padding-top: 16px;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-timeline-control > div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 10px;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-timeline-control strong {
    font-family: "JetBrains Mono", Consolas, monospace;
    color: #414755;
    font-size: 0.7rem;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-timeline-track {
    height: 7px;
    border-radius: 999px;
    margin-top: 14px;
    background: #e0e2ed;
    overflow: hidden;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-timeline-track span {
    display: block;
    width: 18%;
    height: 100%;
    border-radius: inherit;
    background: #0058bc;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-map-zoom-controls {
    position: absolute;
    right: 382px;
    bottom: 146px;
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: auto;
    background: rgba(255,255,255,0.86);
    border: 1px solid rgba(193,198,215,0.58);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0,24,68,0.10);
    backdrop-filter: blur(20px);
    padding: 6px;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-map-zoom-controls button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #414755;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-map-zoom-controls button:hover {
    background: #f1f3fe;
    color: #0058bc;
}

body.stitch-skin.light-mode #mlPanel {
    padding: 14px !important;
}

body.stitch-skin.light-mode #mlPanel::before,
body.stitch-skin.light-mode #mlPanel::after {
    display: none !important;
}

body.stitch-skin.light-mode .ml-panel-header {
    align-items: flex-start !important;
    gap: 12px;
    margin-bottom: 12px !important;
}

body.stitch-skin.light-mode .ml-title {
    color: #181c23 !important;
    font-size: 0.82rem !important;
    font-weight: 900 !important;
    flex-wrap: wrap;
}

body.stitch-skin.light-mode .ml-toolbar,
body.stitch-skin.light-mode .ml-toolbar-group {
    width: 100%;
}

body.stitch-skin.light-mode .ml-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

body.stitch-skin.light-mode .ml-toolbar-group {
    background: #f1f3fe !important;
    border: 1px solid rgba(193,198,215,0.72) !important;
    border-radius: 12px !important;
    padding: 8px !important;
    justify-content: flex-start;
}

body.stitch-skin.light-mode .ml-hybrid-info {
    background: #f1f3fe !important;
    border-color: rgba(173,198,255,0.95) !important;
    border-left-color: #0058bc !important;
    border-radius: 12px !important;
    color: #414755 !important;
}

body.stitch-skin.light-mode .ml-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
}

body.stitch-skin.light-mode .ml-trafo-card {
    background: #ffffff !important;
    border: 1px solid rgba(193,198,215,0.72) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}

body.stitch-skin.light-mode .ml-trafo-card::before {
    display: none !important;
}

body.stitch-skin.light-mode .ml-alert-card {
    background: #fff7f6 !important;
    border: 1px solid rgba(186,26,26,0.16) !important;
    border-left: 4px solid #ba1a1a !important;
    color: #181c23 !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}

body.stitch-skin.light-mode .ml-alert-content {
    color: #414755 !important;
}

body.stitch-skin.light-mode #scadaLogsContainer {
    max-height: 220px !important;
    background: #ffffff !important;
    padding: 8px 12px !important;
}

body.stitch-skin.light-mode .log-item {
    border-bottom: 1px solid rgba(224,226,237,0.92) !important;
    font-family: Inter, system-ui, sans-serif !important;
}

body.stitch-skin.light-mode .log-time {
    color: #717786 !important;
}

body.stitch-skin.light-mode .log-title {
    color: #181c23 !important;
}

body.stitch-skin.light-mode .log-msg {
    color: #717786 !important;
}

body.stitch-skin.light-mode .chart-area,
body.stitch-skin.light-mode .chart-pie {
    background: #ffffff !important;
    border-radius: 12px;
}

body.stitch-skin.light-mode .section-label {
    color: #414755 !important;
    border-bottom: 1px solid rgba(224,226,237,0.92) !important;
    padding-bottom: 8px;
}

body.stitch-skin.light-mode .spec-table td,
body.stitch-skin.light-mode .plg-table-row {
    border-color: rgba(224,226,237,0.95) !important;
}

body.stitch-skin.light-mode .plg-list-card {
    overflow: hidden;
    border: 1px solid rgba(224,226,237,0.92);
    border-radius: 12px;
    background: #ffffff;
}

body.stitch-skin.light-mode .plg-table-row {
    grid-template-columns: minmax(170px, 1.1fr) minmax(90px, 0.65fr) minmax(90px, 0.65fr) minmax(92px, 0.65fr) minmax(92px, 0.6fr);
    gap: 12px !important;
    min-height: 44px;
    padding: 10px 12px !important;
    border-bottom: 1px solid rgba(224,226,237,0.82) !important;
    background: #ffffff !important;
    color: #414755 !important;
}

body.stitch-skin.light-mode .plg-table-row:last-child {
    border-bottom: 0 !important;
}

body.stitch-skin.light-mode .plg-table-row:hover {
    background: #f8f9ff !important;
}

body.stitch-skin.light-mode .plg-table-header {
    min-height: 34px;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    background: #f7f8ff !important;
    border-radius: 0 !important;
    color: #717786 !important;
    letter-spacing: 0.04em !important;
}

body.stitch-skin.light-mode .plg-name-cell {
    color: #181c23 !important;
    font-weight: 750;
}

body.stitch-skin.light-mode .plg-name-cell small {
    color: #8b93a1 !important;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.64rem;
}

body.stitch-skin.light-mode .plg-capacity-cell,
body.stitch-skin.light-mode .plg-power-cell,
body.stitch-skin.light-mode .plg-voltage-cell {
    color: #414755 !important;
    font-weight: 750;
}

body.stitch-skin.light-mode .plg-voltage-cell.is-muted,
body.stitch-skin.light-mode .plg-status-cell {
    color: #717786 !important;
}

body.stitch-skin.light-mode .plg-voltage-cell.is-normal {
    color: #181c23 !important;
}

body.stitch-skin.light-mode .plg-voltage-cell.is-warning {
    color: #b45309 !important;
}

body.stitch-skin.light-mode .plg-voltage-cell.is-danger {
    color: #d92d20 !important;
}

body.stitch-skin.light-mode .plg-status-dot {
    box-shadow: none !important;
    opacity: 0.78;
}

body.stitch-skin.light-mode .spec-table .spec-key,
body.stitch-skin.light-mode .plg-table-header,
body.stitch-skin.light-mode .plg-metric-label {
    color: #717786 !important;
}

body.stitch-skin.light-mode .spec-table .spec-val,
body.stitch-skin.light-mode .plg-metric-value {
    color: #181c23 !important;
}

body.stitch-skin.light-mode #pelangganPanel {
    background: #ffffff !important;
    border-left: 1px solid rgba(193,198,215,0.72) !important;
    box-shadow: -12px 0 34px rgba(0,24,68,0.12) !important;
}

body.stitch-skin.light-mode .plg-panel-header,
body.stitch-skin.light-mode .plg-metric-card,
body.stitch-skin.light-mode .plg-table-header {
    background: #f9f9ff !important;
    border-color: rgba(193,198,215,0.72) !important;
}

body.stitch-skin.light-mode #pelangganPanel > div[style*="border-bottom"] {
    border-bottom-color: rgba(224,226,237,0.92) !important;
}

body.stitch-skin.light-mode .plg-connected-card {
    background: #f8f9ff !important;
    border: 1px solid rgba(193,198,215,0.72) !important;
    border-radius: 12px !important;
    padding: 14px 16px !important;
    color: #414755 !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6);
}

body.stitch-skin.light-mode .plg-connected-title {
    color: #717786 !important;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 850;
    margin-bottom: 10px;
}

body.stitch-skin.light-mode .plg-connected-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
    font-size: 0.78rem;
}

body.stitch-skin.light-mode .plg-connected-grid span {
    color: #717786 !important;
}

body.stitch-skin.light-mode .plg-connected-grid strong {
    color: #181c23 !important;
    font-weight: 800;
}

body.stitch-skin.light-mode .plg-connected-grid #plgConnTD {
    color: #0058bc !important;
}

body.stitch-skin.light-mode .plg-connected-grid #plgConnStatus {
    color: #16a34a !important;
}

body.stitch-skin.light-mode .plg-live-footer {
    border-top-color: rgba(224,226,237,0.92) !important;
    background: #ffffff !important;
}

body.stitch-skin.light-mode footer.sticky-footer {
    background: transparent !important;
    color: #717786 !important;
}

body.stitch-skin.light-mode .dt-feature-page {
    padding: 0 !important;
}

body.stitch-skin.light-mode .dt-feature-hero,
body.stitch-skin.light-mode .dt-feature-panel,
body.stitch-skin.light-mode .dt-feature-card {
    background: rgba(255,255,255,0.86) !important;
    border: 1px solid rgba(193,198,215,0.72) !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 24px rgba(0,24,68,0.07) !important;
    backdrop-filter: blur(20px);
}

body.stitch-skin.light-mode .dt-feature-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 24px;
    margin-bottom: 18px;
}

body.stitch-skin.light-mode .dt-feature-hero h2 {
    margin: 0 0 6px;
    color: #181c23;
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

body.stitch-skin.light-mode .dt-feature-hero p {
    margin: 0;
    color: #717786;
    font-size: 0.88rem;
    max-width: 760px;
}

body.stitch-skin.light-mode .dt-feature-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

body.stitch-skin.light-mode .dt-feature-grid-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.stitch-skin.light-mode .dt-feature-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.stitch-skin.light-mode .dt-feature-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.stitch-skin.light-mode .dt-feature-card {
    min-height: 150px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

body.stitch-skin.light-mode .dt-feature-card > i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #d8e2ff;
    color: #004493;
}

body.stitch-skin.light-mode .dt-feature-card span {
    color: #717786;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.stitch-skin.light-mode .dt-feature-card strong {
    color: #181c23;
    font-size: 1.45rem;
    line-height: 1.1;
    font-weight: 900;
}

body.stitch-skin.light-mode .dt-feature-card small {
    color: #717786;
    font-size: 0.74rem;
    line-height: 1.35;
}

body.stitch-skin.light-mode .dt-alert-tone > i {
    background: #ffdad6;
    color: #ba1a1a;
}

body.stitch-skin.light-mode .dt-feature-panel {
    padding: 18px;
}

body.stitch-skin.light-mode .dt-sparkline {
    height: 220px;
    border: 1px solid rgba(224,226,237,0.92);
    border-radius: 14px;
    background:
        linear-gradient(rgba(224,226,237,0.62) 1px, transparent 1px) 0 0 / 100% 44px,
        linear-gradient(90deg, rgba(224,226,237,0.62) 1px, transparent 1px) 0 0 / 68px 100%,
        linear-gradient(180deg, #ffffff 0%, #f9f9ff 100%);
    position: relative;
    overflow: hidden;
}

body.stitch-skin.light-mode .dt-sparkline::before {
    content: "";
    position: absolute;
    inset: 44px 28px 34px;
    border-radius: 44% 56% 43% 57% / 55% 38% 62% 45%;
    border-bottom: 5px solid #00c7a7;
    border-left: 0;
    transform: skewX(-12deg);
    opacity: 0.92;
}

body.stitch-skin.light-mode .dt-sparkline-temp::before {
    border-bottom-color: #fd7e14;
    transform: skewX(10deg);
}

body.stitch-skin.light-mode .dt-alert-list {
    display: grid;
    gap: 10px;
}

body.stitch-skin.light-mode .dt-alert-list > div,
body.stitch-skin.light-mode .dt-setting-row {
    background: #ffffff;
    border: 1px solid rgba(224,226,237,0.92);
    border-radius: 14px;
    padding: 14px;
}

body.stitch-skin.light-mode .dt-alert-list strong {
    display: block;
    margin: 6px 0 3px;
    color: #181c23;
}

body.stitch-skin.light-mode .dt-alert-list small {
    color: #717786;
}

body.stitch-skin.light-mode .dt-alert-severity {
    display: inline-flex;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

body.stitch-skin.light-mode .dt-alert-severity.critical {
    background: #ffdad6;
    color: #ba1a1a;
}

body.stitch-skin.light-mode .dt-alert-severity.warning {
    background: #ffdbcc;
    color: #9e3d00;
}

body.stitch-skin.light-mode .dt-alert-severity.info {
    background: #d8e2ff;
    color: #004493;
}

body.stitch-skin.light-mode .dt-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: #414755;
}

body.stitch-skin.light-mode .dt-setting-row strong {
    color: #0058bc;
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 0.82rem;
}

@media (max-width: 1199.98px) {
    body.stitch-skin.light-mode #page_dashboard {
        grid-template-columns: 1fr;
        grid-template-areas: none;
    }

    body.stitch-skin.light-mode #manualPanel,
    body.stitch-skin.light-mode .dt-map-card,
    body.stitch-skin.light-mode #mlPanel,
    body.stitch-skin.light-mode #scadaLogsPanel,
    body.stitch-skin.light-mode #simGangguanPanel,
    body.stitch-skin.light-mode .dt-chart-heading,
    body.stitch-skin.light-mode .dt-chart-row-main,
    body.stitch-skin.light-mode .dt-chart-row-secondary,
    body.stitch-skin.light-mode .dt-history-row,
    body.stitch-skin.light-mode .dt-spec-row,
    body.stitch-skin.light-mode #page_dashboard > .row {
        grid-column: 1;
        grid-row: auto;
        grid-area: auto;
    }

    body.stitch-skin.light-mode #manualPanel { order: 1; }
    body.stitch-skin.light-mode .dt-map-card { order: 2; }
    body.stitch-skin.light-mode #mlPanel { order: 3; }
    body.stitch-skin.light-mode #scadaLogsPanel { order: 4; }
    body.stitch-skin.light-mode #simGangguanPanel { order: 5; }
    body.stitch-skin.light-mode .dt-chart-heading { order: 6; }
    body.stitch-skin.light-mode .dt-chart-row-main { order: 7; }
    body.stitch-skin.light-mode .dt-chart-row-secondary { order: 8; }
    body.stitch-skin.light-mode .dt-history-row { order: 9; }
    body.stitch-skin.light-mode .dt-spec-row { order: 10; }

    body.stitch-skin.light-mode.stitch-network-mode .dt-network-left,
    body.stitch-skin.light-mode.stitch-network-mode .dt-network-right {
        width: 288px;
    }

    body.stitch-skin.light-mode.stitch-network-mode .legend-container {
        width: min(720px, calc(100% - 640px));
        min-width: 340px;
    }

    body.stitch-skin.light-mode.stitch-network-mode .dt-map-zoom-controls {
        right: 328px;
        bottom: 146px;
    }

    body.stitch-skin.light-mode .dt-feature-grid-four,
    body.stitch-skin.light-mode .dt-feature-grid-three,
    body.stitch-skin.light-mode .dt-feature-grid-two {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767.98px) {
    body.stitch-skin.light-mode {
        --sidebar-width: 100%;
    }

    body.stitch-skin.light-mode .container-fluid {
        padding: 16px 14px 28px !important;
    }

    body.stitch-skin.light-mode #wrapper .sidebar {
        padding: 8px !important;
        border-right: 0;
        border-bottom: 1px solid rgba(193,198,215,0.55);
    }

    body.stitch-skin.light-mode #mynetwork {
        height: 420px !important;
    }

    body.stitch-skin.light-mode.stitch-network-mode #mynetwork {
        height: 760px !important;
        min-height: 760px;
    }

    body.stitch-skin.light-mode.stitch-network-mode .dt-network-overlay {
        left: 12px;
        right: 12px;
        width: auto;
        top: 12px;
        bottom: auto;
    }

    body.stitch-skin.light-mode.stitch-network-mode .dt-network-right {
        top: auto;
        bottom: 86px;
    }

    body.stitch-skin.light-mode.stitch-network-mode .dt-layer-panel {
        display: none;
    }

    body.stitch-skin.light-mode.stitch-network-mode .dt-network-panel {
        padding: 14px;
        border-radius: 16px;
    }

    body.stitch-skin.light-mode.stitch-network-mode .dt-sim-card small,
    body.stitch-skin.light-mode.stitch-network-mode .dt-recent-list {
        display: none;
    }

    body.stitch-skin.light-mode.stitch-network-mode .legend-container {
        display: none !important;
    }

    body.stitch-skin.light-mode.stitch-network-mode .dt-map-zoom-controls {
        right: 18px;
        bottom: 320px;
    }

    body.stitch-skin.light-mode .dt-feature-grid-four,
    body.stitch-skin.light-mode .dt-feature-grid-three,
    body.stitch-skin.light-mode .dt-feature-grid-two {
        grid-template-columns: 1fr;
    }

    body.stitch-skin.light-mode .dt-feature-hero {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Stitch API visual completion layer: presentation-only overrides. */
body.stitch-skin.light-mode {
    --topbar-height: 72px;
    --stitch-surface: #f9f9ff;
    --stitch-card: #ffffff;
    --stitch-line: rgba(193,198,215,0.68);
    --stitch-soft-line: rgba(224,226,237,0.82);
    --stitch-shadow: 0 4px 24px rgba(0,0,0,0.04);
    --stitch-shadow-strong: 0 12px 30px rgba(0,24,68,0.10);
    background: #f9f9ff !important;
}

body.stitch-skin.light-mode #wrapper .sidebar {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f5f6ff !important;
    box-shadow: inset -1px 0 0 rgba(193,198,215,0.55);
}

body.stitch-skin.light-mode .sidebar-brand {
    justify-content: flex-start !important;
}

body.stitch-skin.light-mode .dt-logo-mark {
    border-radius: 9px;
    background: #0058bc !important;
}

body.stitch-skin.light-mode .dt-logo-mark::before {
    transform: rotate(0deg);
}

body.stitch-skin.light-mode .fa,
body.stitch-skin.light-mode .fas,
body.stitch-skin.light-mode .far,
body.stitch-skin.light-mode .fab {
    display: inline-block !important;
}

body.stitch-skin.light-mode .sidebar .nav-item .nav-link {
    min-height: 38px !important;
    border-radius: 7px !important;
    font-size: 0.76rem;
}

body.stitch-skin.light-mode .sidebar .nav-item.active .nav-link {
    background: #6664e4 !important;
    box-shadow: 0 8px 20px rgba(76,74,202,0.20);
}

body.stitch-skin.light-mode .dt-sidebar-footer {
    margin-top: auto;
    padding: 14px 0 4px;
    display: grid;
    gap: 12px;
}

body.stitch-skin.light-mode .dt-system-status-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 34px;
    padding: 8px 10px;
    border: 1px solid rgba(193,198,215,0.68);
    border-radius: 8px;
    background: rgba(255,255,255,0.72);
    color: #0058bc;
    font-size: 0.68rem;
    font-weight: 700;
}

body.stitch-skin.light-mode .dt-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 0 4px rgba(22,163,74,0.12);
}

body.stitch-skin.light-mode .dt-sidebar-logout {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    border: 0;
    background: transparent;
    color: #414755;
    padding: 8px 10px;
    font-size: 0.76rem;
    font-weight: 650;
    text-align: left;
}

body.stitch-skin.light-mode .dt-sidebar-logout:hover {
    color: #0058bc;
    background: rgba(224,226,237,0.58);
    border-radius: 8px;
}

body.stitch-skin.light-mode .topbar {
    background: rgba(255,255,255,0.74) !important;
    box-shadow: none !important;
}

body.stitch-skin.light-mode .dt-topbar-search {
    align-items: center;
    gap: 10px;
    width: min(320px, 34vw);
    height: 40px;
    margin-left: 4px;
    padding: 0 14px;
    border: 1px solid rgba(193,198,215,0.76);
    border-radius: 999px;
    background: rgba(255,255,255,0.82);
    color: #717786;
}

body.stitch-skin.light-mode .dt-topbar-search input {
    border: 0;
    outline: 0;
    width: 100%;
    background: transparent;
    color: #181c23;
    font-size: 0.72rem;
}

body.stitch-skin.light-mode .dt-topbar-search input::placeholder {
    color: #9aa0af;
}

body.stitch-skin.light-mode .dt-topbar-icon {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #414755;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.stitch-skin.light-mode .dt-topbar-icon:hover {
    background: rgba(224,226,237,0.62);
    color: #0058bc;
}

body.stitch-skin.light-mode .page-header h1 {
    font-size: 1.24rem !important;
}

body.stitch-skin.light-mode .dt-summary-row {
    margin-left: -8px;
    margin-right: -8px;
}

body.stitch-skin.light-mode .dt-summary-row > [class*="col-"] {
    padding-left: 8px;
    padding-right: 8px;
    margin-bottom: 16px;
}

body.stitch-skin.light-mode.stitch-support-mode .dt-summary-row {
    display: none !important;
}

body.stitch-skin.light-mode.stitch-support-mode .page-header > .d-flex:last-child {
    display: none !important;
}

body.stitch-skin.light-mode .stat-card {
    min-height: 104px;
    position: relative;
    align-items: flex-start !important;
    justify-content: space-between;
    flex-direction: column;
    gap: 10px !important;
    border-radius: 12px !important;
    box-shadow: var(--stitch-shadow) !important;
}

body.stitch-skin.light-mode .stat-card .stat-icon {
    display: inline-flex !important;
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
}

body.stitch-skin.light-mode .stat-card > div:last-child {
    display: grid;
    gap: 2px;
    padding-right: 34px;
}

body.stitch-skin.light-mode .stat-card .stat-value {
    font-size: 1.2rem !important;
}

body.stitch-skin.light-mode .stat-card::after {
    content: "";
    display: block !important;
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 4px;
    border-radius: 999px 999px 0 0;
    background: var(--card-accent, #0058bc);
}

body.stitch-skin.light-mode .card,
body.stitch-skin.light-mode .ml-panel,
body.stitch-skin.light-mode #manualPanel,
body.stitch-skin.light-mode .dt-feature-panel,
body.stitch-skin.light-mode .dt-feature-card {
    border-radius: 12px !important;
    box-shadow: var(--stitch-shadow) !important;
}

body.stitch-skin.light-mode .dt-feature-panel .dt-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

body.stitch-skin.light-mode .dt-feature-panel .dt-panel-head span,
body.stitch-skin.light-mode .dt-feature-panel .dt-panel-head strong {
    display: block;
}

body.stitch-skin.light-mode .dt-feature-panel .dt-panel-head strong {
    color: #181c23;
    font-size: 0.96rem;
    line-height: 1.25;
}

body.stitch-skin.light-mode .card-header {
    border-radius: 12px 12px 0 0 !important;
}

body.stitch-skin.light-mode #mynetwork {
    background:
        radial-gradient(circle at 18% 18%, rgba(0,88,188,0.11) 0 2px, transparent 2.5px),
        radial-gradient(circle at 72% 36%, rgba(198,79,0,0.16) 0 2px, transparent 2.5px),
        radial-gradient(circle, rgba(0,88,188,0.06) 1px, transparent 1.6px) 0 0 / 24px 24px,
        linear-gradient(180deg, #ffffff 0%, #fbfbff 100%) !important;
}

body.stitch-skin.light-mode .dt-feature-page {
    display: block;
}

body.stitch-skin.light-mode .dt-feature-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

body.stitch-skin.light-mode .dt-feature-toolbar strong {
    display: block;
    color: #181c23;
    font-size: 0.96rem;
}

body.stitch-skin.light-mode .dt-feature-toolbar > div:last-child {
    display: flex;
    gap: 8px;
}

body.stitch-skin.light-mode .dt-feature-card {
    min-height: 138px;
    align-items: flex-start;
}

body.stitch-skin.light-mode .dt-card-progress {
    width: 100%;
    height: 5px;
    border-radius: 999px;
    background: #e0e2ed;
    overflow: hidden;
    margin-top: auto;
}

body.stitch-skin.light-mode .dt-card-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #0058bc;
}

body.stitch-skin.light-mode .dt-card-progress.green span {
    background: #16a34a;
}

body.stitch-skin.light-mode .dt-card-progress.amber span {
    background: #c64f00;
}

body.stitch-skin.light-mode .dt-metric-pair {
    width: 100%;
    display: flex;
    justify-content: space-between;
    color: #717786;
    font-size: 0.68rem;
}

body.stitch-skin.light-mode .dt-metric-pair b {
    color: #181c23;
}

body.stitch-skin.light-mode .dt-analytics-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 16px;
}

body.stitch-skin.light-mode .dt-analytics-main {
    grid-row: span 2;
}

body.stitch-skin.light-mode .dt-chart-tabs {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    margin: -4px 0 12px;
}

body.stitch-skin.light-mode .dt-chart-tabs span {
    padding: 4px 8px;
    border-radius: 6px;
    color: #717786;
    font-size: 0.65rem;
    font-weight: 800;
}

body.stitch-skin.light-mode .dt-chart-tabs .active {
    background: #f1f3fe;
    color: #0058bc;
}

body.stitch-skin.light-mode .dt-sparkline-large {
    min-height: 260px;
}

body.stitch-skin.light-mode .dt-bar-mini {
    height: 220px;
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 18px;
    border-left: 1px solid #e0e2ed;
    border-bottom: 1px solid #e0e2ed;
    background: repeating-linear-gradient(0deg, transparent 0 38px, rgba(224,226,237,0.62) 39px 40px);
}

body.stitch-skin.light-mode .dt-bar-mini span {
    width: 44px;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, #0070eb, #0058bc);
}

body.stitch-skin.light-mode .dt-alert-list {
    gap: 10px;
}

body.stitch-skin.light-mode .dt-alert-list > div {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    min-height: 70px;
}

body.stitch-skin.light-mode .dt-alert-list > div strong,
body.stitch-skin.light-mode .dt-alert-list > div small {
    grid-column: 2;
}

body.stitch-skin.light-mode .dt-alert-severity {
    grid-row: span 2;
    align-self: start;
}

body.stitch-skin.light-mode .dt-range-row {
    display: grid;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(224,226,237,0.72);
}

body.stitch-skin.light-mode .dt-range-row > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #414755;
    font-size: 0.78rem;
    font-weight: 800;
}

body.stitch-skin.light-mode .dt-range-row b {
    color: #717786;
    font-size: 0.68rem;
}

body.stitch-skin.light-mode .dt-range-line {
    position: relative;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #0058bc 0 70%, #c64f00 70% 88%, #ba1a1a 88% 100%);
}

body.stitch-skin.light-mode .dt-range-line span {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #c64f00;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.14);
}

body.stitch-skin.light-mode .dt-range-line span + span {
    border-color: #ba1a1a;
}

body.stitch-skin.light-mode .dt-sensitivity-track {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    margin: 10px 0 18px;
    color: #717786;
    font-size: 0.66rem;
    font-weight: 800;
}

body.stitch-skin.light-mode .dt-sensitivity-track div {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #e0e2ed, #6664e4);
    overflow: hidden;
}

body.stitch-skin.light-mode .dt-sensitivity-track b {
    display: block;
    width: 58%;
    height: 100%;
    background: #4c4aca;
    border-radius: inherit;
}

@media (max-width: 1199.98px) {
    body.stitch-skin.light-mode .dt-analytics-layout {
        grid-template-columns: 1fr;
    }

    body.stitch-skin.light-mode .dt-analytics-main {
        grid-row: auto;
    }
}

@media (max-width: 767.98px) {
    body.stitch-skin.light-mode .dt-sidebar-footer,
    body.stitch-skin.light-mode .dt-topbar-search {
        display: none !important;
    }

    body.stitch-skin.light-mode .dt-feature-toolbar,
    body.stitch-skin.light-mode .dt-feature-toolbar > div:last-child {
        align-items: stretch;
        flex-direction: column;
    }

    body.stitch-skin.light-mode .dt-range-row > div:first-child {
        align-items: flex-start;
        flex-direction: column;
    }
}

body.stitch-skin.light-mode {
    --sidebar-width: 280px;
    --topbar-height: 72px;
    --stitch-blue: #0058bc;
    --stitch-purple: #6664e4;
    --stitch-text: #181c23;
    --stitch-muted: #717786;
    --stitch-panel: rgba(255,255,255,0.88);
    --stitch-border: rgba(193,198,215,0.66);
    background:
        radial-gradient(circle at 0% 0%, rgba(216,226,255,0.76), transparent 34%),
        linear-gradient(180deg, #fbfbff 0%, #f1f3fe 100%) !important;
}

body.stitch-skin.light-mode #wrapper .sidebar {
    position: sticky;
    top: 0;
    width: var(--sidebar-width) !important;
    min-width: var(--sidebar-width) !important;
    padding: 28px 24px 20px !important;
    background: rgba(241,243,254,0.94) !important;
    border-right: 1px solid rgba(193,198,215,0.46) !important;
    box-shadow: 10px 0 36px rgba(0,24,68,0.06);
}

body.stitch-skin.light-mode .sidebar-brand {
    align-items: flex-start !important;
    height: auto !important;
    min-height: 58px !important;
    padding: 0 !important;
    margin: 0 0 26px !important;
    background: transparent !important;
    border: 0 !important;
}

body.stitch-skin.light-mode .sidebar-brand-icon,
body.stitch-skin.light-mode .sidebar-divider,
body.stitch-skin.light-mode .sidebar-heading {
    display: none !important;
}

body.stitch-skin.light-mode .sidebar-brand-text {
    color: var(--stitch-blue) !important;
    font-size: 1.32rem !important;
    line-height: 1.05 !important;
    font-weight: 900 !important;
    letter-spacing: -0.04em !important;
    text-transform: none !important;
}

body.stitch-skin.light-mode .sidebar-brand-text span {
    display: block;
    margin-top: 7px;
    color: #414755 !important;
    font-size: 0.76rem !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
}

body.stitch-skin.light-mode .sidebar .nav-item {
    margin: 8px 0 !important;
}

body.stitch-skin.light-mode .sidebar .nav-item .nav-link {
    min-height: 46px !important;
    padding: 12px 16px !important;
    border-radius: 12px !important;
    gap: 12px;
    color: #414755 !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
}

body.stitch-skin.light-mode .sidebar .nav-item .nav-link i {
    width: 20px;
    margin-right: 0 !important;
    color: #414755 !important;
    font-size: 0.95rem;
}

body.stitch-skin.light-mode .sidebar .nav-item.active .nav-link {
    color: #ffffff !important;
    background: var(--stitch-purple) !important;
    box-shadow: 0 10px 24px rgba(76,74,202,0.22);
    transform: none !important;
}

body.stitch-skin.light-mode .sidebar .nav-item.active .nav-link i {
    color: #ffffff !important;
}

body.stitch-skin.light-mode .dt-sidebar-footer {
    margin-top: auto;
    border-top: 1px solid rgba(193,198,215,0.58);
    padding-top: 18px;
}

body.stitch-skin.light-mode .topbar {
    height: var(--topbar-height) !important;
    min-height: var(--topbar-height) !important;
    padding: 0 32px !important;
    background: rgba(255,255,255,0.78) !important;
    border-bottom: 1px solid rgba(193,198,215,0.52) !important;
    backdrop-filter: blur(22px);
}

body.stitch-skin.light-mode .dt-topbar-search {
    width: min(330px, 35vw);
    height: 46px;
    margin-left: auto;
    margin-right: 16px;
    background: #ffffff;
    border-color: rgba(193,198,215,0.75);
    box-shadow: 0 5px 16px rgba(0,24,68,0.05);
}

body.stitch-skin.light-mode .container-fluid {
    max-width: 1360px;
    padding: 28px 32px 36px !important;
}

body.stitch-skin.light-mode .page-header {
    align-items: flex-start !important;
    margin-bottom: 22px !important;
}

body.stitch-skin.light-mode .page-header h1 {
    font-size: 1.58rem !important;
    line-height: 1.18 !important;
    font-weight: 900 !important;
}

body.stitch-skin.light-mode #pageSubtitle {
    margin-top: 6px;
    font-size: 0.86rem !important;
    color: var(--stitch-muted) !important;
}

body.stitch-skin.light-mode #btnThemeToggle {
    display: none !important;
}

body.stitch-skin.light-mode .dt-summary-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    margin: 0 0 22px !important;
}

body.stitch-skin.light-mode .dt-summary-row > [class*="col-"] {
    max-width: none;
    flex: none;
    padding: 0 !important;
    margin: 0 !important;
}

body.stitch-skin.light-mode.stitch-dashboard-mode #page_dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "manual"
        "ml"
        "map"
        "logs";
    gap: 22px;
    align-items: stretch;
}

body.stitch-skin.light-mode.stitch-dashboard-mode #manualPanel {
    grid-area: manual;
}

body.stitch-skin.light-mode.stitch-dashboard-mode .dt-map-card {
    grid-area: map;
    height: auto;
    min-height: 0;
}

body.stitch-skin.light-mode.stitch-dashboard-mode #mlPanel {
    grid-area: ml;
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

body.stitch-skin.light-mode.stitch-dashboard-mode #scadaLogsPanel {
    grid-area: logs;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-bottom: 0 !important;
}

body.stitch-skin.light-mode.stitch-dashboard-mode #mlPanel {
    overflow: visible;
}

body.stitch-skin.light-mode.stitch-dashboard-mode #scadaLogsPanel .card-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

body.stitch-skin.light-mode.stitch-dashboard-mode #simGangguanPanel {
    display: none !important;
}

body.stitch-skin.light-mode.stitch-dashboard-mode .dt-chart-heading,
body.stitch-skin.light-mode.stitch-dashboard-mode .dt-chart-row-main,
body.stitch-skin.light-mode.stitch-dashboard-mode .dt-chart-row-secondary,
body.stitch-skin.light-mode.stitch-dashboard-mode .dt-history-row,
body.stitch-skin.light-mode.stitch-dashboard-mode .dt-spec-row {
    grid-column: 1 / -1;
}

body.stitch-skin.light-mode .card,
body.stitch-skin.light-mode .ml-panel,
body.stitch-skin.light-mode #manualPanel,
body.stitch-skin.light-mode .dt-feature-panel,
body.stitch-skin.light-mode .dt-feature-card {
    background: var(--stitch-panel) !important;
    border: 1px solid var(--stitch-border) !important;
    border-radius: 18px !important;
    box-shadow: 0 10px 30px rgba(0,24,68,0.08) !important;
    backdrop-filter: blur(18px);
}

body.stitch-skin.light-mode .card:hover,
body.stitch-skin.light-mode .ml-panel:hover {
    transform: none !important;
    border-color: rgba(0,88,188,0.22) !important;
    box-shadow: 0 14px 34px rgba(0,24,68,0.11) !important;
}

body.stitch-skin.light-mode .card-header {
    min-height: 58px;
    background: transparent !important;
    border-bottom: 1px solid rgba(224,226,237,0.82) !important;
    border-radius: 18px 18px 0 0 !important;
    padding: 16px 20px !important;
}

body.stitch-skin.light-mode .card-header h6 {
    font-size: 1rem !important;
    line-height: 1.2;
    font-weight: 900 !important;
    letter-spacing: -0.02em;
}

body.stitch-skin.light-mode .card-body {
    padding: 20px !important;
}

body.stitch-skin.light-mode .dt-map-card {
    overflow: hidden;
}

body.stitch-skin.light-mode .dt-map-card .card-header {
    position: absolute;
    top: 18px;
    left: 20px;
    right: 20px;
    z-index: 20;
    min-height: 0;
    padding: 0 !important;
    border: 0 !important;
    pointer-events: none;
}

body.stitch-skin.light-mode .dt-map-card .card-header h6 {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.86);
    border: 1px solid rgba(224,226,237,0.82);
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0,24,68,0.08);
    pointer-events: auto;
}

body.stitch-skin.light-mode .dt-map-card .card-header > div:last-child {
    pointer-events: auto;
}

body.stitch-skin.light-mode .dt-map-card .card-body {
    padding: 0 !important;
}

body.stitch-skin.light-mode .map-wrapper {
    min-height: 440px;
    height: clamp(420px, 34vw, 500px);
    display: flex;
    flex-direction: column;
}

body.stitch-skin.light-mode #dtNetworkMap {
    flex: 1;
    min-height: 0;
}

body.stitch-skin.light-mode .dt-map-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.stitch-skin.light-mode .dt-map-card .card-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
}

body.stitch-skin.light-mode #mynetwork {
    height: 690px !important;
    border-radius: 18px;
    background:
        radial-gradient(circle at 28% 24%, rgba(0,88,188,0.12) 0 2px, transparent 3px),
        radial-gradient(circle at 68% 36%, rgba(198,79,0,0.18) 0 2px, transparent 3px),
        radial-gradient(circle at 48% 74%, rgba(0,88,188,0.11) 0 2px, transparent 3px),
        radial-gradient(circle, rgba(0,88,188,0.05) 1px, transparent 1.6px) 0 0 / 24px 24px,
        linear-gradient(180deg, #f9f9ff 0%, #ecedf9 100%) !important;
}

body.stitch-skin.light-mode .legend-container {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    z-index: 22;
    border: 1px solid rgba(193,198,215,0.58) !important;
    border-radius: 999px !important;
    backdrop-filter: blur(18px);
    background: rgba(255,255,255,0.84) !important;
}

body.stitch-skin.light-mode.stitch-dashboard-mode .dt-network-overlay {
    display: none !important;
}

body.stitch-skin.light-mode.stitch-dashboard-mode #mynetwork {
    height: 100% !important;
}

body.stitch-skin.light-mode .dt-map-zoom-controls {
    position: absolute;
    right: 18px;
    bottom: 86px;
    z-index: 24;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    background: rgba(255,255,255,0.86);
    border: 1px solid rgba(193,198,215,0.58);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0,24,68,0.10);
    backdrop-filter: blur(20px);
}

body.stitch-skin.light-mode .dt-map-zoom-controls button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #414755;
}

body.stitch-skin.light-mode .dt-map-zoom-controls button:hover {
    background: #f1f3fe;
    color: var(--stitch-blue);
}

body.stitch-skin.light-mode #mlPanel {
    padding: 18px !important;
}

body.stitch-skin.light-mode .ml-panel-header {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px !important;
}

body.stitch-skin.light-mode .ml-title {
    width: 100%;
    gap: 8px;
    font-size: 1rem !important;
    letter-spacing: -0.02em;
}

body.stitch-skin.light-mode .ml-title i:first-child {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #eef2ff;
    color: var(--stitch-purple);
}

body.stitch-skin.light-mode .ml-title-tag {
    margin-left: auto;
    font-size: 0.72rem;
}

body.stitch-skin.light-mode .ml-concept-link,
body.stitch-skin.light-mode .ml-hybrid-info {
    display: none !important;
}

body.stitch-skin.light-mode .ml-toolbar {
    width: min(100%, 760px);
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: stretch;
}

body.stitch-skin.light-mode .ml-toolbar-group {
    border-radius: 12px !important;
    background: #f7f8ff !important;
    justify-content: space-between;
}

body.stitch-skin.light-mode .ml-alert-card {
    background: #ffffff !important;
    border-color: rgba(224,226,237,0.92) !important;
    border-left-color: var(--stitch-blue) !important;
}

body.stitch-skin.light-mode .ml-alert-card,
body.stitch-skin.light-mode .chart-forecast {
    border-radius: 16px !important;
    background: rgba(255,255,255,0.9) !important;
    border: 1px solid rgba(224,226,237,0.9) !important;
    border-left: 0 !important;
    color: #414755 !important;
    box-shadow: 0 10px 28px rgba(0,24,68,0.05) !important;
    backdrop-filter: blur(16px);
}

body.stitch-skin.light-mode .ml-alert-card.is-critical {
    animation: none !important;
}

body.stitch-skin.light-mode .ml-alert-head {
    border-bottom: 0 !important;
    margin-bottom: 12px !important;
    padding-bottom: 0 !important;
}

body.stitch-skin.light-mode .ml-alert-badge {
    background: #f7f8ff !important;
    border: 1px solid rgba(193,198,215,0.72) !important;
    color: #414755 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

body.stitch-skin.light-mode .ml-alert-badge-status {
    color: #0058bc !important;
}

body.stitch-skin.light-mode .ml-alert-content,
body.stitch-skin.light-mode .chart-forecast {
    color: #414755 !important;
    font-size: 0.8rem !important;
    line-height: 1.72 !important;
}

body.stitch-skin.light-mode .ml-alert-content > b:first-child,
body.stitch-skin.light-mode .chart-forecast b {
    color: #181c23 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    font-size: 0.84rem !important;
    margin-bottom: 12px !important;
}

body.stitch-skin.light-mode .ml-alert-content span,
body.stitch-skin.light-mode .chart-forecast span,
body.stitch-skin.light-mode .ml-alert-content div,
body.stitch-skin.light-mode .chart-forecast div {
    color: #414755 !important;
}

body.stitch-skin.light-mode .ml-alert-content > div[style*='border-left'],
body.stitch-skin.light-mode .chart-forecast > div[style*='border-left'] {
    margin-top: 14px !important;
    padding: 14px 16px !important;
    border-radius: 14px !important;
    background: #f8f9ff !important;
    border: 1px solid rgba(224,226,237,0.9) !important;
    border-left: 0 !important;
    box-shadow: none !important;
}

body.stitch-skin.light-mode .ml-alert-content > div[style*='border-left'] > div:first-child,
body.stitch-skin.light-mode .chart-forecast > div[style*='border-left'] > div:first-child {
    color: #181c23 !important;
    letter-spacing: 0 !important;
    font-size: 0.78rem !important;
    text-transform: none !important;
    margin-bottom: 10px !important;
}

body.stitch-skin.light-mode .ml-alert-content > div[style*='border-left'] > div:first-child::before {
    display: none !important;
}

body.stitch-skin.light-mode .ml-alert-content > div[style*='border-left'] br + span,
body.stitch-skin.light-mode .ml-alert-content > div[style*='border-left'] > span {
    padding: 5px 0 !important;
    border-top: 0 !important;
}

body.stitch-skin.light-mode .ml-alert-content > div[style*='border-left'] br + span::before,
body.stitch-skin.light-mode .ml-alert-content > div[style*='border-left'] > span::before {
    display: none !important;
}

body.stitch-skin.light-mode .ml-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px !important;
}

body.stitch-skin.light-mode .ml-trafo-card {
    padding: 14px !important;
    border: 1px solid rgba(224,226,237,0.92) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    background: #fbfcff !important;
}

body.stitch-skin.light-mode .ml-trafo-card + .ml-trafo-card {
    border-top: 1px solid rgba(224,226,237,0.92) !important;
}

body.stitch-skin.light-mode .ml-health-bar-wrap {
    height: 10px;
    border-radius: 999px;
    background: #e0e2ed !important;
    border: 0 !important;
}

body.stitch-skin.light-mode .ml-health-bar,
body.stitch-skin.light-mode .ml-health-bar::after {
    border-radius: 999px;
}

body.stitch-skin.light-mode .ml-stat-row {
    border: 0 !important;
    padding: 4px 0;
}

body.stitch-skin.light-mode .ml-footer-row {
    margin-top: 14px;
    padding-top: 12px;
}

body.stitch-skin.light-mode #scadaLogsPanel {
    overflow: hidden;
}

body.stitch-skin.light-mode #scadaLogsContainer {
    max-height: 292px !important;
    background: transparent !important;
    padding: 4px 16px 14px !important;
}

body.stitch-skin.light-mode .log-item {
    padding: 12px 0 !important;
    border-bottom-color: rgba(224,226,237,0.86) !important;
    font-family: Inter, system-ui, sans-serif !important;
}

body.stitch-skin.light-mode .log-time {
    width: 72px;
    font-size: 0.66rem;
}

body.stitch-skin.light-mode .log-badge {
    width: auto;
    min-width: 64px;
    border-radius: 999px;
    margin-right: 10px;
}

body.stitch-skin.light-mode .dt-chart-row-main,
body.stitch-skin.light-mode .dt-chart-row-secondary,
body.stitch-skin.light-mode .dt-history-row,
body.stitch-skin.light-mode .dt-spec-row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.stitch-skin.light-mode .dt-chart-row-main > [class*="col-"],
body.stitch-skin.light-mode .dt-chart-row-secondary > [class*="col-"],
body.stitch-skin.light-mode .dt-history-row > [class*="col-"],
body.stitch-skin.light-mode .dt-spec-row > [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.stitch-skin.light-mode .dt-chart-row-main,
body.stitch-skin.light-mode .dt-chart-row-secondary {
    display: grid;
    gap: 22px;
    align-items: stretch;
}

body.stitch-skin.light-mode .dt-chart-row-main {
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.85fr);
}

body.stitch-skin.light-mode .dt-chart-row-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.stitch-skin.light-mode .dt-chart-row-main > [class*="col-"],
body.stitch-skin.light-mode .dt-chart-row-secondary > [class*="col-"] {
    width: auto !important;
    max-width: none !important;
    display: flex;
    flex-direction: column;
}

body.stitch-skin.light-mode .dt-chart-row-main .card,
body.stitch-skin.light-mode .dt-chart-row-secondary .card {
    margin-bottom: 0 !important;
    height: 100%;
    display: flex;
    flex-direction: column;
}

body.stitch-skin.light-mode .dt-chart-row-main .card .card-body,
body.stitch-skin.light-mode .dt-chart-row-secondary .card .card-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

body.stitch-skin.light-mode .chart-area,
body.stitch-skin.light-mode .chart-pie {
    height: 320px;
    min-height: 0;
    flex: 1;
    background: #ffffff !important;
}

body.stitch-skin.light-mode .chart-pie {
    height: 260px;
}

body.stitch-skin.light-mode .chart-area canvas,
body.stitch-skin.light-mode .chart-pie canvas {
    width: 100% !important;
    height: 100% !important;
}

body.stitch-skin.light-mode .chart-filters {
    border: 1px solid rgba(224,226,237,0.92);
    border-radius: 8px;
    padding: 2px;
    background: #f7f8ff;
}

body.stitch-skin.light-mode .chart-filters button {
    min-height: 26px;
    border: 0 !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    background: transparent !important;
}

body.stitch-skin.light-mode .chart-filters button.active {
    background: #ffffff !important;
    color: #181c23 !important;
    box-shadow: 0 2px 8px rgba(0,24,68,0.08) !important;
}

body.stitch-skin.light-mode.stitch-network-mode .container-fluid {
    max-width: none;
}

body.stitch-skin.light-mode.stitch-network-mode .page-header {
    max-width: 1360px;
    margin-left: auto !important;
    margin-right: auto !important;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-map-card {
    min-height: calc(100vh - var(--topbar-height) - 128px);
    border-radius: 20px !important;
}

body.stitch-skin.light-mode.stitch-network-mode #mynetwork {
    height: calc(100vh - var(--topbar-height) - 128px) !important;
    min-height: 680px;
    border-radius: 20px !important;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-network-overlay {
    display: flex !important;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-map-zoom-controls {
    right: 382px;
    bottom: 146px;
}

body.stitch-skin.light-mode.stitch-network-mode .legend-container {
    left: 50%;
    right: auto;
    bottom: 18px;
    width: min(920px, calc(100% - 760px));
    min-width: 420px;
    transform: translateX(-50%);
}

body.stitch-skin.light-mode.stitch-support-mode .container-fluid {
    max-width: 1180px;
}

body.stitch-skin.light-mode.stitch-support-mode .dt-feature-card,
body.stitch-skin.light-mode.stitch-support-mode .dt-feature-panel {
    border-radius: 18px !important;
    padding: 22px;
}

body.stitch-skin.light-mode.stitch-support-mode .dt-feature-toolbar {
    margin-bottom: 22px;
}

body.stitch-skin.light-mode.stitch-support-mode .dt-feature-toolbar strong {
    font-size: 1.38rem;
    letter-spacing: -0.03em;
}

body.stitch-skin.light-mode.stitch-support-mode .dt-feature-grid {
    gap: 22px;
    margin-bottom: 22px;
}

body.stitch-skin.light-mode.stitch-support-mode .dt-feature-card {
    min-height: 166px;
}

body.stitch-skin.light-mode.stitch-support-mode .dt-feature-card strong {
    font-size: 1.72rem;
}

@media (max-width: 1399.98px) {
    body.stitch-skin.light-mode .dt-summary-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body.stitch-skin.light-mode.stitch-dashboard-mode #page_dashboard {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "manual"
            "ml"
            "map"
            "logs";
    }
}

@media (max-width: 991.98px) {
    body.stitch-skin.light-mode #wrapper .sidebar {
        width: 92px !important;
        min-width: 92px !important;
        padding: 18px 12px !important;
    }

    body.stitch-skin.light-mode .sidebar-brand-text span:not(.material-symbols-outlined),
    body.stitch-skin.light-mode .sidebar .nav-item .nav-link span:not(.material-symbols-outlined),
    body.stitch-skin.light-mode .dt-sidebar-footer span:not(.material-symbols-outlined) {
        display: none !important;
    }

    body.stitch-skin.light-mode .sidebar .nav-item .nav-link {
        justify-content: center;
        padding: 12px !important;
    }

    body.stitch-skin.light-mode .dt-summary-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.stitch-skin.light-mode .page-header {
        flex-direction: column;
        gap: 14px;
    }
}

@media (max-width: 767.98px) {
    body.stitch-skin.light-mode #wrapper {
        display: block;
    }

    body.stitch-skin.light-mode #wrapper .sidebar {
        position: relative;
        width: 100% !important;
        min-width: 0 !important;
        min-height: auto;
        flex-direction: row;
        align-items: center;
        overflow-x: auto;
    }

    body.stitch-skin.light-mode .sidebar-brand,
    body.stitch-skin.light-mode .dt-sidebar-footer {
        display: none !important;
    }

    body.stitch-skin.light-mode .sidebar .nav-item {
        flex: 0 0 auto;
    }

    body.stitch-skin.light-mode .sidebar .nav-item .nav-link span {
        display: inline !important;
    }

    body.stitch-skin.light-mode .container-fluid,
    body.stitch-skin.light-mode .topbar {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    body.stitch-skin.light-mode .dt-summary-row {
        grid-template-columns: 1fr;
    }

    body.stitch-skin.light-mode #mynetwork,
    body.stitch-skin.light-mode .map-wrapper {
        min-height: 420px;
        height: 440px !important;
    }

    body.stitch-skin.light-mode .legend-container {
        border-radius: 14px !important;
        flex-wrap: wrap;
    }
}

body.stitch-skin.light-mode .dt-topbar-page-title {
    display: inline-flex;
    align-items: center;
    min-width: 220px;
    color: #181c23;
    font-size: 1.02rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

body.stitch-skin.light-mode.stitch-dashboard-mode .dt-topbar-page-title {
    display: none;
}

body.stitch-skin.light-mode.stitch-network-mode,
body.stitch-skin.light-mode.stitch-support-mode {
    background: #f3f5ff !important;
}

body.stitch-skin.light-mode.stitch-network-mode footer.sticky-footer {
    display: none !important;
}

body.stitch-skin.light-mode.stitch-network-mode .container-fluid {
    max-width: none !important;
    height: calc(100vh - var(--topbar-height));
    padding: 0 !important;
    overflow: hidden;
}

body.stitch-skin.light-mode.stitch-network-mode .page-header {
    display: none !important;
}

body.stitch-skin.light-mode.stitch-network-mode #page_dashboard {
    height: 100%;
    min-height: 0;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-map-card {
    height: 100%;
    min-height: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-map-card:hover {
    box-shadow: none !important;
    border-color: transparent !important;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-map-card > .card-header,
body.stitch-skin.light-mode.stitch-network-mode .map-info-overlay,
body.stitch-skin.light-mode.stitch-network-mode .legend-container,
body.stitch-skin.light-mode.stitch-network-mode .sim-map-overlay {
    display: none !important;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-map-card > .card-body,
body.stitch-skin.light-mode.stitch-network-mode .map-wrapper,
body.stitch-skin.light-mode.stitch-network-mode #mynetwork {
    width: 100%;
    height: 100% !important;
    min-height: 0 !important;
}

body.stitch-skin.light-mode.stitch-network-mode #mynetwork {
    border-radius: 0 !important;
    background:
        radial-gradient(circle at 72% 24%, rgba(0,88,188,0.10) 0 1px, transparent 2px),
        radial-gradient(circle at 60% 64%, rgba(198,79,0,0.18) 0 2px, transparent 3px),
        radial-gradient(circle at 44% 70%, rgba(198,79,0,0.18) 0 2px, transparent 3px),
        linear-gradient(135deg, #f8f9ff 0%, #eef1fb 100%) !important;
}

body.stitch-skin.light-mode.stitch-network-mode #mynetwork::before,
body.stitch-skin.light-mode.stitch-network-mode #mynetwork::after {
    display: none !important;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-network-overlay {
    display: flex !important;
    top: 24px;
    bottom: 24px;
    gap: 18px;
    z-index: 26;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-network-left {
    left: 24px;
    width: 334px;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-network-right {
    right: 24px;
    width: 334px;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-network-panel {
    background: rgba(255,255,255,0.94) !important;
    border: 1px solid rgba(193,198,215,0.78) !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 22px rgba(0,24,68,0.10) !important;
    backdrop-filter: blur(18px);
    padding: 22px;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-network-left .dt-network-panel:first-child {
    flex: 0 0 220px;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-layer-panel {
    flex: 1 1 auto;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-sim-panel {
    height: 100%;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-panel-head strong {
    font-size: 1rem;
    font-weight: 850;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-panel-kicker {
    color: #717786;
    font-size: 0.68rem;
    letter-spacing: 0.03em;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-search-box {
    height: 42px;
    background: #ffffff;
    border-color: rgba(224,226,237,0.96);
    border-radius: 10px;
    box-shadow: none;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-recent-list {
    margin-top: 18px;
    gap: 8px;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-recent-list button {
    min-height: 34px;
    padding: 7px 6px;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-recent-list button i {
    width: 20px;
    text-align: center;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-layer-row {
    min-height: 58px;
    padding: 10px 0;
    border-radius: 10px;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-layer-row i {
    background: #eef5ff;
    color: #0b72d9;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-layer-row:nth-of-type(2) i {
    background: #eef0f6;
    color: #717786;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-layer-row:nth-of-type(3) i {
    background: #fff1e8;
    color: #c64f00;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-toggle {
    width: 40px;
    height: 22px;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-toggle span {
    width: 16px;
    height: 16px;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-layer-row.is-on .dt-toggle span {
    left: 20px;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-sim-card {
    min-height: 92px;
    margin-bottom: 14px;
    border-radius: 12px;
    box-shadow: none;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-sim-card > i {
    background: #fff1e8;
    color: #c64f00;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-sim-card:nth-of-type(2) > i {
    background: #eaf8ef;
    color: #16a34a;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-timeline-control {
    margin-top: auto;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-map-zoom-controls {
    right: 382px !important;
    bottom: 28px !important;
    background: rgba(255,255,255,0.94);
    border-radius: 14px;
    z-index: 27;
}

body.stitch-skin.light-mode.stitch-support-mode .container-fluid {
    max-width: 1160px !important;
    padding-top: 26px !important;
}

body.stitch-skin.light-mode.stitch-support-mode .page-header {
    display: none !important;
}

body.stitch-skin.light-mode.stitch-support-mode .dt-feature-toolbar {
    align-items: flex-start;
    margin-bottom: 22px;
}

body.stitch-skin.light-mode.stitch-support-mode .dt-feature-toolbar strong {
    font-size: 1.82rem;
    line-height: 1.12;
    letter-spacing: -0.04em;
}

body.stitch-skin.light-mode.stitch-support-mode .dt-feature-toolbar .dt-panel-kicker {
    max-width: 620px;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.82rem;
    font-weight: 500;
}

body.stitch-skin.light-mode .dt-analytics-board {
    display: grid;
    grid-template-columns: minmax(240px, 0.8fr) minmax(0, 2.2fr);
    gap: 22px;
}

body.stitch-skin.light-mode .dt-analytics-stack {
    display: grid;
    gap: 22px;
}

body.stitch-skin.light-mode .dt-analytics-main {
    min-height: 360px;
}

body.stitch-skin.light-mode .dt-power-factor-panel,
body.stitch-skin.light-mode .dt-voltage-panel,
body.stitch-skin.light-mode .dt-temp-panel {
    min-height: 250px;
}

body.stitch-skin.light-mode .dt-heatmap-panel {
    grid-column: 1 / -1;
}

body.stitch-skin.light-mode .dt-sparkline-voltage::before {
    border-bottom-color: #0b72d9;
    transform: skewX(-6deg);
}

body.stitch-skin.light-mode .dt-heatmap-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

body.stitch-skin.light-mode .dt-heatmap-grid span {
    height: 34px;
    border-radius: 6px;
    background: #d8e2ff;
}

body.stitch-skin.light-mode .dt-heatmap-grid span.warm {
    background: #7fb7ff;
}

body.stitch-skin.light-mode .dt-heatmap-grid span.hot {
    background: #0058bc;
}

body.stitch-skin.light-mode [data-analytics-action],
body.stitch-skin.light-mode [data-analytics-range] {
    cursor: pointer;
}

body.stitch-skin.light-mode [data-analytics-action]:focus-visible,
body.stitch-skin.light-mode [data-analytics-range]:focus-visible {
    outline: 2px solid #0b72d9;
    outline-offset: 3px;
}

body.stitch-skin.light-mode #manualPanel {
    border-left: 4px solid #c64f00 !important;
}

body.stitch-skin.light-mode #manualPanel .card-body {
    padding: 16px 18px !important;
    background: #ffffff !important;
}

body.stitch-skin.light-mode .manual-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px !important;
    color: #a23f00 !important;
    font-size: 0.85rem !important;
    font-weight: 850 !important;
}

body.stitch-skin.light-mode #manualPanel .manual-select,
body.stitch-skin.light-mode #manualPanel .form-control {
    width: auto;
    min-width: min(100%, 310px);
    height: 34px;
    background: #fbfbff !important;
    border: 1px solid rgba(193,198,215,0.92) !important;
    color: #181c23 !important;
    border-radius: 8px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

body.stitch-skin.light-mode #manualPanel .form-control:focus {
    border-color: rgba(0,88,188,0.46) !important;
    box-shadow: 0 0 0 3px rgba(0,88,188,0.12) !important;
}

body.stitch-skin.light-mode .btn-manual-run {
    background: #d8e2ff !important;
    border-color: #adc6ff !important;
    color: #004493 !important;
    padding: 7px 14px !important;
    font-size: 0.78rem !important;
    font-weight: 850 !important;
}

body.stitch-skin.light-mode .manual-section-label {
    color: #5f6675 !important;
    letter-spacing: 0.02em !important;
}

body.stitch-skin.light-mode .trafo-power-unit {
    background: #f8f9ff !important;
    border: 1px solid rgba(193,198,215,0.86) !important;
    border-radius: 8px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.86), 0 2px 8px rgba(0,24,68,0.04);
}

body.stitch-skin.light-mode .power-unit-title {
    color: #181c23 !important;
}

body.stitch-skin.light-mode .power-unit-sub {
    color: #717786 !important;
}

body.stitch-skin.light-mode .power-state-pill {
    background: #eef2ff !important;
    border-color: #d8e2ff !important;
    color: #4f5b70 !important;
}

body.stitch-skin.light-mode .power-state-pill.online {
    background: #e9f8ee !important;
    border-color: #b7e4c7 !important;
    color: #15803d !important;
}

body.stitch-skin.light-mode .power-state-pill.blackout,
body.stitch-skin.light-mode .power-state-pill.offline {
    background: #fff0f0 !important;
    border-color: #ffc9c9 !important;
    color: #ba1a1a !important;
}

body.stitch-skin.light-mode .btn-trafo-on {
    background: #ffffff !important;
    border-color: #b7e4c7 !important;
    color: #15803d !important;
    box-shadow: 0 2px 8px rgba(0,24,68,0.04);
}

body.stitch-skin.light-mode .btn-trafo-on:hover {
    background: #e9f8ee !important;
    border-color: #86d39c !important;
    color: #0f6b2e !important;
}

body.stitch-skin.light-mode .btn-trafo-off {
    background: #ffffff !important;
    border-color: #ffc9c9 !important;
    color: #ba1a1a !important;
    box-shadow: 0 2px 8px rgba(0,24,68,0.04);
}

body.stitch-skin.light-mode .btn-trafo-off:hover {
    background: #fff0f0 !important;
    border-color: #ff9f9f !important;
    color: #9f1239 !important;
}

body.stitch-skin.light-mode .dt-alert-filterbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto auto auto;
    gap: 12px;
    margin-bottom: 18px;
}

body.stitch-skin.light-mode .dt-alert-table {
    display: grid;
    border: 1px solid rgba(224,226,237,0.92);
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

body.stitch-skin.light-mode .dt-alert-table > div {
    display: grid;
    grid-template-columns: 1.05fr 0.9fr 1fr 2.4fr 1fr 0.7fr;
    gap: 16px;
    align-items: center;
    min-height: 78px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(224,226,237,0.86);
    color: #414755;
    font-size: 0.78rem;
}

body.stitch-skin.light-mode .dt-alert-table > div:first-child {
    min-height: 46px;
    background: #f1f3fe;
    color: #414755;
    font-size: 0.72rem;
    font-weight: 850;
}

body.stitch-skin.light-mode .dt-alert-table > div:last-child {
    border-bottom: 0;
}

body.stitch-skin.light-mode .dt-status-red {
    color: #ba1a1a;
}

body.stitch-skin.light-mode .dt-status-green {
    color: #15803d;
}

body.stitch-skin.light-mode .dt-table-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-top: 16px;
    color: #717786;
    font-size: 0.78rem;
}

body.stitch-skin.light-mode .dt-table-footer b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #d8e2ff;
    color: #0058bc;
}

body.stitch-skin.light-mode .dt-settings-grid {
    align-items: start;
}

body.stitch-skin.light-mode .dt-threshold-panel,
body.stitch-skin.light-mode .dt-db-panel {
    min-height: 320px;
}

body.stitch-skin.light-mode .dt-sensitivity-labels,
body.stitch-skin.light-mode .dt-sensitivity-steps {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #717786;
    font-size: 0.72rem;
    font-weight: 800;
}

body.stitch-skin.light-mode .dt-sensitivity-steps {
    margin: 16px 0;
    border-radius: 12px;
    background: #f1f3fe;
    padding: 6px;
}

body.stitch-skin.light-mode .dt-sensitivity-steps span {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    border-radius: 8px;
}

body.stitch-skin.light-mode .dt-sensitivity-steps span.active {
    color: #181c23;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,24,68,0.08);
}

body.stitch-skin.light-mode .dt-info-callout {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    background: #fbf5ff;
    border: 1px solid #eadbff;
    color: #6d35b8;
    font-size: 0.78rem;
    line-height: 1.55;
}

@media (max-width: 1199.98px) {
    body.stitch-skin.light-mode .dt-analytics-board {
        grid-template-columns: 1fr;
    }

    body.stitch-skin.light-mode .dt-alert-filterbar,
    body.stitch-skin.light-mode .dt-alert-table > div {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    body.stitch-skin.light-mode.stitch-network-mode .dt-network-overlay {
        position: relative;
        top: auto;
        bottom: auto;
        left: auto;
        right: auto;
        width: auto;
        margin: 16px;
    }

    body.stitch-skin.light-mode.stitch-network-mode .container-fluid {
        height: auto;
        overflow: visible;
    }

    body.stitch-skin.light-mode.stitch-network-mode #mynetwork {
        height: 620px !important;
    }
}

/* Dashboard Insights Panel */
body.stitch-skin.light-mode .dt-dashboard-insights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 14px 18px;
    border-top: 1px solid rgba(224,226,237,0.92);
    background: #ffffff;
}
body.stitch-skin.light-mode .dt-dashboard-insights .dt-insight-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f7f8ff;
    border: 1px solid rgba(224,226,237,0.72);
}
body.stitch-skin.light-mode .dt-dashboard-insights .dt-insight-card i {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eef2ff;
    color: #0058bc;
    font-size: 0.72rem;
}
body.stitch-skin.light-mode .dt-dashboard-insights .dt-insight-card span {
    display: block;
    color: #717786;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
body.stitch-skin.light-mode .dt-dashboard-insights .dt-insight-card strong {
    display: block;
    color: #181c23;
    font-size: 0.82rem;
    font-weight: 800;
}

/* Dark Mode Base */
body.stitch-skin.dark-mode {
    --bg-primary: #0d1117;
    --bg-secondary: rgba(22,27,34,0.92);
    --bg-card: rgba(22,27,34,0.95);
    --bg-lighter: #161b22;
    --border-color: rgba(48,54,61,0.8);
    --border-accent: #58a6ff;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --text-main: #e6edf3;
    --accent-blue: #58a6ff;
    --accent-green: #3fb950;
    --accent-yellow: #d29922;
    --accent-red: #f85149;
    --accent-purple: #bc8cff;
    --accent-cyan: #39c5cf;
    background: #0d1117 !important;
    color: var(--text-primary) !important;
}
body.stitch-skin.dark-mode #wrapper,
body.stitch-skin.dark-mode #content-wrapper {
    background: transparent !important;
}
body.stitch-skin.dark-mode #wrapper .sidebar {
    background: rgba(22,27,34,0.92) !important;
    border-right-color: rgba(48,54,61,0.65);
    box-shadow: 8px 0 28px rgba(0,0,0,0.25);
}
body.stitch-skin.dark-mode .sidebar-brand-text { color: #58a6ff !important; }
body.stitch-skin.dark-mode .sidebar-brand-text span { color: #8b949e !important; }
body.stitch-skin.dark-mode .dt-logo-mark { background: #58a6ff !important; }
body.stitch-skin.dark-mode .sidebar .nav-item .nav-link { color: #8b949e !important; }
body.stitch-skin.dark-mode .sidebar .nav-item.active .nav-link {
    background: #4c4aca !important;
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(76,74,202,0.35);
}
body.stitch-skin.dark-mode .topbar {
    background: rgba(22,27,34,0.88) !important;
    border-bottom-color: rgba(48,54,61,0.65);
    box-shadow: 0 6px 22px rgba(0,0,0,0.25);
}
body.stitch-skin.dark-mode .topbar-stat-label { color: #6e7681 !important; }
body.stitch-skin.dark-mode .topbar-stat-val { color: #e6edf3 !important; }
body.stitch-skin.dark-mode .topbar-avatar { background: #58a6ff !important; }
body.stitch-skin.dark-mode .page-header h1 { color: #e6edf3 !important; }
body.stitch-skin.dark-mode .container-fluid { padding: 22px 26px 34px !important; }

/* Dark mode dashboard grid duplication (same layout, different colors) */
body.stitch-skin.dark-mode.stitch-dashboard-mode #page_dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-rows: auto 1fr 1fr;
    grid-template-areas:
        "manual manual"
        "map ml"
        "map logs";
    gap: 24px;
    align-items: stretch;
}

body.stitch-skin.dark-mode.stitch-dashboard-mode #manualPanel { grid-area: manual; }
body.stitch-skin.dark-mode.stitch-dashboard-mode .dt-map-card { grid-area: map; }
body.stitch-skin.dark-mode.stitch-dashboard-mode #mlPanel { grid-area: ml; }
body.stitch-skin.dark-mode.stitch-dashboard-mode #scadaLogsPanel { grid-area: logs; }
body.stitch-skin.dark-mode.stitch-dashboard-mode #simGangguanPanel { display: none !important; }
body.stitch-skin.dark-mode.stitch-dashboard-mode .dt-chart-heading,
body.stitch-skin.dark-mode.stitch-dashboard-mode .dt-chart-row-main,
body.stitch-skin.dark-mode.stitch-dashboard-mode .dt-chart-row-secondary,
body.stitch-skin.dark-mode.stitch-dashboard-mode .dt-history-row,
body.stitch-skin.dark-mode.stitch-dashboard-mode .dt-spec-row {
    grid-column: 1 / -1;
}
body.stitch-skin.dark-mode .card,
body.stitch-skin.dark-mode .ml-panel,
body.stitch-skin.dark-mode #manualPanel {
    background: rgba(22,27,34,0.95) !important;
    border: 1px solid rgba(48,54,61,0.72) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25) !important;
}
body.stitch-skin.dark-mode .card-header {
    background: transparent !important;
    border-bottom-color: rgba(48,54,61,0.72) !important;
}
body.stitch-skin.dark-mode .card-header h6 { color: #e6edf3 !important; }
body.stitch-skin.dark-mode .card-body { background: transparent !important; color: #e6edf3 !important; }
body.stitch-skin.dark-mode #mynetwork {
    background:
        radial-gradient(circle at 28% 24%, rgba(88,166,255,0.10) 0 2px, transparent 3px),
        radial-gradient(circle at 68% 36%, rgba(198,79,0,0.18) 0 2px, transparent 3px),
        radial-gradient(circle at 48% 74%, rgba(88,166,255,0.10) 0 2px, transparent 3px),
        radial-gradient(circle, rgba(88,166,255,0.05) 1px, transparent 1.6px) 0 0 / 24px 24px,
        linear-gradient(180deg, #0d1117 0%, #161b22 100%) !important;
}
body.stitch-skin.dark-mode .dt-dashboard-insights {
    background: rgba(22,27,34,0.95);
    border-top-color: rgba(48,54,61,0.72);
}
body.stitch-skin.dark-mode .dt-dashboard-insights .dt-insight-card {
    background: #161b22;
    border-color: rgba(48,54,61,0.72);
}
body.stitch-skin.dark-mode .dt-dashboard-insights .dt-insight-card i {
    background: rgba(88,166,255,0.12);
    color: #58a6ff;
}
body.stitch-skin.dark-mode .dt-dashboard-insights .dt-insight-card span { color: #8b949e; }
body.stitch-skin.dark-mode .dt-dashboard-insights .dt-insight-card strong { color: #e6edf3; }
body.stitch-skin.dark-mode.stitch-dashboard-mode .dt-network-overlay {
    display: none !important;
}
body.stitch-skin.dark-mode.stitch-network-mode .container-fluid {
    max-width: none !important;
    height: calc(100vh - var(--topbar-height));
    padding: 0 !important;
    overflow: hidden;
}
body.stitch-skin.dark-mode.stitch-network-mode #page_dashboard { height: 100%; min-height: 0; }
body.stitch-skin.dark-mode.stitch-network-mode .dt-map-card {
    height: 100%;
    min-height: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
body.stitch-skin.dark-mode.stitch-network-mode #mynetwork {
    border-radius: 0 !important;
    background:
        radial-gradient(circle at 72% 24%, rgba(88,166,255,0.10) 0 1px, transparent 2px),
        radial-gradient(circle at 60% 64%, rgba(198,79,0,0.18) 0 2px, transparent 3px),
        radial-gradient(circle at 44% 70%, rgba(198,79,0,0.18) 0 2px, transparent 3px),
        linear-gradient(135deg, #0d1117 0%, #161b22 100%) !important;
}
body.stitch-skin.dark-mode.stitch-network-mode .dt-network-panel {
    background: rgba(22,27,34,0.94) !important;
    border-color: rgba(48,54,61,0.78) !important;
    box-shadow: 0 8px 22px rgba(0,0,0,0.25) !important;
}
body.stitch-skin.dark-mode.stitch-network-mode .dt-panel-kicker { color: #8b949e; }
body.stitch-skin.dark-mode.stitch-network-mode .dt-search-box {
    background: #161b22;
    border-color: rgba(48,54,61,0.78);
}
body.stitch-skin.dark-mode.stitch-network-mode .dt-layer-row i {
    background: rgba(88,166,255,0.12);
    color: #58a6ff;
}
body.stitch-skin.dark-mode.stitch-network-mode .dt-layer-row:nth-of-type(2) i {
    background: rgba(139,148,158,0.12);
    color: #8b949e;
}
body.stitch-skin.dark-mode.stitch-network-mode .dt-layer-row:nth-of-type(3) i {
    background: rgba(242,201,121,0.12);
    color: #d29922;
}
body.stitch-skin.dark-mode.stitch-network-mode .dt-sim-card > i {
    background: rgba(242,201,121,0.12);
    color: #d29922;
}
body.stitch-skin.dark-mode.stitch-network-mode .dt-sim-card:nth-of-type(2) > i {
    background: rgba(63,185,80,0.12);
    color: #3fb950;
}
body.stitch-skin.dark-mode.stitch-network-mode .dt-map-zoom-controls {
    background: rgba(22,27,34,0.94);
}
body.stitch-skin.dark-mode.stitch-support-mode .container-fluid {
    max-width: 1160px !important;
    padding-top: 26px !important;
}
body.stitch-skin.dark-mode .dt-feature-toolbar strong { color: #e6edf3; }
body.stitch-skin.dark-mode .dt-feature-toolbar .dt-panel-kicker { color: #8b949e; }
body.stitch-skin.dark-mode .dt-analytics-board { display: grid; grid-template-columns: minmax(240px, 0.8fr) minmax(0, 2.2fr); gap: 22px; }
body.stitch-skin.dark-mode .dt-alert-table { border-color: rgba(48,54,61,0.72); background: rgba(22,27,34,0.95); }
body.stitch-skin.dark-mode .dt-alert-table > div { border-bottom-color: rgba(48,54,61,0.72); color: #c9d1d9; }
body.stitch-skin.dark-mode .dt-alert-table > div:first-child { background: #161b22; color: #8b949e; }
body.stitch-skin.dark-mode .dt-table-footer { color: #8b949e; }
body.stitch-skin.dark-mode .dt-table-footer b { background: rgba(88,166,255,0.12); color: #58a6ff; }
body.stitch-skin.dark-mode .dt-sensitivity-steps { background: #161b22; }
body.stitch-skin.dark-mode .dt-sensitivity-steps span.active { color: #e6edf3; background: #0d1117; box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
body.stitch-skin.dark-mode .dt-info-callout { background: rgba(188,140,255,0.08); border-color: rgba(188,140,255,0.25); color: #bc8cff; }

/* Dark mode stat cards (KPI layout) */
body.stitch-skin.dark-mode .stat-card {
    background: #161b22 !important;
    border-color: rgba(48,54,61,0.72) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25) !important;
}
body.stitch-skin.dark-mode .stat-card .stat-label {
    color: #8b949e !important;
}
body.stitch-skin.dark-mode .stat-card .stat-value {
    color: #e6edf3 !important;
}
body.stitch-skin.dark-mode .stat-card .stat-trend {
    color: #8b949e !important;
}
body.stitch-skin.dark-mode .stat-card .stat-trend.stat-trend-danger {
    color: #f87171 !important;
}

body.stitch-skin.dark-mode .spec-table td,
body.stitch-skin.dark-mode .plg-table-row {
    border-color: rgba(48,54,61,0.72) !important;
}
body.stitch-skin.dark-mode .spec-table .spec-key,
body.stitch-skin.dark-mode .plg-table-header {
    color: #8b949e !important;
}
body.stitch-skin.dark-mode .spec-table .spec-val {
    color: #e6edf3 !important;
}
body.stitch-skin.dark-mode .plg-panel-header,
body.stitch-skin.dark-mode .plg-metric-card,
body.stitch-skin.dark-mode .plg-table-header {
    background: #161b22 !important;
    border-color: rgba(48,54,61,0.72) !important;
}

@media (max-width: 1399.98px) {
    body.stitch-skin.dark-mode.stitch-dashboard-mode #page_dashboard {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "manual"
            "ml"
            "map"
            "logs";
    }
}

/* Dashboard fitting overrides: keep the ML panel above the map and prevent zoom-out
   from shrinking the map background away from its frame. */
body.stitch-skin.light-mode.stitch-dashboard-mode #dtNetworkMap {
    background:
        radial-gradient(circle at 18% 18%, rgba(0,88,188,0.10) 0 2px, transparent 2.5px),
        radial-gradient(circle at 72% 36%, rgba(198,79,0,0.14) 0 2px, transparent 2.5px),
        radial-gradient(circle, rgba(0,88,188,0.06) 1px, transparent 1.6px) 0 0 / 30px 30px,
        linear-gradient(135deg, #d8d9e5 0%, #ecedf9 50%, #f1f3fe 100%) !important;
}

body.stitch-skin.light-mode.stitch-dashboard-mode #dtNetworkViewport > div:nth-child(-n+3) {
    display: none !important;
}

body.stitch-skin.light-mode.stitch-dashboard-mode #dtNetworkViewport {
    transform-origin: center center !important;
}

body.stitch-skin.light-mode.stitch-dashboard-mode .map-info-overlay,
body.stitch-skin.light-mode.stitch-dashboard-mode .map-toolbar {
    top: 64px !important;
}

body.stitch-skin.light-mode.stitch-dashboard-mode .legend-container {
    max-width: calc(100% - 40px);
    flex-wrap: wrap;
    row-gap: 8px;
    border-radius: 16px !important;
}

/* Network map mode: keep the map canvas fixed in its frame and move controls
   out of the main topology area. */
body.stitch-skin.light-mode.stitch-network-mode #dtNetworkMap {
    background:
        radial-gradient(circle at 72% 24%, rgba(0,88,188,0.10) 0 1px, transparent 2px),
        radial-gradient(circle at 60% 64%, rgba(198,79,0,0.16) 0 2px, transparent 3px),
        radial-gradient(circle at 44% 70%, rgba(198,79,0,0.16) 0 2px, transparent 3px),
        radial-gradient(circle, rgba(0,88,188,0.055) 1px, transparent 1.6px) 0 0 / 30px 30px,
        linear-gradient(135deg, #f8f9ff 0%, #eef1fb 100%) !important;
}

body.stitch-skin.light-mode.stitch-network-mode #dtNetworkViewport > div:nth-child(-n+3) {
    display: none !important;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-network-overlay {
    top: auto !important;
    bottom: 14px !important;
    left: 18px !important;
    right: auto !important;
    width: auto !important;
    max-width: calc(100% - 136px);
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start;
    gap: 10px !important;
    z-index: 26;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-network-right {
    left: auto !important;
    right: 92px !important;
    align-items: flex-end;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-network-panel {
    width: auto !important;
    max-width: 260px;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    background: rgba(255,255,255,0.90) !important;
    box-shadow: 0 8px 22px rgba(0,24,68,0.10) !important;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-network-left .dt-network-panel:first-child {
    flex: 0 0 auto !important;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-layer-panel,
body.stitch-skin.light-mode.stitch-network-mode .dt-sim-panel {
    flex: 0 0 auto !important;
    height: auto !important;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-layer-panel {
    width: 260px !important;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-sim-panel {
    width: 260px !important;
    max-height: 330px;
    overflow-y: auto;
    overflow-x: hidden;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-panel-head {
    margin-bottom: 8px !important;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-panel-head strong {
    font-size: 0.82rem !important;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-panel-kicker,
body.stitch-skin.light-mode.stitch-network-mode .dt-recent-list,
body.stitch-skin.light-mode.stitch-network-mode .dt-search-box,
body.stitch-skin.light-mode.stitch-network-mode .dt-sim-card small,
body.stitch-skin.light-mode.stitch-network-mode .dt-timeline-control {
    display: none !important;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-layer-row,
body.stitch-skin.light-mode.stitch-network-mode .dt-sim-card {
    min-height: 38px !important;
    margin: 0 !important;
    padding: 5px 8px !important;
    gap: 8px !important;
    display: flex !important;
    align-items: center !important;
    overflow: hidden;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-layer-row + .dt-layer-row,
body.stitch-skin.light-mode.stitch-network-mode .dt-sim-card + .dt-sim-card {
    margin-top: 6px !important;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-layer-row i,
body.stitch-skin.light-mode.stitch-network-mode .dt-sim-card > i {
    width: 26px !important;
    height: 26px !important;
    border-radius: 8px !important;
    flex: 0 0 26px !important;
    font-size: 0.86rem !important;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-sim-card strong,
body.stitch-skin.light-mode.stitch-network-mode .dt-layer-row > span:first-child {
    font-size: 0.74rem !important;
    white-space: nowrap;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-sim-card > span {
    min-width: 0;
    display: block;
    line-height: 1.15;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-sim-card strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-sim-reset {
    width: 100%;
    min-height: 32px;
    margin-top: 6px;
    border: 1px solid rgba(193,198,215,0.78);
    border-radius: 9px;
    background: #ffffff;
    color: #414755;
    font-size: 0.72rem;
    font-weight: 800;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-sim-target-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2px 8px;
    margin-bottom: 8px;
    padding: 9px 10px;
    border: 1px solid rgba(193,198,215,0.78);
    border-radius: 10px;
    background: #f7f8ff;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-sim-target-picker span {
    color: #717786;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-sim-target-picker strong {
    color: #0058bc;
    font-size: 0.82rem;
    font-weight: 950;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-sim-target-picker small {
    grid-column: 1 / -1;
    color: #717786;
    font-size: 0.68rem;
}

body.stitch-skin.light-mode .dt-map-node-td.is-sim-target > div:first-child {
    outline: 3px solid rgba(0,88,188,0.28);
    outline-offset: 5px;
}

body.stitch-skin.light-mode.stitch-network-mode .dt-map-zoom-controls {
    right: 18px !important;
    bottom: 18px !important;
}

body.stitch-skin.light-mode .dt-map-flow {
    display: none !important;
}

body.stitch-skin.light-mode .dt-city-map-base {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    background:
        linear-gradient(0deg, rgba(255,255,255,0.28), rgba(255,255,255,0.28)),
        #eef2f8;
}

body.stitch-skin.light-mode .dt-city-blocks,
body.stitch-skin.light-mode .dt-city-blocks span,
body.stitch-skin.light-mode .dt-city-road,
body.stitch-skin.light-mode .dt-city-streets,
body.stitch-skin.light-mode .dt-city-label,
body.stitch-skin.light-mode .dt-poi-marker {
    position: absolute;
}

body.stitch-skin.light-mode .dt-city-blocks {
    inset: 0;
    z-index: 1;
}

body.stitch-skin.light-mode .dt-city-blocks span {
    display: block;
    border: 1px solid rgba(202,211,226,0.82);
    background:
        repeating-linear-gradient(90deg, rgba(255,255,255,0.76) 0 14px, rgba(238,229,207,0.72) 14px 28px),
        rgba(250,245,231,0.82);
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.52);
    opacity: 0.95;
}

body.stitch-skin.light-mode .dt-city-road {
    display: none;
}

body.stitch-skin.light-mode .dt-city-streets {
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

body.stitch-skin.light-mode .dt-city-streets path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

body.stitch-skin.light-mode .dt-city-streets .street-main {
    stroke: #c8d3e1;
    stroke-width: 19;
    filter: drop-shadow(0 0 0 rgba(255,255,255,0));
}

body.stitch-skin.light-mode .dt-city-streets .street-minor {
    stroke: #d8e0eb;
    stroke-width: 11;
}

body.stitch-skin.light-mode .dt-city-streets .street-connector {
    stroke: #d2dce8;
    stroke-width: 12;
}

body.stitch-skin.light-mode .dt-city-streets .street-main,
body.stitch-skin.light-mode .dt-city-streets .street-minor,
body.stitch-skin.light-mode .dt-city-streets .street-connector {
    paint-order: stroke;
}

body.stitch-skin.light-mode .dt-city-streets::after {
    content: "";
}

body.stitch-skin.light-mode .dt-city-road {
    z-index: 2;
    background: #cdd7e5;
    box-shadow:
        0 0 0 1px rgba(181,194,211,0.62),
        inset 0 0 0 2px rgba(255,255,255,0.72);
}

body.stitch-skin.light-mode .road-main.road-horizontal {
    height: 30px;
    border-radius: 999px;
}

body.stitch-skin.light-mode .road-main.road-vertical {
    width: 32px;
    border-radius: 999px;
}

body.stitch-skin.light-mode .road-minor.road-horizontal {
    height: 18px;
    border-radius: 999px;
    background: #d8e0eb;
}

body.stitch-skin.light-mode .road-minor.road-vertical {
    width: 18px;
    border-radius: 999px;
    background: #d8e0eb;
}

body.stitch-skin.light-mode .road-diag {
    height: 20px;
    border-radius: 999px;
    background: #d3dce8;
}

body.stitch-skin.light-mode .dt-city-road::after {
    content: "";
    position: absolute;
    inset: 50% 0 auto 0;
    height: 1px;
    background: repeating-linear-gradient(90deg, rgba(111,124,145,0.42) 0 14px, transparent 14px 26px);
    transform: translateY(-50%);
}

body.stitch-skin.light-mode .road-vertical::after {
    inset: 0 auto 0 50%;
    width: 1px;
    height: auto;
    background: repeating-linear-gradient(0deg, rgba(111,124,145,0.42) 0 14px, transparent 14px 26px);
    transform: translateX(-50%);
}

body.stitch-skin.light-mode .dt-city-label {
    z-index: 4;
    pointer-events: none;
    white-space: nowrap;
    text-shadow: 0 1px 0 rgba(255,255,255,0.88), 0 -1px 0 rgba(255,255,255,0.88);
}

body.stitch-skin.light-mode .road-label {
    color: #7a8494;
    font-size: 0.86rem;
    font-weight: 800;
}

body.stitch-skin.light-mode .road-major-label {
    color: #dc5b53;
    font-size: 0.92rem;
}

body.stitch-skin.light-mode .poi-label {
    font-size: 0.78rem;
    font-weight: 800;
}

body.stitch-skin.light-mode .poi-cafe { color: #e8752b; }
body.stitch-skin.light-mode .poi-hotel { color: #d53cb1; }
body.stitch-skin.light-mode .poi-apotek { color: #ef4444; }
body.stitch-skin.light-mode .poi-monument { color: #9b6ee8; }

body.stitch-skin.light-mode .dt-poi-marker {
    z-index: 5;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    border: 3px solid #ffffff;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(26,35,50,0.22);
    font-size: 0.68rem;
}

body.stitch-skin.light-mode .poi-orange { background: #f97316; }
body.stitch-skin.light-mode .poi-purple { background: #e248b5; }
body.stitch-skin.light-mode .poi-red { background: #ef4444; }
body.stitch-skin.light-mode .poi-violet { background: #a855f7; }
body.stitch-skin.light-mode .poi-gray { background: #64748b; }

body.stitch-skin.light-mode .dt-network-nodes {
    z-index: 10 !important;
}

body.stitch-skin.light-mode .dt-flow-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    marker-end: url(#dtFlowArrow);
}

body.stitch-skin.light-mode .dt-sim-story-panel {
    position: absolute;
    left: 292px;
    right: auto;
    bottom: 18px;
    top: auto;
    z-index: 28;
    width: min(430px, calc(100% - 690px));
    min-width: 0;
    max-height: 250px;
    transform: none;
    display: none;
    overflow: hidden;
    border: 1px solid rgba(193,198,215,0.82);
    border-radius: 12px;
    background: rgba(255,255,255,0.94);
    box-shadow: 0 12px 30px rgba(0,24,68,0.12);
    backdrop-filter: blur(18px);
}

body.stitch-skin.light-mode .dt-sim-panel .dt-sim-story-panel {
    position: absolute;
}

body.stitch-skin.light-mode .dt-sim-panel .dt-sim-story-body {
    max-height: 150px;
}

body.stitch-skin.light-mode .sim-map-overlay {
    left: 18px !important;
    right: auto !important;
    bottom: 18px !important;
    transform: none !important;
    max-width: min(340px, calc(100% - 36px));
    padding: 7px 11px !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,0.9) !important;
    border: 1px solid rgba(193,198,215,0.86) !important;
    color: #717786 !important;
    box-shadow: 0 10px 28px rgba(0,24,68,0.08);
    letter-spacing: 0 !important;
    text-transform: none;
    animation: none !important;
}

body.stitch-skin.light-mode .dt-sim-story-panel.is-open + .sim-map-overlay,
body.stitch-skin.light-mode .dt-sim-story-panel.is-open ~ .sim-map-overlay {
    display: none !important;
}

@media (max-width: 1199.98px) {
    body.stitch-skin.light-mode .dt-sim-story-panel {
        left: 16px;
        right: 16px;
        top: auto;
        bottom: 14px;
        width: auto;
        min-width: 0;
        transform: none;
    }
}

body.stitch-skin.light-mode .dt-sim-story-panel.is-open {
    display: block;
}

body.stitch-skin.light-mode .dt-sim-story-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px 7px;
    border-bottom: 0;
}

body.stitch-skin.light-mode .dt-sim-story-head span {
    display: block;
    color: #717786;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

body.stitch-skin.light-mode .dt-sim-story-head strong {
    display: block;
    color: #181c23;
    font-size: 0.9rem;
    line-height: 1.2;
}

body.stitch-skin.light-mode .dt-sim-story-head button {
    width: 26px;
    height: 26px;
    border: 1px solid rgba(193,198,215,0.78);
    border-radius: 8px;
    background: #ffffff;
    color: #717786;
    font-weight: 900;
    line-height: 1;
}

body.stitch-skin.light-mode .dt-sim-story-note {
    padding: 0 12px 8px;
    color: #717786;
    background: transparent;
    font-size: 0.68rem;
    font-weight: 700;
}

body.stitch-skin.light-mode .dt-sim-story-body {
    max-height: 154px;
    overflow-y: auto;
    padding: 0 12px 12px;
}

body.stitch-skin.light-mode .dt-sim-run-card {
    border: 0;
    border-radius: 10px;
    background: #f8f9ff;
    overflow: hidden;
}

body.stitch-skin.light-mode .dt-sim-run-card + .dt-sim-run-card {
    margin-top: 10px;
}

body.stitch-skin.light-mode .dt-sim-run-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 9px;
    background: transparent;
    border-bottom: 0;
}

body.stitch-skin.light-mode .dt-sim-run-title strong {
    color: #181c23;
    font-size: 0.76rem;
    line-height: 1.25;
}

body.stitch-skin.light-mode .dt-sim-run-title span {
    color: #0058bc;
    font-size: 0.66rem;
    font-weight: 900;
}

body.stitch-skin.light-mode .dt-sim-run-title button {
    width: 24px;
    height: 24px;
    border: 1px solid rgba(193,198,215,0.78);
    border-radius: 7px;
    background: #ffffff;
    color: #717786;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
}

body.stitch-skin.light-mode .dt-sim-step {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
    padding: 5px 0;
    border-bottom: 0;
}

body.stitch-skin.light-mode .dt-sim-run-card .dt-sim-step {
    padding-left: 10px;
    padding-right: 10px;
}

body.stitch-skin.light-mode .dt-sim-step:last-child {
    border-bottom: 0;
}

body.stitch-skin.light-mode .dt-sim-step-time {
    color: #717786;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.66rem;
    font-weight: 800;
}

body.stitch-skin.light-mode .dt-sim-step-text {
    color: #414755;
    font-size: 0.74rem;
    line-height: 1.45;
}

body.stitch-skin.light-mode .dt-sim-step.is-active .dt-sim-step-time,
body.stitch-skin.light-mode .dt-sim-step.is-active .dt-sim-step-text {
    color: #d92d20;
    font-weight: 800;
}

body.stitch-skin.light-mode .dt-sim-step.dt-sim-step-trip {
    background: rgba(217,45,32,0.08);
    border-radius: 8px;
}

body.stitch-skin.light-mode .dt-sim-step.dt-sim-step-reroute {
    background: rgba(0,88,188,0.08);
    border-radius: 8px;
}

body.stitch-skin.light-mode .dt-sim-step.dt-sim-step-reroute .dt-sim-step-time,
body.stitch-skin.light-mode .dt-sim-step.dt-sim-step-reroute .dt-sim-step-text {
    color: #0058bc;
    font-weight: 850;
}

body.stitch-skin.light-mode .dt-sim-fx-layer {
    position: absolute;
    inset: 0;
    z-index: 12;
    pointer-events: none;
    overflow: hidden;
}

body.stitch-skin.light-mode .dt-backup-path-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    opacity: 0;
    transition: opacity 0.28s ease;
}

body.stitch-skin.light-mode .dt-backup-path-svg.is-visible {
    opacity: 1;
}

body.stitch-skin.light-mode .dt-backup-path-glow,
body.stitch-skin.light-mode .dt-backup-path-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

body.stitch-skin.light-mode .dt-backup-path-glow {
    stroke: rgba(0,88,188,0.24);
    stroke-width: 12;
    filter: blur(2px);
}

body.stitch-skin.light-mode .dt-backup-path-line {
    stroke: #0b72d9;
    stroke-width: 3.5;
    stroke-dasharray: 8 7;
    animation: dtBackupFlow 1.05s linear infinite;
}

body.stitch-skin.light-mode .dt-backup-path-label {
    position: absolute;
    z-index: 3;
    transform: translate(-50%, -50%);
    padding: 6px 10px;
    border: 1px solid rgba(193,198,215,0.86);
    border-radius: 999px;
    background: rgba(255,255,255,0.94);
    color: #0058bc;
    box-shadow: 0 10px 24px rgba(0,24,68,0.12);
    font-size: 0.68rem;
    font-weight: 900;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

body.stitch-skin.light-mode .dt-backup-path-label.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(-2px);
}

body.stitch-skin.light-mode .dt-fx-run {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

body.stitch-skin.light-mode .dt-realtime-backup-path {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

body.stitch-skin.light-mode .dt-fx-anchor {
    position: absolute;
    left: var(--fx-x);
    top: var(--fx-y);
    width: 1px;
    height: 1px;
    transform: translate(-50%, -50%);
}

body.stitch-skin.light-mode .dt-fx-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 38px;
    height: 38px;
    border: 2px solid var(--fx-color, rgba(217,45,32,0.62));
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 0;
    animation: dtFxRing 1.7s ease-out infinite;
}

body.stitch-skin.light-mode .dt-fx-ring:nth-child(2) {
    animation-delay: 0.45s;
}

body.stitch-skin.light-mode .dt-fx-ring:nth-child(3) {
    animation-delay: 0.9s;
}

body.stitch-skin.light-mode .dt-fx-core {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: var(--fx-core, #d92d20);
    box-shadow: 0 0 24px var(--fx-glow, rgba(217,45,32,0.72));
    animation: dtFxPulse 0.9s ease-in-out infinite alternate;
}

body.stitch-skin.light-mode .dt-fx-bolt {
    position: absolute;
    left: calc(var(--fx-x) - 8px);
    top: -4%;
    width: 18px;
    height: calc(var(--fx-y) + 2%);
    clip-path: polygon(58% 0, 24% 44%, 48% 44%, 30% 100%, 82% 36%, 56% 36%);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(59,130,246,0.95), rgba(217,45,32,0.92));
    filter: drop-shadow(0 0 12px rgba(59,130,246,0.72));
    opacity: 0;
    animation: dtFxBolt 1.2s steps(2, end) infinite;
}

body.stitch-skin.light-mode .dt-fx-spark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--fx-color, #f97316);
    transform: translate(-50%, -50%) rotate(var(--a)) translateX(8px);
    animation: dtFxSpark 1.15s ease-out infinite;
    animation-delay: var(--d, 0s);
}

body.stitch-skin.light-mode .dt-fx-heat {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 42px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(249,115,22,0), rgba(249,115,22,0.38), rgba(217,45,32,0));
    transform: translate(-50%, 10px) rotate(var(--r, 0deg));
    filter: blur(2px);
    opacity: 0;
    animation: dtFxHeat 1.8s ease-in-out infinite;
    animation-delay: var(--d, 0s);
}

body.stitch-skin.light-mode .dt-fx-branch {
    position: absolute;
    left: -58px;
    top: -72px;
    width: 122px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, #7c3f16, #3f6212);
    box-shadow: 16px -8px 0 -2px #16a34a, 42px 8px 0 -3px #22c55e, 72px -7px 0 -3px #15803d;
    transform-origin: right center;
    animation: dtFxBranch 2.5s ease-in-out infinite;
}

body.stitch-skin.light-mode .dt-fx-debris {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: #9a5b22;
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--r, 0deg));
    animation: dtFxDebris 1.9s ease-out infinite;
    animation-delay: var(--d, 0s);
}

body.stitch-skin.light-mode .dt-fx-scan {
    position: absolute;
    left: -90px;
    top: -90px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(59,130,246,0), rgba(59,130,246,0.22), rgba(59,130,246,0));
    animation: dtFxRotate 2.2s linear infinite;
    opacity: 0.8;
}

@keyframes dtFxRing {
    0% { opacity: 0.72; transform: translate(-50%, -50%) scale(0.35); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(3.4); }
}

@keyframes dtFxPulse {
    from { transform: translate(-50%, -50%) scale(0.92); }
    to { transform: translate(-50%, -50%) scale(1.22); }
}

@keyframes dtFxBolt {
    0%, 18%, 100% { opacity: 0; transform: scaleY(0.98); }
    8%, 12% { opacity: 1; transform: scaleY(1.03); }
}

@keyframes dtFxSpark {
    0% { opacity: 0.95; transform: translate(-50%, -50%) rotate(var(--a)) translateX(8px) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--a)) translateX(68px) scale(0.35); }
}

@keyframes dtFxHeat {
    0% { opacity: 0; transform: translate(-50%, 18px) rotate(var(--r, 0deg)) scaleY(0.8); }
    35% { opacity: 0.85; }
    100% { opacity: 0; transform: translate(-50%, -42px) rotate(var(--r, 0deg)) scaleY(1.35); }
}

@keyframes dtFxBranch {
    0%, 100% { transform: rotate(-20deg) translate(0, 0); opacity: 0.92; }
    50% { transform: rotate(9deg) translate(12px, 18px); opacity: 1; }
}

@keyframes dtFxDebris {
    0% { opacity: 0.9; transform: translate(-50%, -50%) rotate(var(--r, 0deg)) translate(0, 0); }
    100% { opacity: 0; transform: translate(-50%, -50%) rotate(calc(var(--r, 0deg) + 180deg)) translate(var(--dx), var(--dy)); }
}

@keyframes dtFxRotate {
    to { transform: rotate(360deg); }
}

@keyframes dtBackupFlow {
    to { stroke-dashoffset: -15; }
}

body.stitch-skin.light-mode .dt-flow-hv {
    stroke: rgba(0,88,188,0.46);
    stroke-width: 0.35;
}

body.stitch-skin.light-mode .dt-flow-lv {
    stroke: rgba(22,163,74,0.44);
    stroke-width: 0.22;
    stroke-dasharray: 1.2 1.1;
}

body.stitch-skin.light-mode #dtFlowArrow path {
    fill: rgba(0,88,188,0.56);
}

body.stitch-skin.light-mode .dt-map-layer-hide-customers .dt-map-node-plg,
body.stitch-skin.light-mode .dt-map-layer-hide-flow .dt-map-flow {
    display: none !important;
}

body.stitch-skin.light-mode .dt-map-layer-hide-labels .dt-map-node-gi > span,
body.stitch-skin.light-mode .dt-map-layer-hide-labels .dt-map-node-td > span {
    display: none !important;
}

body.stitch-skin.light-mode .dt-layer-row:not(.is-on) {
    opacity: 0.68;
}

body.stitch-skin.light-mode .topbar-stat {
    min-width: 0;
    max-width: 92px;
    overflow: hidden;
}

body.stitch-skin.light-mode #modeStatus {
    display: block;
    max-width: 92px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.stitch-skin.light-mode #modeStatus::after {
    content: none !important;
}

@media (max-width: 1199.98px) {
    body.stitch-skin.light-mode .ml-panel-header {
        flex-direction: column;
    }

    body.stitch-skin.light-mode .ml-toolbar {
        width: 100%;
        grid-template-columns: 1fr;
    }

    body.stitch-skin.light-mode .dt-chart-row-main,
    body.stitch-skin.light-mode .dt-chart-row-secondary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    body.stitch-skin.light-mode .ml-grid {
        grid-template-columns: 1fr !important;
    }

    body.stitch-skin.light-mode .chart-area,
    body.stitch-skin.light-mode .chart-pie {
        height: 280px;
    }
}

/* Final adaptive map overrides. Keep these at the end so older layout rules do
   not reintroduce overflow on tablets and phones. */
body.stitch-skin.light-mode.stitch-network-mode #dtNetworkMap,
body.stitch-skin.light-mode.stitch-dashboard-mode #dtNetworkMap,
body.stitch-skin.light-mode.stitch-network-mode .map-wrapper,
body.stitch-skin.light-mode.stitch-dashboard-mode .map-wrapper {
    overflow: hidden !important;
}

body.stitch-skin.light-mode.stitch-network-mode #dtNetworkMap,
body.stitch-skin.light-mode.stitch-dashboard-mode #dtNetworkMap {
    touch-action: none !important;
    overscroll-behavior: contain;
}

body.stitch-skin.light-mode.stitch-network-mode #dtNetworkViewport,
body.stitch-skin.light-mode.stitch-dashboard-mode #dtNetworkViewport {
    left: -18% !important;
    top: -16% !important;
    right: auto !important;
    bottom: auto !important;
    width: 136% !important;
    height: 132% !important;
    min-width: 136%;
    min-height: 132%;
}

@media (max-width: 1199.98px) {
    body.stitch-skin.light-mode.stitch-network-mode .dt-network-overlay {
        max-width: min(280px, calc(100% - 30px)) !important;
    }

    body.stitch-skin.light-mode.stitch-network-mode .dt-network-right {
        right: 76px !important;
    }

    body.stitch-skin.light-mode.stitch-network-mode .dt-network-panel,
    body.stitch-skin.light-mode.stitch-network-mode .dt-layer-panel,
    body.stitch-skin.light-mode.stitch-network-mode .dt-sim-panel {
        width: min(260px, calc(100vw - 106px)) !important;
        max-width: min(260px, calc(100vw - 106px)) !important;
    }

    body.stitch-skin.light-mode .dt-sim-story-panel {
        left: 16px !important;
        right: 76px !important;
        width: auto !important;
        max-width: none !important;
    }
}

@media (max-width: 767.98px) {
    body.stitch-skin.light-mode #toastContainer {
        top: 70px !important;
        bottom: auto !important;
        left: 10px !important;
        right: 10px !important;
        max-height: 28vh !important;
        align-items: stretch !important;
        pointer-events: none !important;
    }

    body.stitch-skin.light-mode .scada-toast {
        max-width: none !important;
        width: 100% !important;
        pointer-events: none !important;
    }

    body.stitch-skin.light-mode.stitch-network-mode .container-fluid {
        height: calc(100vh - var(--topbar-height)) !important;
        overflow: hidden !important;
    }

    body.stitch-skin.light-mode #wrapper {
        flex-direction: column !important;
        min-height: 100vh !important;
        overflow-x: hidden !important;
    }

    body.stitch-skin.light-mode .sidebar {
        position: sticky !important;
        top: 0 !important;
        z-index: 1060 !important;
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        max-height: 58px !important;
        flex-direction: row !important;
        align-items: center !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 6px 8px !important;
        gap: 6px !important;
        box-shadow: 0 8px 18px rgba(0,24,68,0.10) !important;
    }

    body.stitch-skin.light-mode .sidebar .sidebar-brand,
    body.stitch-skin.light-mode .sidebar hr,
    body.stitch-skin.light-mode .sidebar .dt-sidebar-footer {
        display: none !important;
    }

    body.stitch-skin.light-mode .sidebar .nav-item {
        flex: 0 0 auto !important;
        margin: 0 !important;
    }

    body.stitch-skin.light-mode .sidebar .nav-item .nav-link {
        min-width: max-content !important;
        height: 42px !important;
        padding: 0 12px !important;
        border-radius: 10px !important;
        white-space: nowrap !important;
    }

    body.stitch-skin.light-mode .sidebar .nav-item .nav-link span:not(.material-symbols-outlined) {
        display: inline !important;
        font-size: 0.76rem !important;
    }

    body.stitch-skin.light-mode #content-wrapper {
        width: 100% !important;
        min-width: 0 !important;
        overflow-x: hidden !important;
    }

    body.stitch-skin.light-mode .topbar {
        min-height: 54px !important;
        height: auto !important;
        padding: 7px 10px !important;
        gap: 8px !important;
        overflow-x: auto !important;
    }

    body.stitch-skin.light-mode .topbar .navbar-search {
        display: none !important;
    }

    body.stitch-skin.light-mode.stitch-network-mode .map-wrapper,
    body.stitch-skin.light-mode.stitch-network-mode #dtNetworkMap,
    body.stitch-skin.light-mode.stitch-network-mode #dtNetworkViewport {
        min-height: 620px !important;
    }

    body.stitch-skin.light-mode.stitch-network-mode .dt-network-overlay {
        left: 8px !important;
        right: 8px !important;
        bottom: 8px !important;
        top: auto !important;
        width: auto !important;
        max-width: calc(100% - 16px) !important;
        flex-direction: row !important;
        align-items: flex-end !important;
        gap: 8px !important;
    }

    body.stitch-skin.light-mode.stitch-network-mode .dt-network-left {
        display: none !important;
    }

    body.stitch-skin.light-mode.stitch-network-mode .dt-network-right {
        left: 8px !important;
        right: 66px !important;
        bottom: 8px !important;
        align-items: stretch !important;
    }

    body.stitch-skin.light-mode.stitch-network-mode .dt-sim-panel {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 188px !important;
        padding: 8px 9px !important;
        overflow-y: auto !important;
    }

    body.stitch-skin.light-mode.stitch-network-mode .dt-sim-panel .dt-panel-head {
        margin-bottom: 6px !important;
    }

    body.stitch-skin.light-mode.stitch-network-mode .dt-sim-target-picker {
        padding: 7px 8px !important;
        margin-bottom: 6px !important;
    }

    body.stitch-skin.light-mode.stitch-network-mode .dt-sim-card {
        min-height: 32px !important;
        padding: 4px 7px !important;
    }

    body.stitch-skin.light-mode.stitch-network-mode .dt-sim-card > i {
        width: 22px !important;
        height: 22px !important;
        flex-basis: 22px !important;
        font-size: 0.72rem !important;
    }

    body.stitch-skin.light-mode.stitch-network-mode .dt-map-zoom-controls {
        right: 8px !important;
        bottom: 8px !important;
        gap: 6px !important;
    }

    body.stitch-skin.light-mode .dt-sim-story-panel {
        left: 8px !important;
        right: 8px !important;
        top: 8px !important;
        bottom: auto !important;
        width: auto !important;
        max-height: 178px !important;
        z-index: 40 !important;
    }

    body.stitch-skin.light-mode .dt-sim-story-body {
        max-height: 96px !important;
    }

    body.stitch-skin.light-mode:has(.dt-sim-story-panel.is-open) .dt-network-right,
    body.stitch-skin.light-mode.dt-sim-story-open .dt-network-right {
        display: none !important;
    }

    body.stitch-skin.light-mode .dt-city-label.poi-label {
        display: none !important;
    }

    body.stitch-skin.light-mode .road-label {
        font-size: 0.72rem;
    }

    body.stitch-skin.light-mode #pelangganPanel {
        width: min(100vw, 390px) !important;
        max-width: 100vw !important;
    }

    body.stitch-skin.light-mode .dt-feature-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    body.stitch-skin.light-mode .dt-feature-toolbar > div:last-child {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    body.stitch-skin.light-mode .dt-feature-toolbar .btn-control {
        width: 100% !important;
        min-width: 0 !important;
        justify-content: center !important;
        white-space: normal !important;
    }

    body.stitch-skin.light-mode .dt-analytics-main,
    body.stitch-skin.light-mode .dt-power-factor-panel,
    body.stitch-skin.light-mode .dt-voltage-panel,
    body.stitch-skin.light-mode .dt-temp-panel {
        min-height: 220px !important;
    }
}

@media (max-width: 480px) {
    body.stitch-skin.light-mode.stitch-network-mode #dtNetworkViewport,
    body.stitch-skin.light-mode.stitch-dashboard-mode #dtNetworkViewport {
        left: -24% !important;
        top: -20% !important;
        width: 148% !important;
        height: 140% !important;
        min-width: 148%;
        min-height: 140%;
    }

    body.stitch-skin.light-mode.stitch-network-mode .dt-sim-target-picker small,
    body.stitch-skin.light-mode.stitch-network-mode .dt-panel-head > i {
        display: none !important;
    }

    body.stitch-skin.light-mode.stitch-network-mode .dt-sim-panel {
        max-height: 164px !important;
    }

    body.stitch-skin.light-mode.stitch-network-mode .dt-sim-card:nth-of-type(n+5) {
        display: none !important;
    }

    body.stitch-skin.light-mode .dt-map-node-gi > span,
    body.stitch-skin.light-mode .dt-map-node-td > span {
        font-size: 10px !important;
        padding: 3px 6px !important;
    }

    body.stitch-skin.light-mode .dt-poi-marker {
        width: 20px;
        height: 20px;
        font-size: 0.58rem;
    }

    body.stitch-skin.light-mode .plg-metric-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        padding: 12px !important;
    }

    body.stitch-skin.light-mode .plg-metric-card {
        padding: 10px !important;
    }

    body.stitch-skin.light-mode .plg-connected-grid {
        grid-template-columns: 1fr !important;
    }
}
