/* Custom styles for LeadSync */

/* Dashboard cards animation */
.dashboard-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 10px;
    overflow: hidden;
}

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

/* Status badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Lead status colors */
.status-new { background-color: #d1ecf1; color: #0c5460; }
.status-not_contacted { background-color: #e2e3e5; color: #41464b; }
.status-contacted { background-color: #fff3cd; color: #856404; }
.status-no_response { background-color: #f8d7da; color: #842029; }
.status-interested { background-color: #d1e7dd; color: #0f5132; }
.status-not_interested { background-color: #ffe5d0; color: #7f3f00; }
.status-qualified { background-color: #d4edda; color: #155724; }
.status-proposal { background-color: #cce5ff; color: #004085; }
.status-negotiation { background-color: #e2d9f3; color: #3d3163; }
.status-won { background-color: #28a745; color: white; }
.status-lost { background-color: #dc3545; color: white; }

/* Form styling */
.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Table hover effect */
.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Custom button styles */
.btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #0a58ca 100%);
}

/* Sidebar navigation cleanup */
.sidebar {
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
}

/* 1. Remove ALL background colors from all sidebar elements */
.sidebar-menu ul li,
.sidebar-menu ul li a,
.sidebar-menu ul li.active a,
.sidebar-menu ul li a.active,
.sidebar-menu ul li.submenu-open > a,
.sidebar-menu ul li.submenu ul,
.sidebar-menu ul li.submenu ul li a {
    background-color: transparent !important;
    background: transparent !important;
    border-radius: 0 !important;
}

/* 2. Style for the ACTUAL active page link (only items INSIDE submenu, not the header) */
.sidebar-menu ul li.submenu ul li a.active,
.sidebar-menu ul li.submenu ul li.active > a {
    color: #FE9F43 !important;
}

/* 3. Match Icon color to Text color for active page items (NOT dropdown headers) */
.sidebar-menu ul li.submenu ul li a.active svg,
.sidebar-menu ul li.submenu ul li a.active i,
.sidebar-menu ul li.submenu ul li.active > a svg,
.sidebar-menu ul li.submenu ul li.active > a i {
    color: #FE9F43 !important;
    stroke: #FE9F43 !important;
    fill: none !important;
}

/* 4. Hover effect: text and icon only */
.sidebar-menu ul li a:hover {
    color: #FE9F43 !important;
    background: transparent !important;
}

.sidebar-menu ul li a:hover svg,
.sidebar-menu ul li a:hover i,
.sidebar-menu ul li a:hover span {
    color: #FE9F43 !important;
    stroke: #FE9F43 !important;
}

/* Also override theme rule that sets active svg to white - ONLY for main level items */
.sidebar .sidebar-menu > ul > li > a.active:not(.subdrop) svg,
.sidebars .sidebar-menu > ul > li > a.active:not(.subdrop) svg {
    color: #FE9F43 !important;
    stroke: #FE9F43 !important;
}

/* CRITICAL: Override theme's active styling when a.subdrop.active exists */
.sidebar .sidebar-menu > ul > li > a.active.subdrop,
.sidebars .sidebar-menu > ul > li > a.active.subdrop,
.sidebar .sidebar-menu > ul > li > a.active.subdrop span,
.sidebars .sidebar-menu > ul > li > a.active.subdrop span {
    color: #5B6670 !important;
    background: transparent !important;
}

.sidebar .sidebar-menu > ul > li > a.active.subdrop svg,
.sidebars .sidebar-menu > ul > li > a.active.subdrop svg,
.sidebar .sidebar-menu > ul > li > a.active.subdrop i,
.sidebars .sidebar-menu > ul > li > a.active.subdrop i {
    color: #5B6670 !important;
    stroke: #5B6670 !important;
}

/* 5. Keep ALL dropdown headers (.subdrop) NEVER active/orange—only child items should be active */
.sidebar-menu ul li.submenu > a.subdrop,
.sidebar-menu ul li.submenu > a.subdrop.active,
.sidebar-menu ul li.submenu > a.subdrop svg,
.sidebar-menu ul li.submenu > a.subdrop i,
.sidebar-menu ul li.submenu > a.subdrop.active svg,
.sidebar-menu ul li.submenu > a.subdrop.active i {
    color: #5B6670 !important;
    stroke: #5B6670 !important;
    background: transparent !important;
}

/* 6. Remove any 'dot' or 'after' markers that look like backgrounds/bullets */
.sidebar-menu ul li.submenu ul li a::after,
.sidebar-menu ul li.submenu ul li a.active::after {
    display: none !important;
}

/* Ensure text spans inside active links match color */
.sidebar-menu ul li.submenu ul li a.active span,
.sidebar-menu ul li.submenu ul li.active > a span {
    color: #FE9F43 !important;
}

/* Responsive adjustments */


@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,.1);
    border-radius: 50%;
    border-top-color: #0d6efd;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}