:root {
    --primary-color: #000000;
    --secondary-color: #333333;
    --background-color: #ffffff;
    --text-color: #000000;
    --border-color: #000000;
    --hover-color: #f5f5f5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
}

/* Jobs actions are hidden when web app cannot reach jobs server health endpoint. */
body.jobs-server-unavailable .spidr-ai-btn,
body.jobs-server-unavailable .btn-ncci,
body.jobs-server-unavailable #findMoreBtn {
    display: none !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
}

.header-left {
    display: flex;
    align-items: center;
}

.header h1 {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 600;
    text-rendering: optimizeLegibility;
}

.section {
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section h2 {
    color: var(--text-color);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.section-description {
    color: #6c757d;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.employers-results {
    margin-top: 1.5rem;
    min-height: 200px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

/* Status Banner */
.status-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-out;
}

.status-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-banner-icon {
    font-size: 1.5rem;
    animation: spin 1s linear infinite;
}

.status-banner-text {
    font-size: 1rem;
    font-weight: 500;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Progress bar animation */
.progress-bar {
    transition: width 0.3s ease;
}

/* Employer card highlight animation */
.employer-card-highlight {
    animation: highlightUpdate 2s ease-in-out;
}

/* Modal Search Status Banner */
.search-status-banner {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.status-item:last-child {
    margin-bottom: 0;
}

.status-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    animation: pulse 2s infinite;
}

.status-item.completed {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.status-item.error {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
    color: white;
}

.status-icon {
    font-size: 1.2rem;
    min-width: 1.5rem;
    text-align: center;
}

.status-text {
    font-weight: 500;
    flex: 1;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

/* Search Results Sections */
.search-results {
    margin-top: 1rem;
}

.results-section {
    margin-bottom: 2rem;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
}

.results-section h3 {
    margin: 0 0 1rem 0;
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 0.5rem;
}

.ai-results {
    min-height: 100px;
}

.no-results {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 2rem;
}

/* Form group styles for Outlook API section */
.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    background: white;
    color: var(--text-color);
    box-sizing: border-box;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

/* Radios and color pickers must not use full-width (breaks label + control layout). */
.form-group input[type="radio"] {
    width: auto;
    max-width: none;
    margin: 0 0.4rem 0 0;
    flex-shrink: 0;
}

.form-group input[type="color"] {
    width: auto;
    max-width: none;
    flex-shrink: 0;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #666;
}

/* Button styles for Outlook API section */
.btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
}

.btn-secondary {
    background: white !important;
    color: var(--text-color) !important;
}

.btn-secondary:hover {
    background: #f5f5f5 !important;
}

.btn-primary {
    background: var(--primary-color) !important;
    color: white !important;
}

.btn-primary:hover {
    background: var(--secondary-color) !important;
}

.job-name {
    color: var(--primary-color);
    text-rendering: optimizeLegibility;
}

.search-term {
    color: var(--primary-color);
    text-rendering: optimizeLegibility;
}

select, input, button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    color: var(--text-color);
}

select {
    min-width: 200px;
    background-color: white;
}

input {
    flex: 1;
    min-width: 200px;
    background-color: white;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-weight: 500;
}

button:hover {
    background-color: var(--secondary-color);
}

.ai-search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 1px solid #667eea;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ai-search-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.ai-search-btn::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-image: url('../animations/SPIDR animation/SPIDR_SMALL.GIF');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
}

/* AI Search button in modal */
.reports-modal-body .ai-search-btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.reports-modal-body .ai-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Animation for updated employer cards */
@keyframes highlightUpdate {
    0% {
        background-color: #fff;
        transform: scale(1);
    }
    50% {
        background-color: #e8f5e8;
        transform: scale(1.02);
        box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    }
    100% {
        background-color: #fff;
        transform: scale(1);
    }
}

.employer-card[data-employer-id] {
    transition: all 0.3s ease;
}

/* Loading spinner with SPIDR animation */
.loading-spider {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    background-image: url('../animations/SPIDR animation/SPIDR_SMALL.GIF');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
}

/* Button loading state with spider */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-image: url('../animations/SPIDR animation/SPIDR_SMALL.GIF');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
}

/* Loading message with spider */
.loading-message {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-size: 16px;
    color: #666;
}

.loading-message::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 12px;
    background-image: url('../animations/SPIDR animation/SPIDR_SMALL.GIF');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

th {
    background-color: var(--hover-color);
    font-weight: 600;
    color: var(--text-color);
}

tr:hover {
    background-color: var(--hover-color);
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: #64748b;
}

/* Employer display styles */
.employers-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

.employer-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.employer-name {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.employer-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.detail-item {
    font-size: 0.9em;
    color: #666;
}

.detail-item strong {
    color: #333;
}

.employer-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 10px;
}

.action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: background-color 0.2s;
}

.chatgpt-btn {
    background-color: #000000;
    color: white;
}

.chatgpt-btn:hover {
    background-color: #333333;
}

.email-btn {
    background-color: #000000;
    color: white;
}

.email-btn:hover {
    background-color: #333333;
}

.action-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.chatgpt-update {
    color: #28a745;
    font-style: italic;
}

