:root {
    --sidebar-width: 260px;
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f6fa;
    overflow-x: hidden;
}

.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-left-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-illustration {
    max-width: 500px;
}

.login-illustration i {
    font-size: 80px;
    opacity: 0.9;
}

.login-illustration h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
}

.feature-list {
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 18px;
}

.feature-item i {
    font-size: 24px;
}

.login-right-panel {
    background: white;
    padding: 40px;
}

.login-form-container {
    max-width: 450px;
    width: 100%;
}

.login-divider {
    position: relative;
    text-align: center;
    margin: 1.25rem 0;
}

.login-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #dee2e6;
}

.login-divider span {
    position: relative;
    display: inline-block;
    padding: 0 12px;
    background: #fff;
    color: #6c757d;
    font-size: 0.9rem;
}

.btn-microsoft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #fff;
    color: #1f1f1f;
    border: 1px solid #ced4da;
    font-weight: 600;
}

.btn-microsoft:hover,
.btn-microsoft:focus {
    background: #f8f9fa;
    color: #1f1f1f;
    border-color: #adb5bd;
}

.microsoft-mark {
    display: inline-grid;
    grid-template-columns: repeat(2, 10px);
    grid-template-rows: repeat(2, 10px);
    gap: 2px;
}

.microsoft-mark span:nth-child(1) { background: #f25022; }
.microsoft-mark span:nth-child(2) { background: #7fba00; }
.microsoft-mark span:nth-child(3) { background: #00a4ef; }
.microsoft-mark span:nth-child(4) { background: #ffb900; }

.logo-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.logo-circle i {
    font-size: 40px;
    color: white;
}

.input-group-text {
    background-color: #f8f9fa;
    border-right: none;
}

.input-group .form-control {
    border-left: none;
}

.input-group .form-control:focus {
    border-left: none;
    box-shadow: none;
}

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

.sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%);
    color: #fff;
    transition: all 0.3s;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    overflow-y: auto;
}

.sidebar.collapsed {
    margin-left: calc(-1 * var(--sidebar-width));
}

.sidebar-header {
    padding: 25px 20px;
    background: rgba(0, 0, 0, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
}

.logo i {
    font-size: 32px;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-section {
    margin-bottom: 30px;
}

.menu-title {
    padding: 0 20px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 10px;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar .nav-link i {
    font-size: 20px;
    width: 24px;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-left-color: #fff;
}

#content {
    width: 100%;
    min-height: 100vh;
    transition: all 0.3s;
    margin-left: var(--sidebar-width);
}

#content.expanded {
    margin-left: 0;
}

.main-content {
    padding: 30px;
}

.content-header h2 {
    color: #2d3748;
    margin-bottom: 8px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.stat-card-blue .stat-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card-green .stat-icon {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.stat-card-orange .stat-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card-purple .stat-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-content h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #2d3748;
}

.stat-content p {
    color: #718096;
    margin-bottom: 8px;
    font-size: 14px;
}

.stat-change {
    font-size: 13px;
    font-weight: 600;
}

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.card-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 20px 24px;
    background: white;
    border-radius: 12px 12px 0 0 !important;
}

.activity-list {
    padding: 10px 0;
}

.recent-activity-body {
    max-height: 620px;
    overflow-y: auto;
}

.recent-activity-body::-webkit-scrollbar {
    width: 8px;
}

.recent-activity-body::-webkit-scrollbar-thumb {
    background: rgba(113, 128, 150, 0.45);
    border-radius: 999px;
}

.recent-activity-body::-webkit-scrollbar-track {
    background: rgba(226, 232, 240, 0.45);
    border-radius: 999px;
}

.activity-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    color: #718096;
    border-bottom: 2px solid #e2e8f0;
}

.table-hover tbody tr:hover {
    background-color: #f7fafc;
}

.badge {
    padding: 6px 12px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-avatar-large {
    position: relative;
    display: inline-block;
}

.avatar-change-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    padding: 20px 0;
    border-top: 1px solid #e2e8f0;
}

.stat-item {
    text-align: center;
}

.info-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.info-item i {
    font-size: 20px;
    margin-top: 5px;
}

.preference-item {
    padding: 20px 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.session-item {
    padding: 20px;
    background: #f7fafc;
    border-radius: 8px;
    margin-bottom: 15px;
}

.session-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #667eea;
    margin-right: 15px;
}

.stat-card-simple {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stat-icon-simple {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-card-simple h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #2d3748;
}

.stat-card-simple p {
    margin: 0;
    color: #718096;
    font-size: 14px;
}

.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a4093 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-switch .form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }

    .sidebar.active {
        margin-left: 0;
    }

    #content {
        margin-left: 0;
        width: 100%;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .login-left-panel {
        display: none !important;
    }
}

.navbar {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pagination {
    gap: 5px;
}

.pagination .page-link {
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    color: #667eea;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
/* List */
       #segmentList, #driverList, #activityList {
          max-height: 200px;
          overflow-y: auto;
          border: 1px solid #ddd;
          border-top: none;
          display: none;
          position: absolute;
          background: #fff;
          width: 100%;
          z-index: 1000;
        }

        #segmentList li, #driverList li, #activityList li {
          cursor: pointer;
          padding: 8px;
        }

        #segmentList li:hover, #driverList li:hover, #activityList li:hover,    
        .active-suggestion {
          background-color: #007bff;
          color: white;
        }
