 .property-item.expanded {
        background: var(--hover-bg);
        border-left: 3px solid var(--accent-color);
    }.calendar-group {
      margin-top: 30px;
    } 

    .method-button.selected {
        border-bottom-right-radius: 0px !important;
        border-bottom-left-radius: 0px !important;
    }
    small.px-2 {
        display: none !important;
    }
    p.px-2 {
        font-size: 13px !important; 
    }
    .stopelem {
        display: flex; align-items: center; gap: 4px;
        margin-bottom: 12px;
    }
    .stopelem:hover > .drag-icon, .stopelem:hover > .remove-stop  {
        opacity: 1 !important;
        
    }
    .ui-datepicker-header {
        display: flex;
        font-size: 16px;
    }
    .ui-datepicker-calendar {
        margin-top: 10px;
    }
    .ui-datepicker-today > a {
         background: var(--accent-color);
        padding: 7px 11px;
        border-radius: 100%;
    }
    .route-stop {
        position: absolute;
        left: 2px;
        right: 2px;
        background: var(--accent-color);
        border-radius: 4px;
        z-index: 10;
        display: flex;
        font-size: 11px;
        color: var(--text-primary);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding: 0 4px;
    }
    .ui-datepicker-today:hover > a {
         background: var(--blue-accent) !important;
    }
    .ui-state-active {
        border: 1px solid;
        border-radius: 100%;
        border-color: var(--warning-color);
    }
    .ui-state-active:hover {
        border: 1px solid !important;
        border-radius: 100%;
        border-color: var(--warning-color) !important;
    }
    .ui-state-active:hover {
        border: 0px solid;
        border-radius: 100%;
        border-color: var(--warning-color);
    }
   
    [data-handler="selectDay"]:hover > a {
        background: var(--hover-bg);
        border-radius: 100%;
    }
    [data-handler="selectDay"] > a {
        width: 90%;
        display: flex;
        height: 90%;
        margin-top: auto;
        align-content: center;
        flex-wrap: wrap;
        justify-content: center;
    }
  
    .ui-state-default {
        text-decoration: none;  
        color: var(--text-primary);
    }
    [data-handler="selectDay"] {
        width: 36px;
        height: 36px;
        text-align: center;
        font-size: 13px;
    }
    [scope="col"] {
        font-size: 14px;
        text-align: center;
        height: 36px;
    }
  
    .ui-datepicker-title {
        margin-left: auto;
    }
    #ui-datepicker-div {
        background: var(--secondary-bg);
        padding: 10px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
    }
    .px-2 {
        color: white;
    }
    .calendar-group-title {
      margin-bottom: 8px;
      font-size: 16px;
    }
    .calendar-checkbox {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 6px;
      font-size: 13px;
      cursor: pointer;
    }
    .calendar-checkbox input[type="checkbox"] {
      appearance: none;
      width: 16px;
      height: 16px;
      border: 2px solid var(--border-color);
      border-radius: 3px;
      position: relative;
      cursor: pointer;
    }
    .calendar-checkbox input[type="checkbox"]:checked {
      background-color: var(--accent-color);
      border-color: var(--accent-color);
    }
    .calendar-checkbox input[type="checkbox"]:checked::after {
      content: '';
      position: absolute;
      top: 1px;
      left: 4px;
      width: 4px;
      height: 8px;
      border: solid white;
      border-width: 0 2px 2px 0;
      transform: rotate(45deg);
    }
    .modal-fullscreen-sm-down {
        display: none !important;
    }
    .fa-chevron-right {
        color: var(--accent-color) !important
    }
    .fa-chevron-left {
        color: var(--accent-color) !important
    }
    .bg-body-tertiary {
        background: transparent !important;
        color: var(--accent-color) !important;
    }   
    .bg-body {
        background-color: var(--secondary-bg) !important;
    }
    .wc-week-view  {
        padding-left: 50px !important;
        overflow-y: scroll !important;
        padding-top: 10px;
    }
    .wc-day-header {
        margin-bottom: 0px !important;
        padding-left: 0px !important;
    }
    .property-options {
        display: none;  
        padding-bottom: 5px
    }
    .wc-time-label {
        font-size: 13px;
    }
    .px-lg-5 {
        padding: 0px !important;
    }
    .wc-calendar-view-container {
        border: 0px !important;
    }
    .bi-calendar4, .bi-calendar-month, .bi-kanban, .bi-calendar-day{
        display: none !important;
    }
    .container-fluid {
        padding-right: 0px !important;
        border-radius: 0px !important;
    }
    .position-relative {
        cursor: unset !important;
    }
    .h4 {
        font-size: 18px;
    }
    .property-item.expanded .property-options {
        display: block;
        animation: slideDown 0.3s ease-out;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            max-height: 0;
            padding-top: 0;
            margin-top: 0;
        }
        to {
            opacity: 1;
            max-height: 200px;
            padding-top: 12px;
            margin-top: 12px;
        }
    }
    .red {
  background: rgba(255, 93, 93, 0.15) !important;
  color: #ff5d5d !important;
}

.green {
  background: rgba(93, 255, 124, 0.15) !important;
  color: #5dff7c !important;
}

.orange {
  background: rgba(255, 165, 93, 0.15) !important;
  color: #ffa55d !important;
}

.yellow {
  background: rgba(255, 235, 93, 0.15) !important;
  color: #ffeb5d !important;
}

.teal {
  background: rgba(93, 255, 212, 0.15) !important;
  color: #5dffd4 !important;
}

.purple {
  background: rgba(156, 93, 255, 0.15) !important;
  color: #9c5dff !important;
}

.pink {
  background: rgba(255, 93, 186, 0.15) !important;
  color: #ff5dba !important;
}

.blue {
  background: rgba(93, 124, 255, 0.15) !important;
  color: #5d7cff !important;
}
    .option-item {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 0;
        transition: all 0.2s ease;
        flex-wrap: wrap;
    }

    .option-item:last-child {
        border-bottom: none;
    }
    .map-choice:last-child {
        border-bottom-left-radius: 12px;
        border-bottom-right-radius: 12px;
    }

    .color-picker-wrapper {
        position: relative;
        width: 24px;
        height: 24px;
        border-radius: 4px;
        border: 2px solid var(--border-color);
        overflow: hidden;
        cursor: pointer;
        transition: all 0.2s ease;
        background: var(--primary-bg);
        flex-shrink: 0;
    }

    .color-picker-wrapper:hover {
        border-color: white;
        transform: scale(1.1);
        box-shadow: 0 0 0 2px rgba(93, 124, 255, 0.2);
    }

    .color-picker, .color-picker2 {
        width: 100%;
        height: 100%;
        border: none;
        cursor: pointer;
        opacity: 1;
        position: absolute;
    }

    .color-display {
        width: 100%;
        height: 100%;
        border-radius: 2px;
        pointer-events: none;
    }

    .option-label {
        font-size: 12px;
        font-weight: 500;
        color: var(--text-primary);
        flex-shrink: 0;
        max-width: 240px;
    }


    .option-actions {
        display: flex;
        gap: 8px;
        align-items: center;
    }

    .toggle-heatmap {
        width: 24px;
        height: 24px;
        border-radius: 4px;
        border: 1px solid var(--border-color);
        background: var(--primary-bg);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        position: relative;
    }

    .toggle-heatmap:hover {
        border-color: var(--accent-color);
        background: var(--hover-bg);
    }

    .toggle-heatmap.active {
        background: var(--success-color);
        border-color: var(--success-color);
    }

    .toggle-heatmap.active::after {
        content: '✓';
        color: white;
        font-size: 12px;
        font-weight: bold;
    }
    .multi-color-row {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        flex-wrap: wrap;
    }

    .color-group {
        display: flex;
        align-items: center;
        gap: 6px;
        flex: 0 0 auto;
        max-width: 300px;

    }

    .remove-heatmap {
        width: 24px;
        height: 24px;
        border-radius: 4px;
        border: 1px solid rgba(239, 68, 68, 0.3);
        background: rgba(239, 68, 68, 0.1);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        opacity: 0;
        transform: scale(0.8);
    }

    .option-item:hover .remove-heatmap {
        opacity: 1;
        transform: scale(1);
    }



   .fa-trash, .fa-pen, .fa-share-alt, .fa-eye, .fa-eye-slash{
        color: var(--text-secondary);
        transition: color 0.3s ease;
    }

    .delete-btn:hover > i, .filter-btn:hover > .fa-trash {
        color: #ef4444 !important;
        transition: color 0.3s ease;
    }

    .share-btn:hover > i, .edit-btn:hover > i {
        color: var(--text-primary);
        transition: color 0.3s ease;
    }
    
    

    .heatmap-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 8px;
        cursor: pointer;
    }

    .property-item.expanded .remove-heatmap-btn {
        display: flex;
    }



    
    .heatmap-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .expand-toggle {
    background: none;
    border: none;
    color: #5d7cff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    transition: all 0.3s ease;
    width: 100%;
    text-align: left;
}

    .expand-toggle i {
        font-size: 10px;
        color: var(--text-secondary);
        transition: transform 0.2s ease;
    }

    .property-item.expanded .expand-toggle i {
        transform: rotate(90deg);
    }

    .property-item.expanded .expand-toggle {
        background: var(--accent-color);
        border-color: var(--accent-color);
    }

    .property-item.expanded .expand-toggle i {
        color: white;
    }

    .range-inputs {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
    }

    .range-input {
        flex: 1;
        height: 24px;
        background: var(--primary-bg);
        border: 1px solid var(--border-color);
        border-radius: 4px;
        padding: 0 6px;
        font-size: 11px;
        color: var(--text-primary);
        text-align: center;
    }

    .range-input:focus {
        outline: none;
        border-color: var(--accent-color);
    }
    td {
        cursor: pointer !important;
    }
    .mapboxgl-ctrl-bottom-left {
        display: none !important;
    }
    .mapboxgl-ctrl.mapboxgl-ctrl-attrib {
        backdrop-filter: blur(10px);
        border-top-left-radius: 9px;
        background-color: hsla(0, 0%, 100%, 0.03)
    }
    .range-separator {
        color: var(--text-secondary);
        font-size: 11px;
        font-weight: 500;
    }       /*:root {
                --sidebar-width: 60px;
                --panel-width: 350px;
                --primary-bg: #3c4043;
                --secondary-bg: #2d3033;
                --accent-color: #5d7cff;
                --text-primary: #ffffff;
                --text-secondary: #9ca3af;
                --border-color: #4a4d52;
                --hover-bg: #484b50;
                --bright-hover: #5f646c;
                --success-color: #10b981;
                --warning-color: #f59e0b;
                  --blue-accent: #475dc0;
                --white-text: #ffffff;
                --gray-text: #9ca3af;
                --edge-color: #4a4d52;
                --hover-surface: #484b50;
                --green-status: #10b981;
                --orange-warning: #f59e0b;
            }*/
            :root {
    --sidebar-width: 60px;
    --panel-width: 350px;
    --primary-bg: #e1e1e1;
    --secondary-bg: #ffffff;
    --accent-color: #0d6efd;
    --text-primary: #1f1f1f;
    --text-secondary: #6b7280;
    --border-color: #d1d5db;
    --hover-bg: #e8ecf2;
    --bright-hover: #a7a7a7;
    --success-color: #059669;
    --warning-color: #ffa400;
    --blue-accent: #0d6efd;
    --white-text: #1f1f1f;
    --gray-text: #6b7280;
    --edge-color: #d1d5db;
    --hover-surface: #dfe3e8;
    --green-status: #059669;
    --orange-warning: #ffa400;
}


            * {
                margin: 0;
                padding: 0;
                box-sizing: border-box;
            }

            body {
                font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
                background: var(--primary-bg);
                color: var(--text-primary);
                overflow: hidden;
                height: 100vh;
            }

            .main-container {
                display: flex;
                height: 100vh;
                width: 100vw;
            }

            .sidebar {
                width: var(--sidebar-width);
                background: #2d3033;
                border-right: 1px solid #4a4d52;
                display: flex;
                flex-direction: column;
                align-items: center;
                padding: 20px 0;
                z-index: 1000;
                justify-content: space-between;
            }

            .nav-main {
                display: flex;
                flex-direction: column;
                align-items: center;
            }

            .nav-bottom {
                display: flex;
                flex-direction: column;
                align-items: center;
                gap: 12px;
            }

            .nav-item {
                width: 40px;
                height: 40px;
                margin: 8px 0;
                display: flex;
                align-items: center;
                justify-content: center;
                border-radius: 8px;
                cursor: pointer;
                transition: all 0.2s ease;
                position: relative;
                user-select: none;
            }

            .nav-item:hover {
                background: #484b50;
            }
            .gradient-legend {
                display: flex;
                justify-content: space-between;
                }
            .nav-item.active {
                background: var(--accent-color);
            }

            .nav-item i {
                font-size: 18px;
                color: #ffffff;
            }

            .nav-item.active i {
                color: white;
            }
            
            .nav-item .badge {
                position: absolute;
                top: -6px;
                right: -6px;
                background: #ff4757;
                color: white;
                border-radius: 50%;
                width: 18px;
                height: 18px;
                font-size: 10px;
                font-weight: 600;
                display: flex;
                align-items: center;
                justify-content: center;
                border: 2px solid var(--secondary-bg);
            }
            .gradient-controls {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }

    .gradient-picker {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        position: relative;
    }

    .gradient-picker:first-child {
        align-items: flex-start;
    }

    .gradient-picker:last-child {
        align-items: flex-end;
    }

    .gradient-picker input[type="color"] {
        width: 24px;
        height: 24px;
        border: 2px solid var(--border-color);
        border-radius: 4px;
        cursor: pointer;
        background: var(--primary-bg);
        transition: all 0.2s ease;
    }

    .gradient-picker input[type="color"]:hover {
        border-color: white;
        transform: scale(1.1);
        box-shadow: 0 0 0 2px rgba(93, 124, 255, 0.2);
    }
    .add-layer-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

        .add-layer-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(93, 124, 255, 0.4);
        }
         .territory-wrapper {
            width: 300px;
            margin: 0 auto;
            background: var(--secondary-bg);
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 4px 24px rgba(0,0,0,0.4);
            border: 1px solid var(--border-color);
        }
        
        
        .mode-toggle {
            display: flex;
            gap: 2px;
            background: var(--secondary-bg);
            padding: 2px;
            border-radius: 6px;
            border: 1px solid var(--border-color);
        }
        
        .toggle-btn {
            flex: 1;
            padding: 8px 6px;
            border: none;
            border-radius: 4px;
            font-size: 11px;
            font-weight: 500;
            transition: all 0.2s ease;
            background: transparent;
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
        }
        
        .toggle-btn.active {
            background: var(--accent-color);
            color: white;
            box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
        }
        
        .toggle-btn:hover:not(.active) {
            background: var(--hover-bg);
            color: var(--text-primary);
        }
        
        .territory-list {
            overflow-y: auto;
        }
        
      
        
        .territory-item.map-hidden > .territory-main{
            opacity: 0.6;
        }
        .territory-item.map-hidden {
            border-top-color: var(--secondary-bg);
            border-bottom-color: var(--secondary-bg);;
        }
        .territory-item.map-hidden:hover {
            border-top-color: var(--secondary-bg) !important;
            border-bottom-color: var(--secondary-bg) !important;
        }
        
        
        .territory-main {
            padding: 10px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            background-color: var(--secondary-bg);
            border-bottom-right-radius: 18px;
            cursor: pointer;
            
        }
        .territory-main:hover {
            background-color: var(--hover-bg);
            border-top-color: var(--hover-bg);
            border-bottom-color: var(--hover-bg);
        }
        .territory-main:hover > {
            background-color: var(--hover-bg);
            border-top-color: var(--hover-bg);
            border-bottom-color: var(--hover-bg);
        }
        
        .territory-row-1 {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 8px;
        }
        
        .territory-info {
            flex: 1;
            min-width: 0;
        }
        
        .territory-name {
            font-weight: 600;
            font-size: 14px;
            color: var(--text-primary);
            margin-bottom: 2px;
            line-height: 1.2;
        }
        
        .territory-hierarchy {
            font-size: 11px;
            color: var(--text-secondary);
            line-height: 1.2;
        }
        
        .territory-row-2 {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
        }
        
        .territory-metrics {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 11px;
        }
        
        .member-avatars {
            display: flex;
            gap: -2px;
        }
        
        .zone-editor-container {
            display: block;
            width: var(--zone-panel-width);
            height: 100vh;
            background: var(--dark-secondary);
            border-right: 1px solid var(--border-color);
            overflow-y: auto;
        }
                .method-selector {
                width: 100%;
                background: var(--secondary-bg);
                border: 0px solid var(--border-color);
                border-radius: 12px;
                margin-top: 16px;
        }

        .method-tabs {
            display: flex;
            overflow-x: hidden;
            border-top-right-radius: 8px;
            border-top-left-radius: 8px;
        }

        .method-button {
            flex: 1;
            min-width: 0;
            padding: 12px 8px;
            border: none;
            background: transparent;
            cursor: pointer;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 5px;
            font-size: 11px;
            color: var(--gray-text);
            border-bottom: 3px solid transparent;
            transition: all 0.3s ease;
            font-weight: 500;
            padding-top: 20px !important;
        }

        .method-button:hover {
            background: var(--hover-bg);
        }

        .method-button.selected {
            color: var(--accent-color);
            border-bottom-color: var(--accent-color);
            background: rgba(93, 124, 255, 0.1);
        }

        .method-button i {
            font-size: 16px;
        }

     @keyframes fadeSlideIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.method-panel {
    display: none;
    opacity: 0;
    padding: 16px;
    border-top: 2px solid var(--border-color);
}

