/* .mini-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #3781c2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
}

.mini-avatar.sm {
    width: 24px;
    height: 24px;
    font-size: 11px;
}

.mini-avatar.md {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.mini-avatar.lg {
    width: 40px;
    height: 40px;
    font-size: 18px;
}

#myCoursesList {
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
}

#myCoursesList {
    -webkit-overflow-scrolling: touch;
}

#studentPerformanceWidget {
    max-height: 350px;
    overflow-y: auto;
}

.student-name {
    display: flex;
    align-items: center;
    gap: 3px !important;
    line-height: 1.3;
    font-size: 0.95rem;
}

.student-fullname {
    font-weight: 500;
    font-size: 0.8rem;
    color: #344050;
}

.student-id {
    font-size: 0.7rem;
    color: #9da9bb;
} */
/* ===============================
   Student Performance (Refined)
=============================== */

.sp-course {
    padding: 14px 14px 6px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.sp-course-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.sp-course-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: #344050;
    line-height: 1.2;
}

.sp-course-meta {
    margin-top: 4px;
    font-size: 0.78rem;
    color: #8a94a6;
}

.sp-pill {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #f2f6ff;
    color: #2c7be5;
    border: 1px solid rgba(44, 123, 229, .12);
    white-space: nowrap;
}

.sp-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 991.98px) {
    .sp-grid {
        grid-template-columns: 1fr;
    }
}

.sp-panel {
    border-radius: 14px;
    padding: 12px;
    background: #fbfcfe;
    border: 1px solid rgba(0, 0, 0, .06);
}

.sp-panel-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
}

.sp-panel-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    letter-spacing: -0.2px;
    font-size: 0.95rem;
    margin: 0;
}

.sp-panel-sub {
    font-size: 0.78rem;
    color: #8a94a6;
    font-weight: 600;
}

.sp-top .sp-panel-title {
    color: #1f9d5b;
}

.sp-low .sp-panel-title {
    color: #e5533d;
}

.student-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
}

.student-row+.student-row {
    border-top: 1px solid rgba(0, 0, 0, .05);
}

/* tighter student name block */
.student-name {
    display: flex;
    flex-direction: column;
    gap: 2px !important;
    line-height: 1.15;
    min-width: 0;
}

.student-fullname {
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-id {
    font-size: 0.75rem;
    color: #8a94a6;
    white-space: nowrap;
}

/* Micro gauge sizing */
.student-grade-gauge {
    width: 96px !important;
    height: 46px !important;
    flex: 0 0 auto;
}

#myCoursesList {
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
}

#studentPerformanceWidget {
    max-height: 350px;
    overflow-y: auto;
}

/* Upcoming Events widget (template-like) */
#upcomingEventsWidget {
    max-height: 380px;
    overflow-y: auto;
}

.sp-ev-row {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px dashed #d8e2f0;
    align-items: flex-start;
}

.sp-ev-date {
    width: 62px;
    min-width: 62px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(230, 55, 87, 0.35);
    background: #fff;
    text-align: center;
}

.sp-ev-month {
    background: #e63757;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 6px 0;
    line-height: 1;
}

.sp-ev-day {
    font-weight: 800;
    font-size: 1.6rem;
    color: #9da9bb;
    padding: 10px 0 8px;
    line-height: 1;
}

.sp-ev-body {
    flex: 1;
    min-width: 0;
}

.sp-ev-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2c7be5;
    line-height: 1.15;
    margin-bottom: 4px;
}

.sp-ev-sub {
    color: #344050;
    opacity: 0.9;
    margin-bottom: 6px;
}

.sp-ev-meta {
    color: #748194;
    line-height: 1.35;
}

.sp-ev-meta-label {
    color: #344050;
    font-weight: 600;
    margin-right: 4px;
}

.sp-ev-link {
    font-weight: 600;
    text-decoration: none;
}

.sp-ev-link:hover {
    text-decoration: underline;
}

.mini-cal {
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    max-width: 220px;
}

.mini-cal-head {
    padding: 8px 12px;
    background: #f5f7fa;
    font-weight: 700;
    font-size: .85rem;
    color: #344050;
}

.mini-cal-body {
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 2px;
}

.mini-cal-dow {
    font-size: .8rem;
    color: #9da9bb;
    font-weight: 600;
}

.mini-cal-day {
    font-size: 2.2rem;
    line-height: 1;
    font-weight: 800;
    color: #3781c2;
}

.mini-cal-month {
    font-size: .9rem;
    font-weight: 700;
    color: #344050;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.mini-cal-year {
    font-size: .8rem;
    color: #9da9bb;
    font-weight: 600;
}

.mmc {
    user-select: none;
}

.mmc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.mmc-title {
    font-weight: 700;
    color: #344050;
    font-size: 1rem;
}

