/* Jobs Platform - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
}

/* Layout */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Cards */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-card .stat-label {
    font-size: 0.9rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Comparison bars */
.comparison-bar {
    height: 24px;
    border-radius: 12px;
    background: #e9ecef;
    overflow: hidden;
    position: relative;
}

.comparison-bar .bar-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 0.5s ease;
}

.comparison-bar .bar-fill.employer {
    background: var(--primary-color);
}

.comparison-bar .bar-fill.national {
    background: var(--secondary-color);
    opacity: 0.5;
}

.comparison-bar .bar-label {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Status badges */
.badge-status {
    font-size: 0.75rem;
    padding: 0.4em 0.8em;
    border-radius: 20px;
}

.badge-draft { background: #6c757d; color: white; }
.badge-active { background: #198754; color: white; }
.badge-paused { background: #ffc107; color: #212529; }
.badge-expired { background: #495057; color: white; }
.badge-filled { background: #0dcaf0; color: #212529; }

.badge-submitted { background: #0dcaf0; color: #212529; }
.badge-reviewed { background: #0d6efd; color: white; }
.badge-shortlisted { background: #ffc107; color: #212529; }
.badge-successful { background: #198754; color: white; }
.badge-unsuccessful { background: #dc3545; color: white; }
.badge-withdrawn { background: #6c757d; color: white; }

.badge-pending { background: #ffc107; color: #212529; }
.badge-confirmed { background: #198754; color: white; }
.badge-completed { background: #0dcaf0; color: #212529; }
.badge-cancelled_by_school { background: #dc3545; color: white; }
.badge-cancelled_by_employer { background: #dc3545; color: white; }

/* Tables */
.table-hover tbody tr {
    cursor: pointer;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: var(--secondary-color);
}

/* Quote cards */
.quote-card {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0 8px 8px 0;
}

.quote-card .quote-text {
    font-style: italic;
    margin-bottom: 0.5rem;
}

.quote-card .quote-source {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

/* IMD Chart colors */
.imd-decile-1 { background: #d73027; }
.imd-decile-2 { background: #f46d43; }
.imd-decile-3 { background: #fdae61; }
.imd-decile-4 { background: #fee090; }
.imd-decile-5 { background: #ffffbf; }
.imd-decile-6 { background: #e0f3f8; }
.imd-decile-7 { background: #abd9e9; }
.imd-decile-8 { background: #74add1; }
.imd-decile-9 { background: #4575b4; }
.imd-decile-10 { background: #313695; }

/* Forms */
.form-section {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-section h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

/* Dynamic form rows */
.dynamic-row {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    position: relative;
}

.dynamic-row .remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

/* Location venue options */
.location-venue-check {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    transition: border-color 0.2s, background-color 0.2s;
    cursor: pointer;
}

.location-venue-check:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
}

.location-venue-check .form-check-input:checked ~ .form-check-label {
    color: var(--primary-color);
}

.location-venue-check .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.location-venue-check:has(.form-check-input:checked) {
    border-color: var(--primary-color);
    background: #f0f7ff;
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Login/Register pages */
.auth-container {
    max-width: 480px;
    margin: 2rem auto;
}

.auth-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 2rem;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--secondary-color);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Action buttons */
.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Filter tabs */
.filter-tabs {
    margin-bottom: 1rem;
}

.filter-tabs .nav-link {
    border-radius: 20px;
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
}

.filter-tabs .nav-link.active {
    background: var(--primary-color);
    color: white;
}

/* Dashboard grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Chart containers */
.chart-container {
    position: relative;
    height: 300px;
}

/* Quick Action Cards */
.quick-action-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e9ecef;
}

.quick-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Analytics Section */
.analytics-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
}

/* Headline Figures */
.headline-figures {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.headline-stat {
    text-align: center;
    padding: 0.5rem;
}

.headline-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.headline-label {
    font-size: 0.75rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Analytics Tabs */
.analytics-tabs {
    border-bottom: none;
    margin-bottom: 1rem;
}

.analytics-tabs .nav-link {
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    margin-right: 0.5rem;
    color: var(--secondary-color);
    font-weight: 500;
    transition: all 0.2s;
}

.analytics-tabs .nav-link:hover {
    background: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
}

.analytics-tabs .nav-link.active {
    background: var(--primary-color);
    color: white;
}

.analytics-tabs .nav-link i {
    margin-right: 0.4rem;
}

/* Analytics Tab Content */
.analytics-tab-content {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    min-height: 400px;
}

/* Analytics Cards */
.analytics-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.25rem;
    height: 100%;
}

.analytics-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

/* Chart containers */
.chart-container-sm {
    position: relative;
    height: 200px;
}

/* Map placeholder */
.map-container {
    min-height: 350px;
}

.map-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 350px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f5f5f5 100%);
    border-radius: 8px;
    color: var(--secondary-color);
}

.map-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Highlights list */
.highlights-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.highlight-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.highlight-item:last-child {
    border-bottom: none;
}

.highlight-icon {
    width: 32px;
    height: 32px;
    background: #e3f2fd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.highlight-text {
    flex: 1;
}

.highlight-text strong {
    color: var(--primary-color);
}

/* Comparison bars for widening access */
.comparison-section {
    margin-bottom: 1.5rem;
}

.comparison-section:last-child {
    margin-bottom: 0;
}

.comparison-label {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.comparison-bar-container {
    position: relative;
    margin-bottom: 0.25rem;
}

.comparison-bar-bg {
    height: 28px;
    background: #e9ecef;
    border-radius: 14px;
    overflow: hidden;
}

.comparison-bar-fill {
    height: 100%;
    border-radius: 14px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
}

.comparison-bar-fill.employer {
    background: linear-gradient(90deg, #0d6efd, #0b5ed7);
}

.comparison-bar-fill.national {
    background: #adb5bd;
}

.comparison-value {
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
}

.comparison-legend {
    display: flex;
    gap: 1.5rem;
    font-size: 0.75rem;
    color: var(--secondary-color);
    margin-top: 0.5rem;
}

.comparison-legend span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.employer {
    background: var(--primary-color);
}

.legend-dot.national {
    background: #adb5bd;
}

/* Quotes grid */
.quotes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

/* Regions list */
.regions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.region-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.region-item:last-child {
    border-bottom: none;
}

.region-count {
    font-weight: 600;
    color: var(--primary-color);
}

/* Bulk Upload */
.upload-zone {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    background: #fafbfc;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
}

.upload-zone.drag-over {
    border-color: var(--primary-color);
    background: #e3f2fd;
    transform: scale(1.02);
}

.upload-content {
    pointer-events: none;
}

.upload-content button {
    pointer-events: auto;
}

.upload-zone .bi-file-earmark-spreadsheet {
    color: #198754;
}

/* Print styles for PDF export */
@media print {
    .no-print {
        display: none !important;
    }

    .stat-card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }

    .analytics-section {
        background: white;
        border: 1px solid #dee2e6;
    }

    .analytics-tabs {
        display: none;
    }

    .tab-pane {
        display: block !important;
        opacity: 1 !important;
    }
}
