/* Main Dashboard Styles */

.ld-student-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ld-program-director-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ld-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1e5e9;
    gap: 20px;
}

.ld-dashboard-header h2 {
    color: #1e293b;
    margin: 0;
}

.instructor-dash-widget .ld-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.instructor-dash-widget .ld-pagination a.ld-page-link {
    padding: 3px 7px;
    font-size: 14px;
    line-height: 8px;
    color: #000 !important;
    margin: 0 5px;
}

.instructor-dash-widget .ld-pagination a.active,
.instructor-dash-widget .ld-pagination a.ld-page-link:hover {
    background: #fccc02;
    color: #000;
    border-radius: 3px;
}

.ld-student-info {
    text-align: right;
}

.student-name {
    display: block;
    font-weight: 600;
    font-size: 16px;
}

.student-email {
    color: #64748b;
    font-size: 14px;
}


/* Overview Cards */

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

.ld-overview-card {
    background: #fccc0221;
    color: #1e293b;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #fccc02;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 15px;
}

.card-icon {
    font-size: 2.5rem;
    margin-right: 15px;
}

.card-content h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    line-height: 21px;
    opacity: 0.9;
    color: #1e293b;
}

.card-number {
    font-size: 24px;
    font-weight: 700;
}


/* Tables */

.ld-table {
    width: 100%;
    margin-bottom: 5px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 14px;
}

.ld-table th {
    background: #f8fafc;
    padding: 12px;
    text-align: left;
    font-weight: 700;
    color: #000;
    font-size: 16px;
    line-height: 1.2;
    border-bottom: 1px solid #e5e7eb;
}

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

.ld-table tr:hover {
    background: #f9fafb;
}

.ld-user-details {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
}

.ld-user-details .final-passed {
    background: #16A34A;
    color: #fff;
}

.ld-user-details-right {
    background-color: #DB2424;
    color: #fff;
    padding: 5px 10px;
    border-radius: 50px;
}

.ld-user-details-right p {
    font-size: 12px !important;
    line-height: 1;
    margin: 0;
    font-family: 'Poppins';
}


/* Score Badges */

.score-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    min-width: 50px;
}

.score-badge.score-pass {
    background: #dcfce7;
    color: #166534;
}

.score-badge.score-fail {
    background: #fee2e2;
    color: #dc2626;
}

.pass-fail-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.pass-fail-badge.pass {
    background: #dcfce7;
    color: #166534;
}

.pass-fail-badge.fail {
    background: #fee2e2;
    color: #dc2626;
}


/* Progress Bars */

.progress-bar-container {
    margin: 15px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #fccc02;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: #6b7280;
    margin-left: 10px;
}

.mini-progress-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mini-progress-bar {
    width: 60px;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.mini-progress-fill {
    height: 100%;
    background: #fccc02;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.mini-progress-text {
    font-size: 11px;
    color: #6b7280;
    min-width: 35px;
}


/* Course Progress Cards */

.ld-course-progress-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.ld-course-progress-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.course-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.course-header h4 {
    margin: 0;
    color: #1f2937;
    font-size: 18px;
}

span.course-export {
    margin-left: auto;
    padding: 4px 8px;
    border: 1px solid #000;
    border-radius: 50px;
    font-size: 11px;
    margin-right: 5px;
    cursor: pointer;
    line-height: 20px;
}

.course-status {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.course-status.status-not_started {
    background: #f3f4f6;
    color: #6b7280;
}

.course-status.status-in_progress {
    background: #fef3c7;
    color: #d97706;
}

.course-status.status-completed {
    background: #dcfce7;
    color: #166534;
}

.course-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 15px 0;
    padding: 10px 0;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
}

h3.std-dashboard-title {
    font-size: 28px;
    font-weight: 600;
    margin: 20px 0 15px 0;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item .label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.detail-item .value {
    font-weight: 600;
    color: #1f2937;
}

.lesson-list h5 {
    margin: 15px 0 10px 0;
    color: #374151;
    font-size: 14px;
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f9fafb;
}

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

.lesson-status {
    width: 20px;
    text-align: center;
}

.lesson-title {
    flex: 1;
    font-size: 14px;
    color: #374151;
}

.topic-count {
    font-size: 12px;
    color: #6b7280;
}


/* Program Director Dashboard */

.ld-program-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
}

.stat-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.ld-dashboard-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    min-width: 150px;
}

.ld-dashboard-search {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ld-dashboard-search input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.ld-dashboard-search button {
    padding: 10px 20px;
    background: #FCCC02;
    color: #000;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.ld-dashboard-search button:hover {
    background: #000;
    color: #fff;
}

.ld-program-director-dashboard .ld-students-table {
    overflow-x: auto;
}

.student-info strong {
    display: block;
    color: #1f2937;
}

.student-info small {
    color: #6b7280;
    font-size: 11px;
}

.course-count {
    display: inline-block;
    background: #f3f4f6;
    color: #374151;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.course-count.completed {
    background: #dcfce7;
    color: #166534;
}


/* Buttons */

.ld-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.ld-btn-primary {
    background: #fccc02;
    color: #1e293b;
    white-space: nowrap;
}

.ld-btn-primary:hover {
    background: #fccc02;
    color: #1e293b;
    transform: translateY(-1px);
}


/* Modal Styles */

.ld-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.ld-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ld-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

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

.ld-modal-header h3 {
    margin: 0;
    color: #1f2937;
}

.ld-modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 5px;
    line-height: 1;
}