.mmc-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, .08);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #748194;
    cursor: pointer;
}

.mmc-btn:hover {
    background: #f5f7fa;
}

.mmc-dow {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    font-size: .75rem;
    color: #9da9bb;
    font-weight: 700;
    margin-bottom: 8px;
}

.mmc-dow>div {
    text-align: center;
}

.mmc-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.mmc-day {
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #344050;
    font-size: .85rem;
    position: relative;
}

.mmc-day.is-out {
    color: #c7d0dd;
}

.mmc-day.is-today {
    background: rgba(55, 129, 194, .12);
    color: #3781c2;
    font-weight: 800;
}

.mmc-day.is-today::after {
    content: "";
    position: absolute;
    bottom: 5px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #3781c2;
}

.event-widget {
    overflow: hidden;
    max-height: 440px;
    /* Prevent the card itself from scrolling */
}

.event-widget .card-body {
    overflow-y: auto;
    flex-grow: 1;
}

.mycourses {
    overflow: hidden;
    min-height: 398px;
    max-height: 635px;
    /* Prevent the card itself from scrolling */
}

.mycourses .card-body {
    overflow-y: auto;
    flex-grow: 1;
}

.attendance-widget {
    overflow: hidden;
    min-height: 365px !important;
    max-height: 365px !important;
    /* Prevent the card itself from scrolling */
}

.attendance-widget .card-body {
    overflow-y: auto;
    flex-grow: 1;
}

.missing-assessments-widget {
    overflow: hidden;
    min-height: 365px !important;
    max-height: 365px !important;
    /* Prevent the card itself from scrolling */
}

.missing-assessments-widget .card-body {
    overflow-y: auto;
    flex-grow: 1;
}

/* ===============================
   Dark Mode Overrides
=============================== */

.dark .sp-course {
    border-bottom-color: rgba(255, 255, 255, .1);
}

.dark .sp-course-title {
    color: #e3e6ed;
}

.dark .sp-course-meta {
    color: #9da9bb;
}

.dark .sp-pill {
    background: rgba(44, 123, 229, .1);
    color: #8ab7f1;
    border-color: rgba(44, 123, 229, .2);
}

.dark .sp-panel {
    background: #121826;
    border-color: rgba(255, 255, 255, .05);
}

.dark .sp-panel-sub {
    color: #9da9bb;
}

.dark .student-fullname {
    color: #e3e6ed;
}

.dark .student-id {
    color: #9da9bb;
}

.dark .student-row+.student-row {
    border-top-color: rgba(255, 255, 255, .05);
}

.dark .sp-ev-row {
    border-bottom-color: rgba(255, 255, 255, .1);
}

.dark .sp-ev-date {
    background: #121826;
    border-color: rgba(230, 55, 87, 0.4);
}

.dark .sp-ev-day {
    color: #e3e6ed;
}

.dark .sp-ev-sub {
    color: #9da9bb;
}

.dark .sp-ev-meta-label {
    color: #e3e6ed;
}

.dark .mini-cal {
    background: #121826;
    border-color: rgba(255, 255, 255, .1);
}

.dark .mini-cal-head {
    background: #0b111c;
    color: #e3e6ed;
}

.dark .mini-cal-month {
    color: #e3e6ed;
}

.dark .mmc-title {
    color: #e3e6ed;
}

.dark .mmc-btn {
    background: #121826;
    border-color: rgba(255, 255, 255, .1);
    color: #9da9bb;
}

.dark .mmc-btn:hover {
    background: #0b111c;
}

.dark .mmc-day {
    color: #e3e6ed;
}

.dark .mmc-day.is-out {
    color: #4d5969;
}

/* Vertical alignment for Key Assessment toggle in header */
.is-ka-container {
    display: flex !important;
    align-items: center !important;
    padding-left: 0 !important;
    margin-bottom: 0 !important;
}

.is-ka-container .form-check-input {
    margin: 0 !important;
    position: static !important;
    cursor: pointer;
}

.is-ka-container .form-check-label {
    margin: 0 0 0 0.5rem !important;
    cursor: pointer;
    line-height: 1;
}

#div_course_list {
    padding: 1.25rem !important;
}

/* Course row tile */
.course-item {
    padding: .9rem 1rem;
    border-radius: .85rem;
    background: #fff;
    cursor: pointer;
    position: relative;
    margin-bottom: .75rem;

    box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.dark .course-item {
    background: #121826;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .05);
}

.course-text {
    min-width: 0;
}

.course-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .06);
}

.course-item::before {
    content: "";
    position: absolute;
    left: .45rem;
    top: .65rem;
    bottom: .65rem;
    width: 3px;
    border-radius: 6px;
    background: transparent;
}

.course-item.active {
    background: rgba(44, 123, 229, .06);
}