/* Pagination styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.pagination-btn:hover {
    background-color: #f5f5f5;
}

.pagination-btn:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.pagination-current {
    padding: 8px 12px;
    background-color: #000;
    color: white;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
}

#paginationContainer {
    display: none;
}

@media (max-width: 768px) {
    .container {
        padding: 0.75rem;
        min-width: 0;
        max-width: 100%;
    }
    
    /* Mobile tab navigation - dropdown approach */
    .tab-navigation {
        position: relative;
        margin-bottom: 1rem;
    }
    
    .mobile-tab-selector {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        background: white;
        appearance: none;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
        background-position: right 0.5rem center;
        background-repeat: no-repeat;
        background-size: 1.5em 1.5em;
        padding-right: 2.5rem;
    }
    
    /* Mobile: Show dropdown, hide tabs */
    .tab-navigation .tab-btn {
        display: none !important;
    }
    
    .tab-navigation .mobile-tab-selector {
        display: block !important;
    }
    
    .tab-btn:first-child {
        border-radius: 6px 0 0 0;
    }
    
    .tab-btn:last-child {
        border-radius: 0 6px 0 0;
    }
    
    .tab-content {
        border-radius: 0 6px 6px 6px;
        padding: 0.5rem;
    }
    
    .tab-panel {
        padding: 0 !important;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }
    select, input, button {
        width: 100%;
        padding: 1.25rem;
        font-size: 20px; /* Much larger text for mobile */
        min-height: 64px; /* Much larger touch targets */
        border-radius: 16px;
        font-weight: 600;
        border: 2px solid var(--border-color);
    }
    
    button {
        border-radius: 20px;
        font-weight: 700;
        font-size: 20px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
        background: linear-gradient(135deg, #000000 0%, #1f2937 100%);
        color: white;
        position: relative;
        overflow: hidden;
        transition: all 0.3s ease;
    }
    
    button::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        transform: translate(-50%, -50%);
        transition: width 0.6s ease, height 0.6s ease;
    }
    
    button:hover::before {
        width: 500px;
        height: 500px;
    }
    
    button:active {
        transform: translateY(3px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    /* Mobile-friendly table - Card Layout */
    .jobs-table-container {
        overflow-x: visible;
    }
    
    table.jobs-table {
        display: block;
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }
    
    table.jobs-table thead {
        display: none; /* Hide table headers on mobile */
    }
    
    table.jobs-table tbody {
        display: block;
    }
    
    table.jobs-table tr {
        display: block;
        margin-bottom: 1rem;
        background: white;
        border: 2px solid var(--border-color);
        border-radius: 16px;
        padding: 1rem;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    }
    
    table.jobs-table td {
        display: block;
        text-align: left;
        padding: 0.5rem 0;
        border: none;
        min-width: auto;
        white-space: normal;
        font-size: 16px;
        line-height: 1.4;
    }
    
    table.jobs-table td::before {
        content: attr(data-label);
        font-weight: 700;
        display: inline-block;
        margin-right: 0.5rem;
        margin-bottom: 0;
        color: var(--secondary-color);
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        min-width: 80px;
    }
    
    table.jobs-table td:first-child {
        font-size: 18px;
        font-weight: 700;
        padding-top: 0;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid #e5e7eb;
        margin-bottom: 0.25rem;
    }
    
    table.jobs-table tr:hover {
        background: white;
        transform: translateY(-2px);
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    }
    
    /* Mobile section adjustments */
    .section {
        padding: 1.5rem 1rem;
        margin-bottom: 2rem;
        border-radius: 20px;
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }
    
    .section::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 6px;
        background: linear-gradient(90deg, transparent, #3b82f6, #8b5cf6, #ec4899, transparent);
        transition: left 0.5s ease;
    }
    
    .section:hover::before {
        left: 100%;
    }
    
    .section:hover {
        transform: translateY(-6px);
        box-shadow: 0 16px 45px rgba(59, 130, 246, 0.25);
    }
    
    .section h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
        font-weight: 700;
        color: var(--primary-color);
    }
    
    .section h4 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        font-weight: 600;
    }
    
    .section p {
        font-size: 18px;
        line-height: 1.7;
        margin-bottom: 1rem;
    }
    
    /* Mobile header adjustments */
    .header {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
        margin-bottom: 3rem;
    }
    
    .header-left {
        flex-direction: column;
        align-items: center;
    }
    
    .header h1 {
        font-size: 2.5rem;
        margin-top: 1.5rem;
        font-weight: 800;
        position: relative;
        overflow: hidden;
    }
    
    .header h1::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 4px;
        background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
        transition: width 0.3s ease;
    }
    
    .header h1:hover::after {
        width: 100%;
    }
    
    /* Enhanced input effects */
    input, select {
        transition: all 0.3s ease;
        position: relative;
        background: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    input:focus, select:focus {
        transform: translateY(-3px);
        box-shadow: 0 12px 30px rgba(59, 130, 246, 0.25);
        border-color: #3b82f6;
        outline: none;
    }
    
    /* Job name and search term effects */
    .job-name, .search-term {
        position: relative;
        display: inline-block;
        font-size: 18px;
        font-weight: 600;
    }
    
    .job-name::after, .search-term::after {
        content: '';
        position: absolute;
        bottom: -3px;
        left: 0;
        width: 0;
        height: 2px;
        background: linear-gradient(90deg, #3b82f6, #8b5cf6);
        transition: width 0.3s ease;
    }
    
    .job-name:hover::after, .search-term:hover::after {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
    }
    
    .section {
        padding: 1.25rem 0.75rem;
        margin-bottom: 1.5rem;
        border-radius: 16px;
    }
    
    .tab-content {
        padding: 0.25rem;
    }
    
    .tab-panel {
        padding: 0 !important;
    }
    
    .section h2 {
        font-size: 1.75rem;
        font-weight: 700;
    }
    
    .section h4 {
        font-size: 1.25rem;
        font-weight: 600;
    }
    
    .section p {
        font-size: 16px;
        line-height: 1.6;
    }
    
    select, input, button {
        padding: 1.125rem;
        font-size: 18px;
        min-height: 60px;
        border-radius: 14px;
    }
    
    button {
        font-size: 18px;
        font-weight: 700;
        border-radius: 18px;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    }
    
    button:active {
        transform: translateY(2px);
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    }
    
    table.jobs-table tr {
        padding: 0.875rem;
        margin-bottom: 0.875rem;
        border-radius: 14px;
    }
    
    table.jobs-table td {
        padding: 0.4rem 0;
        font-size: 15px;
        line-height: 1.3;
    }
    
    table.jobs-table td::before {
        font-size: 12px;
        min-width: 75px;
    }
    
    table.jobs-table td:first-child {
        font-size: 17px;
        padding-bottom: 0.625rem;
        margin-bottom: 0.2rem;
    }
    
    .header h1 {
        font-size: 2rem;
        font-weight: 800;
    }
    
    .header {
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .controls {
        gap: 1.25rem;
    }
    

}

/* Email template popup styles */
.email-template-modal {
    display: none;
    position: fixed;
    z-index: 30000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.email-template-modal-content {
    background-color: #fff;
    margin: 2% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.email-template-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.email-template-modal-header h3 {
    margin: 0;
    color: #333;
}

.email-template-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.email-template-close:hover {
    color: #666;
}

.email-template-section {
    margin-bottom: 20px;
}

.email-template-section label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.email-template-section input,
.email-template-section textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
}

.email-template-section textarea {
    min-height: 200px;
    resize: vertical;
    font-family: 'Courier New', monospace;
}

.email-template-preview {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-top: 20px;
}

.email-template-preview h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.email-template-preview-subject {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.email-template-preview-body {
    white-space: pre-wrap;
    line-height: 1.5;
    color: #666;
    background-color: #fff;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #eee;
}

.email-template-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.email-template-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn-template-send {
    background-color: #007bff;
    color: white;
}

.btn-template-send:hover:not(:disabled) {
    background-color: #0056b3;
}

.btn-template-send:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.btn-template-cancel {
    background-color: #6c757d;
    color: white;
}

.btn-template-cancel:hover {
    background-color: #5a6268;
}

.template-variables-help {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    line-height: 1.4;
}

.template-variables-help strong {
    color: #333;
}

/* Reports Modal Styles */
.reports-modal {
    position: fixed;
    z-index: 30000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.reports-modal-content {
    background-color: white;
    margin: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.reports-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f8f9fa;
}

.reports-modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.reports-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.reports-modal-close:hover {
    background-color: #e0e0e0;
    color: #333;
}

.reports-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 120px);
}

/* Employer Cards in Modal */
.employer-cards {
    display: grid;
    /* min(100%, 300px) prevents a 300px min track from forcing horizontal scroll on narrow phones */
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 1rem;
    margin-top: 1rem;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.employer-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    background-color: #f8f9fa;
    transition: box-shadow 0.2s;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.employer-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.employer-card h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.1rem;
}

.employer-card p {
    margin: 0.25rem 0;
    color: #666;
    font-size: 0.9rem;
}

.employer-card .contact-info {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e0e0e0;
}

.employer-card .dba {
    color: #888;
    font-style: italic;
    margin-top: -0.25rem !important;
}

.employer-card .description {
    margin-top: 0.5rem !important;
    color: #555;
    font-size: 0.85rem;
    line-height: 1.4;
}

.employer-card .industry {
    color: var(--primary-color);
    font-size: 0.85rem;
}

.employer-card .business-details,
.employer-card .business-info,
.employer-card .ncci-info {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e0e0e0;
    font-size: 0.85rem;
}

.employer-card .business-details p,
.employer-card .business-info p,
.employer-card .ncci-info p {
    margin: 0.15rem 0;
}

.employer-card .ncci-info .ncci-no-match {
    color: #6b7280;
}

.employer-card .ai-status {
    margin-top: 0.5rem !important;
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 4px;
    font-size: 0.8rem;
    color: #667eea;
    display: inline-block;
}

.employer-card a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Employer assignment — Copy-style strip (accent on .assign-agent-wrap, not whole card) */
.employer-assignment {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin: 0.35rem 0 0.85rem;
    padding: 0.35rem 0 0.85rem;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.agent-field-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    flex-shrink: 0;
}
.assign-agent-wrap {
    --agent-accent: #cbd5e1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 1 1 auto;
    min-width: 0;
    max-width: min(22rem, 100%);
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-left: 3px solid var(--agent-accent);
    background: linear-gradient(
        122deg,
        rgba(241, 245, 249, 0.95) 0%,
        rgba(255, 255, 255, 0.98) 42%,
        rgba(248, 250, 252, 1) 100%
    );
    box-shadow:
        0 2px 10px rgba(15, 23, 42, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    overflow: hidden;
    transition:
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}
.assign-agent-wrap--filled {
    border-left-width: 3px;
}
.assign-agent-chip {
    align-self: flex-start;
    margin: 0.4rem 0.65rem 0.15rem 0.65rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.25;
    border-radius: 6px;
    max-width: calc(100% - 1.3rem);
    word-break: break-word;
}
.assign-agent-chip[hidden] {
    display: none !important;
}
.assign-agent-select {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.9rem;
    line-height: 1.4;
    border: none;
    border-radius: 0;
    background-color: transparent;
    color: #0f172a;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23475569'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.55rem center;
    transition: background-color 0.15s ease;
}
.assign-agent-select option {
    color: #0f172a;
    background-color: #fff;
}
.assign-agent-select:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.35);
}
.assign-agent-wrap--filled .assign-agent-select:hover:not(:disabled),
.assign-agent-wrap--filled .assign-agent-select:focus-visible:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.12);
}
.assign-agent-select:disabled {
    opacity: 0.65;
    cursor: wait;
}