.method-panel.visible {
    display: block;
    animation: fadeSlideIn 0.4s ease forwards;
}

        .panel-title {
            color: var(--white-text);
            font-size: 16px;
            font-weight: 600;
        }

        .panel-description {
            color: var(--gray-text);
            margin-bottom: 20px;
            font-size: 13px;
            line-height: 1.4;
        }

        .input-section {
            margin-bottom: 15px;
        }

        .input-label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: var(--white-text);
            font-size: 13px;
        }

        .input-field, .dropdown-field, .text-area-field {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            font-size: 13px;
            background: var(--primary-bg);
            color: var(--white-text);
            transition: all 0.2s ease;
        }

        .input-field:focus, .dropdown-field:focus, .text-area-field:focus {
            outline: none;
            border-color: var(--accent-color);
            box-shadow: 0 0 0 2px rgba(93, 124, 255, 0.2);
            border-bottom-left-radius: 0px;
            border-bottom-right-radius: 0px;
        }

        .input-field::placeholder {
            color: var(--gray-text);
        }

        .range-input {
            width: 100%;
            padding: 0;
            background: transparent;
            border: none;
        }

        .range-input::-webkit-slider-track {
            background: var(--border-color);
            height: 4px;
            border-radius: 2px;
        }

        .range-input::-webkit-slider-thumb {
            -webkit-appearance: none;
            background: var(--accent-color);
            height: 16px;
            width: 16px;
            border-radius: 50%;
            cursor: pointer;
        }

        .range-display {
            display: inline-block;
            margin-top: 5px;
            font-weight: 600;
            color: var(--accent-color);
            font-size: 12px;
        }

        .text-area-field {
            height: 80px;
            resize: vertical;
        }

        .primary-action-button {
            width: 100%;
            padding: 12px;
            background: var(--accent-color);
            color: white;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            transition: all 0.2s ease;
        }

        .primary-action-button:hover {
            background: var(--accent-color);
            transform: translateY(-1px);
        }

        .secondary-action-button {
            flex: 1;
            padding: 8px 12px;
            background: var(--hover-surface);
            color: var(--white-text);
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 11px;
            margin: 0 2px;
            transition: all 0.2s ease;
        }

        .secondary-action-button:hover:not(:disabled) {
            background: #5a5e64;
        }

        .secondary-action-button:disabled {
            background: #3a3d42;
            color: var(--gray-text);
            cursor: not-allowed;
        }

        .drawing-controls {
            display: flex;
            gap: 8px;
            margin-bottom: 15px;
        }

        .draw-button {
            flex: 2;
            margin-bottom: 0;
        }
        .drawing-controls .fas {
            color: white !important;
        }

        .draw-instructions {
            background: rgba(93, 124, 255, 0.1);
            border: 1px solid var(--accent-color);
            border-radius: 8px;
            padding: 15px;
            margin-top: 15px;
        }

        .instruction-content p {
            margin: 0 0 10px 0;
            font-size: 12px;
            color: var(--text-secondary);
        }

        .instruction-content p:last-of-type {
            margin-bottom: 15px;
        }

        .complete-button, .abort-button {
            padding: 8px 16px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 11px;
            margin-right: 8px;
            font-weight: 500;
            transition: all 0.2s ease;
        }

        .complete-button {
            background: var(--green-status);
            color: white;
        }

        .complete-button:hover {
            background: #0ea570;
        }

        .abort-button {
            background: #dc3545;
            color: white;
        }

        .abort-button:hover {
            background: #c82333;
        }

        .components-summary, .team-summary{
            padding-top: 20px;
            margin-top: 20px;
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: auto;
        }
        .team-panel-inline {
            overflow: auto;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        .team-panel-inline .team-member {
            border: 1px solid var(--border-color);
            background-color: var(--secondary-bg);
            border-radius: 6px;
            padding: 12px 12px;
        }
        .team-panel-inline .member-details {
            gap: 0px;
        }
        .summary-title {
            margin-bottom: 15px;
            color: var(--text-secondary);
            font-size: 16px;
            font-weight: 600;
        }

        .component-collection {
            max-height: 200px;
            overflow-y: auto;
        }

        .component-entry {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 12px;
            background: var(--secondary-bg);
            border-radius: 6px;
            margin-bottom: 6px;
            font-size: 12px;
            border: 1px solid var(--border-color);
        }


        .component-entry:hover {
            background: var(--hover-surface) !important;
        }
        .draw-active {
            background: var(--green-status) !important;
        }

        .draw-active:hover {
            background: #0ea570 !important;
        }

        .component-entry i {
            margin-right: 8px;
            color: var(--accent-color);
        }
        .editor-wrapper {
            padding: 18px 16px 16px 16px;
            height: 100%;
            display: flex;
            flex-direction: column;
            height: 100%;
        }
        .member-icon {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: var(--accent-color);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 8px;
            font-weight: 600;
            border: 2px solid var(--secondary-bg);
            margin-left: -2px;
        }
        
        .member-icon:first-child {
            margin-left: 0;
        }
        
        .location-count {
            background: var(--success-color);
            color: white;
            padding: 3px 6px;
            border-radius: 6px;
            font-size: 10px;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 3px;
        }
        
        .territory-actions {
            display: flex;
            gap: 0px;
        }
        

        
        .action-visibility {
            background: var(--success-color);
            color: white;
        }
        
        .action-visibility.hidden {
            background: var(--map-hidden);
        }
        
        .action-add {
            background: var(--accent-color);
            color: white;
        }
        
        .action-edit {
            background: var(--warning-color);
            color: white;
        }
        
        .action-delete {
            background: var(--danger-color);
            color: white;
        }
        
        
        .sub-territories {
            margin-left: 16px;
        }
        
        .level-2 {
            margin-left: 20px;
        }
        
        .level-2 .territory-main {
            border-left-width: 2px;
        }
        
        .flat-view .sub-territories {
            display: none !important;
        }
        
        .flat-view .territory-item {
            margin-left: 0 !important;
        }
        .territory-item {
                border-left: 3px solid;
                border-radius: 18px;
                overflow: hidden !important;
                border: 3px solid var(--secondary-bg);
                margin-top: 7px;
                border-right: 0px;
            }
        .color-picker-wrapper {
            position: relative;
            width: 32px;
            height: 32px;
            border-radius: 8px;
            border: 2px solid var(--border-color);
            overflow: hidden;
            cursor: pointer;
            transition: all 0.3s ease;
            background: var(--primary-bg);
        }

        .color-picker-wrapper:hover {
            border-color: var(--accent-color);
            transform: scale(1.1);
            box-shadow: 0 0 0 3px rgba(93, 124, 255, 0.2);
        }

        .color-picker {
            width: 100%;
            height: 100%;
            border: none;
            cursor: pointer;
            position: absolute;
        }

        .color-display {
            width: 100%;
            height: 100%;
            border-radius: 4px;
            pointer-events: none;
        }

        .control-btn {
            width: 32px;
            height: 32px;
            border: 0px solid var(--border-color);
            background: var(--primary-bg);
            border-radius: 6px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-secondary);
            transition: all 0.3s ease;
        }

        .control-btn:hover {
            background: var(--hover-bg);
            border-color: var(--accent-color);
            color: var(--text-primary);
            transform: scale(1.05);
        }

        .expand-icon {
            transition: transform 0.3s ease;
            color: var(--text-secondary);
        }

        .territory-item.expanded .expand-icon {
            transform: rotate(180deg);
            color: var(--accent-color);
        }

        .territory-layers {
            padding: 20px;
            background: var(--primary-bg);
            display: none;
            border-top: 1px solid var(--border-color);
        }

        .territory-item.expanded .territory-layers {
            display: block;
            animation: slideDown 0.3s ease-out;
        }

        @keyframes slideDown {
            from {
                opacity: 0;
                max-height: 0;
                padding-top: 0;
                margin-top: 0;
            }
            to {
                opacity: 1;
                max-height: 400px;
                padding-top: 20px;
                margin-top: 0;
            }
        }

        .layer-item {
            margin-bottom: 16px;
            padding: 16px;
            background: var(--secondary-bg);
            border-radius: 10px;
            border-left: 4px solid var(--accent-color);
            border: 1px solid var(--border-color);
            transition: all 0.3s ease;
        }

        .layer-item:hover {
            border-color: var(--accent-color);
            box-shadow: 0 2px 8px rgba(93, 124, 255, 0.1);
        }

        .layer-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 14px;
        }

        .layer-info {
            display: flex;
            align-items: center;
            gap: 12px;
        }
         .style-dropdown { position: absolute; top: calc(100% + 10px); right: 0; z-index: 1001; background: var(--secondary-bg); border: 1px solid var(--border-color); border-radius: 12px; min-width: 200px; display: none; }
        .style-dropdown.visible { display: block; }
        .dropdown-header { padding: 18px; border-bottom: 1px solid var(--border-color); }
        .header-text { margin: 0; font-size: 16px; font-weight: 600; }
        .nav-selector { padding: 18px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; }
        .switch-control { position: relative; width: 44px; height: 24px; background: var(--border-color); border-radius: 12px; cursor: pointer; transition: background 0.3s ease; }
        .switch-control.enabled { background: var(--accent-color); }
        .switch-thumb { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: white; border-radius: 50%; transition: transform 0.3s ease; }
        .switch-control.enabled .switch-thumb { transform: translateX(20px); }
        .map-choice { display: flex; align-items: center; padding: 16px 18px; cursor: pointer; transition: all 0.2s ease; border: none; background: none; width: 100%; text-align: left; border-bottom: 1px solid var(--border-color); }
        .map-choice:hover { background: var(--hover-bg); }
        .map-choice.selected { background: var(--bright-hover); }
        .choice-icon { margin-right: 12px; font-size: 16px; width: 20px; color: var(--text-primary); }
        .choice-title { font-size: 14px; font-weight: 500; color: var(--text-primary)}
        .choice-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

        .layer-icon {
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-secondary);
            font-size: 14px;
        }

        .layer-name {
            font-weight: 600;
            color: var(--text-primary);
            font-size: 14px;
        }

        .layer-toggle {
            width: 44px;
            height: 22px;
            background: var(--border-color);
            border-radius: 11px;
            position: relative;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .layer-toggle.active {
            background: var(--success-color);
        }

        .layer-toggle::after {
            content: '';
            width: 18px;
            height: 18px;
            background: white;
            border-radius: 50%;
            position: absolute;
            top: 2px;
            left: 2px;
            transition: all 0.3s ease;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .layer-toggle.active::after {
            transform: translateX(22px);
        }

        .layer-controls {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
 /* Loading Overlay */
        .loading-overlay {
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
            backdrop-filter: blur(10px);
            border-bottom: none;
            border-radius: 18px 18px 0 0;
            padding: 10px 14px 10px 14px;
            display: flex;
            align-items: center;
            gap: 8px;
            z-index: 1000;
            opacity: 1;
            transition: all 0.3s ease;
        }

        .loading-overlay.hidden {
            opacity: 0;
            transform: translateX(-50%) translateY(20px);
            pointer-events: none;
        }

        /* Spinner */
        .spinner {
            width: 24px;
            height: 24px;
            border: 3px solid rgba(74, 77, 82, 0.5);
            border-top: 3px solid var(--accent-color);
            border-radius: 50%;
            animation: spin 0.6s linear infinite;
            flex-shrink: 0;
        }
        .spinner-search {
            border: 2px solid rgba(0,0,0,0.1);
            border-top-color: rgba(0,0,0,0.7);
            border-radius: 50%;
            width: 16px;
            height: 16px;
            animation: spin 1s linear infinite;
            cursor: pointer;
            }


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

        /* Loading Text */
        .loading-text {
            font-size: 14px;
            font-weight: 500;
            color: var(--text-primary);
            white-space: nowrap;
        }

        .control-group {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

        .control-label {
            font-size: 12px;
            color: var(--text-secondary);
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            min-width: 70px;
        }

        .range-slider {
            flex: 1;
            height: 6px;
            background: var(--border-color);
            border-radius: 3px;
            outline: none;
            -webkit-appearance: none;
            margin: 0 12px;
        }

        .range-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 18px;
            height: 18px;
            background: var(--accent-color);
            border-radius: 50%;
            cursor: pointer;
            box-shadow: 0 2px 6px rgba(93, 124, 255, 0.4);
            transition: all 0.3s ease;
        }

        .range-slider::-webkit-slider-thumb:hover {
            transform: scale(1.2);
            box-shadow: 0 4px 12px rgba(93, 124, 255, 0.6);
        }

        .range-slider::-moz-range-thumb {
            width: 18px;
            height: 18px;
            background: var(--accent-color);
            border-radius: 50%;
            cursor: pointer;
            border: none;
            box-shadow: 0 2px 6px rgba(93, 124, 255, 0.4);
        }

        .range-value {
            font-size: 12px;
            color: var(--text-primary);
            font-weight: 600;
            min-width: 50px;
            text-align: right;
            background: var(--primary-bg);
            padding: 4px 8px;
            border-radius: 6px;
            border: 1px solid var(--border-color);
        }

        .text-input {
            flex: 1;
            background: var(--primary-bg);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 6px 10px;
            color: var(--text-primary);
            font-size: 12px;
            margin: 0 12px;
            outline: none;
            transition: border-color 0.3s ease;
        }

        .text-input:focus {
            border-color: var(--accent-color);
        }

        .add-layer-small {
            margin-top: 16px;
            font-size: 12px;
            padding: 10px;
            background: var(--secondary-bg);
            border: 1px dashed var(--border-color);
            color: var(--text-secondary);
        }

        .add-layer-small:hover {
            background: var(--hover-bg);
            border-color: var(--accent-color);
            color: var(--text-primary);
        }


        .territory-item.expanded .remove-heatmap-btn {
            display: flex;
        }





        /* Scrollbar styling */
        .territory-layers::-webkit-scrollbar {
            width: 6px;
        }

        .territory-layers::-webkit-scrollbar-track {
            background: var(--secondary-bg);
        }

        .territory-layers::-webkit-scrollbar-thumb {
            background: var(--border-color);
            border-radius: 3px;
        }

        .territory-layers::-webkit-scrollbar-thumb:hover {
            background: var(--accent-color);
        }
    .gradient-label {
        font-size: 11px;
        color: var(--text-secondary);
        font-weight: 500;
        text-align: center;
        word-wrap: break-word;
    }
            .side-panel {
                width: var(--panel-width);
                background: var(--secondary-bg);
                border-right: 1px solid var(--border-color);
                z-index: 999;
                display: none;
                flex-direction: column;
                transition: all 0.3s ease;
                position: absolute;
                top: 0;
                left: var(--sidebar-width);
                height: 100vh;
            }

        
            .side-panel.active {
                display: flex;
            }

            .panel-header {
                padding: 20px;
                border-bottom: 1px solid var(--border-color);
                display: flex;
                align-items: center;
                justify-content: space-between;
            }

            .panel-title {
                font-size: 18px;
                font-weight: 600;
                color: var(--text-secondary);
            }

            .panel-close {
                background: none;
                border: none;
                color: var(--text-secondary);
                cursor: pointer;
                padding: 4px;
                border-radius: 4px;
                transition: all 0.2s ease;
            }

            .panel-close:hover {
                background: var(--hover-bg);
                color: var(--text-primary);
            }

            .panel-content {
                flex: 1;
                padding: 0;
                overflow-y: auto;
                background: var(--primary-bg);
            }

            .panel-placeholder {
                color: var(--text-secondary);
                text-align: center;
                font-style: italic;
                margin-top: 40px;
                padding: 20px;
            }

            /* Property List Styles */
            .property-controls {
                padding: 20px;
                border-bottom: 1px solid var(--border-color);
            }

            .property-search {
                width: 100%;
                height: 36px;
                background: var(--secondary-bg);
                border: 1px solid var(--border-color);
                border-radius: 6px;
                padding: 0 12px;
                font-size: 13px;
                color: var(--text-primary);
                margin-bottom: 12px;
            }

            .property-search:focus {
                outline: none;
                border-color: var(--accent-color);
            }

            .property-search::placeholder {
                color: var(--text-secondary);
            }

            .property-stats {
                display: flex;
                justify-content: space-between;
                font-size: 12px;
                color: var(--text-secondary);
            }

            .property-list {
                flex: 1;
                overflow-y: auto;
            }

            .property-item {
                padding: 16px 20px;
                border-bottom: 1px solid var(--border-color);
                cursor: pointer;
                transition: all 0.2s ease;
                position: relative;
            }

    .gradient-container {
        width: 100%;
        padding: 8px 0;
    }

    .gradient-bar {
        width: 100%;
        height: 20px;
        border-radius: 10px;
        margin-bottom: 8px;
        border: 1px solid var(--border-color);
    }

    .gradient-controls {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .gradient-picker {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .gradient-picker input[type="color"] {
        width: 20px;
        height: 20px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
    }

    .gradient-label {
        font-size: 11px;
        color: var(--text-secondary);
        font-weight: 500;
    }

            .property-item:hover {
                background: var(--hover-bg);
            }
            .property-item:last-child {
                margin-bottom: 0px !important;
            }

            .property-item.selected {
                background: rgba(93, 124, 255, 0.1);
                border-left: 3px solid var(--accent-color);
            }

            .property-header {
                display: flex;
                justify-content: space-between;
                align-items: flex-start;
                margin-bottom: 8px;
            }

            .property-address {
                font-size: 14px;
                font-weight: 500;
                color: var(--text-primary);
                line-height: 1.3;
                flex: 1;
                margin-right: 8px;
            }

            .property-price {
                font-size: 14px;
                font-weight: 600;
                color: var(--success-color);
                white-space: nowrap;
            }

            .property-details {
                display: flex;
                flex-wrap: wrap;
                gap: 12px;
            }
            .flex-wrap {
                flex-wrap: wrap !important;
                overflow-y: scroll;
                overflow-x: hidden;
                height: calc(100vh - 150px);
            }
            .border-start {
                overflow: hidden;
                border-left: 1px solid var(--border-color)!important
            }
            .border-end {
                border-right: 1px solid var(--border-color)!important
            }
            .property-detail {  
                display: flex;
                align-items: center;
                gap: 4px;
                font-size: 12px;
                color: var(--text-secondary);
            }

            .property-detail i {
                font-size: 11px;
                width: 12px;
            }

            .property-tags {
                display: flex;
                gap: 6px;
                flex-wrap: wrap;
            }

            .property-tag {
                background: var(--primary-bg);
                color: var(--text-secondary);
                padding: 2px 6px;
                border-radius: 3px;
                font-size: 10px;
                font-weight: 500;
            }

            .property-tag.hot {
                background: rgba(239, 68, 68, 0.2);
                color: #ef4444;
            }

            .property-tag.new {
                background: rgba(16, 185, 129, 0.2);
                color: var(--success-color);
            }


            

            .map-container {
                flex: 1;
                position: relative;
                background: #000;
            }

            #map {
                width: 100%;
                height: 100%;
                background: var(--primary-bg);
            }

            .map-loading {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                color: var(--text-primary);
                font-size: 16px;
                display: flex;
                align-items: center;
                gap: 12px;
            }

            .loading-spinner {
                width: 20px;
                height: 20px;
                border: 2px solid var(--border-color);
                border-top: 2px solid var(--accent-color);
                border-radius: 50%;
                animation: spin 1s linear infinite;
            }
            
    /* Add this CSS to your existing styles */
    .property-options-preview {
        padding: 8px 0;
        opacity: 0.7;
    }

    .options-summary {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 12px;
        color: var(--text-secondary);
        cursor: pointer;
    }

    .options-summary i {
        font-size: 10px;
        transition: transform 0.2s ease;
    }
    .expanded {
        display: block !important;
    }
    .property-item.expanded .options-summary i {
        transform: rotate(90deg);
    }
            @keyframes spin {
                0% { transform: rotate(0deg); }
                100% { transform: rotate(360deg); }
            }

            .search-container {
                position: absolute;
                top: 20px;
                left: 20px;
                z-index: 10;
                width: 375px;
            }

            .search-container.panel-open {
                left: calc(var(--panel-width) + 20px);
            }
            #freeTrial.panel-open {
                left: calc(var(--panel-width) + 60px) !important;
            }


            .search-field {
                width: 100%;
                height: 44px;
                background: var(--secondary-bg);
                border: 0px solid var(--border-color);
                border-radius: 8px;
                padding: 0 44px 0 44px;
                font-size: 14px;
                color: var(--text-primary);
                backdrop-filter: blur(10px);
                box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            }

            .search-field:focus {
                outline: none;
            }

            .search-field::placeholder {
                color: var(--text-secondary);
            }

            .search-icon {
                position: absolute;
                left: 16px;
                top: 50%;
                transform: translateY(-50%);
                color: var(--text-secondary);
                font-size: 16px;
                pointer-events: none;
                z-index: 10;
            }


        .search-icon {
            position: absolute;
            left: 16px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-secondary);
            font-size: 16px;
            z-index: 2;
        }

        .search-field {
            width: 100%;
            height: 48px;
            background: var(--secondary-bg);
            border: 0px solid var(--border-color);
            border-radius: 12px;
            padding: 0 16px 0 48px;
            font-size: 16px;
            color: var(--text-primary);
            outline: none;
        }

        .search-container.focused .search-field {
            border-bottom-left-radius: 0;
            border-bottom-right-radius: 0;
            border-bottom-color: transparent;
            border-bottom: solid var(--border-color)
        }
        .search-container.focused {
            height: calc(100% - 85px)
        }
        .categories-section {
            display: none;
            transform: translateY(-10px);
            pointer-events: none;
            transition: opacity 0.2s ease, transform 0.2s ease;
        }
        .card {
            background: var(--secondary-bg);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            transition: all 0.2s ease;
        }

        .card:hover {
            border-color: var(--accent-color);
        }

        .card-header {
            background: var(--secondary-bg);
            border-bottom: 1px solid var(--border-color);
            border-radius: 12px 12px 0 0 !important;
        }

        .card-body {
            background: var(--secondary-bg);
            border-radius: 12px;
        }

        .btn-primary {
            background: var(--accent-color);
            border-color: var(--accent-color);
            color: white;
            transition: all 0.2s ease;
        }

        .btn-primary:hover {
            background: #4c6aef;
            border-color: #4c6aef;
            transform: translateY(-1px);
        }

        .btn-outline-secondary {
            background: var(--primary-bg);
            border-color: var(--border-color);
            color: var(--text-secondary);
            transition: all 0.2s ease;
        }

        .btn-outline-secondary:hover {
            background: var(--hover-bg);
            border-color: var(--accent-color);
            color: var(--text-primary);
        }

        .btn-outline-danger {
            background: var(--primary-bg);
            border-color: rgba(239, 68, 68, 0.3);
            color: #ef4444;
            transition: all 0.2s ease;
        }

        .btn-outline-danger:hover {
            background: rgba(239, 68, 68, 0.1);
            border-color: rgba(239, 68, 68, 0.5);
            color: #ef4444;
        }

        .form-select, .form-control {
             color: var(--text-primary);
                font-weight: 600;
                min-width: 50px;
                background: var(--primary-bg);
                padding: 4px 8px;
                border-radius: 6px;
                border: 1px solid var(--border-color);  
                
        }
        .form-select {
            cursor: pointer;
                
        }


        .form-select:hover, .form-control:hover {
                background: rgba(255, 255, 255, 0.221);
                color: var(--text-primary);

        }

        .form-range {
            background: transparent;
        }

        .form-range::-webkit-slider-thumb {
            background: var(--accent-color);
            border: 2px solid white;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .form-range::-webkit-slider-thumb:hover {
            transform: scale(1.2);
            box-shadow: 0 0 0 4px rgba(93, 124, 255, 0.2);
        }

        .form-range::-webkit-slider-track {
            height: 6px;
            border-radius: 3px;
        }

        .text-success {
            color: var(--success-color) !important;
        }

        .text-primary {
            color: var(--accent-color) !important;
        }

        .text-muted {
            color: var(--text-secondary) !important;
        }
        .dropdown-menu {
            background-color: var(--secondary-bg);
        }
        .dropdown-item {
            color: var(--text-primary);
        }
        .dropdown-item:hover {
            background-color: var(--hover-bg) !important;
        }
        .dropdown-item.active {
            background-color: var(--primary-bg);
        }
        .dropdown-toggle, button.ms-2.ms-2, .js-btn-search, .me-2 {
            color: var(--text-secondary);
            border-color: var(--border-color) !important
        }
        .dropdown-toggle:hover,  button.ms-2.ms-2:hover, .js-btn-search:hover, .me-2:hover {
            background-color: var(--hover-bg);
        }
        .dropdown-item.active, .dropdown-item:active {
            color: var(--text-primary);
        }
        .border-bottom {
            border-color: var(--border-color) !important;
        }

        .border-top {
            border-color: var(--border-color) !important;
        }
        #editTerritory {
            background: var(--primary-bg) !important;
        }

        .badge {
            background: var(--text-secondary) !important;
        }

        .list-group-item {
            background: var(--primary-bg);
            border-color: var(--border-color);
            color: var(--text-primary);
            transition: all 0.2s ease;
        }

        .list-group-item:hover {
            background: var(--hover-bg);
            border-color: var(--accent-color);
        }

        .input-group-text {
            background: var(--secondary-bg);
            border-color: var(--border-color);
            color: var(--text-secondary);
        }

        .btn-close {
            filter: invert(1);
            opacity: 0.7;
        }

        .btn-close:hover {
            opacity: 1;
        }

        .property-item.expanded {
            background: var(--hover-bg);
            border-left: 3px solid var(--accent-color);
        }

        .property-options {
            display: none;
            padding-bottom: 5px;
            display: flex !important;
            flex-direction: row;
            gap: 10px;
            flex-wrap: wrap;
            margin-top: 10px;
            justify-content: space-between !important;
            max-height: 500px;
            overflow: auto;
            width: inherit;
            overflow-x: hidden;
            padding-right: 3px;
        }

        .property-item.expanded .property-options {
            display: block;
            animation: slideDown 0.3s ease-out;
        }

        @keyframes slideDown {
            from {
                opacity: 0;
                max-height: 0;
                padding-top: 0;
                margin-top: 0;
            }
            to {
                opacity: 1;
                max-height: 200px;
                padding-top: 12px;
                margin-top: 12px;
            }
        }

        .position-sticky {
            background: var(--secondary-bg);
            border-color: var(--border-color) !important;
        }
        .mapboxgl-popup-close-button {
            display: none;
        }
        .categories-section.focused {
            opacity: 1;
            display: block;
            transform: translateY(0);
            pointer-events: auto;
            border-top-left-radius: 0;
            border-top-right-radius: 0;
            border-top: 0;
            border-top-color: transparent;
        }

        .search-field::placeholder {
            color: var(--text-secondary);
        }



        .categories-section {
            background: var(--secondary-bg);
            border-radius: 20px;
            border: 0px solid var(--border-color);
            box-shadow: -1px 20px 20px rgba(0, 0, 0, 0.15);
        }
        
        .quick-categories {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 24px;
        }

        .quick-category, .quick-category2 {
            display: flex;
            flex-direction: column;
            align-items: center;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
            color: var(--text-primary);
            flex: 1;
        }

        .quick-category:hover, .quick-category2:hover {
            transform: scale(1.05);
        }

        .quick-category-icon {
            width: 56px;
            height: 56px;
            background: var(--secondary-bg);
            border: 1px solid var(--border-color);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 8px;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .quick-category:hover .quick-category-icon, .quick-category2:hover .quick-category-icon {
            background: var(--hover-bg);
            border-color: var(--accent-color);
        }

        .quick-category i, .quick-category2 i {
            font-size: 22px;
            color: var(--text-secondary);
            transition: color 0.3s ease;
        }

        .quick-category:hover i, .quick-category2:hover i {
            color: var(--accent-color);
        }

        .quick-category-label {
            font-size: 12px;
            font-weight: 500;
            text-align: center;
            line-height: 1.2;
            color: var(--text-primary);
            transition: color 0.3s ease;
        }

        .section-title {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 16px;
            padding-left: 4px;
        }

        .search-history {
            margin-top: 20px;
        }

        .history-list {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .history-item {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 14px 12px;
            background: transparent;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            text-align: left;
            color: var(--text-primary);
            width: 100%;
        }

        .history-item:hover {
            background: var(--hover-bg);
        }

        .history-item i {
            font-size: 16px;
            color: var(--text-secondary);
            width: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .history-item:hover i {
            color: var(--accent-color);
        }
        .filter-input {
            border-bottom-left-radius: 0px;
            border-bottom-right-radius: 0px;
            background-color: var(--primary-bg);
        }
        .history-item-label {
            font-size: 15px;
            font-weight: 400;
        }


            .map-controls {
                position: absolute;
                top: 20px;
                right: 20px;
                z-index: 1000;
                display: flex;
                flex-direction: column;
                gap: 8px;
            }

            .control-btn {
                width: 44px;
                height: 44px;
                background: var(--secondary-bg);
                border: 0px solid var(--border-color);
                border-radius: 8px;
                display: flex;
                align-items: center;
                justify-content: center;
                cursor: pointer;
                backdrop-filter: blur(10px);
                box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
                transition: all 0.2s ease;
                color: var(--text-primary);
                font-size: 16px;
            }

            .control-btn:hover {
                background: var(--hover-bg);
                border-color: var(--accent-color);
                box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
                z-index: 1000000000000000;
            }
          
            .control-btn:active {
                transform: translateY(0);
            }

            .control-btn i {
                font-size: 16px;
                font-weight: 600;
            }

            .nav-item::after {
                content: attr(data-tooltip);
                position: absolute;
                left: 60px;
                top: 50%;
                transform: translateY(-50%);
                background: rgba(0, 0, 0, 0.9);
                color: white;
                padding: 6px 10px;
                border-radius: 6px;
                font-size: 12px;
                white-space: nowrap;
                opacity: 0;
                pointer-events: none;
                transition: opacity 0.2s ease;
                z-index: 1001;
            }
            .tright::after, .clear-icon::after, .clear-icon2::after, .clear-icon3::after, .clear-icon4::after  {
                content: "Empty Search";
                position: absolute;
                left: 26px;
                top: 50%;
                transform: translateY(-50%);
                background: rgba(0, 0, 0, 0.9);
                color: white;
                padding: 6px 10px;
                border-radius: 6px;
                font-size: 12px;
                white-space: nowrap;
                opacity: 0;
                pointer-events: none;
                transition: opacity 0.2s ease;
                z-index: 1001;
                font-family: Inter, -apple-system, "system-ui", sans-serif;
                font-weight: 500;
            }
            .tbottom:hover:after, .clear-icon:hover::after, .clear-icon2:hover::after, .clear-icon3:hover::after, .clear-icon4:hover::after  {
                opacity: 1;
            }
            .driver-avatar::after, .driver-avatar2::after, .driver-avatar3::after, .driver-avatar4::after, .driver-avatar4::after{
                content: attr(title);
                position: absolute;
                transform: translateY(-50%);
                background: rgba(0, 0, 0, 0.9);
                color: white;
                padding: 6px 10px;
                border-radius: 6px;
                font-size: 12px;
                white-space: nowrap;
                opacity: 0;
                pointer-events: none;
                transition: opacity 0.2s ease;
                z-index: 1001;
                font-family: Inter, -apple-system, "system-ui", sans-serif;
                font-weight: 500;
                top: -25px;
            }
            .driver-avatar::before, .driver-avatar2::before, .driver-avatar3::before, .driver-avatar4::before, .driver-avatar5::before {
                content: '';
                position: absolute;
                left: 7px;
                top: -10px;
                transform: translateY(-50%);
                border: 5px solid transparent;
                border-right-color: rgba(0, 0, 0, 0.9);
                opacity: 0;
                transition: opacity 0.2s ease;
                transform: rotate(270deg);
            }
            .gas-stats::after {
                content: "Approximate global average\A for estimate purposes only!" !important;
                white-space: pre !important;
                margin-right: 183px;
            }
            .tbottomp::after, .remove-filter::after, .filter-btn::after, .filter-toggle::before, 
            .action-btn4::after, #editTitle::after, #editTitleT::after, #deleteRoute::after, 
            .remove-stop::after, .drag-icon::after, .territory-actions .driver-avatar2::after, .header-actions .fas::after, .gas-stats::after{
                content: attr(title);
                position: absolute;
                transform: translateY(-50%);
                background: rgba(0, 0, 0, 0.9);
                color: white;
                padding: 6px 10px;
                border-radius: 6px;
                font-size: 12px;
                white-space: nowrap;
                opacity: 0;
                pointer-events: none;
                transition: opacity 0.2s ease;
                z-index: 1001;
                font-family: Inter, -apple-system, "system-ui", sans-serif;
                font-weight: 500;
                margin-left: -69px;
                margin-top: 45px;
                
            }
            #editTitle::after, #editTitleT::after {
                margin-left: -43px !important;
                margin-top: 40px !important;
            }  
            #deleteRoute::after, .remove-stop::after {
                margin-left: -90px !important;
                margin-top: 45px !important;
            } 
            .remove-stop::after {
                content: "Remove Stop";
            } 
            .drag-icon::after {
                content: "Drag to Reorder";
                margin-left: -25px;
            } 
            .territory-actions .driver-avatar2::after {
                content: "Assign Users";
                margin-top: 50px;;
                margin-left: 0px;
                transform: scale(0.87)
            }
            .territory-actions .driver-avatar::after, .territory-actions .driver-avatar3::after, .territory-actions .driver-avatar4::after, .territory-actions .driver-avatar5::after {
                top: 47px;
            }
            .territory-actions .driver-avatar::before, .territory-actions .driver-avatar3::before, .territory-actions .driver-avatar4::before, .territory-actions .driver-avatar5::before {
                content: '';
                position: absolute;
                left: 5px;
                top: 22px;
                transform: translateY(-50%);
                border: 5px solid transparent;
                border-right-color: rgba(0, 0, 0, 0.9);
                opacity: 0;
                transition: opacity 0.2s ease;
                transform: rotate(90deg);
            }
            
            
            .action-btn4.add::after {
                content: "Add User";
                right: 60px;
                margin-top: 30px;
            }
            .action-btn4.remove::after {
                content: "Remove User";
                 right: 60px;
                margin-top: 30px;
            }
        
            .drivers-section2 .driver-avatar2::after {
                content: "Add Team Members";
                top: 16px;
                right: 36px;
            }
            .drivers-section .driver-avatar2::after, #inRouteAvatar .driver-avatar2::after {
                content: "Assign Team Members";
                top: 16px;
                right: 36px;
            }
            .filter-btn::after {
                margin-top: 110px !important;
                margin-left: 0px !important;
            }
            .filter-toggle::before {
                margin-top: 46px !important;
                margin-left: -32px !important;
            }
            .filter-toggle::before {
                content: "Enable Filter";
             }
             .filter-toggle.on::before {
                content: "Disable Filter";
             }

            .remove-heatmap-btn:hover::after, .remove-filter:hover::after, .filter-btn:hover::after, 
            .filter-toggle:hover::before, .driver-avatar2:hover::after, .driver-avatar:hover::after,  .driver-avatar:hover::before,
            .action-btn4:hover::after,  #editTitle:hover::after, #deleteRoute:hover::after, .remove-stop:hover::after, .drag-icon:hover::after,
            .territory-actions .driver-avatar2:hover::after, .control-btn:hover::after, #editTitleT:hover::after, .header-actions .fas:hover::after,
            .driver-avatar3:hover::before, .driver-avatar4:hover::before, .driver-avatar5:hover::before, .driver-avatar3:hover::after, .driver-avatar4:hover::after, 
            .driver-avatar5:hover::after, .control-btn:hover::after, .remove-heatmap-btn:hover::after, .gas-stats:hover::after {
                opacity: 1;

            }
            .tright::after {
                content: attr(data-tooltip);
                position: absolute;
                left: 60px;
                top: 50%;
                transform: translateY(-50%);
                background: rgba(0, 0, 0, 0.9);
                color: white;
                padding: 6px 10px;
                border-radius: 6px;
                font-size: 12px;
                white-space: nowrap;
                opacity: 0;
                pointer-events: none;
                transition: opacity 0.2s ease;
                z-index: 1001;
            }
            .tleft::after, .control-btn::after, .remove-heatmap-btn::after {
                content: attr(title);
                position: absolute;
                right: 50px;
                top: 50%;
                transform: translateY(-50%);
                background: rgba(0, 0, 0, 0.9);
                color: white;
                padding: 6px 10px;
                border-radius: 6px;
                font-size: 12px;
                white-space: nowrap;
                opacity: 0;
                pointer-events: none;
                transition: opacity 0.2s ease;
                z-index: 1001;
            }
            .remove-heatmap-btn::after {
                right: 6px !important;
                top: unset;
                margin-top: 105px;
            }


            .nav-item::before {
                content: '';
                position: absolute;
                left: 50px;
                top: 50%;
                transform: translateY(-50%);
                border: 5px solid transparent;
                border-right-color: rgba(0, 0, 0, 0.9);
                opacity: 0;
                transition: opacity 0.2s ease;
            }

            .nav-item:hover::after,
            .nav-item:hover::before {
                opacity: 1;
            }
            .search-container, .search-container > *:first-child, 
            .map-controls, .position-sticky, .panel-header, .property-controls, 
            .fafawew, #mainTerritory, .side-panel, .fas, .fa, .driver-avatar2, 
            .driver-avatar, .driver-avatar3, .driver-avatar4, .driver-avatar5, .header-actions2, .stops-list, .drivers-info, .total-time {
                    overflow-x: unset !important;
                    overflow-y: unset !important;
                }
            @media (max-width: 768px) {
                .sidebar {
                    width: 100%;
                    position: absolute;
                    bottom: 0px;
                    flex-direction: row;
                    padding: 10px 20px;
                    overflow-x: auto;
                    justify-content: flex-start;
                    overflow: hidden;
                    display: flex;
                    flex-direction: row;
                    justify-content: space-between;
                    align-items: center;
                    height: unset;
                    border-top: 1px solid var(--border-color);
                    border-right: 0px solid var(--border-color);
                    border-left: 0px solid var(--border-color);
                    z-index: 1001;

                }
                #exportBtn {
                    display: none !important;
                }

                .remove-heatmap-btn:hover::after, .remove-filter:hover::after, .filter-btn:hover::after, 
                .filter-toggle:hover::before, .driver-avatar2:hover::after, .driver-avatar:hover::after,  .driver-avatar:hover::before,
                .action-btn4:hover::after,  #editTitle:hover::after, #deleteRoute:hover::after, .remove-stop:hover::after, .drag-icon:hover::after,
                .territory-actions .driver-avatar2:hover::after, .control-btn:hover::after, #editTitleT:hover::after, .header-actions .fas:hover::after,
                .driver-avatar3:hover::before, .driver-avatar4:hover::before, .driver-avatar5:hover::before, .driver-avatar3:hover::after, .driver-avatar4:hover::after, 
                .driver-avatar5:hover::after, .control-btn:hover::after, .remove-heatmap-btn::after:hover {
                    opacity: 0 !important;

                }
                .business-modal {
                    box-shadow: unset !important;
                    position: relative !important;
                    bottom: 0 !important;
                    height: 100% !important;
                    max-height: 100% !important;
                    display: flex !important;
                    flex-direction: column !important;
                    max-width: unset !important;
                }
                
                .modal-header, .business-modal {
                    border-radius: 0px !important;
                }
                #property-list {
                    -webkit-overflow-scrolling: touch;
                    touch-action: pan-y;
                }
                .cupertino-pane .content {
                    touch-action: manipulation;
                }

                #loadingOverlay {
                    display: none !important;
                }

                .supercharge-overlay, .supercharge-overlay2 {
                    background-color: var(--primary-bg)  !important;
                }
                .supercharge-modal, .container2 {
                    box-shadow: none !important;
                }
                .main-content-area {
                    display: flex;
                    justify-content: center;
                }
                .nav-item::before {
                    opacity: 0 !important
                }
                .team-panel {
                    left: 0 !important;
                    top: 100px !important;
                    right: 0px !important;
                    max-width: unset !important;
                }
                #heatmap-legend {
                    display: none !important;
                    opacity: 0 !important;
                }
                .nav-item::after {
                    opacity: 0 !important
                }
                .history-item {
                    border-bottom: 0.5px solid var(--border-color);
                    border-radius: 0px;
                }
                .pane {
                    z-index: 1000 !important;
                }
                .customization-section {
                    display: none !important;
                }
                .supercharge-modal {
                    overflow: auto !important;
                    height: 100% !important;
                    max-height: 100% !important;
                    border-radius: 0px !important;
                    border: 0px !important;
                }
                .tooltip {
                    display: none !important;
                }
                .pane {
                    background: var(--secondary-bg) !important;
                    border-top-right-radius: 18px !important;
                    border-top-left-radius: 18px !important
                }
                .cupertino-pane-wrapper .draggable {
                    z-index: 100000000000 !important;
                }
                .nav-item i {
                    font-size: 21px !important;
                }
                .heatmap-legend {
                    bottom: 50px !important;
                    transform: unset !important;
                    top: unset !important;
                    border-bottom-left-radius: 0px !important;
                }
                .btn-primary {
                    font-size: 16px !important;
                }
                #freeTrial {
                    left: 0px !important;
                }
                #calendar-panel {
                    width: 100% !important;
                }
                .nav-item[data-panel="territory"], .nav-item[data-panel="automations"], .nav-item[data-panel="feature"] {
                    display: none;
                }
                .nav-main, .nav-bottom {
                    flex-direction: row;
                    gap: 8px;
                }
                .nav-main, .nav-bottom {
                    display: contents;
                }   

                .nav-item {
                    margin: 0;
                    flex-shrink: 0;
                }
                .map-controls > button {
                    display: none !important;
                }
                #layersBtn {
                    display: flex !important;
                    margin-top: 62px;
                }
                .fafawew {
                    display: none !important;
                }
                .map-container {
                    height: 100%;
                }

                .search-container {
                    width: calc(100% - 40px);
                    left: 20px;
                    right: 20px;

                }
                .search-container.focused {
                    width: 100%;
                    left: 0px;
                    right: 0px;
                    top: 0px;
                    padding: 20px;
                    background-color: var(--secondary-bg);
                    height: 100%;
                    z-index: 100000;
                }
                .categories-section.focused {
                    border: none !important;
                    box-shadow: none !important;
                }
                .modal-overlay {
                    width: 100% !important;
                }
                .modal-content {
                    width: 100vh !important;
                    height: 100vh !important;
                    max-height: 100vh !important;
                    border-radius: 0px !important;
                }
                .search-container.focused .search-field {
                    border: 0px;
                    border-bottom: 1px solid var(--border-color);
                    box-shadow: unset;
                }
                .categories-content {
                    padding: 28px 0px !important;
                    padding-top: 14px !important; 
                }
                .stop-item {
                    width: 100% !important;
                }
                .drag-icon, .remove-stop {
                    opacity: 1 !important;
                }
                .cupertino-pane-wrapper .pane {
                    color: var(--text-primary) !important
                }
                .container {
                    max-width: unset !important;
                }
                .search-icon.fa-chevron-left {
                    pointer-events: all !important;
                    font-size: 22px;
                        height: 30px;
                    width: 30px;
                    align-items: center;
                    padding-top: 3px;
                }
                .side-panel {
                    position: fixed;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 100vh;  
                    z-index: 1001;
                    border-top-right-radius: 19px;
                    border-top-left-radius: 19px;
                    border: 1px solid var(--border-color);
                }
            }

            .empty-state {
                text-align: center;
                padding: 40px 40px !important;
                color: var(--text-secondary);
            }

            .empty-state i {
                font-size: 48px;
                margin-bottom: 16px;
                opacity: 0.5;
            }
            .settings-list {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px;
    background: var(--primary-bg);
    border-radius: 16px;
    font-family: 'Inter', sans-serif;
    color: #e0e0e0;
}
label {
    color: var(--text-secondary);
}
.settings-section {
    margin-bottom: 32px;
}