.course-item.active::before {
    background: rgba(44, 123, 229, .85);
}

.course-title {
    display: block;
    font-weight: 700;
    font-size: .98rem;
    line-height: 1.2;
}

.course-title-scroll {
    /* min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis; */
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;

    padding-bottom: .65rem;
    margin-bottom: -.65rem;
}

.course-item:hover .course-title-scroll {
    overflow-x: auto;
    text-overflow: clip;
    padding-bottom: .35rem;
    margin-bottom: -.35rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.course-item:hover .course-title-scroll::-webkit-scrollbar {
    height: 5px;
}

.course-item:hover .course-title-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, .18);
    border-radius: 10px;
}

.course-meta {
    display: block;
    font-size: .75rem;
    margin-top: .25rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Chevron in a soft circle */
.course-chevron {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, .04);
    color: rgba(52, 64, 80, .55);
    transition: background .12s ease;
}

.course-item:hover .course-chevron {
    background: rgba(44, 123, 229, .10);
    color: rgba(44, 123, 229, .85);
}

.discussion-item {
    cursor: pointer;
}

.thread-post {
    margin-bottom: .75rem;
}

.thread-post-inner {
    display: flex;
    gap: .75rem;
    padding: .85rem 1rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 14px;
}

.dark .thread-post-inner {
    background: #121826;
    border-color: rgba(255, 255, 255, .05);
}

.thread-avatar {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(44, 123, 229, .10);
    color: rgba(44, 123, 229, 1);
    font-weight: 700;
    flex: 0 0 auto;
    user-select: none;
}

.thread-body {
    flex: 1;
    min-width: 0;
}

.thread-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .25rem;
}

.thread-author {
    font-weight: 700;
    font-size: .95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.thread-date {
    font-size: .75rem;
    color: #94A3B8;
    flex: 0 0 auto;
}

.thread-text {
    line-height: 1.35;
    font-size: .92rem;
}

.thread-actions {
    margin-top: .35rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.thread-actions .btn-link {
    color: #64748B;
    text-decoration: none;
}

.thread-actions .btn-link:hover {
    color: #2C7BE5;
    text-decoration: none;
}

.nested-reply-container {
    width: 100%;
}

#div_reply_editor .card {
    border-radius: 12px;
    overflow: hidden;
}

#div_reply_editor .tox-tinymce {
    border: none !important;
}

#reply_context {
    padding: 0.5rem;
    background: rgba(44, 123, 229, 0.05);
    border-left: 3px solid #2c7be5;
    border-radius: 4px;
}

/* ===============================
   Schedule Widget Theme Matching
=============================== */
.schedule-container-main .schedule-controls {
    background: transparent;
    border-color: #edf2f9;
    color: #344050;
}

.schedule-container-main .schedule-btn {
    background: #fff;
    color: #344050;
    border-color: #d8e2ef;
}

.schedule-container-main .schedule-btn.active {
    background: #2c7be5;
    color: #fff;
    border-color: #2c7be5;
}

.schedule-container-main .calendar-wrapper {
    border-color: #edf2f9;
}

.schedule-container-main .day-label,
.schedule-container-main .time-header,
.schedule-container-main .slot {
    border-color: #edf2f9 !important;
}

.schedule-container-main .day-label {
    background: #f9fafd;
    color: #344050;
}

.schedule-container-main .time-header {
    background: #f9fafd;
    color: #344050;
}

.schedule-container-main .theme-toggle-btn {
    display: none !important;
}

/* Dark Mode Override for Schedule */
.dark .schedule-container-main .schedule-controls {
    background: transparent;
    border-color: rgba(255, 255, 255, .1);
    color: #e3e6ed;
}

.dark .schedule-container-main .schedule-btn {
    background: #0b111c;
    color: #e3e6ed;
    border-color: rgba(255, 255, 255, .1);
}

.dark .schedule-container-main .schedule-btn.active {
    background: #2c7be5;
    color: #fff;
    border-color: #2c7be5;
}

.dark .schedule-container-main .calendar-wrapper {
    background: #121826;
    border-color: rgba(255, 255, 255, .1);
}

.dark .schedule-container-main .day-label,
.dark .schedule-container-main .time-header,
.dark .schedule-container-main .slot {
    border-color: rgba(255, 255, 255, .1) !important;
}

.dark .schedule-container-main .day-label {
    background: #0b111c;
    color: #e3e6ed;
}

.dark .schedule-container-main .time-header {
    background: #0b111c;
    color: #e3e6ed;
}

.dark .schedule-container-main .slot {
    background: #121826;
}

.dark .schedule-container-main .slot.booked {
    background-color: var(--bg-color-dark) !important;
}

.dark .schedule-container-main .slot-title {
    color: #fff;
}

.dark .schedule-container-main .slot-subtitle {
    color: #9da9bb;
}