.user-name-tag {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    max-width: 100%;
    word-break: break-word;
}
.name-tag-color-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}
.name-tag-color-row input[type="color"] {
    width: 42px;
    height: 32px;
    min-width: 42px;
    padding: 0;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}
/* Hex field grows; swatch stays fixed */
.card-theme-builder__text .name-tag-color-row input[type="text"] {
    flex: 1 1 10rem;
    min-width: 0;
}
.admin-name-tag-section {
    margin-top: 1.5rem;
    padding: 1rem 1.15rem 1.2rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: linear-gradient(165deg, #f8fafc 0%, #f1f5f9 55%, #eef2ff 100%);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.admin-name-tag-section h4 {
    margin-bottom: 0.5rem;
}

/* Name tag background builder (profile Card appearance + admin) */
.card-theme-builder {
    max-width: 52rem;
}
.card-theme-builder__lede {
    margin-bottom: 1rem;
}
/* Override generic .form-row 50/50 split: stack on small screens, avoid clipped columns */
.card-theme-builder__row.form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: 1.25rem;
    align-items: start;
}
@media (max-width: 768px) {
    .card-theme-builder__row.form-row {
        grid-template-columns: minmax(0, 1fr);
    }
}
.card-theme-builder__text {
    flex: 1 1 14rem;
    min-width: 0;
}
.card-theme-builder__surface {
    flex: 2 1 22rem;
    margin-top: 0;
    min-width: 0;
    overflow: visible;
    padding: 1rem 1.15rem 1.2rem;
    background: linear-gradient(165deg, #f8fafc 0%, #f1f5f9 55%, #eef2ff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.card-theme-builder__full-preview {
    margin-top: 1.25rem;
}
.card-theme-builder__full-preview label {
    font-weight: 600;
    color: #334155;
}

.label-like {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    color: #334155;
}
.name-tag-bg-block {
    margin-top: 0.25rem;
}
.name-tag-bg-type {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 0.65rem;
    padding: 3px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
/* Segmented labels: override .form-group label { display:block } */
.card-theme-builder .name-tag-bg-type-opt,
.admin-name-tag-section .name-tag-bg-type-opt {
    display: inline-flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: auto;
    margin-bottom: 0;
    font-weight: 500;
}
.name-tag-bg-type-opt {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    color: #64748b;
    cursor: pointer;
    user-select: none;
    padding: 0.45rem 0.95rem;
    border-radius: 9px;
    transition:
        background 0.15s ease,
        color 0.15s ease;
}
.name-tag-bg-type-opt:has(input:checked) {
    background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
    color: #3730a3;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.name-tag-bg-type-opt input {
    margin: 0;
    accent-color: #4f46e5;
}
.name-tag-bg-panel {
    margin-bottom: 0.5rem;
}
.name-tag-bg-panel--hidden {
    display: none !important;
}
.name-tag-gradient-hint {
    margin: 0 0 0.65rem;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #64748b;
}
.name-tag-gradient-swatch-instruction {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #475569;
    font-weight: 500;
}
.name-tag-gradient-stop-mode {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-bottom: 0.5rem;
}
.label-like--compact {
    margin-bottom: 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}
.name-tag-bg-type--compact {
    margin-bottom: 0;
}
.name-tag-bg-type--compact .name-tag-bg-type-opt {
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
}
.name-tag-gradient-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1rem;
}
.name-tag-gradient-controls--stops {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
}
.name-tag-gradient-stops {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    justify-items: stretch;
    gap: 0.75rem 1rem;
    width: 100%;
}
.name-tag-gradient-stops--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 520px) {
    .name-tag-gradient-stops {
        grid-template-columns: 1fr;
    }
    .name-tag-gradient-stops--two {
        grid-template-columns: 1fr;
    }
}
.name-tag-gradient-pair {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    width: 100%;
}
/* Override .form-group label { margin-bottom } so each column stacks label + swatch cleanly */
.form-group .name-tag-gradient-pair-label {
    margin-bottom: 0;
}
.name-tag-gradient-pair-label {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0 2px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.25;
    color: #64748b;
}
/* Framed swatch so native color input reads as a tappable color tile (esp. Windows/Chrome). */
.name-tag-color-swatch-frame {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 56px;
    padding: 4px;
    border: 2px solid #94a3b8;
    border-radius: 12px;
    background: linear-gradient(180deg, #fff 0%, #f1f5f9 100%);
    box-shadow:
        0 2px 6px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    box-sizing: border-box;
    align-self: stretch;
}
.name-tag-color-swatch-frame:focus-within {
    border-color: #6366f1;
    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.25),
        0 2px 6px rgba(15, 23, 42, 0.08);
}
.name-tag-color-swatch-frame input[type='color'] {
    display: block;
    flex: 1 1 auto;
    width: 100% !important;
    min-width: 0;
    min-height: 48px;
    height: 48px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
}
/* Fill the frame: default WebKit swatch can collapse to a thin strip */
.name-tag-color-swatch-frame input[type='color']::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 8px;
    width: 100%;
    height: 100%;
    min-height: 48px;
}
.name-tag-color-swatch-frame input[type='color']::-webkit-color-swatch {
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    height: 100%;
}
.name-tag-color-swatch-frame input[type='color']::-moz-color-swatch {
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.15);
}
.name-tag-gradient-angle {
    width: 100%;
    max-width: 20rem;
}
.name-tag-gradient-angle select {
    width: 100%;
    min-width: 0;
    padding: 0.45rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.85rem;
    background: #fff;
    color: #0f172a;
}
.name-tag-bg-preview-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.45);
    flex-wrap: wrap;
}
.name-tag-bg-preview-label {
    flex: 0 0 auto;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    line-height: 1.2;
    align-self: center;
}
.name-tag-bg-preview {
    min-height: 2.35rem;
    min-width: 8rem;
    max-width: 100%;
    flex: 1 1 auto;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    box-shadow:
        inset 0 1px 3px rgba(15, 23, 42, 0.07),
        0 1px 0 rgba(255, 255, 255, 0.6);
}
.admin-name-tag-section .name-tag-bg-preview {
    min-width: 6rem;
}

.employer-card-theme-preview {
    margin-top: 0.5rem;
    max-width: 420px;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
}

.employer-card a:hover {
    text-decoration: underline;
}

.employer-card .actions {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.employer-card .actions button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.employer-card .card-actions {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.employer-card .card-actions button,
.employer-card .action-btn,
.employer-card .btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.employer-card .spidr-ai-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex: 1;
}

.employer-card .spidr-ai-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.employer-card .spidr-ai-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-email {
    background-color: #007bff;
    color: white;
}

.btn-email:hover {
    background-color: #0056b3;
}

.btn-delete {
    background-color: #dc3545;
    color: white;
}

.btn-delete:hover {
    background-color: #c82333;
}

.btn-ncci {
    background-color: #17a2b8;
    color: white;
}

.btn-ncci:hover {
    background-color: #138496;
}

.btn-ncci.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-ncci.btn-loading::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-image: url('../animations/SPIDR animation/SPIDR_SMALL.GIF');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
}