.settings-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #ffffff;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    transition: background 0.2s ease;
    background: var(--secondary-bg);
}


.settings-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
}
.fw-bold {
    font-size: 14px !important;
}
.settings-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background-color: var(--accent-color);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.settings-btn i {
    font-size: 14px;
}

.settings-btn:hover {
    background-color:  #465cbe;
;
}

.settings-btn.danger {
    background-color: #dc3545;
}

.settings-btn.danger:hover {
    background-color: #bb2d3b;
}

.settings-btn.logout {
    background-color: #6c757d;
    width: 100%;
    justify-content: center;
}

.settings-btn.logout:hover {
    background-color: #5a6268;
}

.settings-input {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    width: 120px;
    background: var(--primary-bg);
    color: var(--text-primary);
    transition: border 0.2s ease;
    border: 0px solid;
}

.settings-input:hover {
    background: var(--hover-bg);

}

.settings-input:focus {
    outline: none;
    border-color: #0d6efd;
}
.settings-btn > .fas {
    color: white !important;
}

.settings-input.small {
    width: 60px;
    text-align: right;
}

.time-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-unit {
    font-size: 14px;
    color: #aaa;
}
            .empty-state h3 {
                font-size: 16px;
                margin-bottom: 8px;
                color: var(--text-secondary);
            }

            .empty-state p, .empty-state span {
                font-size: 14px;
                line-height: 1.5;
            }
        .popupx {
            font-size: 14px;
            padding: 4px 6px !important;
            margin-bottom: 1px !important;
        }
        .popupx i{
            font-size: 14px !important;
            margin-bottom: 0px !important;
            color: var(--white-text);
        }
        .container {
            max-width: 400px;
            margin: 0 auto;
            background-color: var(--primary-bg);
            height: 100%;
            box-shadow: 0 0 20px rgba(0,0,0,0.3);
            display: flex;
            flex-direction: column;
            padding: 0px;   
            overflow: hidden;
        }
        .territory-list {
            height: calc(100vh - 133px);
            padding: 0px 1rem 1rem !important;
            background-color: var(--primary-bg) !important;
        }
         h1 i {
            color: var(--accent-color);
        }
        /* Header Section - Improved readability */
        .header {
            background: var(--secondary-bg);
            color: var(--text-primary);
            padding: 18px 16px 16px 16px;
            border-bottom: 1px solid var(--border-color);
            position: sticky;
            top: 0;
            z-index: 100;
        }
        .filter-card {
            background: var(--secondary-bg);
            border: 1.5px solid var(--border-color);
            border-radius: 12px;
            margin-bottom: 16px;
            overflow: hidden;
            padding: 20px;
            transition: all 0.3s ease;
        }
        .optionbtn {
            border: none;
        border-radius: 20px;
        color: white;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        justify-content: center;
        position: relative;
        overflow: hidden;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        position: absolute;
        align-items: center !important;
        z-index: 100000000000000000000000000000000000000000000000000000;
        }
        .drive_mode .fisch {
            display: none !important;
        }
        .drive_mode > .business-modal{
            max-width: unset !important;
            border-radius: unset !important;
            height: 100% !important;
            max-height: unset !important;
            display: flex !important;
            flex-direction: column !important;
        }
        .drive_mode .modal-body {
            margin: 0px 100px;
            overflow: auto;
            overflow-x: hidden
        }
        .drive_mode .location-text {
            white-space: normal !important;
        }
        .drive_mode .info-panel {
            padding: 0px !important;
            padding-top: 40px !important;
        }
        .drive_mode #extraInfo {
            font-size: 13px !important;
        }
        
        .drive_mode .expand-panel {
            padding: 0px !important;
        }
        .filter-card:hover {
            border-color: var(--accent-color);
            box-shadow: 0 4px 12px rgba(93, 124, 255, 0.15);
        }

        .filter-card.inactive {
            opacity: 0.5;
            border-color: var(--border-color);
        }

        .filter-card.inactive:hover {
            opacity: 0.7;
        }

        .filter-header {
            background: var(--secondary-bg);
            padding: 0px;
            display: flex;
            justify-content: space-between;
            align-items: start;
            transition: all 0.3s ease;
            padding-bottom: 14px;
        }
        .filter-title {
            font-weight: 600;
            font-size: 15px;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .status-indicator {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: var(--text-secondary);
            transition: all 0.3s ease;
        }

        .status-indicator.on {
            background: var(--success-color);
            box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
        }

        .filter-toggle {
            width: 33px;
            height: 17px;
            margin: 0px 3px;
            background: var(--text-secondary);
            border-radius: 12px;
            position: relative;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid transparent;
        }

        .filter-toggle:hover {
            border-color: rgba(255, 255, 255, 0.2);
        }

        .filter-toggle.on {
            background: var(--success-color);
        }

        .filter-toggle::after {
            content: '';
            position: absolute;
            width: 12px;
            height: 12px;
            background: white;
            border-radius: 50%;
            top: 0.5px;
            left: 1px;
            transition: transform 0.3s ease;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .filter-toggle.on::after {
            transform: translateX(15px);
        }

        .filter-actions {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .filter-btn, .remove-heatmap-btn {
            width: 27px;
            height: 27px;
            background: none;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            font-size: 16px
        }
        .remove-heatmap-btn {
            font-size: 16px !important;
        }
        .filter-btn:hover, .remove-heatmap-btn:hover {
            background:  var(--hover-bg);
        }

        .territory-actions >  .filter-btn:hover, .remove-heatmap-btn:hover {
            background: var(--bright-hover) !important;
        }

        .filter-content {
            padding: 14px 0px;
            max-height: 250px;
            overflow: auto;
            border-top: 1px solid var(--border-color);
        }

        .filter-section {
            margin-bottom: 20px;
        }

        .filter-section:last-child {
            margin-bottom: 0;
        }
.section-label {
            font-size: 12px;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 12px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .section-label::before {
            content: '';
            width: 3px;
            height: 12px;
            background: var(--accent-color);
            border-radius: 2px;
        }

        .filter-conditions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            align-items: center;
        }

        .filter-item {
            display: inline-flex;
            align-items: center;
            background: var(--secondary-bg);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            padding: 6px 12px;
            font-size: 12px;
            gap: 6px;
            white-space: nowrap;
            max-width: 250px;
            transition: all 0.3s ease;
        }

        .filter-item:hover {
            border-color: var(--accent-color);
            background: var(--hover-bg);
        }

        .filter-field {
            font-weight: 600;
            color: var(--text-primary);
        }

        .filter-operator {
            color: var(--text-secondary);
            font-weight: 500;
        }

        .filter-value {
            color: var(--accent-color);
            font-weight: 600;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .logic-operator {
            background: var(--accent-color);
            color: white;
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin: 0 4px;
        }

        .and-operator {
            background: var(--success-color);
        }

        .or-operator {
            background: var(--warning-color);
            color: var(--primary-bg);
        }

        .empty-state {
            text-align: center;
            padding: 40px 20px;
            color: var(--text-secondary);
        }

        .empty-state i {
            font-size: 48px;
            margin-bottom: 16px;
            opacity: 0.5;
        }

        .empty-state h3 {
            font-size: 18px;
            margin-bottom: 8px;
            color: var(--text-secondary);
        }

    

        .active-filters .stat-number {
            color: var(--success-color);
        }

        .inactive-filters .stat-number {
            color: var(--text-secondary);
        }
        .header-top {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 14px;
        }
        
        .header-back {
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
        }

        .header-back i {
            font-size: 16px;
            color: var(--text-secondary);
            transition: color 0.2s ease;
        }

        .header-back:hover i, #editTitle:hover {
            color: var(--text-primary) !important;
        }

        .back-text {
            font-size: 14px; /* Increased from 15px but kept readable */
            color: var(--text-secondary);
            font-weight: 500;
        }

        .header-back:hover .back-text {
            color: var(--text-primary);
        }

        .header-actions, .header-actions2{
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .header-actions i, .header-actions2 i {
            font-size: 17px;
            color: var(--accent-color); 
            cursor: pointer;
            transition: color 0.2s ease;
        }

        .header-actions i:hover, .header-actions2 i:hover {
            color: var(--text-primary);
        }

        .header-main {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .route-title, .territory-title {
            font-size: 22px;
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1.2;
            margin-bottom: 0px !important;
        }

        /* Date inputs with better readability */
        .date-inputs {
            display: flex;
            align-items: center;

            gap: 10px;
            color: var(--text-secondary);
            margin-bottom: 8px;
        }

        .header-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            align-items: center;
        }

        .date-inputs i {
            color: var(--accent-color);
            font-size: 14px;
        }
        .date-input, .time-input {
            background: var(--primary-bg);
            border: 0px solid var(--border-color);
            color: var(--text-primary);
            font-size: 14px;
            font-weight: 500;
            width: 100px;
            text-align: center !important;
            padding: 6px 9px;
            border-radius: 6px;
            transition: all 0.2s ease;
        }
        .time-input {
            font-size: 13px !important;
            padding: 3px !important;
            width: 74px !important;
        }

        .date-input:hover, .time-input:hover{
            background: var(--hover-bg);
            color: var(--text-primary);
        }

        .date-input:focus {
            outline: none;
            border-color: var(--accent-color);
            background: var(--hover-bg);
            box-shadow: 0 0 0 2px rgba(93, 124, 255, 0.2);
        }

        .date-separator {
            color: var(--text-secondary);
            font-size: 14px; /* Increased from 13px */
            font-weight: 500;
        }

        /* Improved Tags with better readability */
        .header-tags .tag {
            background: var(--secondary-bg);
            color: var(--text-primary);
            padding: 5px 10px; /* Increased padding */
            border-radius: 12px;
            font-size: 14px; /* Increased from 11px */
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s ease;
            height: 28px; /* Increased height */
        }

        .header-tags .tag:hover {
            background: var(--hover-bg);
            border-color: var(--accent-color);
        }

        .header-tags .tag.business {
            border-color: #10b981;
            color: #10b981;
            background: rgba(16, 185, 129, 0.1);
        }

        .header-tags .tag.recreation {
            border-color: #3b82f6;
            color: #3b82f6;
            background: rgba(59, 130, 246, 0.1);
        }

        .header-tags .tag.urgent {
            border-color: #f59e0b;
            color: #f59e0b;
            background: rgba(245, 158, 11, 0.1);
        }

        .header-tags .tag.long-trip {
            border-color: #8b5cf6;
            color: #8b5cf6;
            background: rgba(139, 92, 246, 0.1);
        }

        .header-tags .remove-tag {
            color: inherit;
            opacity: 0.6;
            cursor: pointer;
            font-size: 14px; /* Increased from 9px */
            transition: opacity 0.2s ease;
            margin-left: 2px;
        }

        .header-tags .remove-tag:hover {
            opacity: 1;
        }

        /* Add tag input with better readability */
        .header-tags .add-tag-input {
            flex: 0 0 auto;
            width: 80px; /* Increased width */
            padding: 5px 8px; /* Increased padding */
            background: transparent;
            border: none;
            border-radius: 12px;
            color: var(--text-secondary);
            font-size: 14px; /* Increased from 11px */
            height: 28px; /* Match tag height */
            transition: all 0.2s ease;
        }
        .add-tag-input::placeholder {
            color: red;
            text-decoration: underline;
              opacity: 1;
            }
        .header-tags .add-tag-input:focus {
            outline: none;
            background: rgba(255, 255, 255, 0.05);
            color: var(--text-primary);
            width: 100px; /* Increased focused width */
        }

        .header-tags .add-tag-input::placeholder {
            color: var(--text-secondary);
            opacity: 0.7;
        }

        /* Action Buttons with better readability */
        .main-actions {
            border-bottom: 1px solid var(--border-color);
        }

        .action-grid {
            display: flex;
            position: sticky !important;
            bottom: 0 !important;
        }

        .action-btn {
                background: var(--secondary-bg);
                border: none;
                border-right: 1px solid var(--border-color);
                padding: 12px 14px;
                display: flex;
                flex-direction: column;
                align-items: center;
                gap: 4px;
                color: var(--accent-color);
                text-decoration: none;
                font-weight: bold;
                font-size: 13px;
                transition: all 0.2s ease;
                cursor: pointer;
                width: 100%;
                border-top: 1px solid var(--border-color);
            }

        .disableStop .drag-icon, .disableStop .remove-stop {
            display: none !important;
        }
        .disableStop .stop-item {
            width: 100%;
        }
        .disableStop .route-planning-inputs, .disableStop .stops-bottom-input {
            padding: 14px 16px !important
        }
        .add-tag-input:disabled {
            display: none;
        }

        .action-btn:last-child {
            border-right: none;
        }

        .action-btn:hover {
            background-color: var(--hover-bg);
            color: var(--text-primary);
        }

        .action-btn i {
            font-size: 16px; /* Increased from 15px */
        }

        /* Route Planning Section */
        .route-planning {
            display: flex;
            flex-direction: column;
            flex: 1;
            overflow: hidden;
            position: relative !important;
        }

        .route-planning-inputs {
            padding: 14px 29px;
            background: var(--primary-bg);
            border-bottom: 1px solid var(--border-color);
        }
        .business-modal .action-btn  {
            padding: 18px 11px !important;
        }
        /* Scrollable stops container */
        .scrollable-stops {
            flex: 1;
            overflow-y: auto;
            padding: 14px 16px;
            background: var(--primary-bg);
            overflow-x: hidden;
        }

        .stops-bottom-input {
            padding: 14px 29px;
            background: var(--primary-bg);
            border-top: 1px solid var(--border-color);
        }   

        .scrollable-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .location-input {
            width: 100%;
            padding: 8px 15px; /* Increased padding */
            background: var(--secondary-bg);
            border: 2px solid var(--border-color);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 15px;
            transition: all 0.2s ease;
            margin-bottom: 0;
        }

        .location-input:focus {
            outline: none;
            border-color: var(--accent-color);
            background: var(--hover-bg);
        }

        .location-input::placeholder {
            color: var(--text-secondary);
        }

        /* Stops Section with improved readability */
        .stops-list {
            margin-bottom: 0;
        }

        .stop-item {
            background: var(--secondary-bg);
            border: 2px solid var(--border-color);
            border-radius: 12px;
            padding: 14px 16px; /* Increased padding */
            display: flex;
            align-items: center;
            gap: 14px;
            position: relative;
            transition: all 0.2s ease;
            width: 289px;
        }
        .drag-icon {
            cursor: grab;
            font-size: 26px;margin-left: -9px;margin-right: -7px;
            opacity: 0;
        }

        .stop-number {
            background: var(--accent-color);
            color: white;
            width: 28px; /* Increased from 26px */
            height: 28px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 14px; /* Increased from 13px */
            flex-shrink: 0;
        }

        .stop-content {
            flex: 1;
            min-width: 0;
        }

        .stop-name {
            font-weight: 600;
            font-size: 14px;
            color: var(--text-primary);
            margin-bottom: 4px; /* Increased margin */
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;    
            width: 213px;
        }

        .stop-time {
            color: var(--text-secondary);
            font-size: 14px; /* Increased from 13px */
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .time-input {
            width: 77px !important; /* Increased width */
            text-align: center !important;
            border: 0px !important;
        }
        .ui-corner-all {
            letter-spacing: -1px !important;
            color: var(--text-primary) !important;
        }
        .time-input:hover {
            background: var(--hover-bg) !important;
            color: var(--text-primary);
        }

        .time-input:focus {
            outline: none;
            background: var(--hover-bg);
            color: var(--text-primary);
            border: 1px solid var(--accent-color);
        }

        .remove-stop, .remove-filter {
            color: #ef4444 !important;
            font-size: 19px;
            cursor: pointer;
            transition: all 0.2s ease;
            padding: 5px;
            border-radius: 4px;
            margin-left: -5px !important;
            opacity: 0;
        }
        .remove-filter {
            opacity: 1 !important;
        }

        .remove-stop:hover,  .remove-filter:hover {
            color: #dc2626;
            background: rgba(239, 68, 68, 0.1);
        }
                @keyframes backdropFadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .business-modal {
            background: var(--secondary-bg);
            border-radius: 16px;
            width: 100%;
            max-width: 400px;
            max-height: 85vh;
            overflow: hidden;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
        }

        @keyframes modalSlideUp {
            from {
                opacity: 0;
                transform: translateY(30px) scale(0.95);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .modal-header {
            background: #2d3033;
            border-bottom: 1px solid var(--border-color);
            color: #ffffff;
            padding: 24px;
            position: relative;
        }

        .header-section {
            display: flex;
            width: 100%;
            justify-content: space-between;
            align-items: flex-start;
        }

        .company-details h1 {
            font-size: 20px;
            font-weight: 700;
            margin-bottom: 4px;
            line-height: 1.2;
            color: #ffffff;
        }

        .company-category {
            font-size: 14px;
            color: #bfc3c9;;
            font-weight: 500;
        }
        .categories-content {
            padding: 28px;
        }
        .modal-close {
            background: var(--text-secondary);
            border: 1px solid var(--border-color);
            color: var(--text-secondary);;;
            width: 32px;
            height: 32px;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            transition: all 0.3s ease;
            margin-left: 16px;
        }
.search-results-section {
    display: none;
}


.results-list {
    display: flex;
    flex-direction: column;
    max-height: 100%;
    overflow: auto;
    border-radius:8px;
    overflow-x: hidden
}   

.result-item {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.result-item:hover {
    border-color: var(--accent-color);
    background: var(--hover-bg);
}


.result-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 20px;
}

.result-details {
    flex: 1;
}

.result-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.result-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
        white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 191px;
    display: block;
}

.result-tag {
    background: var(--accent-color);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.result-address {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 275px;
    display: block;
}

        .modal-close:hover {
            background: rgba(255, 255, 255, 0.2);
            color: #ffffff;
            transform: scale(1.05);
        }

        .modal-body {
            overflow-y: auto;
            max-height: 400px;
        }

        .info-panel {
            padding: 28px;
            padding-bottom: 0px;
        }


        .detail-row {
            display: flex;
            align-items: flex-start;
            margin-bottom: 18px;
            transition: all 0.2s ease;
        }

        .detail-row:last-child {
            margin-bottom: 0;
        }

        .detail-icon {
            width: 22px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 16px;
            margin-top: 2px;
            color: var(--accent-color);
            font-size: 15px;
            flex-shrink: 0;
        }

        .detail-text {
            flex: 1;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .location-text {
            color: var(--text-primary);
            font-size: 14px;
            line-height: 1.5;
            font-weight: 500;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        #stylesDropdown .visible {
            z-index: 100000000000000000000000000;
        }

        .contact-link, .web-link {
            color: var(--accent-color);
            text-decoration: none;
            font-size: 14px;
            font-weight: 500;
            word-break: break-all;
            transition: all 0.2s ease;
        }
        #freeTrial > a {
            color: orange !important;
        }
        .contact-link:hover, .web-link:hover {
            text-decoration: underline;
        }
        
        .expand-panel {
            padding: 0px 28px 20px;
        }   
        .mapboxgl-popup {
            width: 350px !important;
            max-width: unset !important;
            margin-top: 16px !important;
        }
        .mapboxgl-popup-tip {
            border-top-color: var(--secondary-bg) !important;
        }
        .mapboxgl-popup-content {
            background: none !important;
            border-radius: 16px !important;
        }
        .mapboxgl-popup-content {
            padding: 0px !important;
        }
        .additional-info.expanded {
            margin-top: 18px !important;
            font-size: 14px !important
            ;
        }
        .additional-info.expanded strong{
            font-weight: 500 !important;
            color: var(--text-secondary) !important;
        }
        .additional-info.expanded .detail-text{
            font-weight: 500 !important;
        }
        .expand-toggle {
            background: none;
            border: none;
            color: var(--accent-color);
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 0;
            transition: all 0.3s ease;
            width: 100%;
            text-align: left;
            margin-top: 14px;
        }

        .expand-toggle:hover {
            transform: translateX(4px);
        }

        .expand-toggle i {
            font-size: 12px;
            transition: transform 0.3s ease;
        }

        .expand-toggle.active i {
            transform: rotate(90deg);
        }

        .additional-info {
            overflow: hidden;
            transition: all 0.4s ease;
            display: none;
        }

        .additional-info.visible {
            max-height: 250px;
            opacity: 1;
            margin-top: 20px;
        }

        .additional-info .detail-row {
            margin-bottom: 14px;
        }

        .button-panel {
            border-top: 1px solid #4a4d52;
        }


        .modal-action {
            flex: 1;
            background: #5d7cff;
            border: 1px solid rgba(93, 124, 255, 0.3);
            border-radius: 10px;
            padding: 14px 8px;
            text-align: center;
            cursor: pointer;
            text-decoration: none;
            color: #ffffff;
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            height: 76px;
            justify-content: center;
            font-weight: 600;
            position: relative;
            overflow: hidden;
        }


        .location-suggestions {

            position: absolute;
            width: 291px;
            background: var(--secondary-bg);
            z-index: 1000;
            border-radius: 8px;
            border: 1px solid var(--border-color);
            overflow: hidden;
            border-top-right-radius: 0px;
            border-top-left-radius: 0px;

        }



        .heatmap-legend {
            position: fixed;
            right: 0px;
            top: 50%;
            transform: translateY(-50%);
            border-radius: 12px;
            padding: 16px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
            backdrop-filter: blur(10px);
            z-index: 1000;
            max-width: 200px;
            max-height: 50vh;
            overflow: hidden;
            border-top-right-radius: 0px;
            border-bottom-right-radius: 0px;
            color: var(--text-primary);
            gap: 20px;
            display: flex;
            flex-direction: column;
        }
        .heatmap-legend-content, .scrolllegend, .filter-legend-content {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .scrolllegend ul {
            padding-left: 15px;
            font-size: 12px;
            font-weight: 500;
            margin-bottom: 0px;
        }
        .scrolllegend li {
            margin-bottom: 4px;
        }
        .scrolllegend {
            overflow-y: auto;
            max-height: 17vh;
        }
        .scrolllegend:first {
            max-height: 25vh !important; 
        }
        .scrolllegend::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.1); /* transparent white track */
            border-radius: 4px ;
        }
        .property-options::-webkit-scrollbar-track {
            display: none;
        }
        .property-options::-webkit-scrollbar-thumb {
            display: none;
        }

        .scrolllegend::-webkit-scrollbar-thumb {
            background-color: rgba(255, 255, 255, 0.2); /* transparent white thumb */
        }
        .heatmap-legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 12px;
        }
        .heatmap-legend-color {
            width: 16px;
            height: 16px;
            border-radius: 4px;
            flex-shrink: 0;
        }
        .heatmap-legend-gradient {
            width: 16px;
            height: 60px;
            border-radius: 4px;
            flex-shrink: 0;
        }
        .heatmap-legend-label {
            font-weight: 500;
            word-break: break-word;
        }
        .heatmap-legend-title {
            font-size: 14px;
            font-weight: 600;
            border-bottom: 1px solid var(--text-secondary);
            padding-bottom: 6px;
        }
        .heatmap-legend-range {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .heatmap-legend-range-labels {
            display: flex;
            flex-direction: column;
            gap: 30px;
            font-size: 11px;
            color: var(--text-secondary);
        }
        .lm-actions .fa-trash{
            color: white;
        }





        .modal-action::before {
            display: none;
        }

        .modal-action:hover {
            background: #7c93ff;
            transform: translateY(-2px);
        }

        .modal-action:active {
            transform: translateY(0);
            background: #4a63cc;
        }


        .action-symbol {
            font-size: 17px;
            color: #ffffff;
        }

        .action-label {
            font-size: 11px;
            font-weight: 600;
            line-height: 1.2;
            color: #ffffff;
        }

        .operating-hours, .contact-details, .business-rating {
            color: #9ca3af;
            font-size: 14px;
            font-weight: 500;
        }

        .rating-display {
            color: #fbbf24;
            margin-right: 6px;
        }


        .travel-time {
            display: flex;
            align-items: center;
            gap: 10px;
            color: var(--text-secondary);
            font-size: 14px; /* Increased from 13px */
            margin: 0px 0 12px 24px; /* Adjusted margin for larger stop numbers */
        }
        .travel-time i {
            color: var(--warning-color);
            font-size: 14px; /* Increased from 12px */
        }

        /* Time Summary with improved readability */
        .time-summary {
            border-top: 1px solid var(--border-color);
            padding: 14px 16px; /* Increased padding */
            background: var(--primary-bg);
            position: sticky;
            bottom: 0;
            z-index: 90;
            background: var(--secondary-bg);
        }

        .stats-container {
            display: flex;
            gap: 16px;
        }

        .chart-container {
            display: flex;
            align-items: center;
            gap: 12px;
            flex: 1;
        }

        .chart-wrapper {
            width: 63px; /* Slightly increased */
            height: 63px;
            flex-shrink: 0;
        }

        .chart-legend {
            flex: 1;
        }

        .gas-stats {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px; /* Increased gap */
            min-width: 80px; /* Increased width */
            justify-content: center;
        }

        .gas-icon {
            width: 32px; /* Increased from 30px */
            height: 32px;
            background: var(--warning-color);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 14px; /* Increased from 13px */
        }

        .gas-info {
            text-align: center;
        }

        .gas-amount {
            font-size: 15px; /* Increased from 14px */
            font-weight: 600;
            color: var(--text-primary);
            line-height: 1.2;
        }

        .gas-cost {
            font-size: 13px; /* Increased from 11px */
            color: var(--text-secondary);
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 8px; /* Increased gap */
            margin-bottom: 4px; /* Increased margin */
        }

        .legend-item:last-child {
            margin-bottom: 0;
        }

        .legend-color {
            width: 10px; /* Increased from 8px */
            height: 10px;
            border-radius: 2px;
            flex-shrink: 0;
        }
.sortable-ghost {
    opacity: 0.4;
}

.sortable-chosen {
    cursor: grabbing;
}

.sortable-drag {
    transform: rotate(5deg);
}
        .legend-color.driving {
            background-color: #5e7cff;
        }

        .legend-color.meeting {
            background-color: #12b981;
        }

        .legend-text {
            font-size: 14px; /* Increased from 12px */
            font-weight: 500;
            color: var(--text-primary);
        }


        /* Responsive adjustments */
  


























.filter-name i {
            color: var(--text-secondary);
        }

.filter-name {
            background: var(--primary-bg);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 16px;
            transition: all 0.3s ease;
        }

        .filter-name:hover {
            border-color: var(--accent-color);
            box-shadow: 0 4px 16px rgba(93,124,255,0.1);
        }

        .filter-name label {
            display: block;
            font-weight: 600;
            margin-bottom: 12px;
            color: var(--text-primary) !important;
        }

        .filter-name input {
            width: 100%;
            max-width: 500px;
            padding: 14px 18px;
            background: var(--secondary-bg);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            color: var(--text-primary);
            font-size: 16px;
            font-weight: 500;
            transition: all 0.3s ease;
        }

        .filter-name input:focus {
            outline: none;
            border-color: var(--accent-color);
            box-shadow: 0 0 0 3px rgba(93,124,255,0.2);
            background: var(--hover);
        }

        .filter-name input::placeholder { color: var(--text-secondary); }

        .section {
            background: var(--primary-bg);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            margin-bottom: 24px;
            overflow: hidden;
            transition: all 0.3s ease;
        }

        .section:hover {
            border-color: var(--accent-color);
            box-shadow: 0 4px 16px rgba(93,124,255,0.1);
        }

        .section-header {
            background: var(--secondary-bg);
            border-bottom: 1px solid var(--border-color);
            padding: 16px 20px;
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .header-left i{
            color: var(--text-secondary);
        }

        .info-icon {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: var(--accent-color) !important;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            cursor: help;
            position: relative;
        }

        .tooltip {
            position: fixed; /* Change from absolute to fixed */
            background: var(--secondary-bg);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 12px;
            font-size: 12px;
            font-weight: normal;
            width: 220px;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            z-index: 10001; /* Increase z-index */
            box-shadow: 0 8px 24px rgba(0,0,0,0.3);
            margin-bottom: 125px;
            color: var(--text-secondary);
        }

        .header-left:hover .tooltip {
            opacity: 1;
            visibility: visible;
        }
        .container2 {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--secondary-bg);
    border-radius: 0px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 100%;
}
        .section-content { padding: 20px; }

        .condition {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 12px;
            padding: 14px;
            background: var(--secondary-bg);
            border-radius: 10px;
            border: 1px solid var(--border-color);
            transition: all 0.3s ease;
            flex-wrap: wrap;
        }

        .condition:hover {
            border-color: var(--accent-color);
            box-shadow: 0 2px 8px rgba(93,124,255,0.1);
        }

        .logic-label {
            background: var(--accent-color);
            color: white;
            padding: 8px 14px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 600;
            min-width: 60px;
            text-align: center;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .logic-or {
            background: var(--hover);
            color: var(--text-primary);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            padding: 6px 12px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .logic-or:hover {
            background: var(--accent-color);
            border-color: var(--accent-color);
            color: white;
        }
.field-container {
    position: relative;
    min-width: 120px;
    width: auto;
}
.ui-timepicker {
    padding: 0px;
    width: auto !important;
}
.ui-timepicker-viewport {

}
.ui-timepicker-container {
    z-index: 10000000 !important;
    z-index: 100000 !important;
    cursor: default !important;
    font-size: 12px !important;
    color: var(--text-primary) !important;
    font-weight: 600 !important;
    min-width: 50px !important;
    text-align: right !important;
    background: var(--secondary-bg) !important;
    padding: 0px !important;
    border-radius: 6px !important;
    border: 1px solid var(--border-color) !important;
    border-top-right-radius: 0px !important;
    border-top-left-radius: 0px !important;
}
.ui-timepicker-viewport > .ui-menu-item > .ui-corner-all {
    font-weight: 500 !important;
    font-family: Inter, -apple-system, "system-ui", sans-serif !important;
    cursor: pointer !important;
    font-size: 13px !important;
}
.ui-timepicker-viewport > .ui-menu-item > .ui-state-hover {
    border: 0px !important;
    background: var(--hover-bg) !important;
}
.field-input, .operator, .value-input, .date-preset {
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    width: auto;
    min-width: 120px;
    max-width: 300px;
}
.field-input:hover, .operator:hover, .value-input:hover, .date-preset:hover, .field-input:focus, .operator:focus, .value-input:focus, .date-preset:focus {
    background: var(--primary-bg) !important;
}


.operator { 
    min-width: 140px;
    display: none; /* Initially hidden */
}

.value-input { 
    min-width: 120px;
    display: none; /* Initially hidden */
}

.date-preset { 
    min-width: 160px;
}

.date-container {
    display: none; /* Initially hidden */
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.multiselect-container {
    display: none; /* Initially hidden */
}

/* Auto-resize input based on content */
.field-input {
    width: auto;
    min-width: 146px;
}
.field-input:focus, .multiselect-search:focus {
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
    outline: none;
}


         .operator:focus, .value-input:focus, .date-preset:focus {
            outline: none;
            border-color: var(--accent-color);
            box-shadow: 0 0 0 3px rgba(93,124,255,0.2);
            background: var(--hover);
        }

        .field-input:hover, .operator:hover, .value-input:hover, .date-preset:hover {
            background: var(--hover);
            border-color: var(--accent-color);
        }

        .suggestions {
            position: fixed; /* Change from absolute to fixed */
            background: var(--secondary-bg);
            border: 1px solid var(--border-color);
            border-top: none;
            border-radius: 0 0 8px 8px;
            max-height: 200px;
            overflow-y: auto;
            z-index: 10000; /* Increase z-index */
            display: none;
        }


        .suggestion {
            padding: 10px 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 14px;
            border-bottom: 1px solid var(--border-color);
        }

        .suggestion:hover {
            background: var(--hover-bg);
            color: white;
        }
        
        .suggestion.selected {
            background: var(--accent-color);
            color: var(--text-primary);
        }

        .date-container {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }
        .multiselect-input-wrapper {
    position: relative;
    width: 100%;
    min-width: 200px;
}

.multiselect-search {
    width: 100%;
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    text-indent: 0; /* Will be updated by JavaScript */
}

.multiselect-search:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--hover);
}

.multiselect-dropdown {
    position: fixed; /* Change from absolute to fixed */
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10000; /* Increase z-index */
    display: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    min-width: 200px; /* Add minimum width */
}


.multiselect-options {
    padding: 0;
}

.multiselect-option {
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

.multiselect-option:hover {
    background: var(--hover-bg);
}

.multiselect-option.selected {
    background: var(--accent-color);
    color: white;
}

.selected-values {
    display: flex;
    gap: 4px;
    position: absolute;
    pointer-events: none;
    overflow: hidden;
    top: 7px;
    z-index: 100;
    padding-right: 7px;
}
.selected-value:first-of-type {
    margin-left: 7px !important;
}

.selected-value {
    background: var(--accent-color);
    color: white;
    padding: 4px 6px;   
    border-radius: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 2px;
    pointer-events: auto;
}

.selected-value-remove {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    margin-left: 4px;
}
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    background: rgba(0, 0, 0, 0.635);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90vw;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    font-size: 18px;
}

.modal-close:hover {
    background: #ff4757;
    border-color: #ff4757;
    color: white;
}
 .date-header {
            color: var(--text-primary);
            font-size: 18px;
            font-weight: 500;
            margin-bottom: 16px;
            padding-left: 4px;
            opacity: 0.8;
        }

        .route-card {
    background: var(--secondary-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    margin: 16px;
}

        .route-card.hidden {
            display: none;
        }

        .route-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, var(--hover-bg), var(--primary-bg));
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
            z-index: 1;
        }

        .route-card:hover {
            border-color: var(--accent-color);
            background: var(--hover-bg);
        }

        .route-card:hover::before {
            opacity: 1;
        }

        .route-card:hover::after {
            content: 'Edit/View/Drive';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: var(--accent-color);
            color: white;
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            animation: editBounce 0.4s ease-out;
            z-index: 10;
            border: 2px solid rgba(255, 255, 255, 0.2);
        }
        [data-appointment="true"] {
            container-type: size;
            container-name: appointmentContainer;
        }
        @container appointmentContainer (min-width: 170px) and (min-height: 50px) {
            [data-appointment="true"]:hover::after {
                content: 'Edit/View/Drive';
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                background: var(--accent-color);
                color: white;
                padding: 8px 16px;
                border-radius: 8px;
                font-size: 11px;
                font-weight: 700;
                text-transform: uppercase;
                letter-spacing: 1px;
                animation: editBounce 0.4s ease-out;
                border: 2px solid rgba(255, 255, 255, 0.2);
                z-index: 100000000;
            }

        }


        [data-appointment="true"] {
            border: 2px solid var(--primary-bg) !important; 
            background-color: var(--primary-bg) !important;
            cursor:  pointer !important;
        }
        [data-appointment="true"]:hover {
            border: 2px solid var(--accent-color) !important;
            background-color: var(--hover-bg) !important;

        }
        [data-appointment="true"]:hover > .route-stop{
            opacity: 0 !important; 
        }
        [data-appointment="true"] > .route-stop{
            opacity: 1 !important; 
        }
        .route-stop {
            transition: opacity 0.3s ease;
        }
        .drivers-avatars {
            transition: opacity 0.3s ease;
        }
        [data-appointment="true"] {
            transition: border 0.3s ease, background-color 0.3s ease;
        }


        .route-card:hover .route-header,
        .route-card:hover .route-content {
            opacity: 0.3;
            transition: opacity 0.3s ease;
        }

        .route-card:hover .drivers-section {
            opacity: 1;
        }


        .drivers-section:hover ~ *,
        .drivers-section:hover {
            opacity: 1 !important;
        }

        .route-card:has(.drivers-section:hover)::after {
            display: none;
        }

        .route-card:has(.drivers-section:hover)::before {
            opacity: 0;
        }

        .route-card:has(.drivers-section:hover) {
            transform: none;
            box-shadow: none;
            background: var(--secondary-bg);
            border-color: var(--border-color);
        }

        .route-card:has(.drivers-section:hover) .route-header,
        .route-card:has(.drivers-section:hover) .route-content {
            opacity: 1;
        }

        @keyframes editBounce {
            0% {
                opacity: 0;
                transform: translate(-50%, -50%) scale(0.6);
            }
            50% {
                transform: translate(-50%, -50%) scale(1.05);
            }
            100% {
                opacity: 1;
                transform: translate(-50%, -50%) scale(1);
            }
        }

        .route-header {
            padding: 14px 18px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            position: relative;
            z-index: 2;
            transition: opacity 0.3s ease;
        }

        .route-content {
            padding: 18px;
            position: relative;
            z-index: 2;
            transition: opacity 0.3s ease;
        }

        .route-main {
            display: flex;
            align-items: center;
            gap: 12px;
            flex: 1;
        }

        .route-info {
            flex: 1;
        }

        .route-name {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 6px;
        }

        .route-tags {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }

        .tag {
            background: rgba(93, 124, 255, 0.15);
            color: var(--accent-color);
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 500;
        }

        .tag.priority {
            background: rgba(245, 158, 11, 0.15);
            color: var(--warning-color);
        }

        .tag.urgent {
            background: rgba(239, 68, 68, 0.15);
            color: var(--danger-color);
        }

        .status-badge {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
        }

        .status-badge.active {
            background: rgba(16, 185, 129, 0.15);
            color: var(--success-color);
        }
        .territory-actions .driver-avatar, .territory-actions .driver-avatar2, .filter-actions .driver-avatar2, .filter-actions .driver-avatar {
                width: 23px !important;
                height: 23px !important;
                font-size: 10px !important;
                margin-top: 1.5px;
        }   
        .territory-actions > .drivers-avatars {
            margin-right: 4px !important;
        }   
        .driver-avatar-count {
            background: var(--accent-color) !important;
        }
        .member-actions .remove {
            color: var(--red-danger)
        }
        .status-badge.completed {
            background: rgba(93, 124, 255, 0.15);
            color: var(--accent-color);
        }

        .status-badge.delayed {
            background: rgba(245, 158, 11, 0.15);
            color: var(--warning-color);
        }

        .status-dot {
            width: 4px;
            height: 4px;
            border-radius: 50%;
            background: currentColor;
        }

        .route-date {
            font-size: 14px;
            color: var(--text-primary);
            font-weight: 600;
            margin-bottom: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .route-date i {
            color: var(--accent-color);
        }

        .route-metrics {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 18px;
        }

        .stops-info {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
        }

        .stops-count {
            font-size: 20px;
            font-weight: 700;
            color: var(--accent-color);
        }

        .stops-label {
            font-size: 11px;
            color: var(--text-secondary);
            text-transform: uppercase;
        }

        .chart-section {
            display: flex;
            align-items: center;
            gap: 18px;
            margin-bottom: 18px;
        }

        .chart-wrapper {
            position: relative;
            width: 70px;
            height: 70px;
            flex-shrink: 0;
        }

        .chart-center-info {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
            pointer-events: none;
        }

        .total-time {
            font-size: 13px;
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1;
        }

        .total-label {
            font-size: 9px;
            color: var(--text-secondary);
            text-transform: uppercase;
        }

        .chart-legend {
            display: flex;
            flex-direction: column;
            gap: 10px;
            flex: 1;
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .legend-color {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            flex-shrink: 0;
        }



        .legend-text {
            font-size: 13px;
            color: var(--text-secondary);
            flex: 1;
        }

        .legend-value {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
            margin-left: auto;
        }
        .overlay {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.3);
        display: flex
    ;
        justify-content: center;
        align-items: center;
        z-index: 10;
        pointer-events: all;
        backdrop-filter: blur(4px);
        }
        .fa-question {
            color: var(--secondary-bg) !important;
        }
        .spinner2 {
    width: 60;
    height: 60;
    border: 7px solid rgb(255 255 255 / 37%);
    border-top: 7px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    flex-shrink: 0;
}
        .drivers-section, .drivers-section2 {
            display: flex;
            justify-content: space-between;
            padding-top: 14px;
            border-top: 1px solid var(--border-color);
            position: relative;
            z-index: 5;
            align-items: center;
        }

        .drivers-label {
            font-size: 12px;
            color: var(--text-secondary);
            text-transform: uppercase;
            font-weight: 500;
        }

        .drivers-info {
            display: flex;
            align-items: flex-start;
        }

        .drivers-avatars {
            display: flex;
            gap: -8px;
        }
        [data-appointment="true"]:hover .drivers-avatars{
            opacity: 1 !important; 
        }
        [data-appointment="true"] .drivers-avatars{
            opacity: 0 !important; 
        }

        .driver-avatar {
            margin-top: 2px;
            width: 28px;
            height: 28px;
            background: linear-gradient(135deg, var(--accent-color), var(--success-color));
            border: 2px solid var(--secondary-bg);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 11px;
            font-weight: 700;
            cursor: default;
            transition: all 0.2s ease;
            position: relative;
            margin-left: -8px;
        }
        .driver-avatar3 {
            margin-top: 2px;
            width: 28px;
            height: 28px;
            background: linear-gradient(135deg, var(--accent-color), var(--warning-color));
            border: 2px solid var(--secondary-bg);
            border-radius: 50%;
            display: flex;  
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 11px;
            font-weight: 700;
            cursor: default;
            transition: all 0.2s ease;
            position: relative;
            margin-left: -8px;
        }
        .driver-avatar4 {
            margin-top: 2px;
            width: 28px;
            height: 28px;
            background: linear-gradient(135deg, var(--accent-color), var(--bright-hover));
            border: 2px solid var(--secondary-bg);
            border-radius: 50%;
            display: flex;  
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 11px;
            font-weight: 700;
            cursor: default;
            transition: all 0.2s ease;
            position: relative;
            margin-left: -8px;
        }
        .driver-avatar2 {
            border: 2px solid var(--secondary-bg);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 11px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
            margin-left: -8px;
            background: var(--accent-color);
            width: 33px;
            height: 33px
        }



        .driver-avatar:first-child, .driver-avatar3:first-child, .driver-avatar4:first-child {
            margin-left: 0;
        }
        .driver-avatar:hover {
            z-index: 10;
        }
        .driver-avatar2:hover {
            transform: scale(1.15);
            z-index: 10;
        }



        .tooltip::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 3px solid transparent;
            border-top-color: rgba(0, 0, 0, 0.9);
        }

        .driver-avatar:hover .tooltip {
            opacity: 1;
        }

        .drivers-count {
            font-size: 13px;
            color: var(--text-secondary);
            font-weight: 500;
        }
.open-filter-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px auto;
    box-shadow: 0 4px 12px rgba(93,124,255,0.3);
}

.open-filter-btn:hover {
    background: #4a6bff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(93,124,255,0.4);
}

.selected-value-remove:hover, .remove-heatmap-btn:hover > i  {
    color: #ff4757;
}

    .exact-date-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    background: var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    margin-right: 100px;
}

.exact-date-toggle::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.logic-label {
    background: var(--accent-color);
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.exact-date-toggle.active {
    background: var(--accent-color);
}

.exact-date-toggle.active::before {
    transform: translateX(26px);
}

.exact-date-toggle::after {
    content: 'use exact date';
    position: absolute;
    left: 53px;
    top: 50%;
    transform: translateY(-50%);    
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    pointer-events: none;
}


        .date-input2 {
            background: var(--primary-bg);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 10px 12px;
            color: var(--text-primary);
            font-size: 14px;
            width: 140px;
            transition: all 0.3s ease;
        }

        .date-input2:focus {
            outline: none;
            border-color: var(--accent-color);
            box-shadow: 0 0 0 3px rgba(93,124,255,0.2);
        }
        .error {
    border-color: #ff4757 !important;
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.2) !important;
}

.error-message {
    background: #ff4757;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideDown 0.3s ease;
}
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--secondary-bg);
    border-bottom: 1px solid var(--border-color);
    margin: -24px -24px 24px -24px;
    padding: 24px;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}



        .days-input {
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 14px;
    width: 60px;
    transition: all 0.3s ease;
    display: none;
}

.days-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(93,124,255,0.2);
}

  

        .add-btn {
            background: transparent;
            border: 2px dashed var(--border-color);
            color: var(--accent-color);
            padding: 14px 20px;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-weight: 600;
            font-size: 14px;
            width: 100%;
        }

        .add-btn:hover {
            background: rgba(93,124,255,0.1);
            border-color: var(--accent-color);
        }

        .actions {
            display: flex;
            justify-content: center;
            gap: 16px;
            margin-top: 0px;    
            padding: 24px;
            position: sticky;
            bottom: 0;
            background-color: var(--secondary-bg);
            border-top: 1px solid var(--border-color);
        }
.operator {
    min-width: 120px;
    max-width: 200px;
    width: auto;
    text-align: left;
    padding-left: 12px;
    padding-right: 12px;
}



        .days-input-container {
            display: none;
            align-items: center;
            gap: 8px;
            position: relative;
        }


.days-input-container.show {
    display: flex;
}


.days-input {
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 14px;
    width: 80px;
    text-align: center;
    transition: all 0.3s ease;
    display: block;
}

        ::-webkit-scrollbar { width: 6px; }
        ::-webkit-scrollbar-track { background: var(--primary-bg); }
        ::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
        ::-webkit-scrollbar-thumb:hover { background: var(--accent-color); }


   .export-header {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .export-header i {
            color: var(--accent-color);
            font-size: 24px;
        }

        .export-header h2 {
            font-size: 24px;
            font-weight: 700;
            color: var(--text-primary);
            margin: 0;
        }

        .export-subtitle {
            color: var(--text-secondary);
            font-size: 14px;
            margin-top: 8px;
            line-height: 1.4;
        }
  .export-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 16px;
        }

        .export-option {
            background: var(--primary-bg);
            border: 1.5px solid var(--border-color);
            border-radius: 12px;
            padding: 20px 16px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .export-option::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, rgba(93, 124, 255, 0.05), rgba(16, 185, 129, 0.05));
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
            z-index: 1;
        }

        .export-option:hover {
            border-color: var(--accent-color);
            background: var(--hover-bg);
            transform: translateY(-2px);
        }

        .export-option:hover::before {
            opacity: 1;
        }

        .export-option i {
            font-size: 28px;
            color: var(--accent-color);
            margin-bottom: 12px;
            display: block;
            position: relative;
            z-index: 2;
        }

        .export-option .title {
            font-weight: 600;
            color: var(--text-primary);
            font-size: 14px;
            margin-bottom: 4px;
            position: relative;
            z-index: 2;
        }

        .export-option {
            font-size: 12px;
            color: var(--text-secondary);
            line-height: 1.3;
            position: relative;
            z-index: 2;
        }

        .lm-backdrop { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 1000000000000; opacity: 0; animation: fadeIn 0.3s ease forwards; }
        @keyframes fadeIn { to { opacity: 1; } }
        @keyframes slideUp { from { opacity: 0; transform: translateY(20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
        .lm-dialog { background: var(--secondary-bg); border-radius: 16px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6); border: 1px solid var(--border-color); width: 400px; max-width: 90vw; overflow: hidden; animation: slideUp 0.4s ease; }
        .lm-top { padding: 24px 24px 20px; display: flex; align-items: center; gap: 16px; }
        .lm-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
        .lm-icon.warning { background: #dc354521; color: var(--bs-form-invalid-border-color); }
        .lm-icon.info { background: rgba(16, 185, 129, 0.15); color: var(--success-color); }
        .lm-text-area { flex: 1; min-width: 0; }
        .lm-main-title { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; line-height: 1.2; }
        .lm-description { margin-bottom: 0px; font-size: 14px; color: var(--text-secondary); line-height: 1.3; }
        .lm-exit-btn { width: 32px; height: 32px; background: transparent; border: none; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-secondary); transition: all 0.2s ease; flex-shrink: 0; }
        .lm-exit-btn:hover { background: var(--hover-bg); color: var(--text-primary); }
        .lm-content { padding: 0 24px 24px; }
        .lm-input-field { width: 100%; padding: 12px 16px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--primary-bg); color: var(--text-primary); font-size: 14px; transition: all 0.2s ease; margin-bottom: 20px; }
        .lm-input-field:focus { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(93, 124, 255, 0.1); }
        .lm-input-field::placeholder { color: var(--text-secondary); }
        .lm-actions { display: flex; gap: 12px; justify-content: flex-end; }
        .lm-btn { padding: 12px 24px; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; gap: 8px; }
        .lm-secondary { background: var(--hover-bg); color: var(--text-primary); }
        .lm-secondary:hover { background: var(--bright-hover); transform: translateY(-1px); }
        .lm-danger { background: var(--bs-red); color: white; }
        .lm-danger:hover { background: var(--bs-red); transform: translateY(-1px);  }
        .lm-primary { background: var(--accent-color); color: white; }
        .lm-primary:hover { background: #4c6aef; transform: translateY(-1px); }
        .lm-demo-trigger { background: var(--accent-color); color: white; border: none; padding: 16px 24px; border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 12px rgba(93, 124, 255, 0.3); transition: all 0.2s ease; }
        .lm-demo-trigger:hover { transform: translateY(-1px); }
        .lm-demo-trigger.danger { background: var(--red-danger); }
        .lm-demo-trigger.danger:hover { background: var(--bs-red); }
 
         .dashboard-wrapper {
            max-width: 100%;
            margin: 0 auto;
            background: var(--primary-bg);
            border-radius: 12px;
            overflow: hidden;
        }

        .hero-banner {
            background: var(--accent-color);
            color: var(--white-text);
            padding: 20px;
            text-align: left;
        }

        .main-heading {
            font-size: 1.5em;
            font-weight: 600;
            margin: 0;
        }

        .content-area {
            padding: 20px;
        }

        .group-block {
            margin-bottom: 25px;
            overflow: auto;
        }
        #leadershipGroup {
            max-height: 35%;
        }

        .category-title {
            font-size: 1.1em;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .title-symbol {
            color: var(--accent-color);
            width: 16px;
        }

        .member-layout {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        }

        .person-card {
            background: var(--secondary-bg);
            border: 0px solid var(--border-color);
            border-radius: 8px;
            padding: 16px;
            transition: all 0.3s ease;
            cursor: pointer;
            position: relative;
            overflow: hidden;
            margin-bottom: 15px;
        }


        .person-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, rgba(93, 124, 255, 0.05), rgba(16, 185, 129, 0.05));
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
            z-index: 1;
        }

        .person-card:hover::before {
            opacity: 1;
        }

        .profile-row {
            display: flex;
            align-items: center;
            gap: 15px;
            position: relative;
            z-index: 2;
        }

       .avatar-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--success-color));
    display: flex
