
        /* ==============================================================================
           PREMIUM GLASSMORPHISM & CYBER-GOLD DESIGN SYSTEM
           ============================================================================== */
        
        .grid-2 {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
        }

        @media (max-width: 1024px) {
            .cards {
                grid-template-columns: 1fr !important;
            }
        }

        @media (max-width: 768px) {
            .grid-2 {
                grid-template-columns: 1fr;
            }
        }

        /* Loading Spinner */
        #page-loader {
            position: fixed;
            inset: 0;
            background: #0f172a;
            z-index: 9999;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            transition: opacity 0.5s ease;
        }

        .spinner {
            width: 50px;
            height: 50px;
            border: 5px solid rgba(56, 189, 248, 0.2);
            border-top: 5px solid #38bdf8;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 20px;
        }

        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        .hidden-loader {
            opacity: 0;
            pointer-events: none;
        }

        /* Sorting Styles */
        .sortable {
            cursor: pointer;
            transition: background 0.2s;
            position: relative;
        }

        .sortable:hover {
            background: rgba(255, 255, 255, 0.05) !important;
        }

        .sort-icon {
            font-size: 10px;
            margin-left: 5px;
            opacity: 0.5;
        }

        .sort-icon.active {
            opacity: 1;
            color: #f3ba2f;
        }

        /* Card Override */
        .card {
            background: rgba(30, 41, 59, 0.45) !important;
            border: 1px solid rgba(251, 191, 36, 0.08) !important;
            backdrop-filter: blur(10px) !important;
            box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5) !important;
            border-radius: 16px !important;
            padding: 24px !important;
            margin-bottom: 25px;
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
        }
        .card:hover {
            border-color: rgba(251, 191, 36, 0.15) !important;
            box-shadow: 0 15px 40px -10px rgba(251, 191, 36, 0.05), 0 10px 30px -10px rgba(0, 0, 0, 0.6) !important;
        }

        /* Flexible Table Fix */
        .table-container {
            width: 100%;
            border-radius: 12px;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            background: rgba(15, 23, 42, 0.25);
            border: 1px solid rgba(255, 255, 255, 0.05);
            box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
            margin-bottom: 15px;
        }

        .table {
            width: 100%;
            border-collapse: collapse;
            min-width: 500px;
            font-size: 13px;
        }

        .table th {
            background: rgba(15, 23, 42, 0.6);
            color: #94a3b8;
            font-weight: 800;
            text-transform: uppercase;
            font-size: 11px;
            letter-spacing: 0.8px;
            padding: 14px 16px;
            border-bottom: 2px solid rgba(251, 191, 36, 0.15) !important;
            text-align: left;
        }

        .table td {
            padding: 12px 16px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.03);
            color: #cbd5e1;
            transition: all 0.2s ease;
        }

        .table tbody tr {
            transition: background-color 0.2s ease;
        }

        .table tbody tr:hover {
            background-color: rgba(255, 255, 255, 0.02) !important;
        }

        /* Inputs & Buttons */
        .input {
            background: rgba(15, 23, 42, 0.55) !important;
            border: 1px solid rgba(255, 255, 255, 0.08) !important;
            color: #fff !important;
            border-radius: 8px !important;
            padding: 10px 14px !important;
            font-size: 13px !important;
            transition: all 0.3s ease !important;
            width: 100%;
            box-sizing: border-box;
        }

        .input:focus {
            border-color: rgba(251, 191, 36, 0.5) !important;
            box-shadow: 0 0 12px rgba(251, 191, 36, 0.18) !important;
            background: rgba(15, 23, 42, 0.8) !important;
            outline: none !important;
        }

        .input-xs {
            background: rgba(15, 23, 42, 0.55) !important;
            border: 1px solid rgba(255, 255, 255, 0.08) !important;
            color: white !important;
            padding: 6px 12px !important;
            border-radius: 6px !important;
            width: 80px;
            text-align: center;
            transition: all 0.3s ease !important;
        }

        .input-xs:focus {
            border-color: rgba(251, 191, 36, 0.5) !important;
            box-shadow: 0 0 10px rgba(251, 191, 36, 0.18) !important;
            outline: none !important;
        }

        /* Custom Button Theme */
        .btn-accent, .btn-sm {
            background: linear-gradient(135deg, #f59e0b, #d97706) !important;
            color: #0f172a !important;
            font-weight: 700 !important;
            border: 1px solid rgba(251, 191, 36, 0.3) !important;
            box-shadow: 0 2px 10px rgba(245, 158, 11, 0.15) !important;
            transition: all 0.2s ease !important;
            cursor: pointer;
        }
        .btn-accent:hover, .btn-sm:hover {
            box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3) !important;
            transform: translateY(-1px);
        }

        .btn-danger {
            background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
            color: #fff !important;
            border: 1px solid rgba(239, 68, 68, 0.3) !important;
            box-shadow: 0 2px 10px rgba(239, 68, 68, 0.15) !important;
        }
        .btn-danger:hover {
            box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3) !important;
            transform: translateY(-1px);
        }

        .btn-xs {
            padding: 4px 8px !important;
            font-size: 10px !important;
            border-radius: 4px !important;
            cursor: pointer;
            transition: all 0.2s ease !important;
            border: 1px solid transparent !important;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .btn-xs:hover {
            transform: translateY(-1px);
        }

        /* Tabs overrides */
        .tabs {
            display: flex;
            gap: 8px;
            background: rgba(15, 23, 42, 0.4) !important;
            border: 1px solid rgba(255, 255, 255, 0.05) !important;
            padding: 6px !important;
            border-radius: 10px !important;
            margin-bottom: 25px !important;
            flex-wrap: wrap;
        }

        .tab {
            padding: 10px 20px !important;
            font-size: 11px !important;
            font-weight: 800 !important;
            color: #94a3b8 !important;
            border-radius: 8px !important;
            cursor: pointer !important;
            transition: all 0.2s ease !important;
            text-transform: uppercase !important;
            letter-spacing: 0.8px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 6px !important;
            border: 1px solid transparent !important;
            background: transparent !important;
        }

        .tab:hover {
            color: #fff !important;
            background: rgba(255, 255, 255, 0.03) !important;
        }

        .tab.active {
            color: #0f172a !important;
            background: linear-gradient(135deg, #f59e0b, #d97706) !important;
            box-shadow: 0 4px 15px rgba(245, 158, 11, 0.25) !important;
            border-color: rgba(245, 158, 11, 0.3) !important;
        }

        /* --- High-End Glassmorphism Stat Cards --- */
        .stats-bar {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            gap: 16px;
            margin-bottom: 25px;
        }

        .stat-card-gold,
        .stat-card-green,
        .stat-card-purple,
        .stat-card-orange {
            border-radius: 12px;
            padding: 16px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            transition: all 0.3s ease;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
            position: relative;
            overflow: hidden;
            border: 1px solid transparent;
        }
        
        .stat-card-gold::before,
        .stat-card-green::before,
        .stat-card-purple::before,
        .stat-card-orange::before {
            content: '';
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
            transform: translateX(-100%);
            transition: 0.6s;
        }
        
        .stat-card-gold:hover::before,
        .stat-card-green:hover::before,
        .stat-card-purple:hover::before,
        .stat-card-orange:hover::before {
            transform: translateX(100%);
        }
        
        .stat-card-gold:hover,
        .stat-card-green:hover,
        .stat-card-purple:hover,
        .stat-card-orange:hover {
            transform: translateY(-2px);
        }

        .stat-card-gold {
            background: linear-gradient(135deg, rgba(251, 191, 36, 0.04) 0%, rgba(15, 23, 42, 0.8) 100%) !important;
            border-color: rgba(251, 191, 36, 0.18) !important;
        }
        .stat-card-gold:hover {
            border-color: rgba(251, 191, 36, 0.5) !important;
            box-shadow: 0 8px 25px rgba(251, 191, 36, 0.15) !important;
        }

        .stat-card-green {
            background: linear-gradient(135deg, rgba(16, 185, 129, 0.04) 0%, rgba(15, 23, 42, 0.8) 100%) !important;
            border-color: rgba(16, 185, 129, 0.18) !important;
        }
        .stat-card-green:hover {
            border-color: rgba(16, 185, 129, 0.5) !important;
            box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15) !important;
        }

        .stat-card-purple {
            background: linear-gradient(135deg, rgba(168, 85, 247, 0.04) 0%, rgba(15, 23, 42, 0.8) 100%) !important;
            border-color: rgba(168, 85, 247, 0.18) !important;
        }
        .stat-card-purple:hover {
            border-color: rgba(168, 85, 247, 0.5) !important;
            box-shadow: 0 8px 25px rgba(168, 85, 247, 0.15) !important;
        }

        .stat-card-orange {
            background: linear-gradient(135deg, rgba(245, 158, 11, 0.04) 0%, rgba(15, 23, 42, 0.8) 100%) !important;
            border-color: rgba(245, 158, 11, 0.18) !important;
        }
        .stat-card-orange:hover {
            border-color: rgba(245, 158, 11, 0.5) !important;
            box-shadow: 0 8px 25px rgba(245, 158, 11, 0.15) !important;
        }

        /* --- Infrastructure Cards Premium look --- */
        .card-item {
            background: rgba(30, 41, 59, 0.45) !important;
            border: 1px solid rgba(251, 191, 36, 0.08) !important;
            backdrop-filter: blur(10px) !important;
            border-radius: 12px !important;
            padding: 18px !important;
            transition: all 0.3s ease !important;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
        }
        
        .card-item:hover {
            border-color: rgba(251, 191, 36, 0.35) !important;
            box-shadow: 0 8px 25px rgba(251, 191, 36, 0.08), 0 4px 20px rgba(0, 0, 0, 0.3) !important;
            transform: translateY(-2px);
        }

        .card-head {
            font-family: 'Outfit', sans-serif;
            font-size: 14px;
            font-weight: 600;
            color: #fff;
            margin-bottom: 8px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .card-sub {
            font-size: 11px;
            color: #94a3b8;
            margin-bottom: 6px;
        }

        .pill {
            font-size: 9px;
            font-weight: 800;
            letter-spacing: 0.5px;
            padding: 2px 6px;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.08);
            color: #cbd5e1;
        }

        .pill.green {
            background: rgba(16, 185, 129, 0.15) !important;
            color: #34d399 !important;
        }

        .pill.red {
            background: rgba(239, 68, 68, 0.15) !important;
            color: #f87171 !important;
        }

        .bar {
            height: 4px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 2px;
            overflow: hidden;
        }

        .bar div {
            height: 100%;
            background: linear-gradient(90deg, #f59e0b, #d97706);
            border-radius: 2px;
        }

        @media (max-width: 600px) {
            .table th,
            .table td {
                padding: 8px 6px;
                font-size: 11px;
            }

            .input-xs {
                width: 60px;
                padding: 4px;
                font-size: 11px;
            }

            .mobile-hide {
                display: none;
            }

            .sort-icon {
                margin-left: 2px;
            }
        }

        /* Viewport & Canvas */
        .tree-container {
            position: relative;
            height: 650px;
            background: rgba(15, 23, 42, 0.45);
            border-radius: 16px;
            border: 1px solid rgba(251, 191, 36, 0.08);
            margin-top: 15px;
            overflow: hidden;
            user-select: none;
            cursor: grab;
        }

        .tree-container:active {
            cursor: grabbing;
        }

        .tree-canvas {
            position: absolute;
            display: inline-flex;
            align-items: center;
            padding: 100px 150px;
            transform-origin: 0 0;
            transition: transform 0.05s ease-out;
            will-change: transform;
        }

        /* SVG overlay for Bezier Curves */
        #treeConnectionsSvg {
            position: absolute;
            inset: 0;
            pointer-events: none;
            z-index: 1;
        }

        /* Horizontal LTR Layout with Vertically Stacked Roots */
        .tree-root {
            display: inline-flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 40px;
            list-style-type: none;
            margin: 0;
            padding: 0;
            z-index: 2;
        }

        .tree-node-horizontal {
            display: inline-flex;
            align-items: center;
            position: relative;
            margin: 15px 0;
        }

        .node-card-wrapper {
            position: relative;
            display: flex;
            align-items: center;
            margin-right: 50px; /* spacing between parent and child columns */
            z-index: 3;
        }

        /* Premium Node Card Design */
        .node-card {
            width: 250px;
            background: rgba(30, 41, 59, 0.7) !important;
            border: 1px solid rgba(251, 191, 36, 0.12) !important;
            border-radius: 10px !important;
            padding: 12px 14px !important;
            backdrop-filter: blur(12px) !important;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
            cursor: pointer;
            position: relative;
            display: flex;
            flex-direction: column;
            gap: 6px;
            overflow: hidden;
        }

        .node-card:hover {
            border-color: rgba(251, 191, 36, 0.4) !important;
            box-shadow: 0 8px 30px rgba(251, 191, 36, 0.15), 0 8px 24px rgba(0, 0, 0, 0.5) !important;
            transform: translateY(-2px);
        }

        .node-card.highlighted {
            border-color: rgba(251, 191, 36, 0.8) !important;
            box-shadow: 0 0 20px rgba(251, 191, 36, 0.3) !important;
            background: rgba(251, 191, 36, 0.08) !important;
        }

        /* Tipe & Status Indicator Bars */
        .node-card::before {
            content: "";
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 4px;
            transition: all 0.2s;
        }

        .node-card.type-internet::before {
            background: #10b981; /* Green/Emerald for Internet Root */
        }
        .node-card.type-server::before {
            background: #3b82f6; /* Blue for Server */
        }
        .node-card.type-router::before {
            background: #a855f7; /* Purple for Router */
        }
        .node-card.type-odp::before {
            background: #fbbf24; /* Gold for ODP */
        }
        .node-card.type-client::before {
            background: #94a3b8; /* Muted default */
        }

        /* Status colors */
        .node-card.status-online.type-client::before,
        .node-card.status-up.type-client::before {
            background: #10b981; /* Green Neon */
        }
        .node-card.status-offline.type-client::before,
        .node-card.status-down.type-client::before {
            background: #ef4444; /* Red Neon */
        }
        .node-card.status-isolir.type-client::before {
            background: #f59e0b; /* Amber */
        }

        /* Card Content layout */
        .node-header-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            width: 100%;
        }

        .node-title-area {
            display: flex;
            align-items: center;
            gap: 6px;
            overflow: hidden;
        }

        .node-name {
            font-size: 13px;
            font-weight: 700;
            color: #fff;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-family: 'Outfit', sans-serif;
        }

        .node-details-row {
            font-size: 11px;
            color: #94a3b8;
            padding-left: 20px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* Toggle Button */
        .node-toggle-btn {
            position: absolute;
            right: -8px;
            top: 50%;
            transform: translateY(-50%);
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #0f172a;
            border: 1px solid rgba(251, 191, 36, 0.35);
            color: #fbbf24;
            font-size: 11px;
            font-weight: 800;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 10;
            transition: all 0.2s;
            box-shadow: 0 2px 6px rgba(0,0,0,0.4);
        }

        .node-toggle-btn:hover {
            background: #fbbf24;
            color: #0f172a;
            border-color: #fbbf24;
            box-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
        }

        .node-children-horizontal {
            display: inline-flex;
            flex-direction: column;
            position: relative;
            z-index: 2;
        }

        .node-children-horizontal.collapsed {
            display: none !important;
        }

        /* Zoom controls widget */
        .schematic-controls {
            position: absolute;
            right: 20px;
            top: 20px;
            z-index: 100;
            display: flex;
            gap: 6px;
            background: rgba(15, 23, 42, 0.6);
            backdrop-filter: blur(8px);
            padding: 4px;
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.05);
        }

        .schematic-controls button {
            border: none;
            width: 28px;
            height: 28px;
            border-radius: 6px !important;
            font-size: 11px !important;
            font-weight: 800 !important;
            cursor: pointer;
            transition: all 0.2s;
            background: transparent;
            color: #a8b2c1;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .schematic-controls button:hover {
            background: rgba(251, 191, 36, 0.15);
            color: #f3ba2f;
        }

        /* Right Slide-out Drawer Panel */
        .schematic-drawer {
            position: fixed;
            top: 0;
            right: -360px;
            width: 340px;
            height: 100%;
            background: rgba(15, 23, 42, 0.95);
            backdrop-filter: blur(20px);
            border-left: 1px solid rgba(251, 191, 36, 0.15);
            box-shadow: -10px 0 35px rgba(0, 0, 0, 0.6);
            z-index: 2000;
            transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            padding: 24px;
            overflow-y: auto;
            color: #cbd5e1;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .schematic-drawer.open {
            right: 0;
        }

        .drawer-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            padding-bottom: 12px;
        }

        .drawer-header h3 {
            margin: 0;
            color: #fbbf24;
            font-family: 'Outfit', sans-serif;
            font-size: 16px;
            font-weight: 800;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .drawer-close-btn {
            background: none;
            border: none;
            color: #94a3b8;
            font-size: 24px;
            cursor: pointer;
            line-height: 1;
        }

        .drawer-close-btn:hover {
            color: #fff;
        }

        .drawer-body {
            display: flex;
            flex-direction: column;
            gap: 16px;
            font-size: 13px;
        }

        .drawer-section-title {
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: #f59e0b;
            font-weight: 800;
            border-bottom: 1px solid rgba(255, 255, 255, 0.04);
            padding-bottom: 4px;
            margin-bottom: 8px;
        }

        .drawer-field {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
            border-bottom: 1px dashed rgba(255, 255, 255, 0.03);
            padding-bottom: 6px;
        }

        .drawer-field .label {
            color: #94a3b8;
        }

        .drawer-field .value {
            font-weight: 600;
            color: #fff;
            text-align: right;
            max-width: 180px;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .drawer-action-btn {
            width: 100%;
            background: linear-gradient(135deg, #f59e0b, #d97706) !important;
            color: #0f172a !important;
            font-weight: 700 !important;
            border: 1px solid rgba(251, 191, 36, 0.3) !important;
            border-radius: 8px !important;
            padding: 10px !important;
            cursor: pointer;
            transition: all 0.2s !important;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            text-decoration: none !important;
            margin-top: 10px;
        }

        .drawer-action-btn:hover {
            box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3) !important;
            transform: translateY(-1px);
        }

        .drawer-secondary-btn {
            width: 100%;
            background: rgba(255, 255, 255, 0.05);
            color: #fff;
            font-weight: 600;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 8px;
            padding: 10px;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            text-decoration: none;
            margin-top: 6px;
        }

        .drawer-secondary-btn:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        /* View Mode Toggle Buttons */
        .view-mode-btn {
            border: none;
            padding: 6px 12px !important;
            border-radius: 6px !important;
            font-size: 11px !important;
            font-weight: 800 !important;
            cursor: pointer;
            transition: all 0.2s;
            background: transparent;
            color: #a8b2c1;
            border: 1px solid transparent !important;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        
        .view-mode-btn.active {
            background: rgba(251, 191, 36, 0.15) !important;
            color: #f3ba2f !important;
            border: 1px solid rgba(251, 191, 36, 0.2) !important;
        }
    