/* Hide apply buttons for inspectors */
.role-inspector .jobsearch-job-apply-btn,
.role-inspector .jobsearch-apply-job-btn,
.role-inspector .jobsearch_apply_job_btn,
.role-inspector .jobsearch_apply_job,
.role-inspector .jobsearch-job-apply-wrap,
.role-inspector .jobsearch_box_contact_apply,
.role-inspector .jobsearch_apply_job_btn_wrap,
.role-inspector .jobsearch-modal-popup-wrap,
.role-inspector .jobsearch-apply-btn {
    display: none !important;
}

/* Cascading location dropdown (Gouvernorat/Délégation) */
.im-cascading-location {
    margin-bottom: 15px;
}

.im-location-field {
    margin-bottom: 10px;
}

.im-location-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #1e1e1e;
}

.im-location-field select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
}

.im-loading-delegations {
    display: inline-block;
    margin-left: 10px;
    color: #666;
    font-style: italic;
}

/* Avatar sizing/shape */
.user_img_skillid .jobsearch-user-thumb img.avatar {
    width: 132px !important;
    height: 132px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
}

#circle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Styled select for zone filter */
.inspector-filter-select {
    appearance: none;
    -webkit-appearance: none;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 36px 8px 10px;
    color: #111827;
    font-size: 14px;
    line-height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px 18px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: border-color .2s ease, box-shadow .2s ease !important;
}

.inspector-filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
    ;
}

/* Card actions (3-dot menu) */
.inspector-card {
    position: relative !important;
}

.inspector-card-actions {
    position: absolute;
    top: 8px;
    right: 8px !important;
}

.inspector-card-actions button.action-dots {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.inspector-card-actions button.action-dots:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
}

.inspector-card-menu {
    position: absolute;
    top: 44px;
    right: 8px;
    min-width: 180px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    padding: 6px;
    display: none;
    z-index: 10;
}

.inspector-card-menu a,
.inspector-card-menu button {
    display: flex;
    width: 100%;
    text-align: left;
    gap: 8px;
    align-items: center;
    padding: 10px 10px;
    border-radius: 6px;
    color: #111827;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 14px;
    line-height: 20px;
    text-decoration: none;
}

.inspector-card-menu a:hover,
.inspector-card-menu button:hover {
    background: #f3f4f6;
}

.inspector-card-menu .menu-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    color: #6b7280;
}

/* Container & layout */
.inspector-stats {
    margin-bottom: 16px;
}

.inspector-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.inspector-stats .stat-card {
    background: #fff;
    border: 1px solid #eef0f2;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .04);
}

.inspector-stats .stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.inspector-stats .stat-label {
    margin-top: 4px;
    font-size: 12px;
    color: #475569;
}

.inspector-chart {
    margin-top: 12px;
    background: #fff;
    border: 1px solid #eef0f2;
    border-radius: 10px;
    padding: 12px;
}

.inspector-entreprises-filter {
    margin-bottom: 18px;
}

.inspector-entreprises-filter .jobsearch-employer-profile-submit {
    padding: 10px 16px;
    border-radius: 8px;
}

.inspector-entreprises-filter input[type="text"],
.inspector-entreprises-filter select {
    min-width: 220px;
    height: 38px;
}

.inspector-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    width: 100%;
    box-sizing: border-box;
}

.inspector-card {
    background: #fff;
    border: 1px solid #eef0f2;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .06);
    transition: transform .2s ease, box-shadow .2s ease;
    height: 100%;
}

.inspector-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}

/* Header */
.inspector-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inspector-card-logo {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: #f4f6f8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 56px;
}

.inspector-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.inspector-card-title a {
    font-weight: 600;
    color: #111827;
    text-decoration: none;
    display: inline-block;
    max-width: 100%;
}

.inspector-card-title a:hover {
    text-decoration: underline;
}

/* Meta / badges */
.inspector-card-meta {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.inspector-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
}

.inspector-badge.jobs {
    background: #eef6ff;
    color: #1d4ed8;
}

.inspector-badge.matricule {
    background: #fef3c7;
    color: #92400e;
}

.inspector-badge.candidatures {
    background: #e6bcbc;
    color: #3f0709;
}

/* Zones chips */
.inspector-card-zones {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.inspector-zone-chip {
    display: inline-block;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 8px;
}

/* Pagination spacing */
.jobsearch-pagination-wrapper {
    display: none;
}

#inspector-pagination {
    display: flex;
    gap: 6px;
    margin-top: 18px;
    flex-wrap: wrap;
}

#inspector-pagination .page-btn {
    border: 1px solid #e5e7eb;
    background: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    color: #374151;
}

#inspector-pagination .page-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