.ld-modal-close:hover {
    color: #374151;
}

.ld-modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-student-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-student-header h4 {
    margin: 0 0 10px 0;
    color: #1f2937;
    font-size: 20px;
}

.modal-student-header p {
    margin: 5px 0;
    color: #6b7280;
    font-size: 14px;
}

.modal-tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn.active {
    color: #fccc02;
    border-bottom-color: #fccc02;
}

.tab-btn:hover {
    color: #fccc02;
}

.tab-content {
    display: none;
}

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


/* Error Messages */

.ld-dashboard-error {
    background: #fee2e2;
    color: #dc2626;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #dc2626;
    margin: 20px 0;
}

.no-data {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    /* padding: 40px 20px;
    background: #f9fafb; */
    border-radius: 8px;
}

.dental-name-short h2 {
    margin-bottom: 5px;
    font-size: 21px;
    font-family: 'Poppins';
    font-weight: 700;
}

.dental-name-short p {
    font-size: 14px;
    font-family: 'Poppins';
    margin: 0;
}

.ld-user-details {
    /* display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap; */
}


/* Responsive Design */

@media (max-width: 768px) {
    .ld-overview-cards {
        grid-template-columns: 1fr;
    }
    .ld-course-progress-container {
        grid-template-columns: 1fr;
    }
    .ld-dashboard-filters {
        flex-direction: column;
        gap: 15px;
    }
    .ld-program-stats {
        justify-content: space-around;
        gap: 15px;
    }
    .ld-table {
        font-size: 14px;
    }
    .ld-table th,
    .ld-table td {
        padding: 8px;
    }
    .ld-modal-content {
        width: 95%;
        margin: 10px;
    }
    .ld-program-director-dashboard .ld-dashboard-stats {
        width: 100%;
    }
    .ld-dashboard-header h2 {
        margin: 0 0 15px 0;
        font-size: 28px;
    }
    .stat-number {
        font-size: 24px;
    }
}

@media( max-width: 430px) {
    .ld-dashboard-header {
        justify-content: center;
    }
}

.ld-table thead th.ld-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.ld-table thead th.ld-sortable:hover {
    background-color: #f5f0e8;
}

.ld-sort-icon {
    display: inline-block;
    margin-left: 5px;
    color: #ccc;
    font-size: 16px;
    vertical-align: middle;
}

.ld-sort-icon.active {
    color: #f0ad4e;
    font-weight: bold;
}

.action-icons-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0px;
}

.action-icons-wrap button,
.action-icons-wrap a {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #f0ad4e;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.action-icons-wrap button:hover,
.action-icons-wrap a:hover {
    background: #fff3cd;
    color: #d48800;
}

.ld-table-count {
    margin-bottom: 10px;
    font-size: 13px;
    color: #666;
}

.ld-load-more-wrap {
    text-align: center;
    margin-top: 20px;
    padding-bottom: 10px;
}

.ld-load-more-btn {
    background: #FCCC02;
    color: #000;
    border: none;
    padding: 10px 30px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.ld-load-more-btn:hover {
    background: #000;
    color: #fff;
}

.ld-load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.ld-students-table-inner {
    position: relative;
}

.ld-sort-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.75);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.ld-sort-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: #fff;
    padding: 24px 36px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

.ld-spinner {
    width: 36px;
    height: 36px;
    border: 4px solid #f0e0c0;
    border-top-color: #f0ad4e;
    border-radius: 50%;
    animation: ld-spin 0.75s linear infinite;
}

@keyframes ld-spin {
    to {
        transform: rotate(360deg);
    }
}

.ld-quiz-grades-wrapper {
    position: relative;
    min-height: 100px;
    /* Prevents jump if loading */
}

.view-quiz-answers-btn {
    background: #fccc02;
    color: #000;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.view-quiz-answers-btn:hover {
    background: #000;
    color: #fff;
}

.instructor-dash-widget .ld-dashboard-search input {
    flex: 2;
}

.instructor-dash-widget .ld-dashboard-search :where(#location-filter, #year-filter) {
    flex: 1;
    padding: 10px !important;
    margin-right: 0 !important;
}

.instructor-dash-widget .ld-dashboard-search #session-filter {
    flex: 2;
    padding: 10px !important;
    margin-right: 0 !important;
}

.instructor-dash-widget .ld-dashboard-search #search-btn {
    margin-right: 0 !important;
}

.instructor-dash-widget .ld-main-table {
    border: 1px solid #E6E8EB;
    border-radius: 8px;
}

.instructor-dash-widget .ld-main-table table {
    border: unset;
}

.instructor-dash-widget .ld-main-table table #ld-students-tbody {
    font-size: 14px;
}