.find-more-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid #dbe7ff;
    background: #f7faff;
    border-radius: 8px;
}

.btn-find-more {
    background: linear-gradient(135deg, #2b87ff 0%, #14b8a6 100%);
    color: #fff;
    border: none;
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.25;
    max-width: 100%;
}

.btn-find-more:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.find-more-status {
    color: #2f4a6d;
    font-size: 0.9rem;
}

.btn-save {
    background-color: #28a745;
    color: white;
}

.btn-save:hover {
    background-color: #1e7e34;
}

/* Loading and Status Messages */
.loading-message {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.status-message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.status-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Responsive Design for Reports Modal */
@media (max-width: 768px) {
    .reports-modal-content {
        margin: 1rem;
        width: 95%;
    }
    
    .reports-modal-header {
        padding: 1rem;
    }
    
    .reports-modal-body {
        padding: 1rem;
    }
    
    .employer-cards {
        grid-template-columns: 1fr;
    }

    .employer-assignment {
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
    }

    .assign-agent-wrap {
        max-width: 100%;
    }

    .pagination-info {
        white-space: normal;
        text-align: center;
        padding: 0 0.25rem;
    }
}

/* User Dropdown Styles */
.user-dropdown {
    position: relative;
}

.user-dropdown-btn {
    background: white;
    border: 1px solid #000000;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #000000;
    transition: all 0.2s ease;
    min-width: 120px;
    max-width: 200px;
}

.user-dropdown-btn:hover {
    background: #f5f5f5;
    border-color: #000000;
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #000000;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    z-index: 1000;
    display: none;
    margin-top: 0.25rem;
}

.user-dropdown-menu.show {
    display: block;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #000000;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.dropdown-item:first-child {
    border-radius: 6px 6px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 6px 6px;
}

.user-role {
    color: #999;
    font-size: 0.8rem;
    font-weight: normal;
}

/* Mobile section middle flair */
@media (max-width: 768px) {
    .section.middle-screen::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
        background-size: 200% 100%;
        animation: shimmer 2s ease-in-out infinite;
        z-index: 1;
    }
    
    @keyframes shimmer {
        0% { background-position: 200% 0; }
        100% { background-position: -200% 0; }
    }
}

/* Edit Profile Styles */
.edit-profile {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.tab {
    padding: 1rem 2rem;
    background: white;
    border: 1px solid var(--border-color);
    border-bottom: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--text-color);
}

.tab:first-child {
    border-radius: 6px 0 0 0;
}

.tab:last-child {
    border-radius: 0 6px 0 0;
}

.tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tab:hover:not(.active) {
    background: #f5f5f5;
}

/* Removed duplicate .tab-content rule that was hiding content */

/* New Tab Navigation Styles */
.tab-navigation {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    background: white;
}

.tab-btn {
    padding: 1rem 2rem;
    background: white;
    border: 1px solid var(--border-color);
    border-bottom: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--text-color);
    font-size: 1rem;
}

.tab-btn:first-child {
    border-radius: 6px 0 0 0;
}

.tab-btn:last-child {
    border-radius: 0 6px 0 0;
}

/* Desktop: Show tabs, hide dropdown */
.tab-navigation .tab-btn {
    display: inline-block;
}

.tab-navigation .mobile-tab-selector {
    display: none;
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tab-btn:hover:not(.active) {
    background: #f5f5f5;
}

.tab-content {
    border: 1px solid var(--border-color);
    border-radius: 0 6px 6px 6px;
    background: white;
    min-height: 400px;
}

/* Edit Profile tab-content visibility */
.edit-profile .tab-content {
    display: none;
    padding: 2rem;
}

.edit-profile .tab-content.active {
    display: block;
}

.tab-panel {
    display: none;
    padding: 2rem;
}

.tab-panel.active {
    display: block;
}

/* Jobs Table Styles */
.jobs-table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 1rem;
}

.jobs-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.jobs-table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid var(--border-color);
}

.jobs-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
}