#inspector-pagination .page-btn[disabled] {
    opacity: .5;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .inspector-entreprises-filter .jobsearch-user-form-coltwo-full {
        flex-direction: column;
        align-items: stretch !important;
    }

    .inspector-entreprises-filter input[type="text"],
    .inspector-entreprises-filter select {
        width: 100%;
        min-width: 0;
    }
}

.text-black-50 {
    color: black !important;
    margin-bottom: 10px !important;
}

.inspector-report-return {
    border: 1px solid #3047a5;
    color: black !important;
    text-align: center !important;
    padding: 10px !important;
}

/* Repor
t Form Styles */
.report-form-header {
    background: white;
    color: black;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
}

.report-form-header h2 {
    margin: 0 0 8px 0;
    color: white;
    font-size: 24px;
}

.report-form-header p {
    margin: 0;
    opacity: 0.9;
}

.company-info-box {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 6px;
}

.company-info-box h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
}

.company-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.company-info-item {
    display: flex;
    flex-direction: column;
}

.company-info-label {
    font-weight: 600;
    color: #666;
    font-size: 12px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.company-info-value {
    color: #333;
    font-size: 14px;
}

.form-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 25px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-group label .required {
    color: #dc3545;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.help-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

/* Styles pour les tableaux de candidats */
.candidates-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin: 15px 0;
    font-size: 12px;
}

.candidates-table th {
    padding: 10px 8px;
    text-align: center;
    vertical-align: middle;
    background: #fff;
    color: #000;
    font-weight: normal;
    border: 1px solid #000;
    line-height: 1.3;
}

.candidates-table td {
    padding: 12px 8px !important;
    border: 1px solid #000 !important;
    text-align: center !important;
    vertical-align: middle !important;
    min-height: 30px !important;
    height: 35px !important;
}

.candidates-table tbody tr {
    height: 35px !important;
}

/* Avatar circle positioning */
.user_img_skillid #circle {
    left: 50px !important;
}

/* Profile zone tag */
.im-profile-zone-tag {
    display: inline-block !important;
    padding: 8px 16px !important;
    background: #e0f2fe !important;
    color: #0369a1 !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
}

/* Profile no zone text */
.im-profile-no-zone {
    color: #6b7280 !important;
}

/* Profile messages */
.jobsearch-profile-error,
.jobsearch-profile-success {
    display: none !important;
}

/* Filter form layout */
.im-filter-row {
    display: flex !important;
    gap: 10px !important;
    align-items: flex-end !important;
}

/* Button icon wrapper */
.im-btn-icon {
    display: inline-flex !important;
    vertical-align: middle !important;
    margin-right: 6px !important;
}

/* Interview accepted stat card */
.inspector-stats .stat-card.stat-interviews {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #a7f3d0;
}

.inspector-stats .stat-card.stat-interviews .stat-value {
    color: #047857;
}

.inspector-stats .stat-card.stat-interviews .stat-label {
    color: #065f46;
}

/* Chart title */
.inspector-chart .chart-title {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

/* Improve chart container for donut chart */
.inspector-chart {
    min-height: 150px;
    max-width: 100%;
}

.inspector-chart canvas {
    max-height: 150px;
}

/* Reports pagination (same style as entreprises) */
#reports-pagination {
    display: flex;
    gap: 6px;
    margin-top: 18px;
    flex-wrap: wrap;
}

#reports-pagination .page-btn {
    border: 1px solid #e5e7eb;
    background: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    color: #374151;
}

#reports-pagination .page-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

#reports-pagination .page-btn[disabled] {
    opacity: .5;
    cursor: not-allowed;
}

/* Reports layout styles */
.inspector-reports-by-matricule {
    margin-top: 16px;
}

.matricule-section {
    background: #fff;
    border: 1px solid #eef0f2;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .04);
}