.dashboard-banner-announcements {
    position: relative;
    width: 100% !important;
    margin-bottom: 22px;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(135deg, #eef5ff 0%, #ffffff 55%, #f5f8ff 100%);
    border: 1px solid #dbe7ff;
    box-shadow: 0 12px 35px rgba(27, 73, 141, 0.10);
    aspect-ratio: 16 / 4.8;
    min-height: 180px;
}

.dashboard-banner-carousel {
    position: relative;
    height: 100%;
    width: 100%;
}

.dashboard-banner-item {
    display: none;
    height: 100%;
    width: 100%;
    padding: 24px 80px;
    animation: bannerFadeIn 0.45s ease-in-out;
    position: relative;
    z-index: 1;
}

.dashboard-banner-item.clickable-banner {
    cursor: pointer;
}

.dashboard-banner-item.has-image {
    padding: 0;
    min-height: 190px;
}

.dashboard-banner-item.has-image .dashboard-banner-content {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.4) 60%, transparent 100%);
    padding: 26px 80px 26px 90px;
}

.dashboard-banner-announcements:hover .dashboard-banner-item.has-image .dashboard-banner-content {
    opacity: 1;
}

.dashboard-banner-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -2;
}

.dashboard-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    /* Changed to handle it inside content for better control */
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dashboard-banner-item.active {
    display: block;
}

.dashboard-banner-content {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 100%;
    position: relative;
    z-index: 2;
}

.dashboard-banner-item.has-image .dashboard-banner-content {
    padding: 26px 60px 26px 30px;
}

.dashboard-banner-image {
    width: 105px;
    height: 105px;
    border-radius: 20px;
    overflow: hidden;
    flex-shrink: 0;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.dashboard-banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dashboard-banner-text {
    flex: 1;
}

.dashboard-banner-item.has-image .dashboard-banner-text h4 {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dashboard-banner-item.has-image .dashboard-banner-summary {
    color: #e2e8f0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.dashboard-banner-item.has-image .dashboard-banner-label {
    margin-left: 30px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    backdrop-filter: blur(4px);
}

.dashboard-banner-item.has-image .dashboard-banner-link {
    color: #60a5fa;
}

.dashboard-banner-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    margin-left: 30px;
    font-weight: 700;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.10);
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 8px;
}

.dashboard-banner-text h4 {
    margin: 0 0 6px 0;
    padding-left: 30px;
    font-size: 21px;
    font-weight: 800;
    color: #172554;
}

.dashboard-banner-summary {
    margin: 0;
    padding-left: 30px;
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
    max-width: 900px;
}

.dashboard-banner-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    margin-left: 30px;
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
}

.dashboard-banner-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.banner-close-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 10;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    opacity: 0;
}

.dashboard-banner-announcements:hover .banner-close-btn {
    opacity: 1;
}

.dashboard-banner-item:not(.has-image).active~.banner-close-btn {
    opacity: 1;
    color: #334155;
    background: rgba(15, 23, 42, 0.08);
}

.banner-close-btn:hover {
    background: rgba(15, 23, 42, 0.25);
}

.dashboard-banner-dots {
    position: absolute;
    bottom: 20px;
    right: 22px;
    display: flex;
    gap: 7px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 11;
}

.dashboard-banner-announcements:hover .dashboard-banner-dots {
    opacity: 1;
}

.banner-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    opacity: 0;
}

/* Nav buttons are always visible on hover. For non-image, they stay visible. */
.dashboard-banner-announcements:hover .banner-nav-btn {
    opacity: 1;
}

.dashboard-banner-item:not(.has-image).active~.dashboard-banner-carousel .banner-nav-btn {
    opacity: 1;
}

/* If the current active banner is not has-image, show controls without hover */
.dashboard-banner-item:not(.has-image).active~.dashboard-banner-dots {
    opacity: 1;
}

.banner-nav-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.banner-nav-btn.prev {
    left: 10px;
}

.banner-nav-btn.next {
    right: 10px;
}

/* Logic for nav buttons when no image (light bg) */
.dashboard-banner-item:not(.has-image)~.banner-nav-btn {
    background: rgba(15, 23, 42, 0.08);
    color: #334155;
}

.dashboard-banner-item:not(.has-image)~.banner-nav-btn:hover {
    background: rgba(15, 23, 42, 0.15);
}

.dashboard-banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: none;
    background: #cbd5e1;
    cursor: pointer;
    transition: all 0.25s ease;
}

.dashboard-banner-dot.active {
    width: 22px;
    background: #2563eb;
}