.jobs-table td {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.jobs-table tbody tr {
    transition: background-color 0.2s ease;
}

.jobs-table tbody tr:hover {
    background-color: var(--hover-color);
}

.job-row {
    cursor: pointer;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
    transition: all 0.3s ease;
}

.status-running {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status-completed {
    background-color: #e8f5e9;
    color: #388e3c;
}

.status-failed {
    background-color: #ffebee;
    color: #d32f2f;
}

.status-pending {
    background-color: #fff3e0;
    color: #f57c00;
}

.status-in-queue {
    background-color: #e0f2f1;
    color: #00695c;
}

/* Priority Badge Styles */
.priority-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.priority-high {
    background-color: #fce4ec;
    color: #c2185b;
}

.priority-normal {
    background-color: #f5f5f5;
    color: #757575;
}

/* Queue Badge Styles */
.queue-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.queue-waiting {
    background-color: #fff3e0;
    color: #e65100;
    border: 1px solid #ffb74d;
}

.queue-active {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #90caf9;
}

.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.no-jobs-message {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.1rem;
}

.error-message {
    text-align: center;
    padding: 2rem;
    color: #d32f2f;
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 6px;
}

/* User Dropdown Styles */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.user-dropdown-btn:hover {
    background: #f5f5f5;
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    z-index: 1000;
    display: none;
}

.user-dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.dropdown-item:first-child {
    border-radius: 6px 6px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 6px 6px;
}

/* Status Banner Styles */
.status-banner {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-banner-icon {
    font-size: 1.2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.status-banner-text {
    font-weight: 500;
    color: #1976d2;
}

/* Section Styles */
.section {
    margin-bottom: 2rem;
}

.section h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.section h4 {
    color: var(--secondary-color);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.controls input,
.controls select,
.controls button {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

.controls button {
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.controls button:hover {
    background: var(--secondary-color);
}

.ai-search-btn {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4) !important;
    color: white !important;
}

.ai-search-btn:hover {
    background: linear-gradient(45deg, #ff5252, #26a69a) !important;
}

/* Reports Modal Styles */
.reports-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30000;
}

.reports-modal-content {
    background: white;
    border-radius: 8px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.reports-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: #f8f9fa;
}

.reports-modal-header h2 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.reports-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.reports-modal-close:hover {
    background: #e9ecef;
    color: var(--primary-color);
}

.reports-modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.report-description {
    font-style: italic;
    color: var(--secondary-color);
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.report-data-container {
    margin-top: 1rem;
    width: 100%;
    overflow-x: auto;
}

.report-table {
    table-layout: fixed;
}

.report-table th, .report-table td {
    font-size: clamp(10px, 1vw, 14px);
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ccc;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.email-template-preview {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #f8f9fa;
}

.email-template-preview h4 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.email-template-preview p {
    margin: 0.25rem 0;
    color: #666;
}

/* Login Page Styles */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #000000;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-form input {
    padding: 0.75rem;
    border: 1px solid #000000;
    border-radius: 4px;
    font-size: 1rem;
    background: white;
    color: #000000;
}

.login-form button {
    padding: 0.75rem;
    background: linear-gradient(135deg, #000000 0%, #1f2937 100%);
    color: white;
    border: 1px solid #000000;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-form button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.login-form button:hover::before {
    left: 100%;
}

.login-form button:hover {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.error-message {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
}

.success-message {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
}

.info-message {
    color: #0c5460;
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
}

.warning-message {
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
}

.no-results-message {
    color: #6c757d;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    margin: 1rem 0;
    text-align: center;
}

.no-results-message p {
    margin: 0.5rem 0;
}

.no-results-message .no-results-hint {
    font-size: 0.9rem;
    color: #868e96;
    margin-top: 0.75rem;
}

/* AI Search button styling */
.ai-search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.ai-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ai-search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

/* AI updated indicator */
.ai-updated {
    color: #667eea;
    font-style: italic;
}

.signup-link {
    text-align: center;
    margin-top: 1rem;
}

.signup-link a {
    color: #000000;
    text-decoration: none;
    cursor: pointer;
}

.signup-link a:hover {
    text-decoration: underline;
}

.form-toggle {
    text-align: center;
    margin-top: 1rem;
}

.form-toggle a {
    color: #000000;
    text-decoration: none;
    cursor: pointer;
}

.form-toggle a:hover {
    text-decoration: underline;
}

.signup-form {
    display: none;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 30000;
    animation: fadeIn 0.3s ease-out;
}

.modal {
    background: white;
    border: 2px solid #000000;
    border-radius: 12px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
    position: relative;
}

.modal.success {
    border-color: #10b981;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.modal.error {
    border-color: #ef4444;
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}

.modal.warning {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.modal.success .modal-icon {
    color: #10b981;
}

.modal.error .modal-icon {
    color: #ef4444;
}

.modal.warning .modal-icon {
    color: #f59e0b;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #000000;
}

.modal-message {
    font-size: 1rem;
    color: #000000;
    margin-bottom: 1.5rem;
}

.modal-button {
    background: #000000;
    color: white;
    border: 1px solid #000000;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-button:hover {
    background: #333333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Enhanced form effects */
.login-form input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.login-form button:active {
    transform: translateY(1px);
}

/* Remember Me Checkbox */
.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
    line-height: 1;
}

.remember-me input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer;
    transform: translateY(-1px);
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
    display: inline-block !important;
}

.remember-me label {
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
    user-select: none;
    margin: 0;
    padding: 0;
    line-height: 1;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

/* Hover effects for links */
.form-toggle a {
    position: relative;
    overflow: hidden;
}

.form-toggle a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 0.3s ease;
}

.form-toggle a:hover::after {
    width: 100%;
}

/* Inline Styles - Converted to Classes */
.inline-logo {
    height: 4rem;
    margin-right: 1rem;
    vertical-align: middle;
}

.inline-h1 {
    display: inline;
}

.inline-center {
    text-align: center;
    margin-bottom: 2rem;
}

.inline-logo-small {
    height: 3rem;
    margin-bottom: 1rem;
}

.inline-user-info {
    color: #666;
    margin-right: 0.5rem;
    font-size: 0.85rem;
}

.inline-svg {
    margin-right: 0.5rem;
}

.inline-admin-only {
    display: none;
}

.inline-help-text {
    color: #666;
    margin-top: 0.5rem;
    display: block;
}

.inline-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.inline-actions input[type="text"] {
    flex: 1;
}

.subscriptions-list {
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 10px;
    background: #fafafa;
    max-height: 260px;
    overflow-y: auto;
}

.subscriptions-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 14px;
}

.subscriptions-empty {
    color: #777;
    font-size: 13px;
}

.inline-preview-body {
    white-space: pre-wrap;
    margin-top: 0.5rem;
}

/* Variable Tags Styles */
.variable-tags-container {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.variable-tags-header {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #495057;
}

.variable-tags-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.variable-tags-group:last-child {
    margin-bottom: 0;
}

.variable-tag-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #495057;
    margin-right: 0.25rem;
}

.variable-tag {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: #007bff;
    color: white;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: grab;
    user-select: none;
    transition: all 0.2s ease;
    border: 1px solid #0056b3;
}

.variable-tag:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.variable-tag:active {
    cursor: grabbing;
    transform: translateY(0);
}

.variable-tag:focus {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

/* Tag Input Wrapper - Shows tags visually */
.tag-input-wrapper {
    position: relative;
    width: 100%;
}

.tag-input-display {
    width: 100%;
    min-height: 2.5rem;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    background: white;
    color: var(--text-color);
    box-sizing: border-box;
    white-space: pre-wrap;
    word-wrap: break-word;
    cursor: text;
    line-height: 1.5;
}

.tag-input-display:empty:before,
.tag-textarea-display:empty:before {
    content: attr(data-placeholder);
    color: #999;
    pointer-events: none;
}

.tag-input-display:focus {
    outline: 2px solid #007bff;
    outline-offset: -2px;
    border-color: #007bff;
}

/* Variable tag inside input - no curly braces shown */
.tag-input-display .variable-tag-inline,
.tag-textarea-display .variable-tag-inline {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.375rem 0.25rem 0.5rem;
    background: #007bff;
    color: white;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0 2px;
    vertical-align: baseline;
    user-select: text;
    cursor: pointer;
    pointer-events: auto;
    transition: background-color 0.2s ease;
    gap: 0.25rem;
}

.tag-input-display .variable-tag-inline:hover,
.tag-textarea-display .variable-tag-inline:hover {
    background: #0056b3;
}

.tag-input-display .variable-tag-inline::selection,
.tag-textarea-display .variable-tag-inline::selection {
    background: rgba(255, 255, 255, 0.3);
}

.tag-input-display .variable-tag-inline .tag-name,
.tag-textarea-display .variable-tag-inline .tag-name {
    flex: 1;
}

.tag-input-display .variable-tag-inline .tag-delete,
.tag-textarea-display .variable-tag-inline .tag-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 0.25rem;
    padding: 0;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    user-select: none;
}

.tag-input-display .variable-tag-inline .tag-delete:hover,
.tag-textarea-display .variable-tag-inline .tag-delete:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.tag-input-display .variable-tag-inline .tag-delete:active,
.tag-textarea-display .variable-tag-inline .tag-delete:active {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0.95);
}

/* Textarea version */
.tag-textarea-display {
    width: 100%;
    min-height: 200px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    color: var(--text-color);
    box-sizing: border-box;
    white-space: pre-wrap;
    word-wrap: break-word;
    cursor: text;
    line-height: 1.5;
    resize: vertical;
}

.tag-textarea-display:empty:before {
    content: attr(data-placeholder);
    color: #999;
}

.tag-textarea-display:focus {
    outline: 2px solid #007bff;
    outline-offset: -2px;
    border-color: #007bff;
}

.inline-margin-top {
    margin-top: 20px;
    text-align: center;
}

.inline-center-btn {
    margin: 0 auto;
}

.inline-opacity {
    opacity: 0.5;
}

.inline-chatgpt-response {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
}

.inline-error-message {
    color: #d32f2f;
    background: #ffebee;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Mobile Responsive for Edit Profile */
@media (max-width: 768px) {
    .edit-profile {
        padding: 1rem;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab {
        border-radius: 6px 6px 0 0;
        margin-bottom: 0;
    }
    
    .tab:first-child {
        border-radius: 6px 6px 0 0;
    }
    
    .tab:last-child {
        border-radius: 0;
    }
    
    .tab-content {
        border-radius: 0 0 6px 6px;
        padding: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        padding: 1rem;
    }
    
    /* Mobile Enhancements for Login */
    .login-container {
        max-width: 90%;
        margin: 50px auto;
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .login-container::before {
        height: 6px;
    }
    
    .login-form input {
        padding: 1rem;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 8px;
    }
    
    .login-form button {
        padding: 1rem;
        font-size: 16px;
        border-radius: 12px;
        min-height: 48px; /* Touch-friendly */
    }
    
    .modal {
        max-width: 90%;
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .modal-icon {
        font-size: 2.5rem;
    }
    
    .modal-title {
        font-size: 1.25rem;
    }
    
    .modal-button {
        padding: 1rem 2rem;
        min-height: 48px;
        border-radius: 12px;
    }
    
    /* Touch-friendly spacing */
    .form-toggle {
        margin-top: 1.5rem;
    }
    
    .form-toggle a {
        padding: 0.5rem;
        display: inline-block;
        min-height: 44px;
        line-height: 1.5;
    }
}

/* Mobile Responsive for Reports */
@media (max-width: 768px) {
    table.report-table {
      display: block;
      border: none;
      background: transparent;
      box-shadow: none;
    }
  
    table.report-table thead {
      display: none;
    }
  
    table.report-table tbody {
      display: block;
    }
  
    table.report-table tr {
      display: block;
      margin-bottom: 1rem;
      background: white;
      border: 2px solid var(--border-color);
      border-radius: 16px;
      padding: 1rem;
      box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    }
  
    table.report-table td {
        display: block;
        text-align: left;
        padding: 0.5rem 0;
        border: none;
        min-width: auto;
        white-space: normal;
        font-size: 16px;
        line-height: 1.4;
    }
    
    table.report-table td::before {
        content: attr(data-label);
        font-weight: 700;
        display: inline-block;
        margin-right: 0.5rem;
        margin-bottom: 0;
        color: var(--secondary-color);
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        min-width: 80px;
    }
    
    table.report-table td:first-child {
        font-size: 18px;
        font-weight: 700;
        padding-top: 0;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid #e5e7eb;
        margin-bottom: 0.25rem;
    }
    
    table.report-table tr:hover {
        background: white;
        transform: translateY(-2px);
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    }
  }

@media (max-width: 480px) {
    .login-container {
        margin: 20px auto;
        padding: 1rem;
    }
    
    .login-form {
        gap: 0.75rem;
    }
    
    .login-form input,
    .login-form button {
        padding: 0.875rem;
    }
}

/* ========== Pagination Controls ========== */
.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    margin: 1rem 0;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.pagination-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-page {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-page:hover {
    background: #f0f0f0;
    border-color: var(--primary-color);
}

.pagination-page.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-ellipsis {
    padding: 0 0.5rem;
    color: #666;
}

.pagination-info {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    padding: 0 1rem;
    white-space: nowrap;
}

/* Report Controls Card */
.report-controls-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.report-controls-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.report-control-group {
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

.report-control-group.filter-group {
    flex: 1;
    min-width: 300px;
}

.control-label {
    display: block;
    font-size: 0.85rem;
    color: #374151;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.report-control-group select,
.report-control-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.report-control-group select:focus,
.report-control-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.report-control-group input::placeholder {
    color: #9ca3af;
}

.report-description {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: #f0f9ff;
    border-left: 4px solid #3b82f6;
    border-radius: 0 8px 8px 0;
    color: #1e40af;
    font-size: 0.9rem;
    display: none;
}

.report-description:not(:empty) {
    display: block;
}

.report-loading-status {
    display: none;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    text-align: center;
    color: #666;
    background: #fafafa;
    border-radius: 8px;
    font-size: 0.9rem;
}

.report-loading-status:not(:empty) {
    display: block;
}

@media (max-width: 768px) {
    .report-controls-row {
        flex-direction: column;
    }
    
    .report-control-group,
    .report-control-group.filter-group {
        width: 100%;
        min-width: unset;
    }
}

/* Employer Search Controls Card */
.search-controls-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Keep employer search controls above accidental overlay layers */
#employer-search,
#employer-search .section,
#employer-search .search-controls-card,
#employer-search .search-controls-row,
#employer-search .search-buttons {
    position: relative;
    z-index: 20000;
    isolation: isolate;
}

#searchEmployersBtn {
    position: relative;
    z-index: 20001;
    transform: translateZ(0);
    pointer-events: auto !important;
}

.search-controls-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.search-control-group {
    display: flex;
    flex-direction: column;
}

.search-control-group.search-input-group {
    flex: 1;
    min-width: 300px;
}

.search-control-group.search-buttons-group {
    min-width: 200px;
}

.search-control-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-control-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.search-control-group input::placeholder {
    color: #9ca3af;
}

.search-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.search-buttons .btn,
.search-buttons .ai-search-btn {
    flex: 1;
    min-width: 140px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.search-description {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 0 8px 8px 0;
    color: #92400e;
    font-size: 0.9rem;
}

.search-loading-status {
    display: none;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    text-align: center;
    color: #666;
    background: #fafafa;
    border-radius: 8px;
    font-size: 0.9rem;
}

.search-loading-status:not(:empty) {
    display: block;
}

@media (max-width: 768px) {
    .search-controls-row {
        flex-direction: column;
    }
    
    .search-control-group.search-input-group,
    .search-control-group.search-buttons-group {
        width: 100%;
        min-width: unset;
    }
    
    .search-buttons {
        flex-direction: column;
    }
    
    .search-buttons .btn,
    .search-buttons .ai-search-btn {
        width: 100%;
    }
}

/* ========== Card Badge (Result Number & ID) ========== */
.card-badges {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    min-width: 0;
}

.card-badges .card-badge {
    border: 0;
    margin: 0;
    padding: 0;
}

.result-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.employer-id {
    background: #f0f0f0;
    color: #666;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: monospace;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .pagination-pages {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
    
    .pagination-btn {
        flex: 1;
        max-width: 120px;
    }
}

/* AI Assistant Widget (floating chatbot) — hidden for now; set display to flex to show again */
/* pointer-events: none on the shell + auto on launcher/panel: only the FAB receives hits when closed.
   Collapsed panel uses display:none so it does not reserve a 460px-tall invisible layout box. */
.ai-agent-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 25000;
    display: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
}

.ai-agent-launcher {
    pointer-events: auto;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid #000000;
    background: #111827;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    padding: 0 !important;
    min-height: 0 !important;
}

.ai-agent-panel {
    pointer-events: auto;
    width: min(380px, calc(100vw - 32px));
    height: 460px;
    background: #ffffff;
    border: 1px solid #000000;
    border-radius: 12px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ai-agent-panel.collapsed {
    display: none;
}

.ai-agent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.ai-agent-title {
    font-size: 14px;
    font-weight: 700;
}

.ai-agent-close-btn {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    padding: 0 !important;
    min-height: 0 !important;
}

.ai-agent-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ai-agent-message {
    max-width: 92%;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-wrap;
}

.ai-agent-message.user {
    align-self: flex-end;
    background: #111827;
    color: #ffffff;
}

.ai-agent-message.assistant {
    align-self: flex-start;
    background: #f3f4f6;
    color: #111827;
}

.ai-agent-input-row {
    border-top: 1px solid #e5e7eb;
    padding: 10px;
    display: flex;
    gap: 8px;
    background: #f8fafc;
}

.ai-agent-input {
    flex: 1;
    resize: none;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    min-height: 56px;
}

.ai-agent-send-btn {
    border: 1px solid #000000;
    background: #111827;
    color: #ffffff;
    border-radius: 8px;
    padding: 10px 12px !important;
    min-height: 0 !important;
    font-size: 13px !important;
    font-weight: 600;
    cursor: pointer;
    width: auto !important;
}

.ai-agent-send-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .ai-agent-widget {
        right: 10px;
        bottom: 10px;
    }

    .ai-agent-launcher {
        width: 52px;
        height: 52px;
        font-size: 14px !important;
    }

    .ai-agent-panel {
        width: calc(100vw - 20px);
        height: 70vh;
        max-height: 540px;
    }

    .ai-agent-input {
        min-height: 52px;
        font-size: 14px;
        padding: 8px 10px;
    }

    .ai-agent-send-btn {
        min-width: 78px;
        max-width: 110px;
    }
}

/* My Leads tab — assigned employers */
#my-leads .my-leads-section {
    position: relative;
}

#my-leads .my-leads-hero {
    margin-bottom: 1.25rem;
    padding: 1.25rem 1.35rem;
    border-radius: 14px;
    background: linear-gradient(125deg, #0f172a 0%, #1e293b 42%, #334155 100%);
    color: #f8fafc;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
}

#my-leads .my-leads-hero h2 {
    margin: 0 0 0.35rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #f8fafc;
}

#my-leads .my-leads-subtitle {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(248, 250, 252, 0.88);
    max-width: 52rem;
}

#my-leads .search-controls-card.my-leads-toolbar {
    background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
    border: 1px solid #e2e8f0;
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
}

#my-leads .my-leads-toolbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

#my-leads .my-leads-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

#my-leads .my-leads-last-refreshed {
    font-size: 0.8rem;
    color: #64748b;
}

#my-leads .my-leads-status-line {
    margin: 0;
    font-size: 0.9rem;
    color: #334155;
}

#my-leads .my-leads-refresh-btn {
    flex-shrink: 0;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

#my-leads .my-leads-refresh-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

#my-leads .my-leads-stage-filter {
    display: inline-flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #475569;
}

#my-leads .my-leads-stage-filter select {
    min-width: 160px;
    padding: 0.5rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0;
}

.crm-card-fields {
    display: grid;
    gap: 0.6rem;
    margin: 0.85rem 0;
    padding: 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.crm-stage-row,
.crm-field-row {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    flex-wrap: wrap;
    color: #334155;
    font-size: 0.92rem;
}

.crm-stage-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--crm-stage-color, #2563eb) 42%, #ffffff);
    background: color-mix(in srgb, var(--crm-stage-color, #2563eb) 12%, #ffffff);
    color: var(--crm-stage-color, #2563eb);
    font-weight: 800;
}

.crm-field-value {
    white-space: pre-wrap;
}

.crm-pencil-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: #e2e8f0;
    color: #0f172a;
    border-radius: 999px;
    width: 1.55rem;
    height: 1.55rem;
    line-height: 1;
    font-size: 0.82rem;
    cursor: pointer;
    font-weight: 800;
    vertical-align: middle;
}

.crm-pencil-btn:hover {
    background: #cbd5e1;
}

.crm-inline-editor {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 0.35rem;
}

.crm-inline-editor[hidden] {
    display: none;
}

.crm-inline-input {
    min-width: 180px;
    padding: 0.45rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
}

.crm-notes-input {
    width: min(100%, 520px);
    min-height: 74px;
}

.crm-save-btn,
.crm-cancel-btn {
    padding: 0.42rem 0.7rem;
    border-radius: 8px;
    font-size: 0.82rem;
}

.crm-saving {
    opacity: 0.65;
    pointer-events: none;
}

.muted {
    color: #94a3b8;
}

.crm-config-list {
    display: grid;
    gap: 0.75rem;
    margin: 0.75rem 0 1rem;
}

.crm-config-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.crm-config-row label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.88rem;
    color: #334155;
}

.crm-config-row input[type="text"] {
    min-width: 160px;
}

.crm-config-row input[type="number"] {
    width: 84px;
}

.sales-funnel-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin: 0 0 1rem;
}

.sales-funnel-summary-card {
    display: grid;
    gap: 0.35rem;
    padding: 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.sales-funnel-summary-card strong {
    font-size: 1.3rem;
    color: #0f172a;
}

#my-leads .my-leads-results {
    min-height: 4rem;
}

#my-leads .my-leads-empty {
    text-align: center;
    padding: 2.5rem 1.5rem;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    color: #475569;
}

#my-leads .my-leads-empty strong {
    display: block;
    font-size: 1.1rem;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

#my-leads .my-leads-empty-hint {
    margin: 0;
    font-size: 0.95rem;
    color: #64748b;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 640px) {
    #my-leads .my-leads-toolbar-row {
        flex-direction: column;
        align-items: stretch;
    }

    #my-leads .my-leads-refresh-btn {
        width: 100%;
    }

    #my-leads .my-leads-stage-filter,
    #my-leads .my-leads-stage-filter select {
        width: 100%;
    }
}

