/* Card Statistik Modern */
.stat-card {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-right: 15px;
}

.stat-card-info {
    flex: 1;
}

.stat-card-number {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 2px 0;
    line-height: 1;
}

.stat-card-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

/* Status Online/Offline Counter */
.stat-card-status {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 600;
}

.stat-card-status .status-online {
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-card-status .status-offline {
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-card-status .status-isolir {
    color: #a855f7;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-card-status .status-maintenance {
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent !important;
}

.stat-card-status .status-bagus {
    color: #a16207;
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent !important;
}

.stat-card-status .status-maintenance .fa-circle {
    font-size: 8px;
}

.stat-card-status .fa-circle {
    font-size: 8px;
}

/* Dark Mode - Status Counter */
body.dark-mode .stat-card-status .status-online,
.dark-mode .stat-card-status .status-online,
[data-theme="dark"] .stat-card-status .status-online {
    color: #34d399;
}

body.dark-mode .stat-card-status .status-offline,
.dark-mode .stat-card-status .status-offline,
[data-theme="dark"] .stat-card-status .status-offline {
    color: #f87171;
}

body.dark-mode .stat-card-status .status-isolir,
.dark-mode .stat-card-status .status-isolir,
[data-theme="dark"] .stat-card-status .status-isolir {
    color: #c084fc;
}

body.dark-mode .stat-card-status .status-maintenance,
.dark-mode .stat-card-status .status-maintenance,
[data-theme="dark"] .stat-card-status .status-maintenance {
    color: #fbbf24;
}

body.dark-mode .stat-card-status .status-bagus,
.dark-mode .stat-card-status .status-bagus,
[data-theme="dark"] .stat-card-status .status-bagus {
    color: #d97706;
}

/* OLT Card - 3 status butuh gap lebih kecil */
.stat-card-status.stat-card-status-olt {
    gap: 8px;
}

/* Customer Card - 3 status butuh gap lebih kecil */
.stat-card-status.stat-card-status-customer {
    gap: 8px;
}

/* Homepass Card - 6 status dalam grid 3x2 */
.stat-card-status.stat-card-status-homepass {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 4px 8px;
    justify-content: start;
}

.stat-card-status .status-hp-prospek {
    color: #3b82f6;
    display: flex;
    align-items: center;
    gap: 3px;
    background: transparent !important;
}

.stat-card-status .status-hp-pending {
    color: #eab308;
    display: flex;
    align-items: center;
    gap: 3px;
    background: transparent !important;
}

.stat-card-status .status-hp-tidak-minat {
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 3px;
    background: transparent !important;
}

.stat-card-status .status-hp-tidak-mampu {
    color: #f97316;
    display: flex;
    align-items: center;
    gap: 3px;
    background: transparent !important;
}

.stat-card-status .status-hp-rumah-kosong {
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 3px;
    background: transparent !important;
}

.stat-card-status .status-hp-langganan {
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 3px;
    background: transparent !important;
}

/* Dark Mode - Homepass Status */
body.dark-mode .stat-card-status .status-hp-prospek,
.dark-mode .stat-card-status .status-hp-prospek,
[data-theme="dark"] .stat-card-status .status-hp-prospek {
    color: #60a5fa;
}

body.dark-mode .stat-card-status .status-hp-pending,
.dark-mode .stat-card-status .status-hp-pending,
[data-theme="dark"] .stat-card-status .status-hp-pending {
    color: #fbbf24;
}

body.dark-mode .stat-card-status .status-hp-tidak-minat,
.dark-mode .stat-card-status .status-hp-tidak-minat,
[data-theme="dark"] .stat-card-status .status-hp-tidak-minat {
    color: #f87171;
}

body.dark-mode .stat-card-status .status-hp-tidak-mampu,
.dark-mode .stat-card-status .status-hp-tidak-mampu,
[data-theme="dark"] .stat-card-status .status-hp-tidak-mampu {
    color: #fb923c;
}

body.dark-mode .stat-card-status .status-hp-rumah-kosong,
.dark-mode .stat-card-status .status-hp-rumah-kosong,
[data-theme="dark"] .stat-card-status .status-hp-rumah-kosong {
    color: #9ca3af;
}

body.dark-mode .stat-card-status .status-hp-langganan,
.dark-mode .stat-card-status .status-hp-langganan,
[data-theme="dark"] .stat-card-status .status-hp-langganan {
    color: #34d399;
}
.stat-card-router {
    border-left-color: #6366f1;
}

.stat-card-router .stat-card-icon {
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
}

.stat-card-router .stat-card-number {
    color: #4f46e5;
}

/* Warna ODC - Hijau Soft */
.stat-card-odc {
    border-left-color: #10b981;
}

.stat-card-odc .stat-card-icon {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.stat-card-odc .stat-card-number {
    color: #059669;
}

/* Warna ODP - Orange Soft */
.stat-card-odp {
    border-left-color: #f59e0b;
}

.stat-card-odp .stat-card-icon {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.stat-card-odp .stat-card-number {
    color: #d97706;
}

/* Warna Pelanggan - Cyan Soft */
.stat-card-customer {
    border-left-color: #06b6d4;
}

.stat-card-customer .stat-card-icon {
    background: rgba(6, 182, 212, 0.12);
    color: #06b6d4;
}

.stat-card-customer .stat-card-number {
    color: #0891b2;
}

/* ==================== DARKMODE SUPPORT ==================== */
body.dark-mode .stat-card,
.dark-mode .stat-card,
[data-theme="dark"] .stat-card {
    background: #1e293b;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .stat-card:hover,
.dark-mode .stat-card:hover,
[data-theme="dark"] .stat-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

body.dark-mode .stat-card-label,
.dark-mode .stat-card-label,
[data-theme="dark"] .stat-card-label {
    color: #94a3b8;
}

/* Darkmode - Router */
body.dark-mode .stat-card-router .stat-card-icon,
.dark-mode .stat-card-router .stat-card-icon,
[data-theme="dark"] .stat-card-router .stat-card-icon {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

body.dark-mode .stat-card-router .stat-card-number,
.dark-mode .stat-card-router .stat-card-number,
[data-theme="dark"] .stat-card-router .stat-card-number {
    color: #a5b4fc;
}

/* Darkmode - ODC */
body.dark-mode .stat-card-odc .stat-card-icon,
.dark-mode .stat-card-odc .stat-card-icon,
[data-theme="dark"] .stat-card-odc .stat-card-icon {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

body.dark-mode .stat-card-odc .stat-card-number,
.dark-mode .stat-card-odc .stat-card-number,
[data-theme="dark"] .stat-card-odc .stat-card-number {
    color: #6ee7b7;
}

/* Darkmode - ODP */
body.dark-mode .stat-card-odp .stat-card-icon,
.dark-mode .stat-card-odp .stat-card-icon,
[data-theme="dark"] .stat-card-odp .stat-card-icon {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

body.dark-mode .stat-card-odp .stat-card-number,
.dark-mode .stat-card-odp .stat-card-number,
[data-theme="dark"] .stat-card-odp .stat-card-number {
    color: #fcd34d;
}

/* Darkmode - Pelanggan */
body.dark-mode .stat-card-customer .stat-card-icon,
.dark-mode .stat-card-customer .stat-card-icon,
[data-theme="dark"] .stat-card-customer .stat-card-icon {
    background: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
}

body.dark-mode .stat-card-customer .stat-card-number,
.dark-mode .stat-card-customer .stat-card-number,
[data-theme="dark"] .stat-card-customer .stat-card-number {
    color: #67e8f9;
}

/* Warna OLT - Ungu Soft */
.stat-card-olt {
    border-left-color: #8b5cf6;
}

.stat-card-olt .stat-card-icon {
    background: rgba(139, 92, 246, 0.12);
    color: #8b5cf6;
}

.stat-card-olt .stat-card-number {
    color: #7c3aed;
}

/* Darkmode - OLT */
body.dark-mode .stat-card-olt .stat-card-icon,
.dark-mode .stat-card-olt .stat-card-icon,
[data-theme="dark"] .stat-card-olt .stat-card-icon {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

body.dark-mode .stat-card-olt .stat-card-number,
.dark-mode .stat-card-olt .stat-card-number,
[data-theme="dark"] .stat-card-olt .stat-card-number {
    color: #c4b5fd;
}

/* Warna Tiang - Abu-abu */
.stat-card-tiang {
    border-left-color: #a16207;
}

.stat-card-tiang .stat-card-icon {
    background: rgba(161, 98, 7, 0.12);
    color: #a16207;
}

.stat-card-tiang .stat-card-number {
    color: #854d0e;
}

/* Darkmode - Tiang */
body.dark-mode .stat-card-tiang .stat-card-icon,
.dark-mode .stat-card-tiang .stat-card-icon,
[data-theme="dark"] .stat-card-tiang .stat-card-icon {
    background: rgba(161, 98, 7, 0.2);
    color: #d97706;
}

body.dark-mode .stat-card-tiang .stat-card-number,
.dark-mode .stat-card-tiang .stat-card-number,
[data-theme="dark"] .stat-card-tiang .stat-card-number {
    color: #fbbf24;
}

/* ==================== FLOATING ACTION BUTTON ==================== */
.floating-container {
    position: absolute;
    bottom: 25px;
    right: 15px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.floating-btn {
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.floating-btn:focus {
    outline: none;
}

.floating-btn-main {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 2px solid #6366f1;
    background: #ffffff;
    color: #6366f1;
    font-size: 18px;
}

.floating-btn-main:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    background: #f0f0ff;
}

.floating-btn-main.active {
    transform: rotate(45deg);
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border-color: transparent;
}

/* Dark Mode - Floating Button Main */
body.dark-mode .floating-btn-main,
.dark-mode .floating-btn-main,
[data-theme="dark"] .floating-btn-main {
    background: #1e293b;
    color: #818cf8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .floating-btn-main:hover,
.dark-mode .floating-btn-main:hover,
[data-theme="dark"] .floating-btn-main:hover {
    background: #334155;
}

body.dark-mode .floating-btn-main.active,
.dark-mode .floating-btn-main.active,
[data-theme="dark"] .floating-btn-main.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

/* Menu Floating dengan Scroll */
.floating-menu {
    position: absolute;
    bottom: 50px;
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s ease;
    width: 220px;
    max-height: calc(70vh - 100px);
    overflow-y: auto;
    overflow-x: hidden;
}

.floating-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Scrollbar Kustom */
.floating-menu::-webkit-scrollbar {
    width: 6px;
}

.floating-menu::-webkit-scrollbar-track {
    background: transparent;
}

.floating-menu::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.floating-menu::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Grup Menu */
.floating-menu-group {
    border-bottom: 1px solid #e5e7eb;
}

.floating-menu-group:last-child {
    border-bottom: none;
}

/* Header Grup (Bisa diklik untuk collapse) */
.floating-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.floating-menu-header:hover {
    background: #f9fafb;
}

.floating-menu-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.floating-menu-arrow {
    font-size: 10px;
    color: #9ca3af;
    transition: transform 0.3s ease;
}

.floating-menu-arrow.collapsed {
    transform: rotate(-90deg);
}

/* Konten Grup (Collapsible) */
.floating-menu-content {
    padding: 0 12px 12px 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.floating-menu-content.collapsed {
    display: none;
}

/* Grid Tombol Tambah 2x2 */
.floating-btn-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.floating-btn-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border-radius: 10px;
    font-size: 18px;
    color: white;
    gap: 4px;
}

.floating-btn-item span {
    font-size: 10px;
    font-weight: 600;
}

.floating-btn-item:hover {
    transform: translateY(-2px);
}

.fab-add-odc {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.fab-add-odc:hover {
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.fab-add-odp {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.fab-add-odp:hover {
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.fab-add-olt {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.fab-add-olt:hover {
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.fab-add-tiang {
    background: linear-gradient(135deg, #a16207 0%, #854d0e 100%);
}

.fab-add-tiang:hover {
    background: linear-gradient(135deg, #854d0e 0%, #713f12 100%);
    box-shadow: 0 4px 15px rgba(161, 98, 7, 0.4);
}

.fab-add-kabel {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.fab-add-kabel:hover {
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.4);
}

/* Kontrol Lapisan */
.floating-layer-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.floating-layer-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
}

.floating-layer-item:hover {
    background: #f3f4f6;
}

.floating-layer-item input[type="checkbox"] {
    display: none;
}

.floating-layer-item input[type="checkbox"]:checked + .layer-icon {
    opacity: 1;
}

.floating-layer-item input[type="checkbox"]:not(:checked) + .layer-icon {
    opacity: 0.4;
}

.floating-layer-item input[type="checkbox"]:not(:checked) ~ .layer-text {
    opacity: 0.5;
    text-decoration: line-through;
}

.layer-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    margin-right: 6px;
    transition: all 0.2s ease;
}

.layer-text {
    font-size: 11px;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s ease;
}

.layer-router {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

.layer-olt {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.layer-odc {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.layer-odp {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.layer-tiang {
    background: rgba(161, 98, 7, 0.15);
    color: #a16207;
}

.layer-customer {
    background: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
}

/* ==================== DARKMODE - FLOATING MENU ==================== */
body.dark-mode .floating-menu,
.dark-mode .floating-menu,
[data-theme="dark"] .floating-menu {
    background: #1e293b;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

body.dark-mode .floating-menu::-webkit-scrollbar-thumb,
.dark-mode .floating-menu::-webkit-scrollbar-thumb,
[data-theme="dark"] .floating-menu::-webkit-scrollbar-thumb {
    background: #475569;
}

body.dark-mode .floating-menu-group,
.dark-mode .floating-menu-group,
[data-theme="dark"] .floating-menu-group {
    border-bottom-color: #334155;
}

body.dark-mode .floating-menu-header:hover,
.dark-mode .floating-menu-header:hover,
[data-theme="dark"] .floating-menu-header:hover {
    background: #334155;
}

body.dark-mode .floating-menu-label,
.dark-mode .floating-menu-label,
[data-theme="dark"] .floating-menu-label {
    color: #94a3b8;
}

body.dark-mode .floating-menu-arrow,
.dark-mode .floating-menu-arrow,
[data-theme="dark"] .floating-menu-arrow {
    color: #64748b;
}

body.dark-mode .floating-layer-item:hover,
.dark-mode .floating-layer-item:hover,
[data-theme="dark"] .floating-layer-item:hover {
    background: #334155;
}

body.dark-mode .layer-text,
.dark-mode .layer-text,
[data-theme="dark"] .layer-text {
    color: #e2e8f0;
}

/* ==================== FLOATING BUTTON SWITCH MAP TYPE ==================== */
.map-type-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
}

.map-type-fab {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 2px solid #6366f1;
    background: #ffffff;
    color: #6366f1;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.map-type-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    background: #f0f0ff;
}

.map-type-fab.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border-color: transparent;
}

.map-type-menu {
    position: absolute;
    top: 48px;
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s ease;
    min-width: 200px;
}

.map-type-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.map-type-menu-header {
    font-size: 10px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 10px 8px 10px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 6px;
}

.map-type-menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 10px;
    text-align: left;
}

.map-type-menu-item:hover {
    background: #f1f5f9;
}

.map-type-menu-item.active {
    background: #f0f9ff;
}

.map-type-menu-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.map-type-menu-icon.satelit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.map-type-menu-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.map-type-menu-title {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

.map-type-menu-desc {
    font-size: 10px;
    color: #6b7280;
}

.map-type-check {
    color: #6366f1;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.map-type-menu-item.active .map-type-check {
    opacity: 1;
}

/* Darkmode - Map Type Container */
body.dark-mode .map-type-fab,
.dark-mode .map-type-fab,
[data-theme="dark"] .map-type-fab {
    background: #1e293b;
    color: #818cf8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .map-type-fab.active,
.dark-mode .map-type-fab.active,
[data-theme="dark"] .map-type-fab.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

body.dark-mode .map-type-menu,
.dark-mode .map-type-menu,
[data-theme="dark"] .map-type-menu {
    background: #1e293b;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

body.dark-mode .map-type-menu-header,
.dark-mode .map-type-menu-header,
[data-theme="dark"] .map-type-menu-header {
    color: #94a3b8;
    border-bottom-color: #334155;
}

body.dark-mode .map-type-menu-item:hover,
.dark-mode .map-type-menu-item:hover,
[data-theme="dark"] .map-type-menu-item:hover {
    background: #334155;
}

body.dark-mode .map-type-menu-item.active,
.dark-mode .map-type-menu-item.active,
[data-theme="dark"] .map-type-menu-item.active {
    background: #1e3a5f;
}

body.dark-mode .map-type-menu-title,
.dark-mode .map-type-menu-title,
[data-theme="dark"] .map-type-menu-title {
    color: #f1f5f9;
}

body.dark-mode .map-type-menu-desc,
.dark-mode .map-type-menu-desc,
[data-theme="dark"] .map-type-menu-desc {
    color: #94a3b8;
}

body.dark-mode .map-type-check,
.dark-mode .map-type-check,
[data-theme="dark"] .map-type-check {
    color: #818cf8;
}

/* ==================== NOTIFIKASI LAYER MAP ==================== */
.layer-notif {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease;
}

.layer-notif i {
    font-size: 14px;
}

.layer-notif.fade-out {
    opacity: 0;
}

/* Darkmode - Notifikasi Layer */
body.dark-mode .layer-notif,
.dark-mode .layer-notif,
[data-theme="dark"] .layer-notif {
    background: rgba(255, 255, 255, 0.9);
    color: #1e293b;
}

/* ==================== MODAL FORM OLT ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 15px;
    box-sizing: border-box;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 30px);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
    min-height: 56px;
}

.modal-header h4 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    line-height: 1.4;
}

.modal-header h4 i {
    font-size: 18px;
    flex-shrink: 0;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
    flex-shrink: 0;
    margin-left: 16px;
    padding: 0;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 0 0 12px 12px;
    flex-shrink: 0;
}

.form-group {
    margin-bottom: 18px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    line-height: 1.5;
}

.form-group .text-danger {
    color: #ef4444;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 70px;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 18px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-group.half {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.port-input {
    display: flex;
    align-items: center;
    gap: 6px;
}

.port-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.port-btn:hover {
    background: #8b5cf6;
    color: white;
    border-color: #8b5cf6;
}

.port-number {
    text-align: center;
    width: 50px;
    padding: 8px 4px;
    appearance: textfield;
    -moz-appearance: textfield; /* Firefox fallback */
}

.port-number::-webkit-outer-spin-button,
.port-number::-webkit-inner-spin-button {
    appearance: none;
    -webkit-appearance: none; /* Chrome/Safari fallback */
    margin: 0;
}

/* ==================== FORM SECTION GROUPING - CLEAN VERSION ==================== */
.form-section {
    background: #f9fafb;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 18px;
    border: 1px solid #e5e7eb;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.form-section-header i {
    color: #8b5cf6;
    font-size: 15px;
}

.form-section-header span {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== FORM GROUP - VERTICAL LAYOUT ==================== */
.form-section .form-group {
    margin-bottom: 16px;
}

.form-section .form-group:last-child {
    margin-bottom: 0;
}

.form-section .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

/* ==================== PORT INPUT - IMPROVED ==================== */
.port-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 6px;
}

.port-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.port-btn-minus:hover {
    background: #ef4444;
    color: white;
}

.port-btn-plus:hover {
    background: #10b981;
    color: white;
}

.port-input-wrapper .port-number {
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 700;
    font-size: 18px;
    color: #1f2937;
    padding: 8px;
    flex: 1;
}

.port-input-wrapper .port-number:focus {
    outline: none;
    box-shadow: none;
}

/* Port Info - Simple Version (No Icon) */
.port-info-simple {
    padding: 12px 16px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    margin-top: 12px;
    font-size: 13px;
    color: #065f46;
    font-weight: 500;
    text-align: center;
}

.port-info-simple strong {
    font-weight: 700;
    color: #047857;
    font-size: 16px;
}

/* ==================== FORM HELPER TEXT ==================== */
.form-help {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-top: 6px;
    line-height: 1.4;
}

/* ==================== DARKMODE SUPPORT ==================== */
body.dark-mode .form-section,
.dark-mode .form-section,
[data-theme="dark"] .form-section {
    background: #0f172a;
    border-color: #334155;
}

body.dark-mode .form-section-header,
.dark-mode .form-section-header,
[data-theme="dark"] .form-section-header {
    border-bottom-color: #334155;
}

body.dark-mode .form-section-header span,
.dark-mode .form-section-header span,
[data-theme="dark"] .form-section-header span {
    color: #e2e8f0;
}

body.dark-mode .port-input-wrapper,
.dark-mode .port-input-wrapper,
[data-theme="dark"] .port-input-wrapper {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .port-btn,
.dark-mode .port-btn,
[data-theme="dark"] .port-btn {
    background: #334155;
    color: #94a3b8;
}

body.dark-mode .port-input-wrapper .port-number,
.dark-mode .port-input-wrapper .port-number,
[data-theme="dark"] .port-input-wrapper .port-number {
    color: #f1f5f9;
}

body.dark-mode .port-info-simple,
.dark-mode .port-info-simple,
[data-theme="dark"] .port-info-simple {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

body.dark-mode .port-info-simple strong,
.dark-mode .port-info-simple strong,
[data-theme="dark"] .port-info-simple strong {
    color: #34d399;
}

body.dark-mode .form-help,
.dark-mode .form-help,
[data-theme="dark"] .form-help {
    color: #94a3b8;
}

/* ==================== MOBILE RESPONSIVE ==================== */
@media (max-width: 576px) {
    .form-section {
        padding: 14px;
        margin-bottom: 14px;
    }
    
    .form-section-header {
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
    
    .form-section-header i {
        font-size: 14px;
    }
    
    .form-section-header span {
        font-size: 11px;
    }
    
    .form-section .form-group {
        margin-bottom: 14px;
    }
    
    .form-section .form-group label {
        font-size: 12px;
        margin-bottom: 7px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .port-input-wrapper {
        padding: 6px;
    }
    
    .port-btn {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
    
    .port-input-wrapper .port-number {
        font-size: 20px;
    }
    
    .port-info-simple {
        padding: 12px;
        font-size: 13px;
    }
    
    .port-info-simple strong {
        font-size: 17px;
    }
    
    .form-help {
        font-size: 11px;
        margin-top: 6px;
    }
}

/* ==================== FORCE VERTICAL LAYOUT - LABEL DI ATAS INPUT ==================== */
.form-section .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.form-section .form-group label {
    width: 100%;
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    order: 1;
}

.form-section .form-group .form-control,
.form-section .form-group .port-input-wrapper,
.form-section .form-group select,
.form-section .form-group textarea {
    width: 100%;
    order: 2;
}

.form-section .form-group .form-help {
    order: 3;
    width: 100%;
}

/* Pastikan tidak ada grid atau flex row */
.form-section .form-row {
    display: block !important;
    grid-template-columns: none !important;
}

.form-section .form-row .form-group {
    width: 100%;
    margin-bottom: 16px;
}

/* Mobile - tetap vertical */
@media (max-width: 768px) {
    .form-section .form-group {
        margin-bottom: 14px;
    }
    
    .form-section .form-group label {
        font-size: 12px;
        margin-bottom: 7px;
    }
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: #f3f4f6;
    color: #4b5563;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* Indikator Mode Pick */
.pick-mode-indicator {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 6px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    animation: pulseIndicator 2s infinite;
    max-width: calc(100% - 100px);
}

.pick-mode-indicator.active {
    display: flex;
}

.pick-mode-indicator i {
    font-size: 12px;
    flex-shrink: 0;
}

.pick-mode-indicator span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pick-mode-indicator button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 10px;
    margin-left: 2px;
}

.pick-mode-indicator button:hover {
    background: rgba(255, 255, 255, 0.3);
}

@keyframes pulseIndicator {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(139, 92, 246, 0.6);
    }
}

/* OLT Marker */
.olt-marker {
    background-color: #8b5cf6;
    color: white;
    border: 2px solid white;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

/* OLT Status Maintenance - Kuning */
.olt-marker-maintenance {
    background-color: #fbbf24 !important;
    color: #1f2937 !important;
}

/* OLT Status Inactive - Merah */
.olt-marker-inactive {
    background-color: #fc0000 !important;
    color: white !important;
}

/* ==================== MODAL HEADER ODC (HIJAU) ==================== */
.modal-header-odc {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.modal-header-odc h4 {
    color: white !important;
}

.modal-header-odc .modal-close {
    color: white !important;
}

.modal-header-odc .modal-close:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Button Simpan ODC (Hijau) */
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    border: none !important;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4) !important;
}

/* Button Remap Location ODC (Hijau) */
.btn-remap-location.btn-remap-location-odc {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.btn-remap-location.btn-remap-location-odc:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

/* ODC Marker Status */
.odc-marker-maintenance {
    background-color: #fbbf24 !important;
    color: #1f2937 !important;
}

.odc-marker-inactive {
    background-color: #fc0000 !important;
    color: white !important;
}

/* Dark Mode - Modal Header ODC */
body.dark-mode .modal-header-odc,
.dark-mode .modal-header-odc,
[data-theme="dark"] .modal-header-odc {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
}

body.dark-mode .btn-success,
.dark-mode .btn-success,
[data-theme="dark"] .btn-success {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
}

body.dark-mode .btn-success:hover,
.dark-mode .btn-success:hover,
[data-theme="dark"] .btn-success:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%) !important;
}

body.dark-mode .btn-remap-location.btn-remap-location-odc,
.dark-mode .btn-remap-location.btn-remap-location-odc,
[data-theme="dark"] .btn-remap-location.btn-remap-location-odc {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
}

body.dark-mode .btn-remap-location.btn-remap-location-odc:hover,
.dark-mode .btn-remap-location.btn-remap-location-odc:hover,
[data-theme="dark"] .btn-remap-location.btn-remap-location-odc:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

/* ==================== MODAL HEADER ODP (ORANYE) ==================== */
.modal-header-odp {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.modal-header-odp h4 {
    color: white !important;
}

.modal-header-odp .modal-close {
    color: white !important;
}

.modal-header-odp .modal-close:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Button Simpan ODP (Oranye) */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: white !important;
    border: none !important;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4) !important;
}

/* Button Remap Location ODP (Oranye) */
.btn-remap-location.btn-remap-location-odp {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.btn-remap-location.btn-remap-location-odp:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
}

/* ODP Marker Status */
.odp-marker-maintenance {
    background-color: #fbbf24 !important;
    color: #1f2937 !important;
}

.odp-marker-inactive {
    background-color: #fc0000 !important;
    color: white !important;
}

/* Dark Mode - Modal Header ODP */
body.dark-mode .modal-header-odp,
.dark-mode .modal-header-odp,
[data-theme="dark"] .modal-header-odp {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
}

body.dark-mode .btn-warning,
.dark-mode .btn-warning,
[data-theme="dark"] .btn-warning {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
}

body.dark-mode .btn-warning:hover,
.dark-mode .btn-warning:hover,
[data-theme="dark"] .btn-warning:hover {
    background: linear-gradient(135deg, #b45309 0%, #92400e 100%) !important;
}

body.dark-mode .btn-remap-location.btn-remap-location-odp,
.dark-mode .btn-remap-location.btn-remap-location-odp,
[data-theme="dark"] .btn-remap-location.btn-remap-location-odp {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
}

body.dark-mode .btn-remap-location.btn-remap-location-odp:hover,
.dark-mode .btn-remap-location.btn-remap-location-odp:hover,
[data-theme="dark"] .btn-remap-location.btn-remap-location-odp:hover {
    background: linear-gradient(135deg, #b45309 0%, #92400e 100%) !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
}

/* ==================== MODAL HEADER TIANG (ABU-ABU / STONE) ==================== */
.modal-header-tiang {
    background: linear-gradient(135deg, #a16207 0%, #854d0e 100%) !important;
}

.modal-header-tiang h4 {
    color: white !important;
}

.modal-header-tiang .modal-close {
    color: white !important;
}

.modal-header-tiang .modal-close:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Button Simpan Tiang (Abu-abu / Stone) */
.btn-tiang {
    background: linear-gradient(135deg, #a16207 0%, #854d0e 100%) !important;
    color: white !important;
    border: none !important;
}

.btn-tiang:hover {
    background: linear-gradient(135deg, #854d0e 0%, #713f12 100%) !important;
    box-shadow: 0 4px 15px rgba(120, 113, 108, 0.4) !important;
}

/* Button Remap Location Tiang (Abu-abu / Stone) */
.btn-remap-location-tiang {
    background: linear-gradient(135deg, #78716c 0%, #57534e 100%) !important;
}

.btn-remap-location-tiang:hover {
    background: linear-gradient(135deg, #57534e 0%, #44403c 100%) !important;
}

/* Tiang Marker - Lolipop Style */
.tiang-marker {
    position: relative;
    width: 18px;
    height: 18px;
    background-color: #a16207;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Tongkat lolipop */
.tiang-marker::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 12px;
    background-color: #a16207;
    border-radius: 0 0 2px 2px;
    box-shadow: 0 2px 3px rgba(0,0,0,0.2);
}

.tiang-marker i {
    position: relative;
    z-index: 1;
}

/* Tiang Marker Status Perbaikan - Kuning */
.tiang-marker-perbaikan {
    background-color: #fbbf24 !important;
    color: #1f2937 !important;
}

.tiang-marker-perbaikan::after {
    background-color: #fbbf24 !important;
}

/* Tiang Marker Status Rusak - Merah */
.tiang-marker-rusak {
    background-color: #ef4444 !important;
    color: white !important;
}

.tiang-marker-rusak::after {
    background-color: #ef4444 !important;
}
/* Popup Header Tiang - Coklat */
.popup-header-tiang {
    background: linear-gradient(135deg, #a16207 0%, #854d0e 100%) !important;
}

/* Dark Mode - Modal Header Tiang */
body.dark-mode .modal-header-tiang,
.dark-mode .modal-header-tiang,
[data-theme="dark"] .modal-header-tiang {
    background: linear-gradient(135deg, #854d0e 0%, #713f12 100%) !important;
}

body.dark-mode .btn-tiang,
.dark-mode .btn-tiang,
[data-theme="dark"] .btn-tiang {
    background: linear-gradient(135deg, #ca8a04 0%, #a16207 100%) !important;
}

body.dark-mode .btn-tiang:hover,
.dark-mode .btn-tiang:hover,
[data-theme="dark"] .btn-tiang:hover {
    background: linear-gradient(135deg, #a16207 0%, #854d0e 100%) !important;
}

/* ==================== BUTTON WARNA UNTUK MODAL DETAIL ==================== */
/* Button Detail ODC - Hijau */
.btn-odc {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    border: none !important;
}

.btn-odc:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4) !important;
}

/* Button Detail ODP - Kuning/Orange */
.btn-odp {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: white !important;
    border: none !important;
}

.btn-odp:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4) !important;
}

/* Dark Mode Support */
body.dark-mode .btn-odc,
.dark-mode .btn-odc,
[data-theme="dark"] .btn-odc {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
}

body.dark-mode .btn-odp,
.dark-mode .btn-odp,
[data-theme="dark"] .btn-odp {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
}

body.dark-mode .btn-remap-location-tiang,
.dark-mode .btn-remap-location-tiang,
[data-theme="dark"] .btn-remap-location-tiang {
    background: linear-gradient(135deg, #57534e 0%, #44403c 100%) !important;
}

body.dark-mode .btn-remap-location-tiang:hover,
.dark-mode .btn-remap-location-tiang:hover,
[data-theme="dark"] .btn-remap-location-tiang:hover {
    background: linear-gradient(135deg, #44403c 0%, #292524 100%) !important;
}

body.dark-mode .popup-header-tiang,
.dark-mode .popup-header-tiang,
[data-theme="dark"] .popup-header-tiang {
    background: linear-gradient(135deg, #854d0e 0%, #713f12 100%) !important;
}

/* Darkmode - Modal */
body.dark-mode .modal-content,
.dark-mode .modal-content,
[data-theme="dark"] .modal-content {
    background: #1e293b;
}

body.dark-mode .modal-body,
.dark-mode .modal-body,
[data-theme="dark"] .modal-body {
    background: #1e293b;
}

body.dark-mode .modal-footer,
.dark-mode .modal-footer,
[data-theme="dark"] .modal-footer {
    background: #0f172a;
    border-top-color: #334155;
}

body.dark-mode .form-group label,
.dark-mode .form-group label,
[data-theme="dark"] .form-group label {
    color: #e2e8f0;
}

body.dark-mode .form-control,
.dark-mode .form-control,
[data-theme="dark"] .form-control {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

body.dark-mode .btn-secondary,
.dark-mode .btn-secondary,
[data-theme="dark"] .btn-secondary {
    background: #334155;
    color: #e2e8f0;
}

/* ==================== RESPONSIF MOBILE ==================== */
@media (max-width: 768px) {
    /* Statistik Card Mobile */
    .stat-card {
        padding: 12px;
    }
    
    .stat-card-icon {
        width: 38px;
        height: 38px;
        font-size: 16px;
        margin-right: 10px;
    }
    
    .stat-card-number {
        font-size: 20px;
    }
    
    .stat-card-label {
        font-size: 11px;
    }
    
    /* Floating Button Mobile */
    .floating-container {
        bottom: 20px;
        right: 10px;
    }
    
    .floating-btn-main {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
    
    .floating-menu {
        width: 165px;
        bottom: 62px;
        right: 0;
        max-height: none;
        overflow: visible;
        padding: 0;
        border-radius: 10px;
    }
    
    .floating-menu-header {
        padding: 8px 10px;
    }
    
    .floating-menu-label {
        font-size: 9px;
    }
    
    .floating-menu-arrow {
        font-size: 8px;
    }
    
    .floating-menu-content {
        padding: 0 8px 8px 8px;
        max-height: 180px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .floating-btn-grid {
        gap: 4px;
    }
    
    .floating-btn-item {
        padding: 8px 4px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    .floating-btn-item span {
        font-size: 8px;
        margin-top: 2px;
    }
    
    .floating-layer-controls {
        grid-template-columns: 1fr 1fr;
        gap: 3px;
    }
    
    .floating-layer-item {
        padding: 5px 6px;
        border-radius: 6px;
    }
    
    .layer-icon {
        width: 18px;
        height: 18px;
        font-size: 8px;
        margin-right: 4px;
        border-radius: 4px;
    }
    
    .layer-text {
        font-size: 9px;
    }
    
    /* Map Type Container Mobile */
    .map-type-container {
        top: 8px;
        right: 8px;
    }
    
    .map-type-fab {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        font-size: 16px;
    }
    
    .map-type-menu {
        top: 42px;
        min-width: 180px;
        padding: 6px;
        border-radius: 10px;
    }
    
    .map-type-menu-header {
        font-size: 9px;
        padding: 5px 8px 6px 8px;
    }
    
    .map-type-menu-item {
        padding: 8px;
        gap: 8px;
        border-radius: 6px;
    }
    
    .map-type-menu-icon {
        width: 32px;
        height: 32px;
        border-radius: 6px;
        font-size: 14px;
    }
    
    .map-type-menu-title {
        font-size: 12px;
    }
    
    .map-type-menu-desc {
        font-size: 9px;
    }
    
    .map-type-check {
        font-size: 12px;
    }
    /* Modal Mobile */
    .modal-overlay {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
        overflow-y: auto;
    }
    
    .modal-content {
        max-width: 100%;
        max-height: calc(100vh - 40px);
        border-radius: 10px;
        margin-bottom: 20px;
    }
    
    .modal-body {
        max-height: calc(100vh - 220px);
        overflow-y: auto;
    }
    
    .modal-header {
        padding: 16px 18px;
        border-radius: 10px 10px 0 0;
        min-height: 52px;
    }
    
    .modal-header h4 {
        font-size: 15px;
        gap: 8px;
        line-height: 1.4;
    }
    
    .modal-header h4 i {
        font-size: 15px;
    }
    
    .modal-close {
        width: 32px;
        height: 32px;
        font-size: 20px;
        margin-left: 12px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .modal-footer {
        padding: 14px 16px;
        border-radius: 0 0 10px 10px;
        gap: 10px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group label {
        font-size: 12px;
        margin-bottom: 7px;
        line-height: 1.5;
    }
    
    .form-control {
        padding: 9px 10px;
        font-size: 12px;
        border-radius: 5px;
    }
    
    textarea.form-control {
        min-height: 50px;
    }
    
    .form-row {
        gap: 12px;
        margin-bottom: 16px;
    }
    
    .form-row:last-child {
        margin-bottom: 0;
    }
    
    .port-input {
        gap: 4px;
    }
    
    .port-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
        border-radius: 5px;
    }
    
    .port-number {
        width: 45px;
        padding: 7px 2px;
        font-size: 12px;
    }
    
    .btn {
        padding: 7px 12px;
        font-size: 12px;
        gap: 5px;
    }
    
    /* Pick Mode Indicator Mobile */
    .pick-mode-indicator {
        top: 8px;
        padding: 6px 10px;
        border-radius: 15px;
        font-size: 10px;
        gap: 5px;
        max-width: calc(100% - 80px);
    }
    
    .pick-mode-indicator i {
        font-size: 10px;
    }
    
    .pick-mode-indicator span {
        max-width: 150px;
    }
    
    .pick-mode-indicator button {
        width: 18px;
        height: 18px;
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    /* Extra Small Mobile */
    .stat-card {
        padding: 10px;
    }
    
    .stat-card-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
        margin-right: 8px;
    }
    
    .stat-card-number {
        font-size: 18px;
    }
    
    .stat-card-label {
        font-size: 10px;
    }
    
    .floating-container {
        bottom: 18px;
        right: 8px;
    }
    
    .floating-btn-main {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .floating-menu {
        width: 150px;
        bottom: 58px;
        border-radius: 8px;
    }
    
    .floating-menu-header {
        padding: 6px 8px;
    }
    
    .floating-menu-label {
        font-size: 8px;
    }
    
    .floating-menu-content {
        padding: 0 6px 6px 6px;
        max-height: 160px;
    }
    
    .floating-btn-grid {
        gap: 3px;
    }
    
    .floating-btn-item {
        padding: 6px 3px;
        font-size: 12px;
        border-radius: 6px;
    }
    
    .floating-btn-item span {
        font-size: 7px;
    }
    
    .floating-layer-controls {
        gap: 2px;
    }
    
    .floating-layer-item {
        padding: 4px 5px;
        border-radius: 5px;
    }
    
    .layer-icon {
        width: 16px;
        height: 16px;
        font-size: 7px;
        margin-right: 3px;
        border-radius: 3px;
    }
    
    .layer-text {
        font-size: 8px;
    }
    
    /* Map Type Container Extra Small */
    .map-type-container {
        top: 6px;
        right: 6px;
    }
    
    .map-type-fab {
        width: 32px;
        height: 32px;
        border-radius: 6px;
        font-size: 14px;
    }
    
    .map-type-menu {
        top: 38px;
        min-width: 160px;
        padding: 5px;
        border-radius: 8px;
    }
    
    .map-type-menu-header {
        font-size: 8px;
        padding: 4px 6px 5px 6px;
    }
    
    .map-type-menu-item {
        padding: 6px;
        gap: 6px;
        border-radius: 5px;
    }
    
    .map-type-menu-icon {
        width: 28px;
        height: 28px;
        border-radius: 5px;
        font-size: 12px;
    }
    
    .map-type-menu-title {
        font-size: 11px;
    }
    
    .map-type-menu-desc {
        font-size: 8px;
    }
    
    .map-type-check {
        font-size: 10px;
    }
    /* Modal Extra Small */
    .modal-overlay {
        padding: 8px;
        padding-top: 15px;
        overflow-y: auto;
    }
    
    .modal-content {
        max-height: calc(100vh - 30px);
        border-radius: 8px;
        margin-bottom: 15px;
    }
    
    .modal-body {
        max-height: calc(100vh - 200px);
        overflow-y: auto;
    }
    
    .modal-header {
        padding: 14px 16px;
        border-radius: 8px 8px 0 0;
        min-height: 48px;
    }
    
    .modal-header h4 {
        font-size: 14px;
        gap: 7px;
        line-height: 1.4;
    }
    
    .modal-header h4 i {
        font-size: 14px;
    }
    
    .modal-close {
        width: 30px;
        height: 30px;
        font-size: 19px;
        margin-left: 10px;
    }
    
    .modal-body {
        padding: 14px;
    }
    
    .modal-footer {
        padding: 8px 10px;
        border-radius: 0 0 8px 8px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group label {
        font-size: 12px;
        margin-bottom: 8px;
        line-height: 1.5;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    /* Form Section Mobile */
    .form-section {
        padding: 14px;
        margin-bottom: 16px;
    }
    
    .form-section-header {
        margin-bottom: 14px;
        padding-bottom: 8px;
    }
    
    .form-section-header i {
        font-size: 14px;
    }
    
    .form-section-header span {
        font-size: 11px;
    }
    
    /* Form Row Mobile - Jadi Single Column */
    .form-section .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-section .form-row .form-group {
        margin-bottom: 0;
    }
    
    /* Port Input Mobile */
    .port-input-wrapper {
        padding: 6px;
    }
    
    .port-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .port-input-wrapper .port-number {
        font-size: 18px;
    }
    
    .port-info {
        padding: 12px;
        margin-top: 14px;
    }
    
    .port-info span {
        font-size: 13px;
    }
    
    .port-info strong {
        font-size: 15px;
    }
    
    /* Form Helper Mobile */
    .form-help {
        font-size: 11px;
        margin-top: 8px;
    }
    
    /* Coordinate Input Mobile */
    .coordinate-input {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-pick-location {
        width: 100%;
        height: 44px;
        border-radius: 8px;
        font-size: 14px;
    }
    
    .btn-pick-location i {
        margin-right: 6px;
    }
    
    .port-btn {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }
    
    .port-number {
        width: 40px;
        padding: 6px 2px;
        font-size: 11px;
    }
    
    .btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    /* Pick Mode Indicator Extra Small */
    .pick-mode-indicator {
        top: 6px;
        padding: 5px 8px;
        border-radius: 12px;
        font-size: 9px;
        gap: 4px;
        max-width: calc(100% - 70px);
    }
    
    .pick-mode-indicator i {
        font-size: 9px;
    }
    
    .pick-mode-indicator span {
        max-width: 120px;
    }
    
    .pick-mode-indicator button {
        width: 16px;
        height: 16px;
        font-size: 8px;
    }
}

@media (max-width: 380px) {
    /* Very Small Mobile (iPhone SE, dll) */
    .floating-menu {
        width: 140px;
        bottom: 56px;
    }
    
    .floating-btn-main {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }
    
    .floating-menu-content {
        max-height: 140px;
    }
    
    .floating-btn-item {
        padding: 5px 2px;
        font-size: 11px;
    }
    
    .floating-btn-item span {
        font-size: 6px;
    }
    
    .layer-icon {
        width: 14px;
        height: 14px;
        font-size: 6px;
        margin-right: 2px;
    }
    
    .layer-text {
        font-size: 7px;
    }
    
    /* Map Type Container Very Small */
    .map-type-container {
        top: 5px;
        right: 5px;
    }
    
    .map-type-fab {
        width: 30px;
        height: 30px;
        border-radius: 6px;
        font-size: 13px;
    }
    
    .map-type-menu {
        top: 36px;
        min-width: 150px;
        padding: 4px;
    }
    
    .map-type-menu-header {
        font-size: 7px;
        padding: 3px 5px 4px 5px;
    }
    
    .map-type-menu-item {
        padding: 5px;
        gap: 5px;
    }
    
    .map-type-menu-icon {
        width: 24px;
        height: 24px;
        border-radius: 4px;
        font-size: 10px;
    }
    
    .map-type-menu-title {
        font-size: 10px;
    }
    
    .map-type-menu-desc {
        font-size: 7px;
    }
    
    .map-type-check {
        font-size: 9px;
    }
    /* Modal Very Small */
    .modal-header h4 {
        font-size: 12px;
    }
    
    .modal-body {
        padding: 8px;
    }
    
    .form-group label {
        font-size: 9px;
    }
    
    .form-control {
        padding: 5px 6px;
        font-size: 10px;
    }
    
    .btn {
        padding: 5px 8px;
        font-size: 10px;
    }
    
    /* Pick Mode Indicator Very Small */
    .pick-mode-indicator {
        top: 5px;
        padding: 4px 6px;
        font-size: 8px;
        gap: 3px;
        max-width: calc(100% - 60px);
    }
    
    .pick-mode-indicator span {
        max-width: 100px;
    }
    
    .pick-mode-indicator button {
        width: 14px;
        height: 14px;
        font-size: 7px;
    }
}

/* Responsif untuk Mobile */
@media (max-width: 768px) {
    .stat-card {
        padding: 15px;
    }
    
    .stat-card-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
    
    .stat-card-number {
        font-size: 22px;
    }
    
    .stat-card-label {
        font-size: 12px;
    }
}

/* ==================== MODERN POPUP STYLING ==================== */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 0 !important;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4;
    width: 280px !important;
}

.leaflet-popup-tip {
    box-shadow: 0 3px 14px rgba(0,0,0,0.15);
}

/* Popup Close Button - Lingkaran Putih Transparan */
.leaflet-popup-close-button {
    width: 28px !important;
    height: 28px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: white !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    top: 8px !important;
    right: 8px !important;
    padding: 0 !important;
    line-height: 1 !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
}

.leaflet-popup-close-button:hover {
    background: rgba(255, 255, 255, 0.35) !important;
    color: white !important;
    transform: scale(1.05);
}

/* Dark Mode - Popup Close Button */
body.dark-mode .leaflet-popup-close-button,
.dark-mode .leaflet-popup-close-button,
[data-theme="dark"] .leaflet-popup-close-button {
    background: rgba(255, 255, 255, 0.25) !important;
}

body.dark-mode .leaflet-popup-close-button:hover,
.dark-mode .leaflet-popup-close-button:hover,
[data-theme="dark"] .leaflet-popup-close-button:hover {
    background: rgba(255, 255, 255, 0.4) !important;
}

/* Popup Header dengan Gradient */
.popup-header {
    padding: 14px 16px;
    color: white;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.popup-header i {
    font-size: 16px;
    flex-shrink: 0;
}

.popup-header-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.popup-header-olt {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.popup-header-router {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.popup-header-odc {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.popup-header-odp {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.popup-header-customer {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

/* Popup Body */
.popup-body {
    padding: 12px 16px;
    background: white;
    max-height: 50vh;
    overflow-y: auto;
}

.popup-info-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #374151;
}

.popup-info-row:last-child {
    margin-bottom: 0;
}

.popup-info-row i {
    color: #6b7280;
    font-size: 14px;
    width: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.popup-info-row span {
    flex: 1;
    line-height: 1.5;
}

/* Text Overflow Handling */
.popup-text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.popup-text-wrap {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-maintenance {
    background: #fef3c7;
    color: #92400e;
}

.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

/* Popup Footer */
.popup-footer {
    padding: 12px 16px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
}

/* Popup Buttons */
.popup-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.popup-btn i {
    font-size: 13px;
}

.popup-btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white !important;
}

.popup-btn-primary:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    color: white !important;
}

.popup-btn-primary i {
    color: white !important;
}

.popup-btn-secondary {
    background: white;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.popup-btn-secondary:hover {
    background: #f3f4f6;
    color: #374151;
    border-color: #9ca3af;
}

/* Icon di tombol secondary (Rute) */
.popup-btn-secondary i {
    color: #6b7280 !important;
    font-size: 13px !important;
}

.popup-btn-secondary:hover i {
    color: #374151 !important;
}

/* ==================== POPUP BUTTON WARNA SESUAI DEVICE ==================== */
/* Popup Button ODC - Hijau */
.popup-btn-odc {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white !important;
}

.popup-btn-odc:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    color: white !important;
}

.popup-btn-odc i {
    color: white !important;
}

/* Popup Button ODP - Kuning/Orange */
.popup-btn-odp {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white !important;
}

.popup-btn-odp:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    color: white !important;
}

.popup-btn-odp i {
    color: white !important;
}

/* Popup Button Tiang - Coklat/Stone */
.popup-btn-tiang {
    background: linear-gradient(135deg, #a16207 0%, #854d0e 100%);
    color: white !important;
}

.popup-btn-tiang:hover {
    background: linear-gradient(135deg, #854d0e 0%, #713f12 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(161, 98, 7, 0.3);
    color: white !important;
}

.popup-btn-tiang i {
    color: white !important;
}

/* Popup Button Kabel - Abu-abu */
.popup-btn-kabel {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white !important;
}

.popup-btn-kabel:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
    color: white !important;
}

.popup-btn-kabel i {
    color: white !important;
}

/* Popup Button Router - Biru */
.popup-btn-router {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white !important;
}

.popup-btn-router:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    color: white !important;
}

.popup-btn-router i {
    color: white !important;
}

/* Popup Button Customer - Cyan */
.popup-btn-customer {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white !important;
}

.popup-btn-customer:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
    color: white !important;
}

.popup-btn-customer i {
    color: white !important;
}

/* Dark Mode Support */
body.dark-mode .popup-body,
.dark-mode .popup-body,
[data-theme="dark"] .popup-body {
    background: #1e293b;
}

body.dark-mode .popup-info-row,
.dark-mode .popup-info-row,
[data-theme="dark"] .popup-info-row {
    color: #e2e8f0;
}

body.dark-mode .popup-info-row i,
.dark-mode .popup-info-row i,
[data-theme="dark"] .popup-info-row i {
    color: #94a3b8;
}

body.dark-mode .popup-footer,
.dark-mode .popup-footer,
[data-theme="dark"] .popup-footer {
    background: #0f172a;
    border-top-color: #334155;
}

body.dark-mode .popup-btn-secondary,
.dark-mode .popup-btn-secondary,
[data-theme="dark"] .popup-btn-secondary {
    background: #334155;
    color: #e2e8f0;
    border-color: #475569;
}

body.dark-mode .popup-btn-secondary:hover,
.dark-mode .popup-btn-secondary:hover,
[data-theme="dark"] .popup-btn-secondary:hover {
    background: #475569;
    border-color: #64748b;
}

body.dark-mode .leaflet-popup-content-wrapper,
.dark-mode .leaflet-popup-content-wrapper,
[data-theme="dark"] .leaflet-popup-content-wrapper {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Mobile Responsive Popup */
@media (max-width: 480px) {
    .leaflet-popup-content {
        width: 240px !important;
    }
    
    .popup-header {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .popup-header i {
        font-size: 14px;
    }
    
    .popup-body {
        padding: 10px 12px;
        max-height: 45vh;
    }
    
    .popup-info-row {
        font-size: 12px;
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .popup-info-row i {
        font-size: 12px;
        width: 14px;
    }
    
    .popup-footer {
        padding: 8px 10px;
        gap: 6px;
    }
    
    .popup-btn {
        padding: 6px 8px;
        font-size: 11px;
        gap: 4px;
    }
    
    .popup-btn i {
        font-size: 11px;
    }
    
    .status-badge {
        padding: 2px 8px;
        font-size: 10px;
    }
}

@media (max-width: 360px) {
    .leaflet-popup-content {
        width: 220px !important;
    }
    
    .popup-header {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .popup-body {
        padding: 8px 10px;
        max-height: 40vh;
    }
    
    .popup-info-row {
        font-size: 11px;
    }
    
    .popup-btn {
        font-size: 10px;
        padding: 5px 6px;
    }
}

.custom-div-icon {
    background: none;
    border: none;
}

.router-marker {
    background-color: #6366f1;
    color: white;
    border: 2px solid white;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

/* Router Marker Inactive - Merah */
.router-marker-inactive {
    background-color: #ef4444 !important;
}

.odc-marker {
    background-color: #10b981;
    color: white;
    border: 2px solid white;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.odp-marker {
    background-color: #f59e0b;
    color: white;
    border: 2px solid white;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.customer-marker {
    background-color: #17a2b8;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
    transition: background-color 0.3s ease;
}

/* Customer Marker Offline - Merah */
.customer-marker-offline {
    background-color: #dc3545;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 3px 6px rgba(220, 53, 69, 0.4);
    transition: background-color 0.3s ease;
}

/* Customer Marker Isolir - Pink ke Ungu */
.customer-marker-isolir {
    background-color: #a855f7;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 3px 6px rgba(168, 85, 247, 0.4);
    transition: background-color 0.3s ease;
}

/* ==================== POPUP CUSTOMER OFFLINE ==================== */
.popup-header-customer-offline {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
}

.popup-btn-customer-offline {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    color: white !important;
}

.popup-btn-customer-offline:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71d2a 100%) !important;
    transform: translateY(-1px);
}

/* ==================== POPUP CUSTOMER ISOLIR ==================== */
.popup-header-customer-isolir {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%) !important;
}

.popup-btn-customer-isolir {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%) !important;
    color: white !important;
}

.popup-btn-customer-isolir:hover {
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%) !important;
    transform: translateY(-1px);
}

/* ==================== STATUS BADGE ==================== */
.popup-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-status-online {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.popup-status-offline {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.popup-status-isolir {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    margin-left: 5px;
}

/* Status badge untuk isolir yang masih connected (pink-ungu) */
.popup-status-isolir-connected {
    background-color: #f3e8ff;
    color: #7c3aed;
    border: 1px solid #ddd6fe;
}

.popup-status-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.popup-status-online .popup-status-icon {
    background-color: #28a745;
}

.popup-status-offline .popup-status-icon {
    background-color: #dc3545;
}

/* ==================== DARK MODE POPUP CUSTOMER OFFLINE ==================== */
body.dark-mode .popup-header-customer-offline,
.dark-mode .popup-header-customer-offline,
[data-theme="dark"] .popup-header-customer-offline {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
}

body.dark-mode .popup-btn-customer-offline,
.dark-mode .popup-btn-customer-offline,
[data-theme="dark"] .popup-btn-customer-offline {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
}

body.dark-mode .popup-status-online,
.dark-mode .popup-status-online,
[data-theme="dark"] .popup-status-online {
    background-color: #1e3a2f;
    color: #75d99a;
    border-color: #2d5a45;
}

body.dark-mode .popup-status-offline,
.dark-mode .popup-status-offline,
[data-theme="dark"] .popup-status-offline {
    background-color: #3d1f23;
    color: #f5a6ad;
    border-color: #5a2d33;
}

body.dark-mode .popup-status-isolir,
.dark-mode .popup-status-isolir,
[data-theme="dark"] .popup-status-isolir {
    background-color: #3d1f23;
    color: #f5a6ad;
    border-color: #5a2d33;
}

body.dark-mode .popup-status-isolir-connected,
.dark-mode .popup-status-isolir-connected,
[data-theme="dark"] .popup-status-isolir-connected {
    background-color: #2e1f3d;
    color: #c4b5fd;
    border-color: #4c3a6e;
}

body.dark-mode .popup-header-customer-isolir,
.dark-mode .popup-header-customer-isolir,
[data-theme="dark"] .popup-header-customer-isolir {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%) !important;
}

body.dark-mode .popup-btn-customer-isolir,
.dark-mode .popup-btn-customer-isolir,
[data-theme="dark"] .popup-btn-customer-isolir {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%) !important;
}

body.dark-mode .popup-status-online .popup-status-icon,
.dark-mode .popup-status-online .popup-status-icon,
[data-theme="dark"] .popup-status-online .popup-status-icon {
    background-color: #75d99a;
}

body.dark-mode .popup-status-offline .popup-status-icon,
.dark-mode .popup-status-offline .popup-status-icon,
[data-theme="dark"] .popup-status-offline .popup-status-icon {
    background-color: #f5a6ad;
}

/* ==================== REALTIME TRAFFIC ICONS ==================== */
.popup-info-row .text-success {
    color: #28a745 !important;
}

.popup-info-row .text-primary {
    color: #007bff !important;
}

.popup-info-row .text-warning {
    color: #ffc107 !important;
}

.popup-info-row .text-danger {
    color: #dc3545 !important;
}

.popup-info-row .fa-arrow-up,
.popup-info-row .fa-arrow-down,
.popup-info-row .fa-exchange {
    width: 14px;
    text-align: center;
}

/* Upload Speed - Hijau */
.realtime-upload {
    color: #28a745 !important;
    font-weight: 600;
}

/* Download Speed - Biru */
.realtime-download {
    color: #007bff !important;
    font-weight: 600;
}

/* Ping - Dinamis */
.realtime-ping-good {
    color: #28a745 !important;
    font-weight: 600;
}

.realtime-ping-medium {
    color: #ffc107 !important;
    font-weight: 600;
}

.realtime-ping-bad {
    color: #dc3545 !important;
    font-weight: 600;
}

/* Dark Mode Realtime Icons */
body.dark-mode .popup-info-row .text-success,
.dark-mode .popup-info-row .text-success,
[data-theme="dark"] .popup-info-row .text-success {
    color: #75d99a !important;
}

body.dark-mode .popup-info-row .text-primary,
.dark-mode .popup-info-row .text-primary,
[data-theme="dark"] .popup-info-row .text-primary {
    color: #6ea8fe !important;
}

body.dark-mode .popup-info-row .text-warning,
.dark-mode .popup-info-row .text-warning,
[data-theme="dark"] .popup-info-row .text-warning {
    color: #ffda6a !important;
}

body.dark-mode .popup-info-row .text-danger,
.dark-mode .popup-info-row .text-danger,
[data-theme="dark"] .popup-info-row .text-danger {
    color: #f5a6ad !important;
}

body.dark-mode .realtime-upload,
.dark-mode .realtime-upload,
[data-theme="dark"] .realtime-upload {
    color: #75d99a !important;
}

body.dark-mode .realtime-download,
.dark-mode .realtime-download,
[data-theme="dark"] .realtime-download {
    color: #6ea8fe !important;
}

body.dark-mode .realtime-ping-good,
.dark-mode .realtime-ping-good,
[data-theme="dark"] .realtime-ping-good {
    color: #75d99a !important;
}

body.dark-mode .realtime-ping-medium,
.dark-mode .realtime-ping-medium,
[data-theme="dark"] .realtime-ping-medium {
    color: #ffda6a !important;
}

body.dark-mode .realtime-ping-bad,
.dark-mode .realtime-ping-bad,
[data-theme="dark"] .realtime-ping-bad {
    color: #f5a6ad !important;
}

/* Gaya Cluster Pelanggan */
.customer-cluster {
    background: transparent;
}

.cluster-icon {
    color: white;
    border: 3px solid white;
    border-radius: 50%;
    text-align: center;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

/* Cluster Kecil (1-10) - Hijau */
.cluster-small {
    width: 36px;
    height: 36px;
    font-size: 12px;
    background-color: #10b981;
}

/* Cluster Sedang (11-50) - Orange */
.cluster-medium {
    width: 44px;
    height: 44px;
    font-size: 14px;
    background-color: #f97316;
}

/* Cluster Besar (51+) - Kuning */
.cluster-large {
    width: 52px;
    height: 52px;
    font-size: 16px;
    background-color: #eab308;
    color: #1f2937;
}

/* ==================== ODC CLUSTER STYLING ==================== */
.odc-cluster {
    background: transparent;
}

.cluster-odc-small,
.cluster-odc-medium,
.cluster-odc-large {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: white;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.4);
    border: 3px solid white;
}

/* Cluster ODC Kecil (1-10) - Hijau Terang */
.cluster-odc-small {
    background-color: #10b981;
    width: 36px;
    height: 36px;
    font-size: 12px;
}

/* Cluster ODC Sedang (11-50) - Hijau Sedang */
.cluster-odc-medium {
    background-color: #059669;
    width: 44px;
    height: 44px;
    font-size: 14px;
}

/* Cluster ODC Besar (51+) - Hijau Tua */
.cluster-odc-large {
    background-color: #047857;
    width: 52px;
    height: 52px;
    font-size: 16px;
}

/* ==================== ODP CLUSTER STYLING ==================== */
.odp-cluster {
    background: transparent;
}

.cluster-odp-small,
.cluster-odp-medium,
.cluster-odp-large {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: white;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.4);
    border: 3px solid white;
}

/* Cluster ODP Kecil (1-10) - Orange Terang */
.cluster-odp-small {
    background-color: #f59e0b;
    width: 36px;
    height: 36px;
    font-size: 12px;
}

/* Cluster ODP Sedang (11-50) - Orange Sedang */
.cluster-odp-medium {
    background-color: #d97706;
    width: 44px;
    height: 44px;
    font-size: 14px;
}

/* Cluster ODP Besar (51+) - Orange Tua */
.cluster-odp-large {
    background-color: #b45309;
    width: 52px;
    height: 52px;
    font-size: 16px;
}

@media (max-width: 768px) {
    .alert h4 {
        font-size: 18px;
    }
    
    .btn-xs {
        padding: 3px 6px;
        font-size: 10px;
    }
    
    #map {
        height: 75vh !important;
    }
}
/* ==================== PARENT CONNECTION STYLING ==================== */
.form-group select:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.6;
}

.form-help {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-top: 6px;
    line-height: 1.4;
}

.form-help i {
    font-size: 10px;
    margin-right: 4px;
}

/* ==================== COORDINATE INPUT WRAPPER 80:20 ==================== */
/* Pastikan semua label form tetap align kiri dan block */
.modal-body .form-group label {
    display: block !important;
    text-align: left !important;
    width: 100% !important;
    margin-bottom: 8px !important;
}

/* Force coordinate form group menjadi column dengan urutan yang benar */
.coordinate-form-group {
    display: flex !important;
    flex-direction: column !important;
}

.coordinate-form-group label {
    order: 1 !important;
}

.coordinate-form-group .coordinate-input-wrapper {
    order: 2 !important;
}

.coordinate-form-group .form-help {
    order: 3 !important;
}

.coordinate-input-wrapper {
    display: flex !important;
    flex-direction: row-reverse !important;
    gap: 10px;
    align-items: stretch;
}

.coordinate-input-field {
    flex: 0 0 80% !important;
    width: 80% !important;
}

.btn-remap-location {
    flex: 0 0 calc(20% - 10px) !important;
    width: calc(20% - 10px) !important;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

.btn-remap-location:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
}

.btn-remap-location:active {
    transform: translateY(0) !important;
}

.btn-remap-location i {
    font-size: 16px !important;
}

/* Dark Mode Support */
body.dark-mode .btn-remap-location,
.dark-mode .btn-remap-location,
[data-theme="dark"] .btn-remap-location {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%) !important;
}

body.dark-mode .btn-remap-location:hover,
.dark-mode .btn-remap-location:hover,
[data-theme="dark"] .btn-remap-location:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
}

/* ==================== SWEETALERT2 Z-INDEX FIX ==================== */
/* Pastikan SweetAlert2 muncul di atas modal (modal z-index: 2000) */
.swal2-container {
    z-index: 3000 !important;
}

.swal2-popup {
    z-index: 3001 !important;
}




/* ==================== FIX DROPDOWN TERPOTONG ==================== */
/* Pastikan text dropdown tidak terpotong */
.form-control {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 8px 12px !important;
}

.modal-body select.form-control {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 8px 30px 8px 12px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 12px !important;
}

/* Dropdown option styling */
.form-control option,
.modal-body select.form-control option {
    padding: 8px 12px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    min-height: 30px !important;
}

/* Fix untuk Safari dan iOS */
@supports (-webkit-touch-callout: none) {
    .form-control,
    .modal-body select.form-control {
        -webkit-appearance: menulist !important;
        appearance: menulist !important;
    }
}

/* Dark Mode Support untuk dropdown fix */
body.dark-mode .form-control option,
.dark-mode .form-control option,
[data-theme="dark"] .form-control option {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

/* ==================== FIX DROPDOWN PON MULTI-PORT ==================== */
/* Fix untuk dropdown PON yang di-generate dinamis */
#detailPortsContainer select.form-control,
#detailPortsContainer select.form-control.input-sm,
select[id^="detailPonSelect_"] {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 6px 10px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: 13px !important;
    height: auto !important;
    min-height: 34px !important;
    line-height: 1.4 !important;
}

/* Option styling untuk dropdown PON */
#detailPortsContainer select.form-control option,
#detailPortsContainer select.form-control.input-sm option,
select[id^="detailPonSelect_"] option {
    padding: 8px 10px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    min-height: 28px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

/* Disabled option styling untuk PON yang sudah dipilih */
#detailPortsContainer select.form-control option:disabled,
select[id^="detailPonSelect_"] option:disabled {
    color: #999 !important;
    background-color: #f5f5f5 !important;
    font-style: italic !important;
}

/* Input label port di multi-port */
#detailPortsContainer input.form-control,
#detailPortsContainer input.form-control.input-sm,
input[id^="detailPortLabel_"] {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    height: auto !important;
    min-height: 34px !important;
}

/* Port field item container */
.port-field-item {
    background: #fafafa !important;
    padding: 12px !important;
    border-radius: 6px !important;
    margin-bottom: 10px !important;
    border: 1px solid #e5e7eb !important;
}

.port-field-item .row {
    margin-left: -5px !important;
    margin-right: -5px !important;
}

.port-field-item .col-md-6 {
    padding-left: 5px !important;
    padding-right: 5px !important;
}

/* Responsive untuk mobile */
@media (max-width: 768px) {
    #detailPortsContainer select.form-control,
    #detailPortsContainer select.form-control.input-sm,
    select[id^="detailPonSelect_"] {
        font-size: 14px !important;
        padding: 8px 10px !important;
        min-height: 38px !important;
    }
    
    #detailPortsContainer input.form-control,
    #detailPortsContainer input.form-control.input-sm,
    input[id^="detailPortLabel_"] {
        font-size: 14px !important;
        padding: 8px 10px !important;
        min-height: 38px !important;
    }
    
    .port-field-item .col-md-6 {
        width: 100% !important;
        margin-bottom: 8px !important;
    }
}

/* Dark Mode untuk multi-port fields */
body.dark-mode #detailPortsContainer select.form-control option,
.dark-mode #detailPortsContainer select.form-control option,
[data-theme="dark"] #detailPortsContainer select.form-control option,
body.dark-mode select[id^="detailPonSelect_"] option,
.dark-mode select[id^="detailPonSelect_"] option,
[data-theme="dark"] select[id^="detailPonSelect_"] option {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

body.dark-mode #detailPortsContainer select.form-control option:disabled,
.dark-mode #detailPortsContainer select.form-control option:disabled,
[data-theme="dark"] #detailPortsContainer select.form-control option:disabled,
body.dark-mode select[id^="detailPonSelect_"] option:disabled,
.dark-mode select[id^="detailPonSelect_"] option:disabled,
[data-theme="dark"] select[id^="detailPonSelect_"] option:disabled {
    background: #374151 !important;
    color: #6b7280 !important;
}

body.dark-mode .port-field-item,
.dark-mode .port-field-item,
[data-theme="dark"] .port-field-item {
    background: #1e293b !important;
    border-color: #374151 !important;
}

body.dark-mode .ports-fields-header,
.dark-mode .ports-fields-header,
[data-theme="dark"] .ports-fields-header {
    background: #1e3a5f !important;
    color: #e2e8f0 !important;
}

/* ==================== FIX DROPDOWN PON MODAL ADD OLT ==================== */
/* Fix untuk dropdown PON di modal Add OLT yang di-generate dinamis */
#addPortsContainer select.form-control,
#addPortsContainer select.form-control.input-sm,
select[id^="addPonSelect_"] {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 6px 10px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: 13px !important;
    height: auto !important;
    min-height: 34px !important;
    line-height: 1.4 !important;
}

/* Option styling untuk dropdown PON di modal Add */
#addPortsContainer select.form-control option,
#addPortsContainer select.form-control.input-sm option,
select[id^="addPonSelect_"] option {
    padding: 8px 10px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    min-height: 28px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

/* Disabled option styling untuk PON yang sudah dipilih di modal Add */
#addPortsContainer select.form-control option:disabled,
select[id^="addPonSelect_"] option:disabled {
    color: #999 !important;
    background-color: #f5f5f5 !important;
    font-style: italic !important;
}

/* Input label port di multi-port modal Add */
#addPortsContainer input.form-control,
#addPortsContainer input.form-control.input-sm,
input[id^="addPortLabel_"] {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    height: auto !important;
    min-height: 34px !important;
}

/* Responsive untuk mobile - Modal Add */
@media (max-width: 768px) {
    #addPortsContainer select.form-control,
    #addPortsContainer select.form-control.input-sm,
    select[id^="addPonSelect_"] {
        font-size: 14px !important;
        padding: 8px 10px !important;
        min-height: 38px !important;
    }
    
    #addPortsContainer input.form-control,
    #addPortsContainer input.form-control.input-sm,
    input[id^="addPortLabel_"] {
        font-size: 14px !important;
        padding: 8px 10px !important;
        min-height: 38px !important;
    }
}

/* Dark Mode untuk multi-port fields di Modal Add */
body.dark-mode #addPortsContainer select.form-control option,
.dark-mode #addPortsContainer select.form-control option,
[data-theme="dark"] #addPortsContainer select.form-control option,
body.dark-mode select[id^="addPonSelect_"] option,
.dark-mode select[id^="addPonSelect_"] option,
[data-theme="dark"] select[id^="addPonSelect_"] option {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

body.dark-mode #addPortsContainer select.form-control option:disabled,
.dark-mode #addPortsContainer select.form-control option:disabled,
[data-theme="dark"] #addPortsContainer select.form-control option:disabled,
body.dark-mode select[id^="addPonSelect_"] option:disabled,
.dark-mode select[id^="addPonSelect_"] option:disabled,
[data-theme="dark"] select[id^="addPonSelect_"] option:disabled {
    background: #374151 !important;
    color: #6b7280 !important;
}
/* ==================== FIX DROPDOWN PORT ODP MODAL ADD ==================== */
/* Fix untuk dropdown Port di modal Add ODP yang di-generate dinamis */
#addOdpPortsContainer select.form-control,
#addOdpPortsContainer select.form-control.input-sm,
select[id^="addOdpPortSelect_"] {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 6px 10px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: 13px !important;
    height: auto !important;
    min-height: 34px !important;
    line-height: 1.4 !important;
}

/* Option styling untuk dropdown Port di modal Add ODP */
#addOdpPortsContainer select.form-control option,
#addOdpPortsContainer select.form-control.input-sm option,
select[id^="addOdpPortSelect_"] option {
    padding: 8px 10px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    min-height: 28px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

/* Disabled option styling untuk Port yang sudah dipilih di modal Add ODP */
#addOdpPortsContainer select.form-control option:disabled,
select[id^="addOdpPortSelect_"] option:disabled {
    color: #999 !important;
    background-color: #f5f5f5 !important;
    font-style: italic !important;
}

/* Input label port di multi-port modal Add ODP */
#addOdpPortsContainer input.form-control,
#addOdpPortsContainer input.form-control.input-sm,
input[id^="addOdpPortLabel_"] {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    height: auto !important;
    min-height: 34px !important;
}

/* Responsive untuk mobile - Modal Add ODP */
@media (max-width: 768px) {
    #addOdpPortsContainer select.form-control,
    #addOdpPortsContainer select.form-control.input-sm,
    select[id^="addOdpPortSelect_"] {
        font-size: 14px !important;
        padding: 8px 10px !important;
        min-height: 38px !important;
    }
    
    #addOdpPortsContainer input.form-control,
    #addOdpPortsContainer input.form-control.input-sm,
    input[id^="addOdpPortLabel_"] {
        font-size: 14px !important;
        padding: 8px 10px !important;
        min-height: 38px !important;
    }
}

/* Dark Mode untuk multi-port fields di Modal Add ODP */
body.dark-mode #addOdpPortsContainer select.form-control option,
.dark-mode #addOdpPortsContainer select.form-control option,
[data-theme="dark"] #addOdpPortsContainer select.form-control option,
body.dark-mode select[id^="addOdpPortSelect_"] option,
.dark-mode select[id^="addOdpPortSelect_"] option,
[data-theme="dark"] select[id^="addOdpPortSelect_"] option {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

body.dark-mode #addOdpPortsContainer select.form-control option:disabled,
.dark-mode #addOdpPortsContainer select.form-control option:disabled,
[data-theme="dark"] #addOdpPortsContainer select.form-control option:disabled,
body.dark-mode select[id^="addOdpPortSelect_"] option:disabled,
.dark-mode select[id^="addOdpPortSelect_"] option:disabled,
[data-theme="dark"] select[id^="addOdpPortSelect_"] option:disabled {
    background: #374151 !important;
    color: #6b7280 !important;
}

/* ==================== FIX DROPDOWN PORT ODP MODAL DETAIL ==================== */
/* Fix untuk dropdown Port di modal Detail ODP yang di-generate dinamis */
#detailOdpPortsContainer select.form-control,
#detailOdpPortsContainer select.form-control.input-sm,
select[id^="detailOdpPortSelect_"] {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 6px 10px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: 13px !important;
    height: auto !important;
    min-height: 34px !important;
    line-height: 1.4 !important;
}

/* Option styling untuk dropdown Port di modal Detail ODP */
#detailOdpPortsContainer select.form-control option,
#detailOdpPortsContainer select.form-control.input-sm option,
select[id^="detailOdpPortSelect_"] option {
    padding: 8px 10px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    min-height: 28px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

/* Disabled option styling untuk Port yang sudah dipilih di modal Detail ODP */
#detailOdpPortsContainer select.form-control option:disabled,
select[id^="detailOdpPortSelect_"] option:disabled {
    color: #999 !important;
    background-color: #f5f5f5 !important;
    font-style: italic !important;
}

/* Input label port di multi-port modal Detail ODP */
#detailOdpPortsContainer input.form-control,
#detailOdpPortsContainer input.form-control.input-sm,
input[id^="detailOdpPortLabel_"] {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    height: auto !important;
    min-height: 34px !important;
}

/* Responsive untuk mobile - Modal Detail ODP */
@media (max-width: 768px) {
    #detailOdpPortsContainer select.form-control,
    #detailOdpPortsContainer select.form-control.input-sm,
    select[id^="detailOdpPortSelect_"] {
        font-size: 14px !important;
        padding: 8px 10px !important;
        min-height: 38px !important;
    }
    
    #detailOdpPortsContainer input.form-control,
    #detailOdpPortsContainer input.form-control.input-sm,
    input[id^="detailOdpPortLabel_"] {
        font-size: 14px !important;
        padding: 8px 10px !important;
        min-height: 38px !important;
    }
}

/* Dark Mode untuk multi-port fields di Modal Detail ODP */
body.dark-mode #detailOdpPortsContainer select.form-control option,
.dark-mode #detailOdpPortsContainer select.form-control option,
[data-theme="dark"] #detailOdpPortsContainer select.form-control option,
body.dark-mode select[id^="detailOdpPortSelect_"] option,
.dark-mode select[id^="detailOdpPortSelect_"] option,
[data-theme="dark"] select[id^="detailOdpPortSelect_"] option {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

body.dark-mode #detailOdpPortsContainer select.form-control option:disabled,
.dark-mode #detailOdpPortsContainer select.form-control option:disabled,
[data-theme="dark"] #detailOdpPortsContainer select.form-control option:disabled,
body.dark-mode select[id^="detailOdpPortSelect_"] option:disabled,
.dark-mode select[id^="detailOdpPortSelect_"] option:disabled,
[data-theme="dark"] select[id^="detailOdpPortSelect_"] option:disabled {
    background: #374151 !important;
    color: #6b7280 !important;
}

/* ==================== FIX DROPDOWN PORT ODC MODAL ADD ==================== */
/* Fix untuk dropdown Port di modal Add ODC yang di-generate dinamis */
#addOdcPortsContainer select.form-control,
#addOdcPortsContainer select.form-control.input-sm,
select[id^="addOdcPortSelect_"] {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 6px 10px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: 13px !important;
    height: auto !important;
    min-height: 34px !important;
    line-height: 1.4 !important;
}

/* Option styling untuk dropdown Port di modal Add ODC */
#addOdcPortsContainer select.form-control option,
#addOdcPortsContainer select.form-control.input-sm option,
select[id^="addOdcPortSelect_"] option {
    padding: 8px 10px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    min-height: 28px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

/* Disabled option styling untuk Port yang sudah dipilih di modal Add ODC */
#addOdcPortsContainer select.form-control option:disabled,
select[id^="addOdcPortSelect_"] option:disabled {
    color: #999 !important;
    background-color: #f5f5f5 !important;
    font-style: italic !important;
}

/* Input label port di multi-port modal Add ODC */
#addOdcPortsContainer input.form-control,
#addOdcPortsContainer input.form-control.input-sm,
input[id^="addOdcPortLabel_"] {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    height: auto !important;
    min-height: 34px !important;
}

/* ==================== FIX DROPDOWN PORT ODC MODAL DETAIL ==================== */
/* Fix untuk dropdown Port di modal Detail ODC yang di-generate dinamis */
#detailOdcPortsContainer select.form-control,
#detailOdcPortsContainer select.form-control.input-sm,
select[id^="detailOdcPortSelect_"] {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 6px 10px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: 13px !important;
    height: auto !important;
    min-height: 34px !important;
    line-height: 1.4 !important;
}

/* Option styling untuk dropdown Port di modal Detail ODC */
#detailOdcPortsContainer select.form-control option,
#detailOdcPortsContainer select.form-control.input-sm option,
select[id^="detailOdcPortSelect_"] option {
    padding: 8px 10px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    min-height: 28px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

/* Disabled option styling untuk Port yang sudah dipilih di modal Detail ODC */
#detailOdcPortsContainer select.form-control option:disabled,
select[id^="detailOdcPortSelect_"] option:disabled {
    color: #999 !important;
    background-color: #f5f5f5 !important;
    font-style: italic !important;
}

/* Input label port di multi-port modal Detail ODC */
#detailOdcPortsContainer input.form-control,
#detailOdcPortsContainer input.form-control.input-sm,
input[id^="detailOdcPortLabel_"] {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    height: auto !important;
    min-height: 34px !important;
}

/* Responsive untuk mobile - Modal ODC */
@media (max-width: 768px) {
    #addOdcPortsContainer select.form-control,
    #addOdcPortsContainer select.form-control.input-sm,
    select[id^="addOdcPortSelect_"],
    #detailOdcPortsContainer select.form-control,
    #detailOdcPortsContainer select.form-control.input-sm,
    select[id^="detailOdcPortSelect_"] {
        font-size: 14px !important;
        padding: 8px 10px !important;
        min-height: 38px !important;
    }
    
    #addOdcPortsContainer input.form-control,
    #addOdcPortsContainer input.form-control.input-sm,
    input[id^="addOdcPortLabel_"],
    #detailOdcPortsContainer input.form-control,
    #detailOdcPortsContainer input.form-control.input-sm,
    input[id^="detailOdcPortLabel_"] {
        font-size: 14px !important;
        padding: 8px 10px !important;
        min-height: 38px !important;
    }
}

/* Dark Mode untuk multi-port fields di Modal ODC */
body.dark-mode #addOdcPortsContainer select.form-control option,
.dark-mode #addOdcPortsContainer select.form-control option,
[data-theme="dark"] #addOdcPortsContainer select.form-control option,
body.dark-mode select[id^="addOdcPortSelect_"] option,
.dark-mode select[id^="addOdcPortSelect_"] option,
[data-theme="dark"] select[id^="addOdcPortSelect_"] option,
body.dark-mode #detailOdcPortsContainer select.form-control option,
.dark-mode #detailOdcPortsContainer select.form-control option,
[data-theme="dark"] #detailOdcPortsContainer select.form-control option,
body.dark-mode select[id^="detailOdcPortSelect_"] option,
.dark-mode select[id^="detailOdcPortSelect_"] option,
[data-theme="dark"] select[id^="detailOdcPortSelect_"] option {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

body.dark-mode #addOdcPortsContainer select.form-control option:disabled,
.dark-mode #addOdcPortsContainer select.form-control option:disabled,
[data-theme="dark"] #addOdcPortsContainer select.form-control option:disabled,
body.dark-mode select[id^="addOdcPortSelect_"] option:disabled,
.dark-mode select[id^="addOdcPortSelect_"] option:disabled,
[data-theme="dark"] select[id^="addOdcPortSelect_"] option:disabled,
body.dark-mode #detailOdcPortsContainer select.form-control option:disabled,
.dark-mode #detailOdcPortsContainer select.form-control option:disabled,
[data-theme="dark"] #detailOdcPortsContainer select.form-control option:disabled,
body.dark-mode select[id^="detailOdcPortSelect_"] option:disabled,
.dark-mode select[id^="detailOdcPortSelect_"] option:disabled,
[data-theme="dark"] select[id^="detailOdcPortSelect_"] option:disabled {
    background: #374151 !important;
    color: #6b7280 !important;
}

/* ==================== FIX DROPDOWN MODAL KABEL ==================== */
/* Fix untuk dropdown dan select di modal Kabel */
#modalKabelOverlay select.form-control,
#modalKabelOverlay select.form-control.input-sm,
#kabelSambunganContainer select.form-control,
select[id^="sambunganTitik_"] {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 6px 10px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: 13px !important;
    height: auto !important;
    min-height: 34px !important;
    line-height: 1.4 !important;
}

/* Option styling untuk dropdown di modal Kabel */
#modalKabelOverlay select.form-control option,
#kabelSambunganContainer select.form-control option,
select[id^="sambunganTitik_"] option {
    padding: 8px 10px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    min-height: 28px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

/* Input di modal Kabel */
#modalKabelOverlay input.form-control,
#kabelSambunganContainer input.form-control,
input[id^="sambunganJarak_"],
input[id^="sambunganKeterangan_"] {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    height: auto !important;
    min-height: 34px !important;
}

/* Responsive untuk mobile - Modal Kabel */
@media (max-width: 768px) {
    #modalKabelOverlay select.form-control,
    #kabelSambunganContainer select.form-control,
    select[id^="sambunganTitik_"] {
        font-size: 14px !important;
        padding: 8px 10px !important;
        min-height: 38px !important;
    }
    
    #modalKabelOverlay input.form-control,
    #kabelSambunganContainer input.form-control,
    input[id^="sambunganJarak_"],
    input[id^="sambunganKeterangan_"] {
        font-size: 14px !important;
        padding: 8px 10px !important;
        min-height: 38px !important;
    }
    
    .sambungan-field-item .col-md-4 {
        width: 100% !important;
        margin-bottom: 8px !important;
    }
}

/* Dark Mode untuk dropdown di Modal Kabel */
body.dark-mode #modalKabelOverlay select.form-control option,
.dark-mode #modalKabelOverlay select.form-control option,
[data-theme="dark"] #modalKabelOverlay select.form-control option,
body.dark-mode #kabelSambunganContainer select.form-control option,
.dark-mode #kabelSambunganContainer select.form-control option,
[data-theme="dark"] #kabelSambunganContainer select.form-control option,
body.dark-mode select[id^="sambunganTitik_"] option,
.dark-mode select[id^="sambunganTitik_"] option,
[data-theme="dark"] select[id^="sambunganTitik_"] option {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

body.dark-mode .sambungan-field-item,
.dark-mode .sambungan-field-item,
[data-theme="dark"] .sambungan-field-item {
    background: #1e293b !important;
    border-color: #374151 !important;
}

body.dark-mode .sambungan-fields-header,
.dark-mode .sambungan-fields-header,
[data-theme="dark"] .sambungan-fields-header {
    background: #374151 !important;
    color: #e2e8f0 !important;
}
/* Popup Button Danger - Merah (untuk Hapus) */
.popup-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white !important;
}

.popup-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    color: white !important;
}

.popup-btn-danger i {
    color: white !important;
}
/* ==================== POPUP SAMBUNGAN SECTION (KABEL) ==================== */
.popup-sambungan-section {
    margin-top: 10px;
    border-top: 1px dashed #d1d5db;
    padding-top: 10px;
}

.popup-sambungan-header {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.popup-sambungan-header i {
    font-size: 10px;
    color: #78716c;
}

.popup-sambungan-list {
    max-height: 100px;
    overflow-y: auto;
    background: #f9fafb;
    border-radius: 6px;
    padding: 6px;
}

.popup-sambungan-list::-webkit-scrollbar {
    width: 4px;
}

.popup-sambungan-list::-webkit-scrollbar-track {
    background: #e5e7eb;
    border-radius: 2px;
}

.popup-sambungan-list::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 2px;
}

.popup-sambungan-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 8px;
    background: white;
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 11px;
    border-left: 3px solid #78716c;
}

.popup-sambungan-item:last-child {
    margin-bottom: 0;
}

.sambungan-number {
    font-weight: 700;
    color: white;
    min-width: 22px;
    background: #78716c;
    padding: 2px 5px;
    border-radius: 3px;
    text-align: center;
    font-size: 10px;
}

.sambungan-info {
    flex: 1;
    color: #374151;
    line-height: 1.4;
}

.sambungan-keterangan {
    color: #9ca3af;
    font-style: italic;
}

/* Dark Mode Support */
body.dark-mode .popup-sambungan-section,
.dark-mode .popup-sambungan-section,
[data-theme="dark"] .popup-sambungan-section {
    border-top-color: #374151;
}

body.dark-mode .popup-sambungan-header,
.dark-mode .popup-sambungan-header,
[data-theme="dark"] .popup-sambungan-header {
    color: #9ca3af;
}

body.dark-mode .popup-sambungan-list,
.dark-mode .popup-sambungan-list,
[data-theme="dark"] .popup-sambungan-list {
    background: #1e293b;
}

body.dark-mode .popup-sambungan-list::-webkit-scrollbar-track,
.dark-mode .popup-sambungan-list::-webkit-scrollbar-track,
[data-theme="dark"] .popup-sambungan-list::-webkit-scrollbar-track {
    background: #374151;
}

body.dark-mode .popup-sambungan-list::-webkit-scrollbar-thumb,
.dark-mode .popup-sambungan-list::-webkit-scrollbar-thumb,
[data-theme="dark"] .popup-sambungan-list::-webkit-scrollbar-thumb {
    background: #6b7280;
}

body.dark-mode .popup-sambungan-item,
.dark-mode .popup-sambungan-item,
[data-theme="dark"] .popup-sambungan-item {
    background: #0f172a;
}

body.dark-mode .sambungan-number,
.dark-mode .sambungan-number,
[data-theme="dark"] .sambungan-number {
    background: #6b7280;
}

body.dark-mode .sambungan-info,
.dark-mode .sambungan-info,
[data-theme="dark"] .sambungan-info {
    color: #e2e8f0;
}

body.dark-mode .sambungan-keterangan,
.dark-mode .sambungan-keterangan,
[data-theme="dark"] .sambungan-keterangan {
    color: #6b7280;
}
/* Fix untuk dropdown sambungan di modal Detail Kabel */
#detailKabelSambunganContainer select.form-control,
#detailKabelSambunganContainer select.form-control.input-sm,
select[id^="detailSambunganTitik_"] {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 6px 10px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: 13px !important;
    height: auto !important;
    min-height: 34px !important;
    line-height: 1.4 !important;
}

/* Option styling untuk dropdown sambungan di modal Detail Kabel */
#detailKabelSambunganContainer select.form-control option,
select[id^="detailSambunganTitik_"] option {
    padding: 8px 10px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    min-height: 28px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

/* Input di modal Detail Kabel */
#detailKabelSambunganContainer input.form-control,
input[id^="detailSambunganJarak_"],
input[id^="detailSambunganKeterangan_"] {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    height: auto !important;
    min-height: 34px !important;
}

/* Responsive untuk mobile - Modal Detail Kabel */
@media (max-width: 768px) {
    #detailKabelSambunganContainer select.form-control,
    select[id^="detailSambunganTitik_"] {
        font-size: 14px !important;
        padding: 8px 10px !important;
        min-height: 38px !important;
    }
    
    #detailKabelSambunganContainer input.form-control,
    input[id^="detailSambunganJarak_"],
    input[id^="detailSambunganKeterangan_"] {
        font-size: 14px !important;
        padding: 8px 10px !important;
        min-height: 38px !important;
    }
    
    #detailKabelSambunganContainer .col-md-4 {
        width: 100% !important;
        margin-bottom: 8px !important;
    }
}

/* Dark Mode untuk sambungan di Modal Detail Kabel */
body.dark-mode #detailKabelSambunganContainer select.form-control option,
.dark-mode #detailKabelSambunganContainer select.form-control option,
[data-theme="dark"] #detailKabelSambunganContainer select.form-control option,
body.dark-mode select[id^="detailSambunganTitik_"] option,
.dark-mode select[id^="detailSambunganTitik_"] option,
[data-theme="dark"] select[id^="detailSambunganTitik_"] option {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

/* ==================== MODAL HEADER KABEL (ABU-ABU) ==================== */
.modal-header-kabel {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
}

.modal-header-kabel h4 {
    color: white !important;
}

.modal-header-kabel .modal-close {
    color: white !important;
}

.modal-header-kabel .modal-close:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Button Simpan Kabel */
.btn-kabel {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
    color: white !important;
    border: none !important;
}

.btn-kabel:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%) !important;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.4) !important;
}

/* Popup Header Kabel */
.popup-header-kabel {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
}

/* Layer Icon Kabel */
.layer-kabel {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

/* ==================== INDIKATOR MODE KABEL ==================== */
.kabel-mode-indicator {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    z-index: 1001;
    display: none;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    min-width: 320px;
    max-width: 90%;
    pointer-events: auto;
}

.kabel-mode-indicator.active {
    display: flex;
}

.kabel-mode-indicator * {
    pointer-events: auto;
}

.kabel-mode-buttons button {
    pointer-events: auto !important;
    position: relative;
    z-index: 1002;
}

.kabel-mode-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.kabel-mode-header i {
    font-size: 18px;
}

.kabel-mode-info {
    display: flex;
    gap: 20px;
    font-size: 13px;
    background: rgba(255,255,255,0.15);
    padding: 8px 12px;
    border-radius: 6px;
}

.kabel-mode-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.kabel-mode-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.kabel-btn-undo,
.kabel-btn-cancel {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.kabel-btn-undo {
    background: rgba(255,255,255,0.2);
    color: white;
}

.kabel-btn-undo:hover:not(:disabled) {
    background: rgba(255,255,255,0.3);
}

.kabel-btn-undo:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.kabel-btn-cancel {
    background: #ef4444;
    color: white;
}

.kabel-btn-cancel:hover {
    background: #dc2626;
}

/* ==================== CHECKPOINT MARKERS ==================== */
/* Checkpoint normal (klik di peta biasa) */
.kabel-checkpoint-marker.kabel-checkpoint-normal {
    background: #6b7280;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Checkpoint Tiang - Lolipop style dengan warna biru highlight */
.kabel-checkpoint-tiang {
    position: relative;
    width: 18px;
    height: 18px;
    background-color: #3b82f6 !important;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.6);
    animation: pulseTiang 1.5s ease-in-out infinite;
}

.kabel-checkpoint-tiang::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 12px;
    background-color: #3b82f6;
    border-radius: 0 0 2px 2px;
    box-shadow: 0 2px 3px rgba(0,0,0,0.2);
}

@keyframes pulseTiang {
    0%, 100% { box-shadow: 0 2px 8px rgba(59, 130, 246, 0.6); }
    50% { box-shadow: 0 2px 15px rgba(59, 130, 246, 0.9); }
}

/* ==================== DEVICE MARKER HIGHLIGHT (START/END) ==================== */
/* Overlay untuk highlight device marker - SOLID */
.kabel-device-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    z-index: 10;
    pointer-events: none;
}

.kabel-device-overlay i {
    font-size: 14px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* Start highlight - Hijau SOLID */
.kabel-device-highlight-start {
    position: relative;
    background-color: #10b981 !important;
    border-color: white !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.5), 0 4px 12px rgba(16, 185, 129, 0.6) !important;
    animation: pulseDeviceStart 1.5s ease-in-out infinite !important;
}

/* Sembunyikan icon asli di dalam marker */
.kabel-device-highlight-start > i {
    opacity: 0 !important;
}

.kabel-device-overlay-start {
    background: #10b981;
}

.kabel-device-overlay-start i {
    color: white !important;
}

@keyframes pulseDeviceStart {
    0%, 100% { 
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.5), 0 4px 12px rgba(16, 185, 129, 0.6);
    }
    50% { 
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.3), 0 4px 20px rgba(16, 185, 129, 0.8);
    }
}

/* End highlight - Merah SOLID */
.kabel-device-highlight-end {
    position: relative;
    background-color: #ef4444 !important;
    border-color: white !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.5), 0 4px 12px rgba(239, 68, 68, 0.6) !important;
    animation: pulseDeviceEnd 1.5s ease-in-out infinite !important;
}

/* Sembunyikan icon asli di dalam marker */
.kabel-device-highlight-end > i {
    opacity: 0 !important;
}

.kabel-device-overlay-end {
    background: #ef4444;
}

.kabel-device-overlay-end i {
    color: white !important;
}

@keyframes pulseDeviceEnd {
    0%, 100% { 
        box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.5), 0 4px 12px rgba(239, 68, 68, 0.6);
    }
    50% { 
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.3), 0 4px 20px rgba(239, 68, 68, 0.8);
    }
}

/* ==================== DETAIL KABEL CONTENT ==================== */
.detail-kabel-content .detail-row {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.detail-kabel-content .detail-row:last-child {
    border-bottom: none;
}

.detail-kabel-content .detail-row strong {
    color: #4b5563;
    margin-right: 8px;
}

/* ==================== DARK MODE - KABEL ==================== */
body.dark-mode .modal-header-kabel,
.dark-mode .modal-header-kabel,
[data-theme="dark"] .modal-header-kabel {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%) !important;
}

body.dark-mode .btn-kabel,
.dark-mode .btn-kabel,
[data-theme="dark"] .btn-kabel {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%) !important;
}

body.dark-mode .btn-kabel:hover,
.dark-mode .btn-kabel:hover,
[data-theme="dark"] .btn-kabel:hover {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%) !important;
}

body.dark-mode .popup-header-kabel,
.dark-mode .popup-header-kabel,
[data-theme="dark"] .popup-header-kabel {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%) !important;
}

body.dark-mode .kabel-mode-indicator,
.dark-mode .kabel-mode-indicator,
[data-theme="dark"] .kabel-mode-indicator {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
}

body.dark-mode .detail-kabel-content .detail-row,
.dark-mode .detail-kabel-content .detail-row,
[data-theme="dark"] .detail-kabel-content .detail-row {
    border-bottom-color: #475569;
}

body.dark-mode .detail-kabel-content .detail-row strong,
.dark-mode .detail-kabel-content .detail-row strong,
[data-theme="dark"] .detail-kabel-content .detail-row strong {
    color: #94a3b8;
}

body.dark-mode .detail-sambungan-item,
.dark-mode .detail-sambungan-item,
[data-theme="dark"] .detail-sambungan-item {
    background: #334155 !important;
}

/* ==================== HOMEPASS STYLING ==================== */

/* Stats Card Homepass - Pink */
.stat-card-homepass {
    border-left-color: #ec4899;
}

.stat-card-homepass .stat-card-icon {
    background: rgba(236, 72, 153, 0.12);
    color: #ec4899;
}

.stat-card-homepass .stat-card-number {
    color: #ec4899;
}

/* Layer Icon Homepass - Pink */
.layer-homepass {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
}

/* FAB Homepass - Pink */
.fab-add-homepass {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%) !important;
    color: white !important;
}

.fab-add-homepass i,
.fab-add-homepass span {
    color: white !important;
}

.fab-add-homepass:hover {
    background: linear-gradient(135deg, #db2777 0%, #be185d 100%) !important;
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.4) !important;
}

/* Modal Header Homepass - Pink */
.modal-header-homepass {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%) !important;
}

/* Button Homepass - Pink */
.btn-homepass {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%) !important;
    color: white !important;
    border: none !important;
}

.btn-homepass:hover {
    background: linear-gradient(135deg, #db2777 0%, #be185d 100%) !important;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4) !important;
}

/* Popup Button Homepass - Pink */
.popup-btn-homepass {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%) !important;
    color: white !important;
}

.popup-btn-homepass:hover {
    background: linear-gradient(135deg, #db2777 0%, #be185d 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.popup-btn-homepass i {
    color: white !important;
}

/* Popup Header Homepass - Pink */
.popup-header-homepass {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%) !important;
}

/* Homepass Marker - Shape seperti OLT/ODC/ODP (kotak rounded) */
.homepass-marker {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: white;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}

.homepass-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* Homepass Cluster - Pink */
.homepass-cluster {
    background: transparent !important;
}

.cluster-homepass-small,
.cluster-homepass-medium,
.cluster-homepass-large {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(236, 72, 153, 0.4);
    border: 3px solid white;
}

.cluster-homepass-small {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    width: 36px;
    height: 36px;
    font-size: 12px;
}

.cluster-homepass-medium {
    background: linear-gradient(135deg, #db2777 0%, #be185d 100%);
    width: 44px;
    height: 44px;
    font-size: 14px;
}

.cluster-homepass-large {
    background: linear-gradient(135deg, #be185d 0%, #9d174d 100%);
    width: 52px;
    height: 52px;
    font-size: 16px;
}

/* Status Badge Homepass */
.status-prospek {
    background-color: #3b82f6 !important;
    color: white !important;
}

.status-pending {
    background-color: #eab308 !important;
    color: #1f2937 !important;
}

.status-bermasalah {
    background-color: #ef4444 !important;
    color: white !important;
}

.status-tidak-minat {
    background-color: #f97316 !important;
    color: white !important;
}

.status-rumah-kosong {
    background-color: #6b7280 !important;
    color: white !important;
}

.status-sudah-langganan {
    background-color: #10b981 !important;
    color: white !important;
}

/* Dark Mode Homepass - Pink */
body.dark-mode .stat-card-homepass,
.dark-mode .stat-card-homepass,
[data-theme="dark"] .stat-card-homepass {
    background: #1e293b;
}

body.dark-mode .stat-card-homepass .stat-card-number,
.dark-mode .stat-card-homepass .stat-card-number,
[data-theme="dark"] .stat-card-homepass .stat-card-number {
    color: #f472b6;
}

body.dark-mode .stat-card-homepass .stat-card-icon,
.dark-mode .stat-card-homepass .stat-card-icon,
[data-theme="dark"] .stat-card-homepass .stat-card-icon {
    background: rgba(236, 72, 153, 0.2);
    color: #f472b6;
}

body.dark-mode .modal-header-homepass,
.dark-mode .modal-header-homepass,
[data-theme="dark"] .modal-header-homepass {
    background: linear-gradient(135deg, #db2777 0%, #be185d 100%) !important;
}
/* Button Remap Location Homepass - Ungu */
.btn-remap-location-homepass {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    border-color: #8b5cf6 !important;
}

.btn-remap-location-homepass:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    border-color: #7c3aed !important;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4) !important;
}
/* ==================== ROUTER MODAL & BUTTON STYLING ==================== */

/* Modal Header Router - Biru */
.modal-header-router {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
}

.modal-header-router h4 {
    color: white !important;
}

.modal-header-router .modal-close {
    color: white !important;
}

.modal-header-router .modal-close:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Button Simpan Router - Biru */
.btn-router {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    color: white !important;
    border: none !important;
}

.btn-router:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%) !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4) !important;
}

/* Button Remap Location Router - Biru */
.btn-remap-location-router {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    border-color: #6366f1 !important;
}

.btn-remap-location-router:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%) !important;
    border-color: #4f46e5 !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4) !important;
}

/* Dark Mode Router */
body.dark-mode .modal-header-router,
.dark-mode .modal-header-router,
[data-theme="dark"] .modal-header-router {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%) !important;
}

body.dark-mode .btn-router,
.dark-mode .btn-router,
[data-theme="dark"] .btn-router {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%) !important;
}
/* Input Readonly - Support Dark Mode */
.input-readonly {
    background-color: #f3f4f6 !important;
    cursor: not-allowed !important;
}

body.dark-mode .input-readonly,
.dark-mode .input-readonly,
[data-theme="dark"] .input-readonly {
    background-color: #374151 !important;
    color: #e5e7eb !important;
    border-color: #4b5563 !important;
}
/* ==================== STATS GRID RESPONSIVE ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

/* Desktop Large (< 1400px) - 4 kolom */
@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet (< 992px) - 3 kolom */
@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet Small (< 768px) - 1 kolom vertikal */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}
/* ==================== MULTI-SLOT ODC STYLING ==================== */

/* Box Mode Options (Radio Button Style) */
.box-mode-options {
    display: flex;
    gap: 15px;
}

.box-mode-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.box-mode-option:hover {
    border-color: #10b981;
    background: #f0fdf4;
}

.box-mode-option.active {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.box-mode-option input[type="radio"] {
    display: none;
}

.box-mode-option i {
    font-size: 24px;
    color: #6b7280;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.box-mode-option.active i {
    color: #10b981;
}

.box-mode-option span {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.box-mode-option small {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}

.box-mode-option.active span {
    color: #059669;
}

/* Box Info Summary */
.box-info-summary {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #d1fae5;
}

.box-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: #374151;
}

.box-info-item i {
    color: #10b981;
    width: 20px;
    text-align: center;
}

.box-info-stats {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #d1fae5;
}

.box-info-stats .stat-item {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: 8px;
}

.box-info-stats .stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #10b981;
}

.box-info-stats .stat-value.text-success {
    color: #059669;
}

.box-info-stats .stat-label {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
}

/* Slots Accordion */
.slots-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.slot-accordion-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: white;
}

.slot-accordion-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slot-accordion-header:hover {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.slot-accordion-header.active {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.slot-number-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    margin-right: 12px;
}

.slot-info {
    flex: 1;
}

.slot-info .slot-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
}

.slot-info .slot-meta {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.slot-info .slot-meta .port-used {
    color: #f59e0b;
}

.slot-info .slot-meta .port-available {
    color: #10b981;
}

.slot-accordion-actions {
    display: flex;
    gap: 8px;
}

.slot-accordion-actions .btn-slot-action {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.slot-accordion-actions .btn-slot-edit {
    background: #dbeafe;
    color: #3b82f6;
}

.slot-accordion-actions .btn-slot-edit:hover {
    background: #3b82f6;
    color: white;
}

.slot-accordion-actions .btn-slot-delete {
    background: #fee2e2;
    color: #ef4444;
}

.slot-accordion-actions .btn-slot-delete:hover {
    background: #ef4444;
    color: white;
}

.slot-accordion-toggle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.slot-accordion-header.active .slot-accordion-toggle {
    transform: rotate(180deg);
}

.slot-accordion-body {
    display: none;
    padding: 15px;
    background: #fafafa;
    border-top: 1px solid #e5e7eb;
}

.slot-accordion-body.active {
    display: block;
}

/* Port List dalam Accordion */
.slot-ports-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.slot-port-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.slot-port-item.used {
    border-color: #fcd34d;
    background: #fffbeb;
}

.slot-port-number {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    margin-right: 10px;
}

.slot-port-item.used .slot-port-number {
    background: #f59e0b;
    color: white;
}

.slot-port-label {
    flex: 1;
    font-size: 12px;
    color: #374151;
}

.slot-port-label.empty {
    color: #9ca3af;
    font-style: italic;
}

/* Slot Badge Info */
.slot-badge-info {
    text-align: center;
    margin-bottom: 15px;
}

.slot-badge {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

/* Parent Connection Info in Slot */
.slot-parent-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #eff6ff;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #3b82f6;
}

.slot-parent-info i {
    color: #3b82f6;
}

/* Modal Large untuk Box Detail */
.modal-content.modal-lg {
    max-width: 700px;
}

/* Popup Button Success (Tambah Slot) */
.popup-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
}

.popup-btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
}

/* Dark Mode Support */
body.dark-mode .box-mode-option,
.dark-mode .box-mode-option,
[data-theme="dark"] .box-mode-option {
    border-color: #475569;
    background: #1e293b;
}

body.dark-mode .box-mode-option:hover,
.dark-mode .box-mode-option:hover,
[data-theme="dark"] .box-mode-option:hover {
    border-color: #10b981;
    background: #1e3a3a;
}

body.dark-mode .box-mode-option.active,
.dark-mode .box-mode-option.active,
[data-theme="dark"] .box-mode-option.active {
    border-color: #10b981;
    background: linear-gradient(135deg, #1e3a3a 0%, #134e4a 100%);
}

body.dark-mode .box-mode-option i,
.dark-mode .box-mode-option i,
[data-theme="dark"] .box-mode-option i {
    color: #94a3b8;
}

body.dark-mode .box-mode-option span,
.dark-mode .box-mode-option span,
[data-theme="dark"] .box-mode-option span {
    color: #e2e8f0;
}

body.dark-mode .box-info-summary,
.dark-mode .box-info-summary,
[data-theme="dark"] .box-info-summary {
    background: linear-gradient(135deg, #1e3a3a 0%, #134e4a 100%);
    border-color: #065f46;
}

body.dark-mode .box-info-item,
.dark-mode .box-info-item,
[data-theme="dark"] .box-info-item {
    color: #e2e8f0;
}

body.dark-mode .box-info-item span,
.dark-mode .box-info-item span,
[data-theme="dark"] .box-info-item span {
    color: #e2e8f0;
}

body.dark-mode .box-info-item i,
.dark-mode .box-info-item i,
[data-theme="dark"] .box-info-item i {
    color: #34d399;
}

body.dark-mode .box-info-stats .stat-label,
.dark-mode .box-info-stats .stat-label,
[data-theme="dark"] .box-info-stats .stat-label {
    color: #94a3b8;
}

body.dark-mode .box-info-stats .stat-value,
.dark-mode .box-info-stats .stat-value,
[data-theme="dark"] .box-info-stats .stat-value {
    color: #f1f5f9;
}

body.dark-mode .box-info-stats .stat-item,
.dark-mode .box-info-stats .stat-item,
[data-theme="dark"] .box-info-stats .stat-item {
    background: #1e293b;
}

body.dark-mode .slot-accordion-item,
.dark-mode .slot-accordion-item,
[data-theme="dark"] .slot-accordion-item {
    border-color: #475569;
    background: #1e293b;
}

body.dark-mode .slot-accordion-header,
.dark-mode .slot-accordion-header,
[data-theme="dark"] .slot-accordion-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

body.dark-mode .slot-accordion-body,
.dark-mode .slot-accordion-body,
[data-theme="dark"] .slot-accordion-body {
    background: #0f172a;
}

body.dark-mode .slot-port-item,
.dark-mode .slot-port-item,
[data-theme="dark"] .slot-port-item {
    background: #1e293b;
    border-color: #475569;
}

body.dark-mode .slot-info .slot-name,
.dark-mode .slot-info .slot-name,
[data-theme="dark"] .slot-info .slot-name {
    color: #e2e8f0;
}

/* Responsive untuk Mobile */
@media (max-width: 768px) {
    .box-mode-options {
        flex-direction: column;
    }
    
    .box-info-stats {
        flex-wrap: wrap;
    }
    
    .box-info-stats .stat-item {
        flex: 0 0 calc(50% - 8px);
    }
    
    .slot-ports-list {
        grid-template-columns: 1fr;
    }
    
    .modal-content.modal-lg {
        max-width: 95%;
    }
}

.odc-slot-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #ef4444;
    color: white;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
/* ==================== MULTI-SLOT ODP STYLING ==================== */

/* Box Mode Options ODP */
.box-mode-options-odp .box-mode-option-odp:hover {
    border-color: #f59e0b;
    background: #fffbeb;
}

.box-mode-options-odp .box-mode-option-odp.active {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.box-mode-options-odp .box-mode-option-odp.active i {
    color: #f59e0b;
}

.box-mode-options-odp .box-mode-option-odp.active span {
    color: #d97706;
}

/* Box Info Summary ODP */
.box-info-summary-odp {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fcd34d;
}

.box-info-stats-odp .stat-value-odp {
    color: #f59e0b;
}

.text-warning {
    color: #d97706 !important;
}

/* Slot Accordion ODP */
.slot-accordion-item-odp {
    border-color: #fcd34d;
}

.slot-accordion-header-odp:hover {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.slot-accordion-header-odp.active {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.slot-number-badge-odp {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Port Items ODP */
.slot-port-item-odp.used {
    border-color: #f59e0b;
    background: #fffbeb;
}

.slot-port-item-odp.used .slot-port-number-odp {
    background: #f59e0b;
    color: white;
}

/* Slot Badge ODP */
.slot-badge-info-odp {
    text-align: center;
    margin-bottom: 15px;
}

.slot-badge-odp {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Parent Info ODP */
.slot-parent-info-odp {
    background: #fffbeb;
    color: #d97706;
}

.slot-parent-info-odp i {
    color: #f59e0b;
}

/* ODP Slot Badge (di marker) */
.odp-marker {
    position: relative;
}

.odp-slot-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #ef4444;
    color: white;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Popup Button Warning (Tambah Slot ODP) */
.popup-btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: white !important;
}

.popup-btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
}

/* Dark Mode Support ODP */
body.dark-mode .box-mode-options-odp .box-mode-option-odp.active,
.dark-mode .box-mode-options-odp .box-mode-option-odp.active,
[data-theme="dark"] .box-mode-options-odp .box-mode-option-odp.active {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
}

body.dark-mode .box-info-summary-odp,
.dark-mode .box-info-summary-odp,
[data-theme="dark"] .box-info-summary-odp {
    background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
    border-color: #b45309;
}

body.dark-mode .slot-accordion-header-odp.active,
.dark-mode .slot-accordion-header-odp.active,
[data-theme="dark"] .slot-accordion-header-odp.active {
    background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
}
/* ==================== SEARCH AUTOCOMPLETE STYLING ==================== */

/* Wrapper */
.search-autocomplete-wrapper {
    position: relative;
    z-index: 1100;
}

.search-autocomplete-wrapper .input-group {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.search-autocomplete-wrapper .form-control {
    border: none;
    padding: 12px 15px;
    font-size: 14px;
    height: auto;
}

.search-autocomplete-wrapper .form-control:focus {
    box-shadow: none;
    border-color: transparent;
}

.search-autocomplete-wrapper .input-group-addon {
    background: #f8fafc;
    border: none;
    padding: 12px 15px;
}

.search-autocomplete-wrapper .input-group-addon .fa {
    color: #64748b;
}

.search-autocomplete-wrapper .input-group-btn .btn {
    border: none;
    padding: 8px 12px;
    height: 100%;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-autocomplete-wrapper .input-group-btn #btnClearSearch {
    background: transparent;
    color: #94a3b8;
    font-size: 14px;
    padding: 8px 12px;
}

.search-autocomplete-wrapper .input-group-btn #btnClearSearch:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* Dropdown */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1100;
    margin-top: 2px;
}

.search-dropdown.active {
    display: block;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Kategori Header */
.search-category {
    padding: 8px 15px;
    background: #f1f5f9;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
}

.search-category i {
    font-size: 12px;
}

.search-category.category-router { color: #3b82f6; background: #eff6ff; }
.search-category.category-olt { color: #3b82f6; background: #eff6ff; }
.search-category.category-odc { color: #22c55e; background: #f0fdf4; }
.search-category.category-odp { color: #f59e0b; background: #fffbeb; }
.search-category.category-customer { color: #8b5cf6; background: #f5f3ff; }
.search-category.category-tiang { color: #78716c; background: #f5f5f4; }
.search-category.category-homepass { color: #ec4899; background: #fdf2f8; }

/* Item Hasil */
.search-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.15s ease;
}

.search-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s ease;
    background-color: transparent;
}

.search-item:hover,
.search-item.active {
    background-color: #f8fafc;
}

.search-item:not(:hover):not(.active) {
    background-color: transparent;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.search-item-icon.icon-router { background: #eff6ff; color: #3b82f6; }
.search-item-icon.icon-olt { background: #eff6ff; color: #3b82f6; }
.search-item-icon.icon-odc { background: #f0fdf4; color: #22c55e; }
.search-item-icon.icon-odp { background: #fffbeb; color: #f59e0b; }
.search-item-icon.icon-customer { background: #f5f3ff; color: #8b5cf6; }
.search-item-icon.icon-tiang { background: #f5f5f4; color: #78716c; }
.search-item-icon.icon-homepass { background: #fdf2f8; color: #ec4899; }

.search-item-content {
    flex: 1;
    min-width: 0;
}

.search-item-name {
    font-weight: 600;
    font-size: 13px;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item-name mark {
    background: #fef08a;
    color: #1e293b;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 600;
}

/* Dark Mode - Fix highlight mark color */
body.dark-mode .search-item-name mark,
.dark-mode .search-item-name mark,
[data-theme="dark"] .search-item-name mark {
    background: #ca8a04;
    color: #ffffff;
}

.search-item-meta {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.search-item-arrow {
    color: #cbd5e1;
    font-size: 12px;
}

.search-item:hover .search-item-arrow {
    color: #64748b;
    transform: translateX(3px);
    transition: transform 0.15s ease;
}

/* ==================== SEARCH ITEM CUSTOMER STATUS ==================== */
/* Badge Status Online/Offline */
.search-status-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    font-size: 8px;
}

.search-status-badge.status-online {
    color: #10b981;
}

.search-status-badge.status-offline {
    color: #ef4444;
}

.search-status-badge.status-isolir {
    color: #dc2626;
    font-size: 10px;
    margin-left: 5px;
}

/* Status badge untuk isolir yang masih connected (pink-ungu) */
.search-status-badge.status-isolir-connected {
    color: #a855f7;
}

/* Background Offline */
.search-item.search-item-offline {
    background-color: rgba(239, 68, 68, 0.08) !important;
}

.search-item.search-item-offline:hover {
    background-color: rgba(239, 68, 68, 0.15) !important;
}

/* Background Isolir (pink-ungu transparan) */
.search-item.search-item-isolir {
    background-color: rgba(168, 85, 247, 0.08) !important;
}

.search-item.search-item-isolir:hover {
    background-color: rgba(168, 85, 247, 0.15) !important;
}

/* Dark Mode - Search Status */
body.dark-mode .search-status-badge.status-online,
.dark-mode .search-status-badge.status-online,
[data-theme="dark"] .search-status-badge.status-online {
    color: #34d399;
}

body.dark-mode .search-status-badge.status-offline,
.dark-mode .search-status-badge.status-offline,
[data-theme="dark"] .search-status-badge.status-offline {
    color: #f87171;
}

body.dark-mode .search-status-badge.status-isolir,
.dark-mode .search-status-badge.status-isolir,
[data-theme="dark"] .search-status-badge.status-isolir {
    color: #f87171;
}

body.dark-mode .search-item.search-item-offline,
.dark-mode .search-item.search-item-offline,
[data-theme="dark"] .search-item.search-item-offline {
    background-color: rgba(239, 68, 68, 0.15) !important;
}

body.dark-mode .search-item.search-item-offline:hover,
.dark-mode .search-item.search-item-offline:hover,
[data-theme="dark"] .search-item.search-item-offline:hover {
    background-color: rgba(239, 68, 68, 0.25) !important;
}

/* Dark Mode - Search Isolir Connected */
body.dark-mode .search-status-badge.status-isolir-connected,
.dark-mode .search-status-badge.status-isolir-connected,
[data-theme="dark"] .search-status-badge.status-isolir-connected {
    color: #c4b5fd;
}

body.dark-mode .search-item.search-item-isolir,
.dark-mode .search-item.search-item-isolir,
[data-theme="dark"] .search-item.search-item-isolir {
    background-color: rgba(168, 85, 247, 0.15) !important;
}

body.dark-mode .search-item.search-item-isolir:hover,
.dark-mode .search-item.search-item-isolir:hover,
[data-theme="dark"] .search-item.search-item-isolir:hover {
    background-color: rgba(168, 85, 247, 0.25) !important;
}

/* Empty State */
.search-empty {
    padding: 30px 15px;
    text-align: center;
    color: #94a3b8;
}

.search-empty i {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.search-empty-text {
    font-size: 13px;
}

/* Loading State */
.search-loading {
    padding: 20px 15px;
    text-align: center;
    color: #64748b;
}

.search-loading i {
    margin-right: 8px;
}

/* Hint */
.search-hint {
    padding: 15px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
}

.search-hint i {
    margin-right: 5px;
}

/* Scrollbar */
.search-dropdown::-webkit-scrollbar {
    width: 6px;
}

.search-dropdown::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.search-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.search-dropdown::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Dark Mode */
body.dark-mode .search-autocomplete-wrapper .input-group,
.dark-mode .search-autocomplete-wrapper .input-group,
[data-theme="dark"] .search-autocomplete-wrapper .input-group {
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

body.dark-mode .search-autocomplete-wrapper .form-control,
.dark-mode .search-autocomplete-wrapper .form-control,
[data-theme="dark"] .search-autocomplete-wrapper .form-control {
    background: #1e293b;
    color: #e2e8f0;
}

body.dark-mode .search-autocomplete-wrapper .input-group-addon,
.dark-mode .search-autocomplete-wrapper .input-group-addon,
[data-theme="dark"] .search-autocomplete-wrapper .input-group-addon {
    background: #334155;
}

body.dark-mode .search-dropdown,
.dark-mode .search-dropdown,
[data-theme="dark"] .search-dropdown {
    background: #1e293b;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

body.dark-mode .search-category,
.dark-mode .search-category,
[data-theme="dark"] .search-category {
    background: #334155;
    border-color: #475569;
}

body.dark-mode .search-item,
.dark-mode .search-item,
[data-theme="dark"] .search-item {
    border-color: #334155;
}

/* Dark Mode - Search Items */
body.dark-mode .search-dropdown,
.dark-mode .search-dropdown,
[data-theme="dark"] .search-dropdown {
    background-color: #1e293b;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

body.dark-mode .search-item,
.dark-mode .search-item,
[data-theme="dark"] .search-item {
    border-color: #334155;
    background-color: transparent;
}

body.dark-mode .search-item:hover,
body.dark-mode .search-item.active,
.dark-mode .search-item:hover,
.dark-mode .search-item.active,
[data-theme="dark"] .search-item:hover,
[data-theme="dark"] .search-item.active {
    background-color: #334155;
}

body.dark-mode .search-item:not(:hover):not(.active),
.dark-mode .search-item:not(:hover):not(.active),
[data-theme="dark"] .search-item:not(:hover):not(.active) {
    background-color: transparent;
}

/* Dark Mode - Clear Button */
body.dark-mode .search-autocomplete-wrapper .input-group-btn #btnClearSearch,
.dark-mode .search-autocomplete-wrapper .input-group-btn #btnClearSearch,
[data-theme="dark"] .search-autocomplete-wrapper .input-group-btn #btnClearSearch {
    background: transparent;
    color: #94a3b8;
}

body.dark-mode .search-autocomplete-wrapper .input-group-btn #btnClearSearch:hover,
.dark-mode .search-autocomplete-wrapper .input-group-btn #btnClearSearch:hover,
[data-theme="dark"] .search-autocomplete-wrapper .input-group-btn #btnClearSearch:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

body.dark-mode .search-item-name,
.dark-mode .search-item-name,
[data-theme="dark"] .search-item-name {
    color: #e2e8f0;
}

body.dark-mode .search-item-meta,
.dark-mode .search-item-meta,
[data-theme="dark"] .search-item-meta {
    color: #94a3b8;
}
/* ==================== ICON COLORS PER MODAL ==================== */

/* ---------- OLT - UNGU ---------- */
#modalOltOverlay .form-section-header i,
#modalDetailOlt .form-section-header i {
    color: #8b5cf6 !important;
}

#modalOltOverlay .btn-remap-location,
#modalDetailOlt .btn-remap-location {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
}

#modalOltOverlay .btn-remap-location:hover,
#modalDetailOlt .btn-remap-location:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4) !important;
}

#modalOltOverlay .modal-header,
#modalDetailOlt .modal-header {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
}

#modalOltOverlay .modal-header h4,
#modalDetailOlt .modal-header h4 {
    color: white !important;
}

#modalOltOverlay .modal-header .modal-close,
#modalDetailOlt .modal-header .modal-close {
    color: white !important;
}

#modalOltOverlay .modal-header .modal-close:hover,
#modalDetailOlt .modal-header .modal-close:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Button Simpan OLT (Ungu) */
#modalOltOverlay .btn-primary,
#modalDetailOlt .btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    border: none !important;
}

#modalOltOverlay .btn-primary:hover,
#modalDetailOlt .btn-primary:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4) !important;
}

/* ---------- ODC - HIJAU ---------- */
#modalOdcOverlay .form-section-header i,
#modalDetailOdcOverlay .form-section-header i,
#modalDetailOdcBoxOverlay .form-section-header i {
    color: #22c55e !important;
}

/* ---------- ODP - ORANYE ---------- */
#modalOdpOverlay .form-section-header i,
#modalDetailOdpOverlay .form-section-header i,
#modalDetailOdpBoxOverlay .form-section-header i {
    color: #f59e0b !important;
}

/* ---------- TIANG - COKLAT ---------- */
#modalTiangOverlay .form-section-header i,
#modalDetailTiangOverlay .form-section-header i {
    color: #a16207 !important;
}

.btn-remap-location-tiang {
    background: linear-gradient(135deg, #a16207 0%, #854d0e 100%) !important;
}

.btn-remap-location-tiang:hover {
    background: linear-gradient(135deg, #854d0e 0%, #713f12 100%) !important;
    box-shadow: 0 4px 12px rgba(161, 98, 7, 0.4) !important;
}

.modal-header-tiang {
    background: linear-gradient(135deg, #a16207 0%, #854d0e 100%) !important;
}

/* ---------- HOMEPASS - PINK ---------- */
#modalHomepassOverlay .form-section-header i,
#modalDetailHomepassOverlay .form-section-header i {
    color: #ec4899 !important;
}

.btn-remap-location-homepass {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%) !important;
}

.btn-remap-location-homepass:hover {
    background: linear-gradient(135deg, #db2777 0%, #be185d 100%) !important;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4) !important;
}

.modal-header-homepass {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%) !important;
}

.modal-header-homepass h4 {
    color: white !important;
}

.modal-header-homepass .modal-close {
    color: white !important;
}

.modal-header-homepass .modal-close:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* ---------- KABEL - ABU-ABU ---------- */
#modalKabelOverlay .form-section-header i,
#modalDetailKabelOverlay .form-section-header i {
    color: #64748b !important;
}

.modal-header-kabel {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
}

.modal-header-kabel h4 {
    color: white !important;
}

.modal-header-kabel .modal-close {
    color: white !important;
}

.modal-header-kabel .modal-close:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* ---------- ROUTER - BIRU ---------- */
#modalDetailRouterOverlay .form-section-header i {
    color: #6366f1 !important;
}

.btn-remap-location-router {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
}

.btn-remap-location-router:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4) !important;
}

.modal-header-router {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
}

.modal-header-router h4 {
    color: white !important;
}

.modal-header-router .modal-close {
    color: white !important;
}

.modal-header-router .modal-close:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* ==================== DARK MODE - ICON COLORS PER MODAL ==================== */

/* OLT - Ungu */
body.dark-mode #modalOltOverlay .form-section-header i,
body.dark-mode #modalDetailOlt .form-section-header i,
.dark-mode #modalOltOverlay .form-section-header i,
.dark-mode #modalDetailOlt .form-section-header i,
[data-theme="dark"] #modalOltOverlay .form-section-header i,
[data-theme="dark"] #modalDetailOlt .form-section-header i {
    color: #a78bfa !important;
}

body.dark-mode #modalOltOverlay .modal-header,
body.dark-mode #modalDetailOlt .modal-header,
.dark-mode #modalOltOverlay .modal-header,
.dark-mode #modalDetailOlt .modal-header,
[data-theme="dark"] #modalOltOverlay .modal-header,
[data-theme="dark"] #modalDetailOlt .modal-header {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
}

/* ODC - Hijau */
body.dark-mode #modalOdcOverlay .form-section-header i,
body.dark-mode #modalDetailOdcOverlay .form-section-header i,
body.dark-mode #modalDetailOdcBoxOverlay .form-section-header i,
.dark-mode #modalOdcOverlay .form-section-header i,
.dark-mode #modalDetailOdcOverlay .form-section-header i,
.dark-mode #modalDetailOdcBoxOverlay .form-section-header i,
[data-theme="dark"] #modalOdcOverlay .form-section-header i,
[data-theme="dark"] #modalDetailOdcOverlay .form-section-header i,
[data-theme="dark"] #modalDetailOdcBoxOverlay .form-section-header i {
    color: #4ade80 !important;
}

/* ODP - Oranye */
body.dark-mode #modalOdpOverlay .form-section-header i,
body.dark-mode #modalDetailOdpOverlay .form-section-header i,
body.dark-mode #modalDetailOdpBoxOverlay .form-section-header i,
.dark-mode #modalOdpOverlay .form-section-header i,
.dark-mode #modalDetailOdpOverlay .form-section-header i,
.dark-mode #modalDetailOdpBoxOverlay .form-section-header i,
[data-theme="dark"] #modalOdpOverlay .form-section-header i,
[data-theme="dark"] #modalDetailOdpOverlay .form-section-header i,
[data-theme="dark"] #modalDetailOdpBoxOverlay .form-section-header i {
    color: #fbbf24 !important;
}

/* Tiang - Coklat */
body.dark-mode #modalTiangOverlay .form-section-header i,
body.dark-mode #modalDetailTiangOverlay .form-section-header i,
.dark-mode #modalTiangOverlay .form-section-header i,
.dark-mode #modalDetailTiangOverlay .form-section-header i,
[data-theme="dark"] #modalTiangOverlay .form-section-header i,
[data-theme="dark"] #modalDetailTiangOverlay .form-section-header i {
    color: #d97706 !important;
}

body.dark-mode .btn-remap-location-tiang,
.dark-mode .btn-remap-location-tiang,
[data-theme="dark"] .btn-remap-location-tiang {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
}

body.dark-mode .btn-remap-location-tiang:hover,
.dark-mode .btn-remap-location-tiang:hover,
[data-theme="dark"] .btn-remap-location-tiang:hover {
    background: linear-gradient(135deg, #b45309 0%, #92400e 100%) !important;
}

body.dark-mode .modal-header-tiang,
.dark-mode .modal-header-tiang,
[data-theme="dark"] .modal-header-tiang {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
}

/* Homepass - Pink */
body.dark-mode #modalHomepassOverlay .form-section-header i,
body.dark-mode #modalDetailHomepassOverlay .form-section-header i,
.dark-mode #modalHomepassOverlay .form-section-header i,
.dark-mode #modalDetailHomepassOverlay .form-section-header i,
[data-theme="dark"] #modalHomepassOverlay .form-section-header i,
[data-theme="dark"] #modalDetailHomepassOverlay .form-section-header i {
    color: #f472b6 !important;
}

body.dark-mode .btn-remap-location-homepass,
.dark-mode .btn-remap-location-homepass,
[data-theme="dark"] .btn-remap-location-homepass {
    background: linear-gradient(135deg, #db2777 0%, #be185d 100%) !important;
}

body.dark-mode .btn-remap-location-homepass:hover,
.dark-mode .btn-remap-location-homepass:hover,
[data-theme="dark"] .btn-remap-location-homepass:hover {
    background: linear-gradient(135deg, #be185d 0%, #9d174d 100%) !important;
}

body.dark-mode .modal-header-homepass,
.dark-mode .modal-header-homepass,
[data-theme="dark"] .modal-header-homepass {
    background: linear-gradient(135deg, #db2777 0%, #be185d 100%) !important;
}

/* Kabel - Abu-abu */
body.dark-mode #modalKabelOverlay .form-section-header i,
body.dark-mode #modalDetailKabelOverlay .form-section-header i,
.dark-mode #modalKabelOverlay .form-section-header i,
.dark-mode #modalDetailKabelOverlay .form-section-header i,
[data-theme="dark"] #modalKabelOverlay .form-section-header i,
[data-theme="dark"] #modalDetailKabelOverlay .form-section-header i {
    color: #94a3b8 !important;
}

body.dark-mode .modal-header-kabel,
.dark-mode .modal-header-kabel,
[data-theme="dark"] .modal-header-kabel {
    background: linear-gradient(135deg, #475569 0%, #334155 100%) !important;
}

/* Router - Biru (Dark Mode) */
body.dark-mode #modalDetailRouterOverlay .form-section-header i,
.dark-mode #modalDetailRouterOverlay .form-section-header i,
[data-theme="dark"] #modalDetailRouterOverlay .form-section-header i {
    color: #a5b4fc !important;
}

body.dark-mode .btn-remap-location-router,
.dark-mode .btn-remap-location-router,
[data-theme="dark"] .btn-remap-location-router {
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%) !important;
}

body.dark-mode .btn-remap-location-router:hover,
.dark-mode .btn-remap-location-router:hover,
[data-theme="dark"] .btn-remap-location-router:hover {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
}

body.dark-mode .modal-header-router,
.dark-mode .modal-header-router,
[data-theme="dark"] .modal-header-router {
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%) !important;
}

/* ==================== KABEL OFFLINE BLINK ANIMATION ==================== */
.kabel-offline-blink {
    animation: kabelOfflineBlink 1s ease-in-out infinite;
}

@keyframes kabelOfflineBlink {
    0%, 100% {
        stroke-opacity: 1;
        stroke: #ef4444;
    }
    50% {
        stroke-opacity: 0.3;
        stroke: #ef4444;
    }
}

/* ==================== KABEL ISOLIR BLINK ANIMATION ==================== */
.kabel-isolir-blink {
    animation: kabelIsolirBlink 1s ease-in-out infinite;
}

@keyframes kabelIsolirBlink {
    0%, 100% {
        stroke-opacity: 1;
        stroke: #a855f7;
    }
    50% {
        stroke-opacity: 0.3;
        stroke: #a855f7;
    }
}

/* ==================== KABEL FLOW ANIMATION ==================== */
.kabel-flow-animation {
    stroke-dasharray: 10, 5;
    animation: kabelFlow 1s linear infinite;
}

@keyframes kabelFlow {
    0% {
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dashoffset: -15;
    }
}

/* ==================== POPUP CATEGORY STYLING ==================== */
.popup-category {
    font-size: 11px;
    font-weight: 600;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 0 4px 0;
    margin-top: 8px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 6px;
}

.popup-category:first-child {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
}

.popup-category i {
    font-size: 12px;
    color: #6366f1;
}

/* Dark Mode - Popup Category */
body.dark-mode .popup-category,
.dark-mode .popup-category,
[data-theme="dark"] .popup-category {
    color: #a5b4fc;
    border-top-color: #374151;
}

body.dark-mode .popup-category i,
.dark-mode .popup-category i,
[data-theme="dark"] .popup-category i {
    color: #a5b4fc;
}

/* ==================== SAMBUNGAN KABEL MARKER ==================== */
.sambungan-marker-container {
    background: transparent !important;
    border: none !important;
}

.sambungan-marker {
    width: 12px;
    height: 12px;
    background: #f59e0b;
    border: 2px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.sambungan-marker:hover {
    transform: scale(1.3);
    background: #d97706;
}

.sambungan-marker i {
    display: none;
}

/* Animasi pulse untuk sambungan */
.sambungan-marker::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #f59e0b;
    opacity: 0;
    animation: sambunganPulse 2s ease-out infinite;
}

@keyframes sambunganPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Dark Mode - Sambungan Marker */
body.dark-mode .sambungan-marker,
.dark-mode .sambungan-marker,
[data-theme="dark"] .sambungan-marker {
    border-color: #1f2937;
}

/* ==================== KABEL SELECTION POPUP ==================== */
.kabel-selection-popup-container .leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
}

.kabel-selection-popup-container .leaflet-popup-content {
    margin: 0;
    width: 250px !important;
}

.kabel-selection-popup {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.kabel-selection-header {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    padding: 10px 12px;
    font-weight: 600;
    font-size: 13px;
}

.kabel-selection-header i {
    margin-right: 6px;
}

.kabel-selection-list {
    max-height: 200px;
    overflow-y: auto;
    background: #ffffff;
}

.kabel-selection-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.2s;
    font-size: 12px;
    background: #ffffff;
}

.kabel-selection-item:last-child {
    border-bottom: none;
}

.kabel-selection-item:hover {
    background: #f3f4f6;
}

.kabel-selection-item i {
    color: #78716c;
    margin-right: 6px;
}

.kabel-selection-name {
    font-weight: 500;
    color: #374151;
}

.kabel-selection-length {
    color: #6b7280;
    margin-left: 4px;
}

.kabel-badge-online {
    background: #10b981;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    margin-left: 6px;
}

.kabel-badge-isolir {
    background: #a855f7;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    margin-left: 6px;
}

.kabel-badge-offline {
    background: #ef4444;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    margin-left: 6px;
}

.kabel-status-online {
    border-left: 3px solid #10b981;
}

.kabel-status-isolir {
    border-left: 3px solid #a855f7;
}

.kabel-status-offline {
    border-left: 3px solid #ef4444;
}

/* Dark Mode - Kabel Selection Popup */
body.dark-mode .kabel-selection-popup-container .leaflet-popup-content-wrapper,
.dark-mode .kabel-selection-popup-container .leaflet-popup-content-wrapper,
[data-theme="dark"] .kabel-selection-popup-container .leaflet-popup-content-wrapper {
    background: #1f2937;
}

body.dark-mode .kabel-selection-header,
.dark-mode .kabel-selection-header,
[data-theme="dark"] .kabel-selection-header {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
}

body.dark-mode .kabel-selection-list,
.dark-mode .kabel-selection-list,
[data-theme="dark"] .kabel-selection-list {
    background: #1f2937;
}

body.dark-mode .kabel-selection-item,
.dark-mode .kabel-selection-item,
[data-theme="dark"] .kabel-selection-item {
    background: #1f2937;
    border-bottom-color: #374151;
}

body.dark-mode .kabel-selection-item:hover,
.dark-mode .kabel-selection-item:hover,
[data-theme="dark"] .kabel-selection-item:hover {
    background: #374151;
}

body.dark-mode .kabel-selection-item i,
.dark-mode .kabel-selection-item i,
[data-theme="dark"] .kabel-selection-item i {
    color: #9ca3af;
}

body.dark-mode .kabel-selection-name,
.dark-mode .kabel-selection-name,
[data-theme="dark"] .kabel-selection-name {
    color: #e5e7eb;
}

body.dark-mode .kabel-selection-length,
.dark-mode .kabel-selection-length,
[data-theme="dark"] .kabel-selection-length {
    color: #9ca3af;
}

/* ==================== FOTO UPLOAD STYLING ==================== */

/* Container foto upload */
.foto-upload-container {
    width: 100%;
}

.foto-preview-wrapper {
    width: 100%;
    position: relative;
}

/* Placeholder saat belum ada foto */
.foto-placeholder {
    width: 100%;
    height: 150px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9fafb;
    gap: 8px;
}

.foto-placeholder:hover {
    border-color: #a16207;
    background: #fefce8;
}

.foto-placeholder i {
    font-size: 32px;
    color: #9ca3af;
    transition: color 0.3s ease;
}

.foto-placeholder:hover i {
    color: #a16207;
}

.foto-placeholder span {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

/* Preview foto */
.foto-preview {
    width: 100%;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.foto-preview img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.foto-preview-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
}

.btn-foto-change,
.btn-foto-remove {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-foto-change {
    background: rgba(255, 255, 255, 0.95);
    color: #374151;
}

.btn-foto-change:hover {
    background: #ffffff;
    transform: scale(1.05);
}

.btn-foto-remove {
    background: rgba(239, 68, 68, 0.95);
    color: white;
}

.btn-foto-remove:hover {
    background: #ef4444;
    transform: scale(1.05);
}

/* ==================== POPUP FOTO STYLING ==================== */

/* Container foto di popup marker */
.popup-foto-container {
    width: 100%;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.popup-foto-container::after {
    content: '\f065';
    font-family: FontAwesome;
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.popup-foto-container:hover::after {
    opacity: 1;
}

.popup-foto {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.popup-foto-container:hover .popup-foto {
    transform: scale(1.02);
}

/* ==================== FULLSCREEN FOTO (Custom Modal) ==================== */

.foto-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.foto-fullscreen-overlay.active {
    opacity: 1;
    visibility: visible;
}

.foto-fullscreen-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.foto-fullscreen-overlay.active .foto-fullscreen-container {
    transform: scale(1);
}

.foto-fullscreen-header {
    background: linear-gradient(135deg, #a16207 0%, #854d0e 100%);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.foto-fullscreen-title {
    color: white;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.foto-fullscreen-title i {
    font-size: 16px;
    flex-shrink: 0;
}

.foto-fullscreen-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}

.foto-fullscreen-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.foto-fullscreen-body {
    padding: 0;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1f2937;
}

.foto-fullscreen-img {
    max-width: 100%;
    max-height: calc(90vh - 60px);
    object-fit: contain;
    display: block;
}

/* ==================== DARK MODE - FOTO FULLSCREEN ==================== */

body.dark-mode .foto-fullscreen-container,
.dark-mode .foto-fullscreen-container,
[data-theme="dark"] .foto-fullscreen-container {
    background: #1f2937;
}

body.dark-mode .foto-fullscreen-header,
.dark-mode .foto-fullscreen-header,
[data-theme="dark"] .foto-fullscreen-header {
    background: linear-gradient(135deg, #854d0e 0%, #713f12 100%);
}

body.dark-mode .foto-fullscreen-body,
.dark-mode .foto-fullscreen-body,
[data-theme="dark"] .foto-fullscreen-body {
    background: #111827;
}

/* ==================== RESPONSIVE - FOTO FULLSCREEN ==================== */

@media (max-width: 768px) {
    .foto-fullscreen-overlay {
        padding: 10px;
    }
    
    .foto-fullscreen-container {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .foto-fullscreen-header {
        padding: 12px 14px;
    }
    
    .foto-fullscreen-title {
        font-size: 14px;
    }
    
    .foto-fullscreen-title i {
        font-size: 14px;
    }
    
    .foto-fullscreen-close {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }
    
    .foto-fullscreen-img {
        max-height: calc(95vh - 55px);
    }
}

@media (max-width: 480px) {
    .foto-fullscreen-overlay {
        padding: 5px;
    }
    
    .foto-fullscreen-container {
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 8px;
    }
    
    .foto-fullscreen-header {
        padding: 10px 12px;
        border-radius: 8px 8px 0 0;
    }
    
    .foto-fullscreen-title {
        font-size: 13px;
    }
    
    .foto-fullscreen-close {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    
    .foto-fullscreen-img {
        max-height: calc(100vh - 50px);
    }
}

/* ==================== DARK MODE - FOTO STYLING ==================== */

body.dark-mode .foto-placeholder,
.dark-mode .foto-placeholder,
[data-theme="dark"] .foto-placeholder {
    border-color: #4b5563;
    background: #1f2937;
}

body.dark-mode .foto-placeholder:hover,
.dark-mode .foto-placeholder:hover,
[data-theme="dark"] .foto-placeholder:hover {
    border-color: #d97706;
    background: #292524;
}

body.dark-mode .foto-placeholder i,
.dark-mode .foto-placeholder i,
[data-theme="dark"] .foto-placeholder i {
    color: #6b7280;
}

body.dark-mode .foto-placeholder:hover i,
.dark-mode .foto-placeholder:hover i,
[data-theme="dark"] .foto-placeholder:hover i {
    color: #d97706;
}

body.dark-mode .foto-placeholder span,
.dark-mode .foto-placeholder span,
[data-theme="dark"] .foto-placeholder span {
    color: #9ca3af;
}

body.dark-mode .foto-preview,
.dark-mode .foto-preview,
[data-theme="dark"] .foto-preview {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .btn-foto-change,
.dark-mode .btn-foto-change,
[data-theme="dark"] .btn-foto-change {
    background: rgba(31, 41, 55, 0.95);
    color: #e5e7eb;
}

body.dark-mode .btn-foto-change:hover,
.dark-mode .btn-foto-change:hover,
[data-theme="dark"] .btn-foto-change:hover {
    background: #374151;
}

/* ==================== RESPONSIVE - FOTO ==================== */

@media (max-width: 768px) {
    .foto-placeholder {
        height: 130px;
    }
    
    .foto-placeholder i {
        font-size: 28px;
    }
    
    .foto-placeholder span {
        font-size: 12px;
    }
    
    .foto-preview img {
        height: 150px;
    }
    
    .btn-foto-change,
    .btn-foto-remove {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
    
    .popup-foto {
        height: 100px;
    }
}

@media (max-width: 480px) {
    .foto-placeholder {
        height: 120px;
    }
    
    .foto-placeholder i {
        font-size: 24px;
    }
    
    .foto-placeholder span {
        font-size: 11px;
    }
    
    .foto-preview img {
        height: 130px;
    }
    
    .btn-foto-change,
    .btn-foto-remove {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .popup-foto {
        height: 90px;
    }
    
    .popup-foto-container::after {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
}
/* ==================== FULLSCREEN FOTO ODC (Warna Hijau) ==================== */

.foto-fullscreen-header-odc {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

/* ==================== FULLSCREEN FOTO ODP (Warna Orange) ==================== */

.foto-fullscreen-header-odp {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

/* ==================== DARK MODE ==================== */

body.dark-mode .foto-fullscreen-header-odc,
.dark-mode .foto-fullscreen-header-odc,
[data-theme="dark"] .foto-fullscreen-header-odc {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
}

body.dark-mode .foto-fullscreen-header-odp,
.dark-mode .foto-fullscreen-header-odp,
[data-theme="dark"] .foto-fullscreen-header-odp {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
}
/* ==================== FULLSCREEN FOTO HOMEPASS (Warna Ungu) ==================== */

.foto-fullscreen-header-homepass {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
}

/* ==================== DARK MODE ==================== */

body.dark-mode .foto-fullscreen-header-homepass,
.dark-mode .foto-fullscreen-header-homepass,
[data-theme="dark"] .foto-fullscreen-header-homepass {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
}
/* Fullscreen header untuk Customer - berdasarkan status */
/* Online - Cyan */
.foto-fullscreen-header-customer-online {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
}

/* Isolir (aktif/konek) - Ungu/Pink */
.foto-fullscreen-header-customer-isolir {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%) !important;
}

/* Offline / Off_Isolir - Merah */
.foto-fullscreen-header-customer-offline {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

/* ==================== POPUP FOTO SAMBUNGAN KABEL ==================== */

/* SweetAlert harus di depan popup sambungan */
.swal2-container {
    z-index: 20000 !important;
}

.popup-foto-sambungan-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-foto-sambungan-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-foto-sambungan-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.popup-foto-sambungan-overlay.active .popup-foto-sambungan-container {
    transform: scale(1) translateY(0);
}

.popup-foto-sambungan-header {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: #ffffff;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.popup-foto-sambungan-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.popup-foto-sambungan-title i {
    font-size: 14px;
}

.popup-foto-sambungan-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.popup-foto-sambungan-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.popup-foto-sambungan-body {
    padding: 20px;
}

.popup-foto-sambungan-info {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
    margin-bottom: 15px;
    border-left: 3px solid #78716c;
}

.popup-foto-sambungan-info-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #374151;
    margin-bottom: 6px;
}

.popup-foto-sambungan-info-row:last-child {
    margin-bottom: 0;
}

.popup-foto-sambungan-info-row i {
    color: #6b7280;
    width: 14px;
    text-align: center;
    margin-top: 2px;
}

.popup-foto-sambungan-section {
    margin-bottom: 15px;
}

.popup-foto-sambungan-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.popup-foto-sambungan-label i {
    color: #6b7280;
}

.foto-sambungan-wrapper {
    width: 100%;
}

.foto-sambungan-placeholder {
    width: 100%;
    height: 150px;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.foto-sambungan-placeholder:hover {
    background: #fef3c7;
    border-color: #f59e0b;
}

.foto-sambungan-placeholder i {
    font-size: 32px;
    color: #9ca3af;
}

.foto-sambungan-placeholder:hover i {
    color: #f59e0b;
}

.foto-sambungan-placeholder span {
    font-size: 13px;
    color: #6b7280;
}

.foto-sambungan-placeholder:hover span {
    color: #92400e;
}

.foto-sambungan-preview {
    width: 100%;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.foto-sambungan-preview img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: all 0.3s ease;
}

.foto-sambungan-preview img:hover {
    opacity: 0.9;
}

.foto-sambungan-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
}

.btn-foto-sambungan-change,
.btn-foto-sambungan-remove {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-foto-sambungan-change {
    background: #3b82f6;
    color: #ffffff;
}

.btn-foto-sambungan-change:hover {
    background: #2563eb;
    transform: scale(1.1);
}

.btn-foto-sambungan-remove {
    background: #ef4444;
    color: #ffffff;
}

.btn-foto-sambungan-remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Fullscreen header untuk sambungan */
.foto-fullscreen-header-sambungan {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
}

/* Dark Mode Support */
body.dark-mode .popup-foto-sambungan-container,
.dark-mode .popup-foto-sambungan-container,
[data-theme="dark"] .popup-foto-sambungan-container {
    background: #1f2937;
}

body.dark-mode .popup-foto-sambungan-header,
.dark-mode .popup-foto-sambungan-header,
[data-theme="dark"] .popup-foto-sambungan-header {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: #ffffff;
}

body.dark-mode .popup-foto-sambungan-title,
.dark-mode .popup-foto-sambungan-title,
[data-theme="dark"] .popup-foto-sambungan-title {
    color: #ffffff;
}

body.dark-mode .popup-foto-sambungan-title i,
.dark-mode .popup-foto-sambungan-title i,
[data-theme="dark"] .popup-foto-sambungan-title i {
    color: #ffffff;
}

body.dark-mode .popup-foto-sambungan-close,
.dark-mode .popup-foto-sambungan-close,
[data-theme="dark"] .popup-foto-sambungan-close {
    color: #ffffff;
}

body.dark-mode .popup-foto-sambungan-info,
.dark-mode .popup-foto-sambungan-info,
[data-theme="dark"] .popup-foto-sambungan-info {
    background: #1e293b;
    border-left-color: #78716c;
}

body.dark-mode .popup-foto-sambungan-info-row,
.dark-mode .popup-foto-sambungan-info-row,
[data-theme="dark"] .popup-foto-sambungan-info-row {
    color: #f3f4f6;
}

body.dark-mode .popup-foto-sambungan-info-row i,
.dark-mode .popup-foto-sambungan-info-row i,
[data-theme="dark"] .popup-foto-sambungan-info-row i {
    color: #9ca3af;
}

body.dark-mode .popup-foto-sambungan-info-row strong,
.dark-mode .popup-foto-sambungan-info-row strong,
[data-theme="dark"] .popup-foto-sambungan-info-row strong {
    color: #ffffff;
}

body.dark-mode .popup-foto-sambungan-info-row span,
.dark-mode .popup-foto-sambungan-info-row span,
[data-theme="dark"] .popup-foto-sambungan-info-row span {
    color: #f3f4f6;
}

body.dark-mode .popup-foto-sambungan-label,
.dark-mode .popup-foto-sambungan-label,
[data-theme="dark"] .popup-foto-sambungan-label {
    color: #e5e7eb;
}

body.dark-mode .foto-sambungan-placeholder,
.dark-mode .foto-sambungan-placeholder,
[data-theme="dark"] .foto-sambungan-placeholder {
    background: #374151;
    border-color: #4b5563;
}

body.dark-mode .foto-sambungan-placeholder:hover,
.dark-mode .foto-sambungan-placeholder:hover,
[data-theme="dark"] .foto-sambungan-placeholder:hover {
    background: #4b5563;
    border-color: #6b7280;
}

body.dark-mode .foto-sambungan-placeholder i,
.dark-mode .foto-sambungan-placeholder i,
[data-theme="dark"] .foto-sambungan-placeholder i {
    color: #6b7280;
}

body.dark-mode .foto-sambungan-placeholder span,
.dark-mode .foto-sambungan-placeholder span,
[data-theme="dark"] .foto-sambungan-placeholder span {
    color: #9ca3af;
}

body.dark-mode .foto-sambungan-preview,
.dark-mode .foto-sambungan-preview,
[data-theme="dark"] .foto-sambungan-preview {
    background: #374151;
}

/* Responsive */
@media (max-width: 480px) {
    .popup-foto-sambungan-container {
        width: 95%;
        max-width: none;
        margin: 10px;
    }
    
    .popup-foto-sambungan-header {
        padding: 12px 15px;
    }
    
    .popup-foto-sambungan-title {
        font-size: 14px;
    }
    
    .popup-foto-sambungan-body {
        padding: 15px;
    }
    
    .foto-sambungan-placeholder {
        height: 150px;
    }
    
    .foto-sambungan-preview img {
        max-height: 200px;
    }
}
.popup-foto-sambungan-rute {
    margin-top: 10px;
    margin-bottom: 15px;
}

.btn-foto-sambungan-rute {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 15px;
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-foto-sambungan-rute:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.btn-foto-sambungan-rute i {
    font-size: 14px;
}

/* Dark Mode */
body.dark-mode .btn-foto-sambungan-rute,
.dark-mode .btn-foto-sambungan-rute,
[data-theme="dark"] .btn-foto-sambungan-rute {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
}

body.dark-mode .btn-foto-sambungan-rute:hover,
.dark-mode .btn-foto-sambungan-rute:hover,
[data-theme="dark"] .btn-foto-sambungan-rute:hover {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}
.popup-sambungan-item-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.popup-sambungan-item-clickable:hover {
    background: #e5e7eb;
    transform: translateX(3px);
}

.sambungan-goto {
    margin-left: auto;
    color: #9ca3af;
    font-size: 10px;
    transition: all 0.2s ease;
}

.popup-sambungan-item-clickable:hover .sambungan-goto {
    color: #6b7280;
    transform: translateX(3px);
}

/* Dark Mode */
body.dark-mode .popup-sambungan-item-clickable:hover,
.dark-mode .popup-sambungan-item-clickable:hover,
[data-theme="dark"] .popup-sambungan-item-clickable:hover {
    background: #374151;
}

body.dark-mode .sambungan-goto,
.dark-mode .sambungan-goto,
[data-theme="dark"] .sambungan-goto {
    color: #6b7280;
}

body.dark-mode .popup-sambungan-item-clickable:hover .sambungan-goto,
.dark-mode .popup-sambungan-item-clickable:hover .sambungan-goto,
[data-theme="dark"] .popup-sambungan-item-clickable:hover .sambungan-goto {
    color: #9ca3af;
}
/* ================================================================
   FIX MODAL HOMEPASS — Layout & Mobile Responsive
   ================================================================ */

/* Pastikan label selalu di ATAS input di modal homepass */
#modalHomepassOverlay .form-group,
#modalDetailHomepassOverlay .form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
}

#modalHomepassOverlay .form-group label,
#modalDetailHomepassOverlay .form-group label {
    order: -1;
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 2px;
}

/* Input & select full width dalam modal */
#modalHomepassOverlay .bk-input,
#modalDetailHomepassOverlay .bk-input {
    width: 100%;
    box-sizing: border-box;
}

/* Footer tombol rapi di semua ukuran */
#modalHomepassOverlay .gcs-modal-footer {
    display: flex;
    gap: 10px;
    padding: 16px 22px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

#modalHomepassOverlay .gcs-modal-footer .bk-btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

/* Mobile responsive fix */
@media (max-width: 576px) {
    #modalHomepassOverlay .gcs-modal-card,
    #modalDetailHomepassOverlay .gcs-modal-card {
        margin: 0;
        border-radius: 16px 16px 0 0;
        max-height: 92vh;
        overflow-y: auto;
    }

    #modalHomepassOverlay .gcs-modal-footer {
        flex-direction: column-reverse;
        padding: 14px 16px 24px;
    }

    #modalHomepassOverlay .gcs-modal-footer .bk-btn {
        width: 100%;
        height: 44px;
        font-size: 14px;
    }
}