@keyframes bannerFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .dashboard-banner-announcements {
        aspect-ratio: 16 / 8;
        min-height: 160px;
    }

    .dashboard-banner-item {
        padding: 22px 48px 34px 20px;
    }

    .dashboard-banner-item.has-image {
        min-height: 160px;
    }

    .dashboard-banner-item.has-image .dashboard-banner-content {
        padding: 20px 45px 30px 18px;
    }

    .dashboard-banner-overlay {
        background: linear-gradient(90deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.6) 100%);
    }

    .dashboard-banner-content {
        align-items: flex-start;
    }

    .dashboard-banner-image {
        width: 72px;
        height: 72px;
        border-radius: 16px;
    }

    .dashboard-banner-text h4 {
        font-size: 18px;
    }

    .dashboard-banner-summary {
        font-size: 13px;
    }
}

/* ===============================
   Teacher Banner Dark Mode
=============================== */
.dark .dashboard-banner-announcements {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, #121826 55%, #0b111c 100%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.dark .dashboard-banner-image {
    background: #121826;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.dark .dashboard-banner-label {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.15);
    padding-left: 30px;
}

.dark .dashboard-banner-item:not(.has-image) .dashboard-banner-text h4 {
    color: #f8fafc;
}

.dark .dashboard-banner-item:not(.has-image) .dashboard-banner-summary {
    color: #9da9bb;
}

.dark .dashboard-banner-link {
    color: #60a5fa;
}

.dark .dashboard-banner-link:hover {
    color: #93c5fd;
}

.dark .banner-close-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

.dark .banner-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.dark .dashboard-banner-dot {
    background: #475569;
}

.dark .dashboard-banner-dot.active {
    background: #3b82f6;
}

/* Fix text visibility and background colors when switching between light and dark modes in discussions */
.thread-text *:not(pre):not(code),
.discussion-rich-text *:not(pre):not(code) {
    background-color: transparent !important;
}

:not(.dark) .thread-text [style*="color: rgb(255, 255, 255)"],
:not(.dark) .thread-text [style*="color: rgb(255,255,255)"],
:not(.dark) .thread-text [style*="color: #fff"],
:not(.dark) .thread-text [style*="color:#fff"],
:not(.dark) .thread-text [style*="color: #FFFFFF"],
:not(.dark) .thread-text [style*="color:#FFFFFF"],
:not(.dark) .thread-text [style*="color: white"],
:not(.dark) .thread-text [style*="color:rgb(230, 235, 245)"],
:not(.dark) .thread-text [style*="color:rgb(240, 240, 240)"],
:not(.dark) .thread-text [style*="color:#e3e6ed"],
:not(.dark) .discussion-rich-text [style*="color: rgb(255, 255, 255)"],
:not(.dark) .discussion-rich-text [style*="color: rgb(255,255,255)"],
:not(.dark) .discussion-rich-text [style*="color: #fff"],
:not(.dark) .discussion-rich-text [style*="color:#fff"],
:not(.dark) .discussion-rich-text [style*="color: #FFFFFF"],
:not(.dark) .discussion-rich-text [style*="color:#FFFFFF"],
:not(.dark) .discussion-rich-text [style*="color: white"] {
    color: inherit !important;
}

.dark .thread-text [style*="color: rgb(0, 0, 0)"],
.dark .thread-text [style*="color: rgb(0,0,0)"],
.dark .thread-text [style*="color: rgb(52, 64, 80)"],
.dark .thread-text [style*="color:rgb(52,64,80)"],
.dark .thread-text [style*="color: #000"],
.dark .thread-text [style*="color:#000"],
.dark .thread-text [style*="color: #000000"],
.dark .thread-text [style*="color:#000000"],
.dark .thread-text [style*="color: black"],
.dark .thread-text [style*="color:#344050"],
.dark .discussion-rich-text [style*="color: rgb(0, 0, 0)"],
.dark .discussion-rich-text [style*="color: rgb(0,0,0)"],
.dark .discussion-rich-text [style*="color: rgb(52, 64, 80)"],
.dark .discussion-rich-text [style*="color:rgb(52,64,80)"],
.dark .discussion-rich-text [style*="color: #000"],
.dark .discussion-rich-text [style*="color:#000"],
.dark .discussion-rich-text [style*="color: #000000"],
.dark .discussion-rich-text [style*="color:#000000"],
.dark .discussion-rich-text [style*="color: black"] {
    color: inherit !important;
}

.sequence-legend {
    display: flex;
    justify-content: flex-end;
    gap: 1.25rem;
    padding: .85rem 1rem;
    border: 1px solid #d8e2ef;
    border-radius: .5rem;
    background: #fff;
    font-size: .875rem;
    color: #5e6e82;
}

.sequence-legend span {
    white-space: nowrap;
}

.sequence-legend i {
    font-size: .75rem;
    margin-right: .35rem;
}

.sequence-program-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid #cfe0f5;
    border-radius: .75rem;
    background: linear-gradient(135deg, #ffffff 0%, #f6faff 100%);
}