/* --- All Contacts tab --- */
.all-contacts-section {
    padding-bottom: 2rem;
}

.all-contacts-hero {
    margin-bottom: 0.9rem;
}

.all-contacts-hero-text h2 {
    margin: 0 0 0.25rem 0;
    color: #0f172a;
    font-size: 1.45rem;
    letter-spacing: -0.01em;
}

.all-contacts-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 0.92rem;
    max-width: 46rem;
    line-height: 1.45;
}

.all-contacts-toolbar {
    margin-bottom: 1.25rem;
    padding: 1rem 1rem 1.1rem;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    overflow-x: hidden;
}

.all-contacts-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #eef2f7;
}

.all-contacts-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 38px;
    padding: 0 0.7rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    user-select: none;
}

.all-contacts-checkbox-label input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary-color, #2563eb);
}

.all-contacts-view-toggle {
    display: inline-flex;
    align-items: center;
    padding: 2px;
    border-radius: 10px;
    border: 1px solid #d7dee9;
    background: #f8fafc;
}

.all-contacts-view-btn {
    margin: 0;
    border: none;
    border-radius: 8px;
    padding: 0.42rem 0.95rem;
    font-size: 0.86rem;
    font-weight: 600;
    background: transparent;
    color: #475569;
    box-shadow: none;
}

