:root {
    --primary: #0a2558;
    --secondary: #3b5998;

    --sidebar-width: 250px;
    --header-height: 65px;
    --transaction-color: #4caf50;
    --transaction-hover: #388e3c;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #343a40;
    --gray: #6c757d;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

html, body {
    width: 100%;
    overflow-x: hidden;
    background-color: #f8f9fa;
    font-family: "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

/* Fix for modal backdrop width on some mobile devices */
.modal-backdrop {
    width: 100% !important;
    height: 100% !important;
}

.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-primary:hover {
    background-color: #082045 !important;
    border-color: #082045 !important;
}

.btn-primary:focus,
.btn-primary:active {
    background-color: #061a36 !important;
    border-color: #061a36 !important;
    box-shadow: 0 0 0 0.25rem rgba(10, 37, 88, 0.4) !important;
}

/* Mobile-first approach - base styles for mobile */
/* Header styling */
header {
    height: var(--header-height);
    z-index: 1030;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background: white;
    position: relative;
    /* Ensure header stays above content */
}

/* Mobile bottom navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #6c757d;
    font-size: 0.75rem;
    padding: 5px 0;
    flex: 1;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item i {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

/* Sidebar styling from User Request */
.sidebar {
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, #0b1f4a, #0a1733);
    color: #cbd5e1;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 1040;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    transform: translateX(-100%);
}

.sidebar.active {
    transform: translateX(0);
}

/* Sidebar Header */
.sidebar-header {
    padding: 18px 20px;
    height: auto;
}

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

.brand-icon {
    background: #fff;
    color: #0b1f4a;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.brand-name {
    font-weight: 700;
    color: #fff;
    font-size: 1.2rem;
}

/* Sidebar Menu */
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

/* Scrollbar for menu */
.sidebar-menu::-webkit-scrollbar {
    width: 5px;
}
.sidebar-menu::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}
.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.menu-link:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.menu-link.active {
    background: #3b4b66;
    color: #fff;
    border-left-color: #60a5fa;
}

.menu-link i {
    width: 20px;
    text-align: center;
}

/* Submenu */
.submenu {
    background: #0f244f;
    margin: 5px 12px 10px;
    border-radius: 8px;
    padding: 8px 0;
    list-style: none; 
}

.submenu li a {
    display: block;
    padding: 8px 20px 8px 38px; /* Indented text */
    font-size: 14px;
    color: #94a3b8;
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease;
}

.submenu li a:hover {
    color: #fff;
}

/* Active Dot Logic */
.submenu li a.active-dot {
    color: #fff;
    font-weight: 600;
}

.submenu li a.active-dot::before {
    content: "";
    width: 6px;
    height: 6px;
    background: #60a5fa;
    border-radius: 50%;
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
}

/* Arrow Animation */
.arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.menu-link[aria-expanded="true"] .arrow {
    transform: rotate(180deg);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    background: #0a1733; /* Matches bottom gradient */
}

.sidebar-footer img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-info strong {
    display: block;
    font-size: 14px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info small {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main content area */
.main-wrapper {
    margin-left: 0;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    background-color: #f8f9fa;
    padding-bottom: 70px;
    /* Space for bottom nav */
}

/* Content area below header */
.content-area {
    min-height: calc(100vh - var(--header-height));
    padding: 10px;
}

/* Overlay for mobile when sidebar is open */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1035;
    /* Between sidebar and header */
    display: none;
}

.sidebar-overlay.active {
    display: block;
}

/* Profile dropdown styling - hidden on mobile */
.profile-dropdown {
    width: 300px;
    right: 3px !important;
    top: 5px !important;
    background-color: #f8f9fa;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}

.dropdown-item:hover {
    background-color: #e9eef6 !important;
    transition: background-color 0.2s ease-in-out;
}

.avatar {
    cursor: pointer;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px 14px;
    border-radius: 15px;
    transition: all 0.3s ease;
    background-color: #f1f5f9;
}

.user-menu:hover {
    background-color: #f1f5f9;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.user-role {
    color: #6c757d;
}

.dashboard {
    display: flex;
    min-height: 100vh;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 8px 0;
    /* margin-left: var(--sidebar-width); */
    transition: var(--transition);
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
}

.stat-card {
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stats-cards .card {
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-5px);
}

/* .stat-card::before removed */

.stat-card h3 {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 10px;
}

.stat-card h2 {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 10px;
}

.stat-card .icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 20px;
}

.leads-icon {
    background: rgba(58, 123, 213, 0.1);
    color: var(--primary);
}

.followup-icon {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning);
}

/* Leads Rate Overview */
.leads-rate-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.leads-rate-chart {
    flex: 1;
    min-width: 300px;
}

.leads-rate-details {
    flex: 1;
    min-width: 300px;
}

.chart-container {
    position: relative;
    height: 250px;
}

.rate-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: var(--border-radius);
    background: white;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.rate-detail:hover {
    transform: translateX(5px);
}

.rate-detail .label {
    display: flex;
    align-items: center;
}

.rate-detail .color-indicator {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    margin-right: 10px;
}

.rate-detail .value {
    font-weight: 500;
    font-size: 18px;
}

.hot {
    background-color: #dc3545;
}

.cold {
    background-color: #17a2b8;
}

.not-work {
    background-color: #ffc107;
}

.other {
    background-color: #6c757d;
}

/* Mobile view for rate details */
.mobile-rate-cards {
    display: none;
}

.rate-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: var(--box-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rate-card-left {
    display: flex;
    align-items: center;
}

.rate-card-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    margin-right: 12px;
}

.rate-card-info {
    display: flex;
    flex-direction: column;
}

.rate-card-label {
    font-weight: 600;
    margin-bottom: 4px;
}

.rate-card-value {
    font-size: 18px;
    font-weight: 700;
}

/* Today's Leads Report */
.leads-report {
    margin-bottom: 30px;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
}

.report-table th,
.report-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.report-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.report-table tr:hover {
    background: #f8f9fa;
}

.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-primary {
    background: rgba(58, 123, 213, 0.1);
    color: var(--primary);
}

.badge-success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.badge-danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

.view-btn {
    padding: 6px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.view-btn:hover {
    background: #2d62a3;
}

/* Mobile Cards for Leads Report */
.mobile-leads-cards {
    display: none;
}

.lead-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: var(--box-shadow);
}

.lead-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.lead-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.lead-info {
    display: flex;
    flex-direction: column;
}

.lead-label {
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 5px;
}

.lead-value {
    font-weight: 600;
}

.lead-action {
    grid-column: span 2;
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

/* Vehicles Section */
.vehicles-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.vehicle-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.vehicle-card-header {
    background: var(--primary);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vehicle-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 14px;
}

.vehicle-card-body {
    padding: 20px;
    min-height: 150px;
}

.placeholder-text {
    color: var(--gray);
    text-align: center;
    padding: 30px 0;
    font-style: italic;
}

.toggle-icon {
    transition: transform 0.3s ease;
}
.collapse.show + .toggle-icon,
a[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.table-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 0 !important;
}

.card-header {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
}

.avatar-table {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    margin: 0;
}
.badge-manager {
    background-color: #6f42c1;
}

.badge-cre {
    background-color: #20c997;
}

.badge-salesman {
    background-color: #fd7e14;
}

.badge-admin {
    background-color: #dc3545;
}

.badge-customer {
    background-color: #7e8d9c;
}

/* Profile Styles */
.profile-header {
    background: linear-gradient(to right, #0a2558, #3b5998);
    padding: 30px 20px 60px;
    position: relative;
    color: white;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid white;
    background: linear-gradient(to right, #0a2558, #3b5998);
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
}

.profile-content {
    padding: 70px 20px 30px;
}

.profile-name {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
}

.profile-title {
    color: var(--primary);
    text-align: center;
    margin-bottom: 5px;
}

.profile-location {
    text-align: center;
    color: var(--secondary);
    margin-bottom: 15px;
}

.profile-meta {
    text-align: center;
    color: var(--secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.profile-section {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--light-bg);
    padding-bottom: 10px;
}

.info-item {
    display: flex;
    margin-bottom: 15px;
}

.info-icon {
    color: var(--primary);
    font-size: 1.2rem;
    min-width: 30px;
}

.info-label {
    font-size: 0.85rem;
    color: var(--secondary);
    margin-bottom: 3px;
}

.info-value {
    font-weight: 500;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    background-color: #e6f7ee;
    color: #28a745;
}

.connected-badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    background-color: #e6f0ff;
    color: var(--primary);
    margin-left: 10px;
}

.btn-edit {
    background: linear-gradient(to right, #0a2558, #3b5998);
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: white;
    width: 100%;
}

.btn-logout {
    border: 1px solid var(--secondary);
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 600;
    color: var(--secondary);
    width: 100%;
}

.btn-edit:hover,
.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-edit:hover {
    color: white;
}

/* Increase Select2 height */
.select2-container--default .select2-selection--single {
    height: 38px !important;       
    padding-top: 3px !important;
    padding-bottom: 3px !important;
    border: 1px solid #ddd;
}

/* Make the arrow align center */
.select2-container--default .select2-selection__arrow {
    height: 100% !important;
}


/* Hide profile dropdown on mobile */
@media (max-width: 991.98px) {
    .profile-dropdown-container {
        display: none !important;
    }

    /* Show simplified user info on mobile */
    .mobile-user-info {
        display: flex;
        align-items: center;
        margin-right: 15px;
    }

    .mobile-user-info img {
        width: 35px;
        height: 35px;
        border-radius: 50%;
        border: 2px solid var(--primary);
    }
}

@media (min-width: 992px) {
    .mobile-user-info {
        display: none !important;
    }

    .sidebar {
        transform: translateX(0);
    }

    .sidebar.hidden {
        transform: translateX(-100%);
    }

    .main-wrapper {
        margin-left: var(--sidebar-width);
        padding-bottom: 0;
    }

    .main-wrapper.no-squeeze {
        margin-left: 0;
    }

    .bottom-nav {
        display: none;
    }

    .quick-actions {
        grid-template-columns: repeat(4, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .profile-grid {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 25px;
    }

    .about-section-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .action-buttons {
        display: grid;
        gap: 15px;
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }

    .stats-cards {
        grid-template-columns: 1fr;
    }

    /* Show mobile cards, hide table */
    .report-table {
        display: none;
    }

    .mobile-leads-cards {
        display: block;
    }

    /* Leads Rate Overview mobile adjustments */
    .leads-rate-container {
        flex-direction: column;
    }

    .leads-rate-details {
        display: none;
    }

    .mobile-rate-cards {
        display: block;
        margin-top: 20px;
    }
}

@media (max-width: 576px) {
    .leads-rate-container {
        flex-direction: column;
    }

    .chart-container {
        height: 200px;
    }
}

/* Compact pagination */
.dataTables_wrapper .dataTables_paginate .pagination {
    margin: 0;
    gap: 4px;
}

.dataTables_wrapper .dataTables_paginate .page-item .page-link {
    padding: 4px 10px; /* smaller size */
    font-size: 0.85rem; /* reduce text size */
    border-radius: 6px; /* modern rounded */
    border: 1px solid #ddd; /* subtle border */
    color: var(--primary); /* modern blue */
}

.dataTables_wrapper .dataTables_paginate .page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Hover effect */
.dataTables_wrapper .dataTables_paginate .page-item .page-link:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

/* Arrows smaller */
.dataTables_wrapper .dataTables_paginate .page-item.previous .page-link,
.dataTables_wrapper .dataTables_paginate .page-item.next .page-link {
    font-size: 0.8rem;
    padding: 4px 8px;
}

/* Top controls (dropdown left, search right, search below on mobile) */
.dt-top {
    width: 100%;
    margin-bottom: 10px;
}
.dt-length {
    flex: 1;
    text-align: left;
}
.dt-search {
    flex: 1;
    text-align: right;
}
@media (max-width: 767px) {
    div.dataTables_wrapper div.dataTables_length,
    div.dataTables_wrapper div.dataTables_filter,
    div.dataTables_wrapper div.dataTables_info,
    div.dataTables_wrapper div.dataTables_paginate {
        text-align: left;
    }
    .dt-search {
        width: 100%;
        text-align: right;
    }
}

/* Pagination alignment */
.dt-bottom {
    width: 100%;
    justify-content: flex-end !important;
}

/* Sidebar Submenu White Background */
.sidebar-submenu {
    background: #ffffff;
    margin: 5px 10px 10px 10px;
    padding: 10px 0;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sidebar-submenu li a {
    color: var(--dark) !important;
    padding: 8px 20px;
    font-size: 0.9rem;
    margin: 2px 5px;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.sidebar-submenu li a:hover,
.sidebar-submenu li a.active {
    background-color: #e9ecef !important;
    color: var(--primary) !important;
    font-weight: 600;
    box-shadow: none;
}

/* LEADS DASHBOARD CARD REDESIGN */
/* --------------------------------------------------------- */
/* Override grid to 5 columns for desktop */
/* Centered Grid Layout for Stats Cards */
/* Centered Grid Layout for Stats Cards */
.stats-cards {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 15px !important; /* Reduced gap to fit more items */
}

.stat-card {
    flex: 1 1 200px !important; /* Grow enabled to fill gaps */
    min-width: 200px;
    /* max-width removed to allow filling space */
    width: auto;
}


/* Card Styling */
.stat-card {
    border-radius: 10px !important;
    border: 1px solid #edf2f9 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02) !important;
    padding: 24px 20px !important;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.stat-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05) !important;
}

/* Top Border Indicator */
/* .stat-card::before removed */

/* Typography */
.stat-label {
    font-size: 11px;
    font-weight: 700;
    color: #95aac9;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px !important;
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #12263f;
    margin: 10px 0 15px 0 !important;
    text-align: center;
}

/* Icons */
.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

/* Colors Classes */
/* Blue */
.border-top-blue { border-top: 4px solid #2c7be5 !important; }
.icon-blue { background-color: rgba(44, 123, 229, 0.1); color: #2c7be5; }

/* Warning (Orange/Yellow) */
.border-top-warning { border-top: 4px solid #f6c343 !important; }
.icon-warning { background-color: rgba(246, 195, 67, 0.1); color: #f6c343; }

/* Yellow */
.border-top-yellow { border-top: 4px solid #d2d216 !important; }
.icon-yellow { background-color: rgba(210, 210, 22, 0.1); color: #d2d216; }

/* Orange */
.border-top-orange { border-top: 4px solid #fd7e14 !important; }
.icon-orange { background-color: rgba(253, 126, 20, 0.1); color: #fd7e14; }

/* Red */
.border-top-red { border-top: 4px solid #e63757 !important; }
.icon-red { background-color: rgba(230, 55, 87, 0.1); color: #e63757; }

/* Cyan */
.border-top-cyan { border-top: 4px solid #00d4ff !important; }
.icon-cyan { background-color: rgba(0, 212, 255, 0.1); color: #00d4ff; }

/* Green */
.border-top-green { border-top: 4px solid #00d97e !important; }
.icon-green { background-color: rgba(0, 217, 126, 0.1); color: #00d97e; }

/* Danger */
.border-top-danger { border-top: 4px solid #d63384 !important; }
.icon-danger { background-color: rgba(214, 51, 132, 0.1); color: #d63384; }

/* Purple */
.border-top-purple { border-top: 4px solid #6f42c1 !important; }
.icon-purple { background-color: rgba(111, 66, 193, 0.1); color: #6f42c1; }



/* CHART SECTION REDESIGN */
/* --------------------------------------------------------- */
/* Stat List Items (Legend) */
.stat-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 50px; /* Pill shape */
    transition: all 0.2s ease;
}

.stat-list-item:hover {
    border-color: #ced4da;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    background-color: #f8f9fa;
}

.dot-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* Chart Wrapper */
.chart-wrapper {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Center Text for Doughnut Chart */
.center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none; /* Allow clicks to pass through to chart */
}

/* Scrollable Stats List - Elegant Fade Effect */
.scrollable-stats-list {
    /* Hide scrollbar for clean look */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    
    /* Show scroll hint via subtle padding or mask if supported */
    position: relative;
    /* Create a fade out effect at the bottom */
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    padding-bottom: 50px; /* Ensure last item scrolls into view */
}

.scrollable-stats-list::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

/* Remove old rate-card styles if conflicting */
.rate-card {
    display: none; /* Ensure old mobile cards don't show up duplicatively if classes persist */
}

/* TODAY'S LEADS REPORT CARD REDESIGN */
/* --------------------------------------------------------- */

/* Table Styling */
.custom-table th {
    font-weight: 600;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #edf2f9;
    padding-top: 20px;
    padding-bottom: 20px;
}

.custom-table td {
    padding-top: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #edf2f9;
}

.custom-table tr:last-child td {
    border-bottom: none;
}

/* Badge Substles (Fallbacks if BS 5.3 variables arent perfect) */
.bg-danger-subtle {
    background-color: #ffe5e5 !important;
    color: #dc3545 !important;
}

.bg-success-subtle {
    background-color: #e5ffe5 !important;
    color: #198754 !important;
}

.bg-info-subtle {
    background-color: #e5f7ff !important;
    color: #0dcaf0 !important;
}

/* Pagination Buttons */
.btn-outline-secondary {
    border-color: #dee2e6;
    color: #6c757d;
}

.btn-outline-secondary:hover {
    background-color: #f8f9fa;
    color: #000;
    border-color: #ced4da;
}

/* Dark Header and Buttons Update */
/* .bg-dark-blue removed */

.btn-dark-blue {
    background-color: #12263f;
    border-color: #12263f;
    color: #fff;
}

.btn-dark-blue:hover {
    background-color: #1c375c;
    border-color: #1c375c;
    color: #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Ensure opacity helper works if not in bootstrap version */
.opacity-75 {
    opacity: 0.75 !important;
}

/* Override card-header background for Leads Report to ensure it is white */
/* Refined "Slick" Look for Leads Report Card */
.leads-report-card {
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important;
    border-radius: 12px !important;
    overflow: hidden; /* Ensure neat corners */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.leads-report-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05) !important;
}

.leads-report-card .card-header {
    background: #fff !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6) !important; /* Subtle separator */
    padding-top: 20px !important;
    padding-bottom: 20px !important;
}

/* SLICK DESIGN UPDATE FOR DASHBOARD ELEMENTS */
/* --------------------------------------------------------- */

/* Shared Slick Card Style */
.slick-style {
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important;
    border-radius: 12px !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

/* Stat Cards (Top Row) Update */
.stat-card {
    /* Improve upon existing base styles */
    background: #fff;
    border-radius: 12px !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06) !important;
}

/* Note: Keep the top borders as they are utility classes, 
   but ensure they play nice with the border radius */

/* Chart Cards (Middle Row) */
.chart-card {
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important;
    border-radius: 12px !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chart-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06) !important;
}

/* Aged Stock Alert Styles */
.border-top-danger { border-top: 4px solid #dc3545 !important; }
.icon-danger { background: rgba(220, 53, 69, 0.1); color: #dc3545; }