.sequence-program-icon,
.sequence-guide-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #2c7be5, #4f9cff);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.sequence-wrapper {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: .75rem;
}

.sequence-term {
    min-width: 245px;
    padding: 1rem;
    border: 1px solid #d8e2ef;
    border-radius: .75rem;
    background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
}

.sequence-term-header {
    text-align: center;
    margin-bottom: 1rem;
}

.sequence-term-header h5 {
    color: #2c7be5;
    font-weight: 700;
    margin-bottom: .25rem;
}

.sequence-term-header small {
    color: #5e6e82;
}

.sequence-arrow {
    display: flex;
    align-items: center;
    color: #344050;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 5.5rem;
}

.sequence-course {
    position: relative;
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: .65rem;
    padding: 1rem 1rem 1rem 2.2rem;
    margin-bottom: 1rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, .04);
    min-height: 115px;
}

.sequence-course p {
    margin: .35rem 0;
    color: #344050;
    line-height: 1.35;
}

.sequence-course small {
    color: #5e6e82;
}

.status-dot {
    position: absolute;
    top: 1.05rem;
    left: .9rem;
    width: .85rem;
    height: .85rem;
    border-radius: 50%;
    border: 2px solid #d8e2ef;
    background: #fff;
}

.sequence-course.completed .status-dot {
    background: #00d27a;
    border-color: #00d27a;
}

.sequence-course.completed .status-dot::after {
    content: "✓";
    color: #fff;
    font-size: .55rem;
    position: absolute;
    top: -1px;
    left: 2px;
    font-weight: 700;
}

.sequence-course.in-progress .status-dot,
.sequence-course.active-link .status-dot {
    background: #2c7be5;
    border-color: #2c7be5;
}

.sequence-course.planned .status-dot {
    background: #fdbb30;
    border-color: #fdbb30;
}

.sequence-course.locked {
    color: #8a94a6;
    background: #fbfcfd;
}

.sequence-course.locked .status-dot {
    background: #e3e8ef;
}

.lock-icon {
    position: absolute;
    right: .9rem;
    top: 1rem;
    color: #b6c1d2;
}

.sequence-course.has-prereq::before,
.sequence-course.active-link::before {
    content: "";
    position: absolute;
    left: -2rem;
    top: 50%;
    width: 2rem;
    border-top: 2px solid #00d27a;
}

.sequence-course.has-prereq::after,
.sequence-course.active-link::after {
    content: "";
    position: absolute;
    left: -0.35rem;
    top: calc(50% - 5px);
    border-left: 7px solid #00d27a;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.sequence-guide {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    border: 1px solid #cfe0f5;
    border-radius: .75rem;
    background: linear-gradient(135deg, #ffffff 0%, #f6faff 100%);
}

@media (max-width: 768px) {
    .sequence-legend {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .sequence-program-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .sequence-arrow {
        display: none;
    }

    .sequence-wrapper {
        flex-direction: column;
        overflow-x: visible;
    }

    .sequence-term {
        min-width: 100%;
    }

    .sequence-course.has-prereq::before,
    .sequence-course.has-prereq::after,
    .sequence-course.active-link::before,
    .sequence-course.active-link::after {
        display: none;
    }
}

/* ==========================================================================
   PrereqMap Conflict Overrides (Do not alter core/vendors/PrereqMap files)
   ========================================================================== */

/* 1. Neutralize global body overrides from prereqmap.css */
body {
    background-color: var(--falcon-body-bg) !important;
    color: var(--falcon-body-color) !important;
    font-family: var(--falcon-body-font-family) !important;
    font-size: var(--falcon-body-font-size) !important;
    line-height: var(--falcon-body-line-height) !important;
    padding: 0 !important;
    min-height: 100vh !important;
    transition: background-color 0.2s ease, color 0.2s ease !important;
}

/* 2. Revert the universal margin/padding resets of prereqmap.css for non-plugin elements */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* 3. Scope PrereqMap typography specifically to container elements */
.prereqmap-container,
.prereqmap-container * {
    font-family: var(--font-family-body, 'Plus Jakarta Sans', sans-serif);
}

.prereqmap-container h1,
.prereqmap-container h2,
.prereqmap-container h3,
.prereqmap-container h4,
.prereqmap-container h5,
.prereqmap-container h6,
.prereqmap-container .course-code {
    font-family: var(--font-family-title, 'Outfit', sans-serif);
}

/* 4. Light/Dark Theme Variable Overrides */

/* Leren Light Theme variables (when html does NOT have class .dark) */
html:not(.dark) {
    --bg-app: transparent;
    --bg-card: rgba(255, 255, 255, 0.85);
    --border-card: rgba(0, 0, 0, 0.06);
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --line-default: rgba(75, 85, 99, 0.12);
    --color-completed-glow: rgba(16, 185, 129, 0.18);
    --color-in-progress-glow: rgba(59, 130, 246, 0.18);
    --color-planned-glow: rgba(245, 158, 11, 0.18);
    --color-locked-glow: rgba(107, 114, 128, 0.08);
}

/* Leren Dark Theme variables (when html HAS class .dark) */
html.dark {
    --bg-app: transparent;
    --bg-card: #0b111c;
    /* Use deep dark background for column containers */
    --border-card: rgba(255, 255, 255, 0.06);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --line-default: rgba(255, 255, 255, 0.12);
    --color-completed-glow: rgba(16, 185, 129, 0.25);
    --color-in-progress-glow: rgba(59, 130, 246, 0.25);
    --color-planned-glow: rgba(245, 158, 11, 0.25);
    --color-locked-glow: rgba(107, 114, 128, 0.15);
}

/* 5. Custom layout overrides for integration */
.prereqmap-container {
    background-color: transparent !important;
    padding: 0;
    margin: 0;
}

.prereqmap-container .sequence-wrapper {
    background-color: transparent !important;
    min-height: 520px;
    padding-top: 1rem;
    padding-bottom: 2rem;
}

/* Make sure courses stack and columns show nicely on Leren layout */
.prereqmap-container .course-card {
    background-color: var(--bg-card);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.3s ease;
}

/* Light Theme Card Aesthetics */
html:not(.dark) .prereqmap-container .course-card {
    background-color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

html:not(.dark) .prereqmap-container .course-card.locked {
    background-color: #f3f4f6 !important;
}

/* Highlight shadow styling for light theme to look clean and soft */
html:not(.dark) .prereqmap-container .course-card.hovered.completed {
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.2), 0 8px 10px -6px rgba(16, 185, 129, 0.2) !important;
}

html:not(.dark) .prereqmap-container .course-card.hovered.in-progress {
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.2), 0 8px 10px -6px rgba(59, 130, 246, 0.2) !important;
}

html:not(.dark) .prereqmap-container .course-card.hovered.planned {
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.2), 0 8px 10px -6px rgba(245, 158, 11, 0.2) !important;
}