.all-contacts-view-btn.active {
    background: var(--primary-color, #2563eb);
    color: #fff;
}

.all-contacts-view-btn:not(.active):hover {
    background: #edf2f7;
}

.all-contacts-refresh-btn {
    margin-left: auto;
    min-height: 38px;
    border-radius: 10px;
    border: 1px solid #d7dee9;
    padding: 0.42rem 0.95rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: #334155;
    background: #fff;
    cursor: pointer;
}

.all-contacts-refresh-btn:hover {
    background: #f8fafc;
    border-color: #c3d0e0;
}

.all-contacts-filters-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.7rem;
}

.all-contacts-filters-head .control-label {
    margin: 0;
    font-size: 0.83rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.01em;
}

.all-contacts-saved-filters-card {
    margin-bottom: 0.8rem;
    padding: 0.8rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    box-shadow: none;
}

.all-contacts-saved-filters-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.55rem;
}

.all-contacts-saved-filters-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.all-contacts-saved-filters-hint {
    font-size: 0.78rem;
    color: #64748b;
}

.all-contacts-saved-filters-controls {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) auto auto auto;
    gap: 0.5rem;
    align-items: center;
    min-width: 0;
}

.all-contacts-saved-filters-select,
.all-contacts-saved-filter-name {
    min-height: 38px;
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
    border: 1px solid #d4dce7;
    background: #fff;
    color: #0f172a;
    font-size: 0.88rem;
}

.all-contacts-saved-filters-select:focus,
.all-contacts-saved-filter-name:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.all-contacts-section .all-contacts-toolbar .btn.btn-secondary {
    min-height: 38px;
    border-radius: 10px;
    border: 1px solid #d4dce7;
    background: #fff;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    box-shadow: none;
}

.all-contacts-section .all-contacts-toolbar .btn.btn-secondary:hover {
    background: #f8fafc;
    border-color: #c1ccdc;
}

.all-contacts-section .all-contacts-toolbar #allContactsSaveNewFilterBtn {
    background: var(--primary-color, #2563eb);
    border-color: var(--primary-color, #2563eb);
    color: #fff;
}

.all-contacts-section .all-contacts-toolbar #allContactsSaveNewFilterBtn:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.all-contacts-delete-filter-btn {
    border-color: #f3d0d0 !important;
    color: #b91c1c;
    background: #fff;
}

.all-contacts-delete-filter-btn:hover {
    background: #fef2f2 !important;
    border-color: #fca5a5 !important;
}

.all-contacts-saved-filter-status {
    min-height: 1.1rem;
    margin-top: 0.45rem;
    font-size: 0.78rem;
    color: #475569;
}

.all-contacts-saved-filter-status.success {
    color: #166534;
}

.all-contacts-saved-filter-status.error {
    color: #b91c1c;
}

.all-contacts-saved-filter-status.info {
    color: #334155;
}

.all-contacts-filter-rows {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.all-contacts-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.75fr) minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
    min-width: 0;
}

.all-contacts-filter-row > * {
    min-width: 0;
}

@media (max-width: 1180px) {
    .all-contacts-saved-filters-controls {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto;
    }

    .all-contacts-saved-filters-controls #allContactsDeleteFilterBtn {
        grid-column: span 2;
        justify-self: start;
    }

    .all-contacts-filter-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 1fr);
    }

    .all-contacts-filter-row .all-contacts-remove-filter {
        width: 100%;
        height: 38px;
        grid-column: span 3;
    }
}

.all-contacts-filter-row .all-contacts-col-select {
    min-height: 38px;
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
    border: 1px solid #d4dce7;
    font-size: 0.86rem;
    color: #1e293b;
    background: #fff;
}

