/* Reset & Font */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* Body */
body {
    background: #f4f4f4;
    color: #333;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    height: 100vh;
    padding: 20px;
    position: fixed;
}

.sidebar h2 {
    margin-bottom: 20px;
}

.sidebar a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 10px;
    margin: 10px 0;
    transition: 0.3s;
}

.sidebar a:hover, .sidebar .active {
    background: #34495e;
    border-radius: 5px;
}
.admin-financials {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
    color: black !important; /* standard text is black */
}

.admin-financials h3 {
    margin-bottom: 10px;
    color: #333;
}

.admin-financials p {
    margin: 5px 0;
    font-size: 14px;
    color: black ; /* normal paragraphs black */
}

.admin-financials span {
    font-weight: bold;
    color: #007bff;
}

#balanceWarning {
    font-weight: bold;
    display: block;
}
.admin-available-leads {
    margin-top: 20px;
    padding: 15px;
    background: #ffffff;
    border-radius: 10px;
    color: black !important;
}

.admin-available-leads h3 {
    margin-bottom: 10px;
    color: #333;
}

.admin-available-leads p {
    margin: 5px 0;
    font-size: 14px;
    color: black !important;
}

.admin-available-leads h4 {
    margin-top: 10px;
    font-size: 16px;
    font-weight: bold;
    color: #007bff;
}

#geoCities {
    max-height: 200px; /* or any fixed height */
    overflow-y: auto;
    padding-right: 10px; /* optional for spacing */
}

.refresh-btn {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 5px 12px;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 10px;
    display: inline-block;
}

.refresh-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}



/* Main Content */
.main-content {
    margin-left: 270px;
    padding: 20px;
    width: calc(100% - 270px);
    min-height: 100vh;
}

/* Cards */
.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 15px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    padding: 8px 12px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

th {
    background-color: #007bff;
    color: #fff;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.login-container {
    background: white;
    width: 100%;
    max-width: 400px;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.login-container input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 10px;
    font-size: 16px;
}

.login-container button {
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: 0.3s;
}

/* Buttons */
.primary-btn, .update-btn, .edit-btn, .toggle-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    margin: 5px;
}

.primary-btn {
    background: #007bff;
}
.filter-input {
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 0 5px;
}
.primary-btn:hover {
    background: #0056b3;
}

.update-btn {
    background: #28a745;
}

.update-btn:hover {
    background: #218838;
}

.edit-btn {
    background: #28a745;
}

.edit-btn:hover {
    background: #218838;
}

.toggle-btn {
    background: #dc3545;
}

.toggle-btn:hover {
    background: #c82333;
}

/* Status coloring */
.active-status {
    color: green;
    font-weight: bold;
}

.inactive-status {
    color: red;
    font-weight: bold;
}

/* Modal */
	/* Improve Modal Forms */
.close-modal {
    position: absolute;
    top: 10px;
    right: 15px; /* Moves "X" to top-right */
    font-size: 24px; /* Makes "X" larger */
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
}

/* ✅ Hover Effect for "X" */
.close-modal:hover {
    color: red; /* Changes color on hover */
    transform: scale(1.2); /* Increases size slightly */
}
.modal {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0; 
    top: 0; 
    width: 100vw; 
    height: 100vh; 
    background-color: rgba(0, 0, 0, 0.5);
    /* (We do NOT place display:flex or justify-content here)
       This means the modal is hidden by default. */
}

/* 
   Because your JS calls $("#cityZipModal").show(),
   which sets inline "display: block",
   we override it with flex for centering:
*/
.modal[style*="display: block"] {
    display: flex !important;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    width: 400px;
    border-radius: 4px;
    position: relative; /* If you use position:relative, you can still place .close-modal, etc. */
}


.form-container {
    padding: 20px;
}

.modal h3 {
    text-align: center;
    margin-bottom: 15px;
}

/* Match modal form inputs & dropdown styling */
.modal input,
.modal select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Optionally, you can add hover/focus effects too */
.modal select:focus {
    outline: none;
    border-color: #007bff;
}

.modal button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background: #007bff;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.modal button:hover {
    background: #0056b3;
}

/* Close Button */
.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
}
cursor: pointer;
}

/* Additional for lead table compactness */
.compact-table {
    margin: auto;
    text-align: left;
    border-collapse: collapse;
}

.compact-table td {
    padding: 5px 10px;
    border-bottom: 1px solid #ddd;
}
/* Agent Lead Display Table */
.lead-details-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    margin: auto;
    text-align: left;
}

.lead-details-container h3 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: bold;
}

.lead-details-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.lead-details-table tr {
    border-bottom: 1px solid #ddd;
}

.lead-details-table td {
    padding: 10px;
    font-size: 16px;
    vertical-align: middle;
}

.lead-details-table td:first-child {
    font-weight: bold;
    color: #333;
    width: 40%;
}

.lead-details-table td:last-child {
    color: #007bff;
    font-weight: bold;
    cursor: pointer;
}

.lead-details-table td:last-child:hover {
    text-decoration: underline;
}

/* Status Update Section */
.status-update-container {
    margin-top: 15px;
    text-align: center;
}

.status-update-container select {
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.status-update-container button {
    padding: 8px 15px;
    font-size: 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 10px;
    transition: 0.3s;
}

.status-update-container button:hover {
    background: #218838;
}
/* Report Table */
/* Refine Date Filter Section */
.filter-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px 0;
    gap: 10px;
}

.filter-container label {
    font-weight: bold;
}

.filter-container input {
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
}
/* ✅ Highlight Admin's Assigned State in Available Leads */
.highlight-state {
    background-color: green !important;
    font-weight: bold;
    color: white;
}
/* ✅ Style Available Leads Display */
/* ✅ Blinking Effect */
@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; } /* Fully disappear at midpoint */
    100% { opacity: 1; }
}

/* ✅ Base Styling for Available Leads */
.available-leads {
    font-size: 20px;
    font-weight: bold;
    background-color: black !important;
    color: white;
    margin-left: 20px;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
}

/* ✅ Apply Blink Effect */
.blink {
    animation: blink 2.5s infinite; /* Blinks every 1 second */
}


#generateReport {
    padding: 8px 15px;
    font-size: 14px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

#generateReport:hover {
    background: #0056b3;
}

/* Refine Report Table */
.report-container {
    margin-top: 20px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    margin: auto;
    text-align: center;
}

.report-container h3 {
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: bold;
}
/* Style the date inputs and Search button in .report-controls */
.report-controls {
    margin-bottom: 10px;
    display: flex;
    align-items: center; /* vertically center items */
    gap: 5px;            /* small spacing between elements */
}

.report-controls label {
    font-weight: bold;
}

.report-controls input[type="date"] {
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.report-controls button {
    padding: 6px 12px;
    background-color: #007bff;
    border: none;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

.report-controls button:hover {
    background-color: #0056b3;
}

#leadStatus {
    display: block !important;
}
#pivotTable {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

#pivotTable th, #pivotTable td {
    padding: 12px;
    border: 1px solid #ddd;
}

#pivotTable th {
    background: #007bff;
    color: white;
}

#pivotTable tbody tr:nth-child(even) {
    background: #f9f9f9;
}

/* Highlight "Total" Row */
#pivotTable tfoot th {
    background: #333;
    color: white;
    font-weight: bold;
    font-size: 16px;
    padding: 14px;
}


/* Loading Icon */
#loading {
    display: none;
    margin-top: 15px;
    text-align: center;
}

#loading img {
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