html:not(.dark) .prereqmap-container .course-card.hovered.locked {
    box-shadow: 0 10px 25px -5px rgba(107, 114, 128, 0.1), 0 8px 10px -6px rgba(107, 114, 128, 0.1) !important;
}

/* Dark Theme Specific Card & Column Customizations */
html.dark .prereqmap-container .sequence-term {
    background: #0b111c !important;
    /* Deep dark blue-gray column BG (clears gradient) */
    border-color: rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4) !important;
}

html.dark .prereqmap-container .sequence-term.summer {
    background: rgba(245, 158, 11, 0.14) !important;
    /* Clears gradient */
    border-color: rgba(245, 158, 11, 0.18) !important;
}

html:not(.dark) .prereqmap-container .sequence-term.summer {
    background: rgba(245, 158, 11, 0.05) !important;
    /* Clears gradient */
    border-color: rgba(245, 158, 11, 0.2) !important;
}

html.dark .prereqmap-container .course-card {
    background-color: #121e2d !important;
    /* Lighter Falcon card BG to stand out from column BG */
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark .prereqmap-container .course-card.locked {
    background-color: rgba(18, 24, 38, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.04) !important;
}

/* Locked card text colors in dark mode */
html.dark .prereqmap-container .course-card.locked .course-code,
html.dark .prereqmap-container .course-card.locked .course-name,
html.dark .prereqmap-container .course-card.locked .course-credits,
html.dark .prereqmap-container .course-card.locked .lock-badge {
    color: #5e6e82 !important;
}

/* Glow lines opacity bump in dark mode for clean rendering */
html.dark .sequence-connections-svg path {
    opacity: 0.65;
}

/* Adjust general panels (Program Card & Guide) for Dark Mode */
html.dark .sequence-program-card,
html.dark .sequence-guide {
    background: rgba(35, 46, 60, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

html.dark .sequence-program-card h5,
html.dark .sequence-guide h6 {
    color: #e3e6ed !important;
}

html.dark .sequence-program-card p,
html.dark .sequence-guide p {
    color: #9da9bb !important;
}

/* Elevate SVG connection overlay to sit between columns (z-index 2) and cards (z-index 4) */
.prereqmap-container .sequence-connections-svg {
    z-index: 3 !important;
}

.prereqmap-container .sequence-term {
    z-index: 2 !important;
}

.prereqmap-container .course-card {
    z-index: 4 !important;
}

/* Make inactive paths a little more transparent for clean visual weight */
.prereqmap-container .prereq-path {
    opacity: 0.20 !important;
}

/* Active/hovered paths remain bright and clear */
.prereqmap-container .prereq-path.active {
    opacity: 1 !important;
}

/* ===============================
   Today's Schedule Widget
=============================== */
.today-schedule-card-container {
    overflow: hidden;
}

#todayScheduleWidget {
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
}

.today-schedule-timeline {
    position: relative;
    padding: 4px 0;
    width: 100%;
    min-width: 0;
}

.today-schedule-item {
    position: relative;
    min-height: 44px;
    width: 100%;
    min-width: 0;
}

.today-schedule-item:last-child {
    margin-bottom: 0 !important;
}

.today-schedule-time {
    user-select: none;
    font-variant-numeric: tabular-nums;
    width: 60px;
    min-width: 60px;
    flex-shrink: 0;
    font-size: 0.78rem;
}

.today-schedule-track-container {
    height: 100%;
    align-self: stretch;
    min-height: 40px;
    width: 16px;
    min-width: 16px;
    flex-shrink: 0;
}

.today-schedule-line {
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #e5edf7;
    left: 50%;
    transform: translateX(-50%);
}

.today-schedule-item:first-child .today-schedule-line {
    top: 50%;
}

.today-schedule-item:last-child .today-schedule-line {
    bottom: 50%;
}

.today-schedule-item:only-child .today-schedule-line {
    display: none;
}

.dark .today-schedule-line {
    background-color: rgba(255, 255, 255, 0.12);
}

.today-schedule-dot {
    width: 10px;
    height: 10px;
    z-index: 2;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.today-schedule-item:hover .today-schedule-dot {
    transform: scale(1.2);
}

.today-schedule-card {
    background-color: #fff;
    border: 1px solid #edf2f9;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease-in-out;
    min-width: 0 !important;
    flex: 1 1 0%;
    overflow: hidden;
}

.today-schedule-content {
    min-width: 0 !important;
    flex: 1 1 auto;
    overflow: hidden;
}

.today-schedule-title-wrapper {
    line-height: 1.25;
}

.today-schedule-title {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
    color: #0b1727;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    word-break: normal;
    overflow-wrap: break-word;
}

.dark .today-schedule-title {
    color: #e3ebf6;
}

.today-schedule-card:hover {
    border-color: #d8e2ef;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.dark .today-schedule-card {
    background-color: #121e2d !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: none;
}

.dark .today-schedule-card:hover {
    border-color: rgba(255, 255, 255, 0.16) !important;
}

.today-schedule-active .today-schedule-card {
    border-left: 3px solid #2c7be5;
    box-shadow: 0 4px 14px rgba(44, 123, 229, 0.08);
}

.today-schedule-past .today-schedule-card {
    opacity: 0.85;
}

.today-schedule-tick {
    right: 50%;
    width: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.today-schedule-card .btn-primary {
    background-color: #0062ff;
    border-color: #0062ff;
    transition: all 0.15s ease-in-out;
}

.today-schedule-card .btn-primary:hover {
    background-color: #0052d6;
    border-color: #0052d6;
    transform: translateY(-1px);
}

/* ===============================
   Today's Schedule Empty State
=============================== */
.today-schedule-empty {
    padding: 1.25rem 0.75rem;
    text-align: center;
}

.today-schedule-empty-icon-wrapper {
    position: relative;
    width: 52px;
    height: 52px;
    margin: 0 auto 0.85rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.today-schedule-empty-icon-pod {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(44, 123, 229, 0.12) 0%, rgba(44, 123, 229, 0.04) 100%);
    border: 1px solid rgba(44, 123, 229, 0.22);
    box-shadow: 0 8px 20px rgba(44, 123, 229, 0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}

.today-schedule-empty:hover .today-schedule-empty-icon-pod {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 24px rgba(44, 123, 229, 0.18);
}

.today-schedule-empty-icon-pulse {
    position: absolute;
    inset: -5px;
    border-radius: 20px;
    background: radial-gradient(circle, rgba(44, 123, 229, 0.18) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    animation: schedule-empty-pulse 3.5s ease-in-out infinite;
}

@keyframes schedule-empty-pulse {
    0%, 100% {
        transform: scale(0.96);
        opacity: 0.45;
    }
    50% {
        transform: scale(1.12);
        opacity: 0.85;
    }
}

.dark .today-schedule-empty-icon-pod {
    background: linear-gradient(135deg, rgba(44, 123, 229, 0.20) 0%, rgba(44, 123, 229, 0.06) 100%);
    border-color: rgba(44, 123, 229, 0.32);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.dark .today-schedule-empty-icon-pulse {
    background: radial-gradient(circle, rgba(44, 123, 229, 0.28) 0%, transparent 70%);
}

.today-schedule-empty .btn-falcon-default {
    transition: all 0.2s ease-in-out;
}

.today-schedule-empty .btn-falcon-default:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}