/* General Body and Font Styling */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa; /* Light background */
    padding-top: 70px; /* Adjust body padding to make space for fixed top navbar */
}

/* Navbar Styling */
.navbar {
    background-color: #404040 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-weight: 700;
    color: #ffffff !important; /* Changed to white for dark background */
    padding-left: 1rem; /* Padding for brand on larger screens */
}

.navbar-nav .nav-link {
    color: #e0e0e0; /* Lighter grey for navigation links on dark background */
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s, color 0.2s;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15); /* Subtle light background on hover/active */
    color: #ffffff; /* White text on hover/active */
}

/* User Dropdown in Navbar */
.navbar-nav .dropdown-toggle {
    display: flex;
    align-items: center;
    color: #e0e0e0; /* Ensure dropdown toggle also looks good on dark navbar */
}

.navbar-nav .dropdown-toggle:hover {
    color: #ffffff;
}

.navbar-nav .dropdown-menu {
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: none;
    background-color: #343a40; /* Dark background for dropdown menu */
}

.navbar-nav .dropdown-menu .dropdown-item {
    color: #e0e0e0; /* Light text for dropdown items */
}

.navbar-nav .dropdown-menu .dropdown-item:hover,
.navbar-nav .dropdown-menu .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.1); /* Subtle hover for dropdown items */
    color: #ffffff;
}

.navbar-nav .dropdown-menu .dropdown-divider {
    border-top-color: rgba(255, 255, 255, 0.2);
}

/* Content Wrapper Adjustment */
#content-wrapper {
    flex-grow: 1; /* Allows content to take available space */
    padding: 1rem; /* Add some padding around the main content */
}

/* Responsive adjustments for top navigation */
@media (max-width: 991.98px) { /* Bootstrap's 'lg' breakpoint for navbar collapse */
    .navbar-brand {
        padding-left: 0.5rem; /* Reduce padding on smaller screens */
    }
    .navbar-toggler {
        margin-right: 0.5rem;
    }
    .navbar-collapse {
        background-color: #343a40; /* Dark background for collapsed menu */
        border-top: 1px solid rgba(255, 255, 255, 0.1); /* Lighter border for dark theme */
        position: absolute; /* Position to appear below the navbar */
        top: 100%; /* Place it right below the navbar */
        left: 0;
        right: 0;
        z-index: 1000; /* Ensure it's above other content */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Slightly darker shadow for dark theme */
    }
    .navbar-nav {
        flex-direction: column; /* Stack nav items vertically */
        padding: 1rem;
    }
    .navbar-nav .nav-item {
        width: 100%;
    }
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        margin-bottom: 0.25rem;
    }
    .navbar-nav .dropdown-menu {
        position: static; /* Make dropdowns static in collapsed menu */
        float: none;
        width: 100%;
        margin-top: 0.5rem;
        border: none;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.2); /* Slightly transparent dark for sub-menu */
    }
    .navbar-nav .dropdown-menu .dropdown-item {
        padding-left: 2rem; /* Indent dropdown items */
    }
}

/* Hide the old sidebar elements if they were still present in HTML for some reason */
#sidebar-wrapper {
    display: none !important;
}

/* Custom styling for cards to enhance appearance */
.card {
    border: none;
    border-radius: 1rem; /* More rounded corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Subtle shadow */
}

.card-header {
    background-color: #f0f4f8; /* Light header background */
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    font-weight: 600;
}

.card-title {
    color: #334155; /* Darker title color */
    font-weight: 700;
}

.card-text {
    color: #64748b; /* Lighter text color */
}

.btn-primary {
    background-color: #3b82f6; /* A nice blue */
    border-color: #3b82f6;
    transition: background-color 0.2s, border-color 0.2s;
    border-radius: 0.75rem; /* Rounded buttons */
}

.btn-primary:hover {
    background-color: #2563eb; /* Darker blue on hover */
    border-color: #2563eb;
}

.btn-outline-primary {
    border-color: #3b82f6;
    color: #3b82f6;
    border-radius: 0.75rem;
}

.btn-outline-primary:hover {
    background-color: #3b82f6;
    color: #fff;
}

.form-control {
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
}

.form-select {
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
}

.alert {
    border-radius: 0.75rem;
}

/* Responsive adjustments for forms and grids */
.modal-content {
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: none;
    padding: 1.5rem 2rem 0.5rem;
}

.modal-body {
    padding: 0.5rem 2rem 1.5rem;
}

.modal-footer {
    border-top: none;
    padding: 0.5rem 2rem 1.5rem;
}

/* Status badges for Leads & Activities (ensure these are present) */
.badge-new { background-color: #e0f2fe; color: #0284c7; } /* light blue */
.badge-contacted { background-color: #fffbeb; color: #d97706; } /* light orange */
.badge-qualified { background-color: #ecfdf5; color: #059669; } /* light green */
.badge-unqualified { background-color: #fee2e2; color: #dc2626; } /* light red */
.badge-scheduled { background-color: #e0f2fe; color: #0284c7; } /* light blue */
.badge-completed { background-color: #dcfce7; color: #166534; } /* light green */
.badge-cancelled { background-color: #fee2e2; color: #b91c1c; } /* light red */


/* Deal Stage badges - UPDATED */
.badge-qualification { background-color: #e0f2fe; color: #0284c7; } /* Blue for initial stages */
.badge-proposal { background-color: #fffbeb; color: #d97706; } /* Orange for proposals */
.badge-negotiation { background-color: #fefce8; color: #a16207; } /* Amber for negotiation */
.badge-pending { background-color: #eff6ff; color: #2563eb; } /* Lighter blue for pending */
.badge-won { background-color: #d1fae5; color: #065f46; } /* Green for won deals */
.badge-lost { background-color: #ffe4e6; color: #b91c1c; } /* Red for lost deals */


/* Dashboard specific styling */
.border-start-primary {
    border-left: 0.25rem solid #3b82f6 !important;
}
.border-start-success {
    border-left: 0.25rem solid #10b981 !important;
}
.border-start-info {
    border-left: 0.25rem solid #0ea5e9 !important;
}
.text-xs {
    font-size: 0.7rem;
}
.text-gray-300 {
    color: #cbd5e1 !important;
}