;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1em;
    flex-shrink: 0;
}

        .info-column {
            flex: 1;
        }

        .display-name {
            font-size: 0.9em;
            font-weight: 600;
            color: var(--text-primary);
        }

        .contact-info {
            color: var(--text-secondary);
            font-size: 0.8em;
        }

        .role-tags {
            display: flex;
            gap: 8px;
        }

        .status-label {
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 0.8em;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .status-label.admin {
            background: rgba(239, 68, 68, 0.15);
            color: #ff4757;
        }

        .status-label.member {
            background: rgba(16, 185, 129, 0.15);
            color: var(--success-color);
        }

        .placeholder-text {
            text-align: center;
            padding: 40px;
            color: var(--text-secondary);
            font-style: italic;
        }

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

         #mainTerritory {
            height: 100%;
        }
         #mainTerritory .empty-state {
                height: 100%;
                background: var(--secondary-bg);
        }


                .team-panel {
                    position: absolute; background: var(--secondary-bg);
                    border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,0.4); min-width: 300px;
                    max-width: 400px; max-height: 400px; overflow-y: auto; z-index: 1000;
                    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
                }
                .team-panel-header {
                    padding: 20px; font-weight: 600; border-bottom: 1px solid var(--border-color);
                    background: var(--secondary-bg); border-radius: 12px 12px 0 0;
                    color: var(--text-primary); font-size: 16px;
                }
                .team-member {
                    display: flex; align-items: center; justify-content: space-between;
                    padding: 16px 20px; border-bottom: 1px solid var(--border-color);
                    transition: all 0.2s ease;
                }
                .team-member:last-child { border-bottom: none; }
                .team-member:hover { background: var(--hover-bg); }

                .member-info { display: flex; align-items: center; gap: 12px; }
                .member-details { display: flex; flex-direction: column; gap: 4px; }
                .member-name { font-weight: 500; font-size: 14px; color: var(--text-primary); }
                .member-status { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500;}
                .member-status.assigned { color: var(--success-color); }
                .member-status.not-assigned { color: var(--text-secondary); }
                .member-actions { display: flex; gap: 6px; align-items: center; }

               
                .member-permission { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500;}
                .member-permission.creator { color: var(--success-color); }
                .member-permission.can-edit { color: var(--warning-color); }
                .member-permission.can-view { color: var(--accent-color); }
                .member-permission.no-access { color: var(--text-secondary); }
                .permission-dropdown { position: relative; display: inline-block; }
                .permission-dropdown select {
                    padding: 6px 12px; border: 1px solid var(--border-color);
                    background: var(--secondary-bg); border-radius: 6px; font-size: 12px;
                    cursor: pointer; transition: all 0.2s ease; color: var(--text-secondary);
                    font-weight: 500; min-width: 100px;
                }
                .permission-dropdown select:hover { background: var(--hover-bg); color: var(--text-primary); }
                .permission-dropdown select:focus { outline: none; border-color: var(--accent-color); }                

                .driver-avatar2 { cursor: pointer; position: relative; }

                .action-btn4 {
                    padding: 6px 8px;
                    background: var(--hover-bg); border-radius: 6px; font-size: 16px;
                    cursor: pointer; transition: all 0.2s ease; color: var(--text-secondary);
                    display: flex; align-items: center; justify-content: center;
                    width: 32px; height: 32px;
                }
                .action-btn4:hover { background: var(--bright-hover) }
                .action-btn4.remove { color: var(--bs-danger); }
                .action-btn4.add { color: var(--success-color); }
 .supercharge-overlay, .supercharge-overlay2 {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            backdrop-filter: blur(10px);
            background-color: hsl(0deg 0% 0% / 74%);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10000000000;
        }

        .supercharge-modal {
            background: var(--primary-bg);
            border-radius: 20px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
            display: flex;
            max-width: 900px;
            width: 100%;
            max-height: 90vh;
            overflow: hidden;
            position: relative;
            border: 1px solid var(--border-color);
        }

        .modal-close-button {
            position: absolute;
            top: 20px;
            right: 25px;
            background: none;
            border: none;
            font-size: 22px;
            color: var(--text-secondary);
            cursor: pointer;
            z-index: 10;
            transition: color 0.3s ease;
        }

        .modal-close-button:hover {
            color: var(--white-text);
        }

        .customization-section {
            background: var(--secondary-bg);
            padding: 40px;
            flex: 1;
            color: var(--white-text);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .customization-content {
            flex: 1;
        }

        .settings-icon-wrapper {
            background: var(--accent-color);
            width: 80px;
            height: 80px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 30px;
            box-shadow: 0 8px 24px rgba(93, 124, 255, 0.3);
        }

        .settings-icon-wrapper i {
            font-size: 36px;
            color: white;
        }

        .customization-section h2 {
            font-size: 22px;
            font-weight: 600;
            margin-bottom: 12px;
            line-height: 1.2;
        }

        .customization-section p {
            font-size: 15px;
            opacity: 0.9;
            margin-bottom: 25px;
            line-height: 1.4;
        }

        .feature-checklist {
            list-style: none;
            margin-bottom: 30px;
            padding-left: 0px !important;
        }

        .feature-checklist li {
            display: flex;
            align-items: center;
            margin-bottom: 12px;
            font-size: 14px;
            opacity: 0.95;
        }

        .feature-checklist li i {
            background: var(--primary-bg);
            width: 20px;
            height: 20px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 12px;
            font-size: 10px;
            flex-shrink: 0;
        }

        .support-card {
            background: var(--primary-bg);
            padding: 20px;
            border-radius: 12px;
            margin-top: 20px;
            border: 0px solid var(--border-color);
        }

        .support-card h3 {
            display: flex;
            align-items: center;
            font-size: 17px;
            margin-bottom: 8px;
        }

        .support-card h3 i {
            margin-right: 8px;
            font-size: 16px;
        }

        .support-card p {
            font-size: 13px;
            opacity: 0.9;
            margin: 0;
        }

        .main-content-area {
            flex: 1;
            padding: 60px;
            display: flex;
            flex-direction: column;
            background: var(--primary-bg);
            color: var(--white-text);
        }

        .main-content-area h1 {
            font-size: 26px;
            font-weight: 600;
            color: var(--white-text);
            margin-bottom: 8px;
            line-height: 1.2;
        }

        .product-subtitle {
            color: var(--text-secondary);
            font-size: 15px;
            margin-bottom: 25px;
            line-height: 1.4;
        }

        .features-showcase {
            margin-bottom: 25px;
        }

        .features-showcase h3 {
            font-size: 17px;
            color: var(--white-text);
            margin-bottom: 15px;
            font-weight: 600;
        }

        .features-display-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
            margin-bottom: 20px;
        }

        .feature-display-item {
            display: flex;
            align-items: center;
            font-size: 14px;
            color: var(--white-text);
        }

        .feature-display-item i {
            width: 35px;
            height: 35px;
            background: var(--accent-color);
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 10px;
            color: white;
            font-size: 16px;
            flex-shrink: 0;
        }

        .product-description {
            color: var(--text-secondary);
            font-size: 14px;
            line-height: 1.5;
            margin-bottom: 25px;
        }

        .team-creation-button {
            background: var(--accent-color);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 16px rgba(93, 124, 255, 0.3);
        }

        .team-creation-button:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 24px rgba(93, 124, 255, 0.4);
            background: var(--blue-accent);
        }

        .team-creation-button i {
            margin-right: 6px;
        }

        @media (max-width: 768px) {
            .supercharge-modal {
                flex-direction: column;
                max-width: 500px;
            }
            
            .customization-section {
                padding: 30px;
            }
            
            .main-content-area {
                padding: 30px;
            }
            
            
            .main-content-area h1 {
                font-size: 28px;
            }
        }

.multiple-locations-modal {
    max-width: 350px;
    font-family: Arial, sans-serif;
}

.multiple-locations-modal .modal-header {
    padding: 20px 20px 15px 20px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.multiple-locations-modal .modal-header h2 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.multiple-locations-modal .modal-header p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.locations-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 22px;
}

.location-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    justify-content: space-between;
    background: var(--primary-bg);
}

.location-item:hover {
    background-color: var(--hover-bg);
}

.location-item:last-child {
    border-bottom: none;
}

.location-info {
    flex: 1;
}
.restulfisch {
    margin-bottom: 0px !important;
}
.multiple-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 0;
}

.location-info h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.location-type {
    margin: 0 0 5px 0;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    font-weight: 500;
}

.location-address {
    margin: 0;
    font-size: 13px;
    color: #888;
}

.location-arrow {
    color: #ccc;
    margin-left: 10px;
}