.matricule-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.matricule-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.reports-count {
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

.reports-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.report-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f9fafb;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.report-card-icon {
    flex-shrink: 0;
}

.report-card-info {
    flex: 1;
    min-width: 0;
}

.report-card-filename {
    display: block;
    font-weight: 500;
    color: #111827;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.report-card-meta {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.report-card-download {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #3b82f6;
    color: #fff;
    border-radius: 8px;
    transition: background .2s ease;
    text-decoration: none;
}

.report-card-download:hover {
    background: #2563eb;
}

/* Pagination summary */
.pagination-summary {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
}

/* Inner report pagination (within each company) */
.inner-report-pagination {
    display: flex;
    gap: 4px;
    margin-top: 12px;
    justify-content: center;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.inner-report-pagination .page-btn {
    border: 1px solid #e5e7eb;
    background: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    color: #374151;
    font-size: 12px;
    min-width: 28px;
}

.inner-report-pagination .page-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.inner-report-pagination .page-btn[disabled] {
    opacity: .4;
    cursor: not-allowed;
}

.inner-report-pagination .page-btn:hover:not([disabled]):not(.active) {
    background: #f3f4f6;
}

/* ===== Report Form Content Styles ===== */
.report-form-container {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 900px;
    margin: 0 auto;
}

.report-form-container .report-form-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.report-form-container .report-form-header h6 {
    margin: 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Text styling - BLACK text */
.report-form-container p,
.report-form-container .text-black-50,
.report-form-container p.text-black-50 {
    color: #000 !important;
    line-height: 1.8 !important;
    text-align: justify !important;
    margin-bottom: 15px !important;
    font-size: 14px !important;
    opacity: 1 !important;
}

/* List styling */
.report-form-container ol {
    margin: 15px 0;
    padding-left: 0;
    list-style-position: inside;
}

.report-form-container ol li {
    color: #000;
    font-size: 15px;
    margin-bottom: 10px;
}

.report-form-container ol.im-list-indent-1 {
    margin-left: 0;
    list-style-position: inside;
}

.report-form-container ol.im-list-indent-2 {
    margin-left: 40px;
    list-style-position: inside;
}

/* Publication fields indentation */
.report-form-container .publication-fields {
    margin-left: 80px !important;
    padding-left: 20px !important;
    margin-bottom: 20px !important;
}

.report-form-container .publication-fields p {
    margin-bottom: 10px;
}

/* Publication titles with bullet point */
.report-form-container .publication-title {
    display: block;
    margin-left: 50px !important;
    font-weight: 700 !important;
    color: #000 !important;
    margin-top: 15px !important;
    margin-bottom: 5px !important;
}

/* Strong text */
.report-form-container strong {
    color: #000 !important;
    font-weight: 600 !important;
}

/* Input fields inside text */
.report-form-container input[name="jobperson-handicap"],
.report-form-container input[name="person-handicap-working"],
.report-form-container input[name="employee-count"] {
    display: inline-block !important;
    width: 100px !important;
    padding: 5px 10px !important;
    border: 1px solid #c00 !important;
    border-radius: 4px !important;
    text-align: center !important;
    font-weight: 600 !important;
    color: #c00 !important;
    background: #fff9f9 !important;
    height: auto !important;
    min-height: auto !important;
}

/* Tables */
.im-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.report-form-container .candidates-table {
    width: 100% !important;
    border-collapse: collapse;
    margin: 0;
    font-size: 13px !important;
    min-width: 600px;
    /* Force minimum width to trigger scroll on small screens */
}

.report-form-container .candidates-table th {
    background: #f5f5f5 !important;
    border: 1px solid #ddd !important;
    padding: 10px 8px !important;
    text-align: center !important;
    font-weight: 600 !important;
    color: #333 !important;
    white-space: nowrap;
}

.report-form-container .candidates-table td {
    border: 1px solid #ddd !important;
    padding: 8px !important;
    text-align: center !important;
    color: #000 !important;
    white-space: normal;
}


.report-form-container .candidates-table select,
.report-form-container .candidates-table input[type="date"] {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    min-width: 150px;
}

/* Form actions */
.report-form-container .form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* URL input fields */
.report-form-container .im-url-input {
    width: 100%;
    max-width: 500px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
}

/* Display values in summary paragraph */
.report-form-container #display-jobperson-handicap,
.report-form-container #display-person-working,
.report-form-container #display-remaining-positions {
    color: #c00;
    font-weight: 700;
}

/* Image preview */
.report-form-container .im-image-preview-container {
    position: relative;
    display: inline-block;
    margin: 10px 0;
}

.report-form-container .im-preview-image {
    max-width: 300px;
    max-height: 200px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Responsive adjustments for mobile */
@media screen and (max-width: 768px) {
    .report-form-container {
        padding: 15px;
        width: 100% !important;
        box-sizing: border-box;
    }

    .report-form-container .report-form-header h6 {
        font-size: 16px;
    }

    .report-form-container .publication-title {
        margin-left: 0 !important;
    }

    .report-form-container .publication-fields {
        margin-left: 10px !important;
        padding-left: 10px !important;
        border-left-width: 3px !important;
    }

    .report-form-container ol.im-list-indent-2 {
        margin-left: 20px;
    }

    .report-form-container .im-preview-image {
        max-width: 100%;
        height: auto;
    }

    .report-form-container .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .report-form-container .form-actions button {
        width: 100%;
        margin-bottom: 10px;
    }

    /* Ajuster la taille de la police pour une meilleure lecture sur mobile */
    .report-form-container p,
    .report-form-container ol li {
        font-size: 14px;
        line-height: 1.6;
        text-align: left !important;
    }

    .report-form-container input[name="jobperson-handicap"],
    .report-form-container input[name="person-handicap-working"],
    .report-form-container input[name="employee-count"] {
        width: 80px !important;
        padding: 4px 6px !important;
    }
}