/* Papilio LMS Frontend Styles */

/* Dashboard Styles */
.trainer-dashboard-access-denied {
    max-width: 600px;
    margin: 100px auto;
    padding: 40px 30px;
    background-color: #fff3f3;
    border: 1px solid #f1caca;
    border-radius: 10px;
    text-align: center;
    font-family: Arial, sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.trainer-dashboard-access-denied h2 {
    color: #d9534f;
    font-size: 28px;
    margin-bottom: 20px;
}

.trainer-dashboard-access-denied p {
    font-size: 16px;
    color: #555;
}

.trainer-dashboard-access-denied a {
    display: inline-block;
    margin-top: 20px;
    text-decoration: none;
    background-color: #d9534f;
    color: #fff;
    padding: 10px 25px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.trainer-dashboard-access-denied a:hover {
    background-color: #c9302c;
}

/* Optional dashboard styling */
.trainer-dashboard {
    max-width: 900px;
    margin: 50px auto;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    font-family: Arial, sans-serif;
}

.trainer-dashboard h1 {
    color: #333;
    font-size: 32px;
    margin-bottom: 25px;
    text-align: center;
}
.papilio-trainer-dashboard {
    width: 100%;
    margin: 40px auto;
    padding: 0 20px;
}

.papilio-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.trainer-info h1 {
    margin: 0;
    font-size: 32px;
    color: #2c3e50;
}

.course-info ul {
    margin: 10px 0 0 0;
    padding: 0;
    list-style: none;

}

.trainer-role {
    margin: 5px 0 0 0;
    color: #7f8c8d;
    font-size: 16px;
}

.btn-add-seminar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-add-seminar:hover {
    background: #2980b9;
}

.papilio-courses-list h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.course-card {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.course-card h3 {
    margin: 0 0 16px 0;
    font-size: 20px;
    color: #2c3e50;
    min-height: 5rem; /* Ensure consistent height for course titles */
}

.course-meta {
    display: flex-row;
    gap: 16px;
    margin-bottom: 16px;
    color: #7f8c8d;
    font-size: 14px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px 8px;
    line-height: 1.5rem;
}

.btn-edit-course {
    display: inline-block;
    padding: 8px 16px;
    background: #27ae60;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.btn-edit-course:hover {
    background: #229954;
}

.no-courses {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-size: 18px;
}

/* Modal Styles */
.papilio-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #ecf0f1;
}

.modal-header h2 {
    margin: 0;
    font-size: 22px;
    color: #2c3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #95a5a6;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #2c3e50;
}

.modal-body {
    padding: 24px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-cancel {
    padding: 10px 20px;
    background: #95a5a6;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-cancel:hover {
    background: #7f8c8d;
}

.btn-submit {
    padding: 10px 20px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit:hover {
    background: #2980b9;
}

.btn-submit:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

/* Course Editor Styles */
.papilio-course-editor {
    width: 100%;
    margin: 40px auto;
    padding: 0 20px;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #3498db;
    text-decoration: none;
    margin-bottom: 10px;
    font-size: 14px;
}

.back-link:hover {
    color: #2980b9;
}

.course-info h1 {
    margin: 0;
    font-size: 28px;
    color: #2c3e50;
}

.btn-save-all {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-save-all:hover {
    background: #229954;
}

.lessons-table-wrapper {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.lessons-table-wrapper h2 {
    margin: 0 0 24px 0;
    font-size: 24px;
    color: #2c3e50;
}

.lessons-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lesson-item {
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    overflow: hidden;
}

.lesson-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #f8f9fa;
    cursor: pointer;
    transition: background 0.3s;
}

.lesson-header:hover {
    background: #ecf0f1;
}

.lesson-toggle {
    display: flex;
    align-items: center;
    color: #3498db;
}

.lesson-info {
    flex: 1;
}

.lesson-info h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    color: #2c3e50;
}

.lesson-number .lesson-teaching-units{
    font-size: 14px;
    color: #7f8c8d;
}

.lesson-number{
    margin-left: 1rem;
}

.lesson-date {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lesson-date label {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 600;
}

.lesson-date-input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.lesson-content {
    padding: 20px;
    background: #fff;
}

.attendance-table {
    width: 100%;
    border-collapse: collapse;
}

.attendance-table thead {
    background: #f8f9fa;
}

.attendance-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #ecf0f1;
}

.attendance-table td {
    padding: 12px;
    border-bottom: 1px solid #ecf0f1;
}

.attendance-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

/* Notifications */
.papilio-notification {
    position: fixed;
    top: 3rem;
    padding: 2rem 3rem;
    width: 100%;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s;
}

.papilio-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.papilio-notification.success {
    background-color: #27ae60;
    border-left: 4px solid #27ae60;
}

.papilio-notification.error {
    background-color: #e74c3c;
    border-left: 4px solid #e74c3c;
}

.papilio-notification.info {
    background-color: #3498db;
    border-left: 4px solid #3498db;
}

/* Responsive */
@media (max-width: 768px) {

    .papilio-dashboard-header,
    .editor-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .lesson-header {
        flex-wrap: wrap;
    }

    .lesson-date {
        width: 100%;
        margin-top: 8px;
    }
}

/* Keep all existing CSS styles exactly as they are */
    * {
        box-sizing: border-box;
    }

    .course-info-nav a {
        font-size: 18px;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .receipt-main-container, .main-container {
        width: 100%;
        margin: 50px auto;
        padding: 20px;
        background-color: #f5f5f5;

    }

    .course-info-box {
        background: #fff;
        padding: 20px;
        border-radius: 8px;
        margin-bottom: 20px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .course-info-box h2 {
        margin: 0 0 10px 0;
        font-size: 24px;
        color: #333;
    }

    .course-info-box p {
        margin: 5px 0;
        color: #666;
    }

    .receipts-section {
        background: #fff;
        padding: 30px;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        margin-bottom: 30px;
    }

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

    .section-header h3 {
        margin: 0;
        font-size: 20px;
        color: #333;
    }

    .receipts-table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 20px;
    }

    .receipts-table th,
    .receipts-table td {
        padding: 12px;
        text-align: left;
        border-bottom: 1px solid #eee;
    }

    .receipts-table th, th {
        background: #f8f9fa;
        font-weight: 600;
        color: #333;
    }

    .receipts-table tr:hover {
        background: #f8f9fa;
    }

    .participants-section {
        background: #fff;
        padding: 30px;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .participants-table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 20px;
    }

    .participants-table th,
    .participants-table td {
        padding: 12px;
        text-align: left;
        border-bottom: 1px solid #eee;
    }

    .participants-table th {
        background: #f8f9fa;
        font-weight: 600;
        color: #333;
    }

    .participants-table tr:hover {
        background: #f8f9fa;
    }

    /* Button Styles */
    .open-btn {
        background-color: #4CAF50;
        color: white;
        padding: 12px 24px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 16px;
        transition: background-color 0.3s;
    }

    .open-btn:hover {
        background-color: #45a049;
    }

    /* Popup Overlay */
    .popup-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        justify-content: center;
        align-items: center;
        z-index: 1000;
    }

    .popup-overlay.active {
        display: flex;
    }

    /* Popup Container */
    .popup {
        background-color: white;
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        max-width: 500px;
        width: 90%;
        max-height: 90vh;
        overflow-y: auto;
        position: relative;
    }

    /* Popup Header */
    .popup-header {
        display: flex;
        align-items: center;
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
    }

    .popup-header::before {
        content: "→";
        margin-right: 10px;
        font-weight: bold;
        font-size: 20px;
    }

    .popup-header h2 {
        font-size: 18px;
        font-weight: normal;
        margin: 0;
    }

    .close-btn {
        position: absolute;
        top: 10px;
        right: 15px;
        font-size: 28px;
        cursor: pointer;
        color: #666;
        background: none;
        border: none;
        line-height: 1;
    }

    .close-btn:hover {
        color: #000;
    }

    /* Popup Body */
    .popup-body {
        padding: 20px;
    }

    /* Search Fields */
    .search-field {
        position: relative;
        margin-bottom: 15px;
    }

    html input[disabled] {
        background-color: #80808038 !important;
    }


    .search-field input,
    .search-field select {
        width: 100%;
        padding: 10px 10px 10px 35px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 14px;
        background: white;
        z-index: 1;
        position: relative;
    }

    .search-field input:focus,
    .search-field select:focus {
        outline: none;
        border-color: #999;
    }

    .search-field::before {
        content: "🔍";
        position: absolute;
        left: 10px;
        top: 78%;
        transform: translateY(-50%);
        font-size: 14px;
        opacity: 0.5;
        z-index: 2;
    }

    /* Select2 container fix */
    /* .select2-container {
        width: 100% !important;
        z-index: 1002 !important;
        position: relative !important;
    }

    .select2-container--default .select2-selection--single {
        border: 1px solid #ddd !important;
        border-radius: 4px !important;
        height: 38px !important;
    }

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 36px !important;
        padding-left: 35px !important;
    }

    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 36px !important;
        right: 5px !important;
    }

    .select2-dropdown {
        border: 1px solid #ddd !important;
        border-radius: 4px !important;
        z-index: 1003 !important;
    } */

    .select2-container--default .select2-selection--single {
        border: 1px solid #ddd !important;
    }

    .select2-container .select2-selection--single .select2-selection__rendered {
        padding-left: 36px !important;
    }

    /* Comment Field */
    .comment-section {
        margin: 20px 0;
        padding: 15px;
        border: 1px solid #ddd;
        border-radius: 4px;
    }

    .comment-section label {
        display: block;
        font-size: 16px;
        margin-bottom: 10px;
        color: #333;
    }

    .comment-section textarea {
        width: 100%;
        min-height: 80px;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 14px;
        resize: vertical;
    }

    .comment-section textarea:focus {
        outline: none;
        border-color: #999;
    }

    /* Participants Section in Popup */
    .participants-popup-section {
        margin-top: 20px;
    }

    .participants-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
        font-size: 14px;
    }

    .participants-header span {
        font-weight: 500;
    }

    .select-all {
        color: #666;
        cursor: pointer;
        background: none;
        border: none;
        text-decoration: underline;
    }

    .select-all:hover {
        color: #333;
    }

    /* Participant List */
    .participant-list {
        border: 1px solid #ddd;
        border-radius: 4px;
        max-height: 200px;
        overflow-y: auto;
    }

    .participant-item {
        display: flex;
        align-items: center;
        padding: 12px 15px;
        border-bottom: 1px solid #eee;
    }

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

    .participant-item input[type="checkbox"] {
        width: 18px;
        height: 18px;
        margin-right: 12px;
        cursor: pointer;
        accent-color: #333;
    }

    .participant-item label {
        font-size: 14px;
        cursor: pointer;
        flex: 1;
        margin: 0;
    }

    .participant-item.disabled {
        opacity: 0.6;
        background-color: #fff5f5;
    }

    .participant-item.disabled label {
        color: #c00;
    }

    .participant-item.disabled input[type="checkbox"] {
        cursor: not-allowed;
    }

    .already-added {
        color: #c00;
        font-size: 12px;
        font-style: italic;
    }

    /* Submit Button */
    .submit-btn {
        width: 100%;
        padding: 14px;
        margin-top: 20px;
        background-color: #333;
        color: white;
        border: none;
        border-radius: 4px;
        font-size: 16px;
        cursor: pointer;
        transition: background-color 0.3s;
    }

    .submit-btn:hover {
        background-color: #555;
    }

    .no-data-message {
        text-align: center;
        padding: 20px;
        color: #666;
        font-style: italic;
    }

    /* Required field indicator */
    .required-field::after {
        content: " *";
        color: #ff0000;
    }

    .organization-name {
        display: block;
        font-size: 12px;
        color: #666;
        margin-top: 2px;
        font-style: italic;
    }

    .course-info-content {
        margin-top: 20px;
    }

    #ajaxMessages p {
        margin: 10px 0;
    }

    .address-section {
        padding: 10px 10px 0px 10px;
        border: 1px solid #dddddd;
        border-radius: 5px;
        margin-bottom: 20px;
        transition: all 0.3s ease-in-out;
    }

    .address-section .address-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
    }

    .address-section .address-header h4 {
        margin: 0;
        font-size: 16px;
    }

    .address-section .address-source-indicator {
        font-size: 12px;
        color: #666;
        font-weight: normal;
        font-style: italic;
    }

    .address-section .address-toggle {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .address-section .toggle-switch {
        position: relative;
        display: inline-block;
        width: 50px;
        height: 24px;
    }

    .address-section .toggle-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

    .address-section .toggle-slider {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #ccc;
        transition: 0.4s;
        border-radius: 24px;
    }

    .address-section .toggle-slider:before {
        position: absolute;
        content: "";
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: 0.4s;
        border-radius: 50%;
    }

    .address-section .toggle-switch input:checked+.toggle-slider {
        background-color: #2196F3;
    }

    .address-section .toggle-switch input:checked+.toggle-slider:before {
        transform: translateX(26px);
    }

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

    .address-section .form-control {
        width: 100%;
        padding: 12px;
        border: 1px solid #dddddd;
        border-radius: 4px;
        font-size: 14px;
    }

    .address-section .form-control.readonly-field {
        background-color: #f5f5f5;
        color: #666;
        cursor: not-allowed;
    }

    .address-section .form-row {
        display: flex;
        gap: 15px;
    }

    .address-section .form-row .col-md-6 {
        flex: 1;
    }

    .organization-option {
        padding: 8px 12px;
        line-height: 1.4;
        border-bottom: 1px solid #f0f0f0;
    }

    .organization-option:last-child {
        border-bottom: none;
    }

    .organization-option:hover {
        background-color: #f8f9fa;
    }

    .org-main-info {
        font-weight: 600;
        color: #333;
        margin-bottom: 4px;
    }

    .org-name {
        color: #2c3e50;
        font-weight: 700;
    }

    .org-parent {
        color: #7f8c8d;
        font-size: 0.9em;
        margin-left: 6px;
    }

    .org-details {
        font-size: 0.85em;
        color: #666;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
    }

    .org-location,
    .org-country {
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

    .org-location i,
    .org-country i {
        color: #3498db;
        font-size: 0.8em;
        width: 14px;
    }

    .select2-results__option--highlighted .organization-option {
        background-color: #e3f2fd;
    }

    .select2-results__option--highlighted .org-name {
        color: #1565c0;
    }

    .select2-results__option--highlighted .org-details {
        color: #1976d2;
    }

    /* For selected item in dropdown */
    .select2-results__option[aria-selected=true] .organization-option {
        background-color: #e8f5e8;
    }

    .select2-results__option[aria-selected=true] .org-name {
        color: #2e7d32;
    }

    .person-option {
        padding: 8px 12px;
        line-height: 1.4;
        border-bottom: 1px solid #f0f0f0;
    }

    .person-option:last-child {
        border-bottom: none;
    }

    .person-option:hover {
        background-color: #f8f9fa;
    }

    .person-name-section {
        margin-bottom: 4px;
    }

    .person-display-name {
        font-weight: 600;
        color: #2c3e50;
        font-size: 0.95em;
    }

    .person-username {
        color: #7f8c8d;
        font-size: 0.85em;
        font-weight: normal;
    }

    .person-email-section {
        font-size: 0.85em;
        color: #666;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .person-email-section i {
        color: #3498db;
        font-size: 0.8em;
        width: 14px;
    }

    .person-email {
        font-family: monospace;
        font-size: 0.9em;
        color: #2c3e50;
    }

    /* Highlighted state */
    .select2-results__option--highlighted .person-option {
        background-color: #e3f2fd;
    }

    .select2-results__option--highlighted .person-display-name {
        color: #1565c0;
    }

    .select2-results__option--highlighted .person-email {
        color: #1976d2;
    }

    /* Selected state */
    .select2-results__option[aria-selected=true] .person-option {
        background-color: #e8f5e8;
    }

    .select2-results__option[aria-selected=true] .person-display-name {
        color: #2e7d32;
    }

    /* For the selection display in the closed select */
    .select2-selection__rendered .person-display-name {
        font-weight: 500;
    }

    .select2-selection__rendered .person-email {
        color: #666;
        font-size: 0.9em;
    }

    /* Select2 custom styling */
    /* .organization-option {
        display: flex;
        justify-content: space-between;
    }

    .org-name {
        flex: 1;
    }

    .parent-org {
        font-size: 12px;
        color: #666;
        font-style: italic;
        margin-left: 10px;
    } */

/** Course Info Navigation from Trainer Course Editor Template */
.course-info-nav {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
}

.papilio-add-receipt-link, .papilio-add-material-order-link{
    background-color: #0073aa;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.papilio-add-receipt-link :hover, .papilio-add-material-order-link :hover {
    background-color: #005177;
    color: #fff;
}

.papilio-add-certifcate-link {
    background-color: #46b450;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.papilio-add-certifcate-link:hover {
    background-color: #2c8734;
    color: #fff;
}

.course-stats-section {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.course-stats-section h2 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.5em;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* .stat-card:nth-child(1) .stat-icon {
    background: #e3f2fd;
    color: #1976d2;
}

.stat-card:nth-child(2) .stat-icon {
    background: #e8f5e9;
    color: #388e3c;
}

.stat-card:nth-child(3) .stat-icon {
    background: #ffebee;
    color: #d32f2f;
} */

.stat-content {
    flex: 1;
}

.stat-number {
    margin: 0;
    font-size: 2em;
    font-weight: 700;
    color: #000;
    line-height: 1;
}

.stat-label {
    margin: 5px 0 0 0;
    font-size: 0.9em;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-number {
        font-size: 1.8em;
    }
}

.papilio-check {
    color: #28a745;
    /* green */
    font-weight: 700;
}

.papilio-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    /* overflow-y: auto; */
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    padding: 1rem;
    z-index: 999999999;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-close:hover {
    color: #000;
}

.modal-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: #ffffff;
    border: none;
    border-bottom: 3px solid #0073aa;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    color: #0073aa;
    border-radius: 0;
}

.tab-btn:hover {
    background: #0073aa;
    border-bottom-color: #0073aa;
    color: #fff;
}

.tab-btn.active {
    background: #0073aa;
    border-bottom-color: #0073aa;
    color: #fff;
    border-radius: 0;
}

.modal-body {
    padding: 20px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

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

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.regular-text {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-actions {
    margin-top: 25px;
    text-align: right;
}

.btn-primary {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-primary:hover {
    background: #005a87;
}

.btn-enroll-students {
    background: #46b450;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-enroll-students:hover {
    background: #389a41;
}

.form-note {
    background: #f0f8ff;
    padding: 10px;
    border-radius: 4px;
    border-left: 4px solid #0073aa;
    margin-bottom: 20px;
}

.form-note p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* New styles for editable section */
.ld-course-main-info {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    position: relative;
    border: 1px solid #e0e0e0;
}

.editable-section {
    position: relative;
}

.editable-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.editable-field {
    min-height: 60px;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.editable-field strong {
    display: block;
    margin-bottom: 5px;
    color: #555;
}

.static-value,
.should-visible {
    display: inline-block;
    padding: 5px 10px;
    background: #f5f5f5;
    border-radius: 4px;
    width: 100%;
}

.edit-field {
    width: 100%;
    padding: 8px;
    border: 1px solid #0073aa;
    border-radius: 4px;
    margin-top: 5px;
}

.btn-edit-info,
.btn-save-info,
.btn-cancel-edit {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-right: 10px;
}

.btn-cancel-edit {
    background: #dc2626;
}

.btn-cancel-edit:hover {
    background: #b91c1c;
}

.btn-edit-info:hover,
.btn-save-info:hover {
    background: #005a87;
}

/* Wrapper header styles */
.wrapper-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #0073aa;
}

.wrapper-header h2 {
    margin: 0;
}

.save-all-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #ddd;
    text-align: right;
}

.btn-save-all {
    background: #f59e0b;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-save-all:hover {
    background: #d97706;
}

/* Select2 custom styles */
.select2-searchable {
    width: 100% !important;
}

.select2-dropdown {
    z-index: 1000000 !important;
}

.select2-container--default .select2-selection--single {
    border: 1px solid #ddd;
    border-radius: 4px;
    height: 38px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 38px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

/* Add to existing CSS */
.select2-searchable-trainer {
    width: 100% !important;
}

.select2-container--default .select2-search--inline .select2-search__field {
    margin-top: 0 !important;
}

/* Organization search dropdown: name + location + phone (match previous UI) */
.papilio-org-result {
    padding: 2px 0;
}
.papilio-org-result .result-org-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 15px;
}
.papilio-org-result .result-org-details {
    font-size: 13px;
    color: #6c757d;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.papilio-org-result .papilio-org-result-detail {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.papilio-org-result .papilio-org-result-detail .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Student search dropdown: name + Ort / Einrichtung / Träger */
.papilio-student-result {
    padding: 2px 0;
}
.papilio-student-result .result-student-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 15px;
}
.papilio-student-result small {
    font-size: 13px;
    color: #6c757d;
    display: block;
}

/* Trainer search dropdown: name + email */
.papilio-trainer-result {
    padding: 2px 0;
}
.papilio-trainer-result .result-trainer-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 15px;
}
.papilio-trainer-result small {
    font-size: 13px;
    color: #6c757d;
    display: block;
}

/* User search dropdown: name + email */
.papilio-user-result {
    padding: 2px 0;
}
.papilio-user-result .result-user-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 15px;
}
.papilio-user-result small {
    font-size: 13px;
    color: #6c757d;
    display: block;
}

.attendance-icons {
    display: flex;
    gap: 18px;
    align-items: center;
}

/* Hide radio safely */
.attendance-icon input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Base icon */
.attendance-icon .dashicons {
    font-size: 24px;
    color: #9ca3af;
    transition: all 0.2s ease;
    cursor: pointer;
}

/* Selected circle */
.attendance-icon.active .dashicons {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Status colors */
.attendance-icon.present .dashicons {
    color: #15803d;
}

.attendance-icon.present.active .dashicons {
    color: #15803d;
    border: 2px solid #15803d;
    background-color: #15803d4f;
}

.attendance-icon.absent .dashicons {
    color: #f97316;
}

.attendance-icon.absent.active .dashicons {
    color: #f97316;
    border: 2px solid #f97316;
    background-color: #f973164f;
}

.attendance-icon.aborted .dashicons {
    color: #dc2626;
}

.attendance-icon.aborted.active .dashicons {
    color: #dc2626;
    border: 2px solid #dc2626;
    background-color: #dc26264f;
}

/* Hover */
.attendance-icon:hover .dashicons {
    transform: scale(1.1);
}

/* Course Stats Section */
.course-stats-section {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.course-stats-section h2 {
    margin: 0 0 25px 0;
    font-size: 22px;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    color: #000 !important;
    padding: 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

/* .stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30%, -30%);
} */

/* .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
} */

/* Card Color Variants */
/* .stat-card.stat-active {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

.stat-card.stat-completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-card.stat-aborted {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
} */

.stat-icon {
    background: #fff;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.stat-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 4px 0;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    margin: 0;
    opacity: 0.9;
    font-weight: 500;
}

.stat-percentage {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }

    .stats-detail-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .detail-label {
        min-width: auto;
    }

    .detail-value {
        text-align: left;
    }
}

.loader {
  border: 16px solid #f3f3f3; /* Light grey */
  border-top: 16px solid #3498db; /* Blue */
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.enroll-user-add-org{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.enroll-user-add-org label{
    margin-bottom: 0px !important;
}
.enroll-user-add-org button{
    padding: 8px;
    font-size: 13px;
    background-color: #0073AA;
}
.enroll-user-add-org button:hover{
    background-color: #005a87;
}
.enroll-user-add-org button .dashicons{
    width: 13px;
    height: 13px;
    font-size: 13px;
}