.all-contacts-filter-row .all-contacts-op-select,
.all-contacts-filter-row .all-contacts-val-input {
    min-height: 38px;
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
    border: 1px solid #d4dce7;
    font-size: 0.86rem;
    color: #1e293b;
    min-width: 0;
    background: #fff;
}

.all-contacts-filter-row .all-contacts-col-select:focus,
.all-contacts-filter-row .all-contacts-op-select:focus,
.all-contacts-filter-row .all-contacts-val-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.all-contacts-remove-filter {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 10px;
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #64748b;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.all-contacts-remove-filter:hover {
    background: #fef2f2;
    border-color: #f5bcbc;
    color: #b91c1c;
}

.all-contacts-results {
    min-height: 4rem;
    margin-top: 0.2rem;
}

.all-contacts-cards-inner {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.all-contacts-card {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.all-contacts-card h3 {
    color: #0f172a;
}

.all-contacts-kv {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 22rem;
    overflow: auto;
}

.all-contacts-kv-row {
    display: grid;
    grid-template-columns: minmax(6rem, 38%) 1fr;
    gap: 0.5rem;
    font-size: 0.82rem;
    line-height: 1.35;
}

.all-contacts-k {
    color: #64748b;
    font-weight: 600;
}

.all-contacts-v {
    color: #0f172a;
    word-break: break-word;
}

.all-contacts-v a {
    color: var(--primary-color, #2563eb);
}

.all-contacts-empty {
    color: #94a3b8;
}

.all-contacts-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin-top: 0.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.04);
    background: #fff;
}

.all-contacts-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.all-contacts-table th:first-child,
.all-contacts-table td:first-child {
    min-width: 10rem;
}

.all-contacts-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 600;
    padding: 0.6rem 0.65rem;
    border-bottom: 1px solid #d6dce8;
    white-space: nowrap;
    text-align: left;
}

.all-contacts-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.all-contacts-table tbody tr:hover {
    background: #f6f9ff;
}

.all-contacts-table td {
    padding: 0.45rem 0.65rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
    max-width: 18rem;
    word-break: break-word;
}

.all-contacts-section .all-contacts-results .pagination-controls {
    justify-content: center;
    gap: 0.45rem;
    padding: 0.45rem 0;
    margin: 0.8rem 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

.all-contacts-section .all-contacts-results .pagination-btn {
    min-height: 34px;
    border-radius: 9px;
    border: 1px solid #d4dce7;
    background: #fff;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
}

.all-contacts-section .all-contacts-results .pagination-btn:hover:not(:disabled) {
    border-color: #bcc8da;
    background: #f8fafc;
    transform: none;
}

.all-contacts-section .all-contacts-results .pagination-btn:disabled {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #94a3b8;
    opacity: 1;
}

.all-contacts-section .all-contacts-results .pagination-pages {
    gap: 0.3rem;
}

.all-contacts-section .all-contacts-results .pagination-page {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: 1px solid #d4dce7;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
}

.all-contacts-section .all-contacts-results .pagination-page:hover {
    background: #f8fafc;
    border-color: #bcc8da;
}

.all-contacts-section .all-contacts-results .pagination-page.active {
    background: var(--primary-color, #2563eb);
    border-color: var(--primary-color, #2563eb);
    color: #fff;
}

.btn-sm {
    font-size: 0.85rem;
    padding: 0.35rem 0.65rem;
}

@media (max-width: 768px) {
    .all-contacts-toolbar {
        padding: 0.9rem 0.8rem 1rem;
    }

    .all-contacts-toolbar-row {
        align-items: stretch;
        padding-bottom: 0.75rem;
    }

    .all-contacts-refresh-btn {
        margin-left: 0;
    }

    .all-contacts-view-toggle {
        width: 100%;
        justify-content: stretch;
    }

    .all-contacts-view-toggle .all-contacts-view-btn {
        flex: 1;
        text-align: center;
    }

    .all-contacts-saved-filters-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .all-contacts-saved-filters-controls,
    .all-contacts-filter-row {
        grid-template-columns: 1fr;
    }

    .all-contacts-filter-row .all-contacts-remove-filter {
        width: 100%;
        height: 38px;
    }

    .all-contacts-section .all-contacts-results .pagination-controls {
        flex-wrap: wrap;
    }

    .all-contacts-section .all-contacts-results .pagination-pages {
        width: 100%;
        justify-content: center;
    }
}

/* Admin: AI spend (xAI Management API) */
#ai-spend .ai-spend-section {
    position: relative;
}

#ai-spend .ai-spend-hero {
    margin-bottom: 1.25rem;
    padding: 1.25rem 1.35rem;
    border-radius: 14px;
    background: linear-gradient(125deg, #0b1220 0%, #152036 45%, #1e3a4f 100%);
    color: #f1f5f9;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
}

#ai-spend .ai-spend-hero h2 {
    margin: 0 0 0.35rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #f8fafc;
}

#ai-spend .ai-spend-subtitle {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #cbd5e1;
    max-width: 52rem;
}

#ai-spend .ai-spend-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

#ai-spend .ai-spend-status {
    font-size: 0.85rem;
    color: #64748b;
}

#ai-spend .ai-spend-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#ai-spend .ai-spend-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

#ai-spend .ai-spend-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.05rem;
    color: #0f172a;
}

#ai-spend .ai-spend-card-primary {
    border-color: #bae6fd;
    background: linear-gradient(180deg, #f0f9ff 0%, #fff 55%);
}

#ai-spend .ai-spend-card-secondary {
    border-color: #fde68a;
    background: #fffbeb;
}

#ai-spend .ai-spend-amount {
    margin: 0.25rem 0 0.5rem 0;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #0f172a;
}

#ai-spend .ai-spend-meta {
    margin: 0;
    padding-left: 1.1rem;
    color: #475569;
    font-size: 0.9rem;
}

#ai-spend .ai-spend-hint,
#ai-spend .ai-spend-muted {
    margin: 0.35rem 0 0 0;
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.4;
}

#ai-spend .ai-spend-notice {
    padding: 1rem;
    border-radius: 8px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

#ai-spend .ai-spend-table-wrap {
    overflow-x: auto;
}

#ai-spend .ai-spend-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

#ai-spend .ai-spend-table th,
#ai-spend .ai-spend-table td {
    text-align: left;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid #e2e8f0;
}

#ai-spend .ai-spend-table th {
    color: #64748b;
    font-weight: 600;
}

#ai-spend .ai-spend-cap-admin {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

#ai-spend .ai-spend-cap-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

#ai-spend .ai-spend-card-gate {
    border-left: 4px solid #0ea5e9;
}

#ai-spend .ai-spend-blocked-note {
    color: #b45309;
}

/* Dashboard: hide AI affordances when monthly spend cap is reached */
body.ai-spend-blocked .find-more-toolbar,
body.ai-spend-blocked #aiAgentWidget,
body.ai-spend-blocked .spidr-ai-btn {
    display: none !important;
}

#jobs-runtime .jobs-runtime-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

#jobs-runtime .jobs-runtime-table-wrap {
    overflow-x: auto;
}

#jobs-runtime .jobs-runtime-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

#jobs-runtime .jobs-runtime-table th,
#jobs-runtime .jobs-runtime-table td {
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.6rem 0.7rem;
    vertical-align: middle;
}

#jobs-runtime .jobs-runtime-table th {
    color: #64748b;
    font-weight: 600;
}

#jobs-runtime .runtime-toggle-key {
    margin-top: 0.2rem;
    color: #64748b;
    font-size: 0.78rem;
}

#jobs-runtime .runtime-toggle-description {
    margin: 0.45rem 0 0;
    max-width: 42rem;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.45;
}

#jobs-runtime .runtime-toggle-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
}

#jobs-runtime .runtime-toggle-enabled {
    background: #dcfce7;
    color: #166534;
}

#jobs-runtime .runtime-toggle-disabled {
    background: #fee2e2;
    color: #991b1b;
}

#jobs-runtime .runtime-toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.86rem;
}