:root {
    --excelcs-navy: #0D1321;
    --excelcs-purple: #6D28D9;
    --excelcs-blue: #2563EB;
    --excelcs-cyan: #06B6D4;
    --excelcs-light: #E5E7EB;
    --excelcs-white: #FFFFFF;

    --excelcs-bg: #F7F9FC;
    --excelcs-text: #172033;
    --excelcs-muted: #667085;

    --excelcs-success: #16A34A;
    --excelcs-warning: #D97706;
    --excelcs-danger: #DC2626;

    --excelcs-gradient: linear-gradient(
        90deg,
        #6D28D9 0%,
        #2563EB 50%,
        #06B6D4 100%
    );

    --excelcs-radius: 18px;
    --excelcs-shadow: 0 10px 30px rgba(13, 19, 33, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--excelcs-bg);
    color: var(--excelcs-text);
}

a {
    text-decoration: none;
}

.excelcs-navbar {
    background: var(--excelcs-navy);
    min-height: 76px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.excelcs-navbar .navbar-brand img {
    height: 38px;
    width: auto;
}

.excelcs-navbar .nav-link {
    color: rgba(255, 255, 255, 0.78);
    font-weight: 500;
    padding-left: 0.9rem !important;
    padding-right: 0.9rem !important;
    position: relative;
}

.excelcs-navbar .nav-link:hover,
.excelcs-navbar .nav-link.active {
    color: #fff;
}

.excelcs-navbar .nav-link.active::after {
    content: "";
    position: absolute;
    left: 0.9rem;
    right: 0.9rem;
    bottom: 0;
    height: 3px;
    border-radius: 99px;
    background: var(--excelcs-gradient);
}

.excelcs-page {
    padding: 48px 0;
}

.excelcs-heading {
    font-weight: 750;
    letter-spacing: -0.02em;
}

.excelcs-muted {
    color: var(--excelcs-muted);
}

.excelcs-card {
    background: #fff;
    border: 1px solid rgba(13, 19, 33, 0.06);
    border-radius: var(--excelcs-radius);
    box-shadow: var(--excelcs-shadow);
}

.excelcs-stat-card {
    padding: 26px;
    height: 100%;
}

.excelcs-stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--excelcs-muted);
    font-weight: 700;
}

.excelcs-stat-value {
    font-size: 2.2rem;
    font-weight: 750;
    color: var(--excelcs-navy);
    line-height: 1;
    margin-top: 10px;
}

.excelcs-btn-primary {
    border: 0;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.2rem;
    border-radius: 12px;
    background: var(--excelcs-gradient);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

.excelcs-btn-primary:hover {
    color: #fff;
    opacity: 0.93;
}

.excelcs-btn-outline {
    border: 1px solid rgba(13, 19, 33, 0.15);
    color: var(--excelcs-navy);
    background: white;
    border-radius: 12px;
    font-weight: 600;
    padding: 0.75rem 1.2rem;
}

.excelcs-btn-outline:hover {
    background: #f3f5f8;
    color: var(--excelcs-navy);
}

.excelcs-btn-danger {
    background: #fff;
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.35);
    border-radius: 12px;
    font-weight: 600;
    padding: 0.75rem 1.2rem;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease;
}

.excelcs-btn-danger:hover,
.excelcs-btn-danger:focus {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.excelcs-btn-danger:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

.excelcs-btn-danger:active {
    background: #bb2d3b;
    color: #fff;
    border-color: #bb2d3b;
}

.excelcs-btn-danger:disabled {
    opacity: 0.6;
    pointer-events: none;
}

.excelcs-login-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    background: white;
}

.excelcs-login-brand {
    flex: 1;
    background:
        radial-gradient(circle at 20% 20%, rgba(109, 40, 217, 0.18), transparent 28%),
        radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.15), transparent 28%),
        var(--excelcs-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.excelcs-login-brand-inner {
    max-width: 520px;
    width: 100%;
}

.excelcs-login-brand img {
    width: min(100%, 430px);
    height: auto;
}

.excelcs-login-tagline {
    margin-top: 28px;
    color: rgba(255,255,255,0.72);
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.excelcs-login-form-wrap {
    width: min(520px, 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.excelcs-login-form {
    width: 100%;
    max-width: 390px;
}

.excelcs-login-form .form-control {
    border-radius: 12px;
    padding: 0.85rem 1rem;
    border-color: #D7DCE3;
}

.excelcs-login-form .form-control:focus {
    border-color: var(--excelcs-blue);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.excelcs-user-button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--excelcs-gradient);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.activity-actions {
    flex-shrink: 0;
}

.activity-action-btn {
    white-space: nowrap;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    line-height: 1.2;
}

/* Live lesson - Add Activity modal */
.excelcs-live-activity-modal .modal-content {
    max-height: calc(100vh - 2rem);
    overflow: hidden;
}

.excelcs-live-activity-modal form {
    min-height: 0;
}

.excelcs-live-activity-modal .modal-body {
    overflow-y: auto;
    min-height: 0;
}

@media (max-width: 900px) {
    .excelcs-login-page {
        display: block;
        background: var(--excelcs-bg);
    }

    .excelcs-login-brand {
        min-height: 260px;
        padding: 40px 30px;
    }

    .excelcs-login-brand img {
        max-width: 320px;
    }

    .excelcs-login-form-wrap {
        width: 100%;
        padding: 36px 24px 48px;
    }
}

/* =========================================
   LIVE LESSON ACTIVITY CARDS
   ========================================= */

.activity-card-layout {
    display: grid;
    grid-template-columns: 28px 34px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.activity-drag-handle {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f3f5f8;
    color: var(--excelcs-muted);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: grab;
    user-select: none;
}

.activity-drag-handle:hover {
    background: #e9edf3;
    color: var(--excelcs-navy);
}

.activity-drag-handle:active {
    cursor: grabbing;
}

.activity-order-number {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f3f5f8;
    color: var(--excelcs-navy);
    font-size: 0.85rem;
    font-weight: 700;
}

.activity-card-main {
    min-width: 0;
}

.activity-card-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.activity-card-copy {
    flex: 1;
    min-width: 0;
}

.activity-title {
    color: var(--excelcs-navy);
    line-height: 1.3;
    font-size: 0.95rem;
}

.activity-question {
    margin-top: 3px;
    line-height: 1.4;
}

.activity-badges {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    flex-shrink: 0;
}

.activity-meta-badge {
    padding: 0.38rem 0.55rem;
    border-radius: 7px;
    font-size: 0.7rem;
    font-weight: 700;
}

.activity-topic-badge {
    background: #f3f5f8;
    color: var(--excelcs-navy);
}

.activity-marks-badge {
    background: #667085;
    color: white;
}

.activity-type-quick {
    background: #e9edf3;
    color: #475467;
}

.activity-type-mcq {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

.activity-type-true-false {
    background: rgba(6, 182, 212, 0.14);
    color: #0e7490;
}

.activity-type-fill {
    background: rgba(217, 119, 6, 0.13);
    color: #b45309;
}

.activity-type-exam {
    background: var(--excelcs-navy);
    color: white;
}

.activity-correct-answer {
    margin-top: 10px;
}

.activity-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.activity-action-btn {
    min-height: 34px;
    padding: 0.35rem 0.75rem;
    border-radius: 9px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.activity-action-neutral {
    background: white;
    border: 1px solid #d7dce3;
    color: var(--excelcs-navy);
}

.activity-action-neutral:hover {
    background: #f7f9fc;
    border-color: #b8c0cc;
    color: var(--excelcs-navy);
}

.activity-action-delete {
    background: white;
    border: 1px solid #d7dce3;
    color: var(--excelcs-muted);
}

.activity-action-delete:hover {
    background: #fff;
    border-color: var(--excelcs-danger);
    color: var(--excelcs-danger);
}

.activity-action-disabled {
    background: #f3f5f8;
    border: 1px solid #d7dce3;
    color: #98a2b3;
}

.activity-action-disabled:disabled {
    opacity: 1;
}

.activity-actions .excelcs-btn-primary {
    min-width: 68px;
    min-height: 34px;
    padding: 0.35rem 0.8rem;
    border-radius: 9px;
    font-size: 0.78rem;
}


/* Smaller screens */

@media (max-width: 767px) {

    .activity-card-layout {
        grid-template-columns: 26px 32px minmax(0, 1fr);
        gap: 9px;
    }

    .activity-drag-handle {
        width: 26px;
        height: 26px;
    }

    .activity-order-number {
        width: 32px;
        height: 32px;
    }

    .activity-card-heading {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .activity-badges {
        justify-content: flex-start;
    }

    .activity-actions {
        justify-content: flex-start;
    }
}
/* Current live activity */

.live-activity {
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.live-activity.activity-current {
    position: relative;
    border-color: rgba(37, 99, 235, 0.45) !important;
    background:
        linear-gradient(
            90deg,
            rgba(109, 40, 217, 0.035),
            rgba(37, 99, 235, 0.025),
            rgba(6, 182, 212, 0.025)
        );
    box-shadow:
        0 0 0 1px rgba(37, 99, 235, 0.05),
        0 8px 24px rgba(37, 99, 235, 0.10);
}
.live-activity.activity-current::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: -1px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--excelcs-gradient);
}

/* =========================================
   LIVE LESSON DASHBOARD LAYOUT
   ========================================= */

.live-dashboard-page {
    padding-top: 32px;
}

.live-dashboard-container {
    max-width: 1600px;
    padding-left: 64px;
    padding-right: 32px;
}


/* Fixed Activities tab */

.live-activities-tab {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1035;

    width: 44px;
    min-height: 178px;
    padding: 12px 6px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;

    border: 0;
    border-radius: 0 14px 14px 0;

    background: var(--excelcs-gradient);
    color: #fff;

    box-shadow: 6px 10px 24px rgba(13, 19, 33, 0.18);

    transition:
        width 0.18s ease,
        box-shadow 0.18s ease;
}

.live-activities-tab:hover {
    width: 48px;
    box-shadow: 8px 12px 28px rgba(13, 19, 33, 0.24);
}

.live-activities-tab-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);

    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.live-activities-tab-count {
    min-width: 26px;
    padding: 4px 5px;

    border-radius: 999px;

    background: rgba(255, 255, 255, 0.18);
    color: #fff;

    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
}


/* Activities drawer */

.live-activities-offcanvas {
    width: min(620px, 94vw) !important;
    border-right: 0;

    box-shadow: 16px 0 40px rgba(13, 19, 33, 0.14);
}

.live-activities-offcanvas .offcanvas-header {
    border-bottom: 1px solid rgba(13, 19, 33, 0.06);
}

.live-activities-offcanvas .offcanvas-body {
    background: var(--excelcs-bg);
}


/* Current question summary */

.live-current-summary {
    position: sticky;
    top: 12px;
    z-index: 20;

    border-color: rgba(37, 99, 235, 0.22);

    box-shadow:
        0 10px 30px rgba(13, 19, 33, 0.08),
        0 0 0 1px rgba(37, 99, 235, 0.03);

    transition:
        opacity 0.2s ease,
        border-color 0.2s ease;
}

.live-current-summary::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;

    width: 4px;

    border-radius: 0 4px 4px 0;

    background: var(--excelcs-gradient);
}

.live-current-summary-empty {
    border-color: rgba(13, 19, 33, 0.06);
}

.live-current-summary-empty::before {
    background: #d7dce3;
}

.live-current-badges {
    align-self: flex-start;
}


/* Student response grid */

.live-student-card {
    min-height: 190px;

    display: flex;
    flex-direction: column;

    background: #fff;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.live-student-card:hover {
    border-color: rgba(37, 99, 235, 0.20) !important;
    box-shadow: 0 8px 22px rgba(13, 19, 33, 0.06);
}

.live-student-name {
    color: var(--excelcs-navy);
    line-height: 1.25;
}

.live-response-text {
    flex: 1;

    max-height: 170px;
    overflow-y: auto;

    padding-right: 4px;

    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.live-response-text::-webkit-scrollbar {
    width: 6px;
}

.live-response-text::-webkit-scrollbar-thumb {
    background: #d7dce3;
    border-radius: 999px;
}

.live-response-text::-webkit-scrollbar-track {
    background: transparent;
}


/* Responsive adjustments */

@media (max-width: 991px) {

    .live-dashboard-container {
        padding-left: 58px;
        padding-right: 20px;
    }

    .live-current-summary {
        position: static;
    }

}

@media (max-width: 575px) {

    .live-dashboard-container {
        padding-left: 54px;
        padding-right: 14px;
    }

    .live-activities-tab {
        width: 38px;
        min-height: 150px;
    }

    .live-activities-tab:hover {
        width: 40px;
    }

    .live-activities-offcanvas {
        width: 96vw !important;
    }

    .live-student-card {
        min-height: 160px;
    }

}
.live-add-activity-btn {
    padding: 0.4rem 0.75rem;
    border-radius: 9px;
    font-size: 0.78rem;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 5px 12px rgba(37, 99, 235, 0.16);
}

/* =========================================
   STUDENT EXIT TICKET
   ========================================= */

.exit-ticket-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background:
        radial-gradient(
            circle at 10% 15%,
            rgba(109, 40, 217, 0.06),
            transparent 26%
        ),
        radial-gradient(
            circle at 90% 80%,
            rgba(6, 182, 212, 0.06),
            transparent 28%
        ),
        var(--excelcs-bg);
}

.exit-ticket-card {
    padding: 40px 48px;
}

.exit-ticket-header {
    margin-bottom: 34px;
}

.exit-ticket-progress {
    position: relative;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.exit-ticket-progress-track {
    position: relative;
    z-index: 2;

    display: flex;
    justify-content: space-between;
}

.exit-ticket-progress::before {
    content: "";

    position: absolute;
    left: 18px;
    right: 18px;
    top: 17px;

    height: 3px;

    background: #e5e7eb;
    border-radius: 999px;
}

.exit-ticket-progress-line {
    position: absolute;
    z-index: 1;

    left: 18px;
    top: 17px;

    width: 0;
    height: 3px;

    background: var(--excelcs-gradient);
    border-radius: 999px;

    transition: width 0.3s ease;
}

.exit-ticket-progress-step {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.exit-ticket-progress-dot {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #fff;
    border: 2px solid #d7dce3;

    color: var(--excelcs-muted);

    font-size: 0.8rem;
    font-weight: 700;

    transition:
        border-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

.exit-ticket-progress-step.active
.exit-ticket-progress-dot {
    border-color: var(--excelcs-blue);
    color: var(--excelcs-blue);

    box-shadow:
        0 0 0 4px rgba(37, 99, 235, 0.08);
}

.exit-ticket-choice-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.exit-ticket-choice-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.exit-ticket-choice {
    cursor: pointer;
}

.exit-ticket-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.exit-ticket-choice-content {
    min-height: 96px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 18px;

    border: 1px solid #d7dce3;
    border-radius: 14px;

    background: #fff;

    text-align: center;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease,
        background 0.18s ease;
}

.exit-ticket-choice:hover
.exit-ticket-choice-content {
    transform: translateY(-2px);

    border-color: rgba(37, 99, 235, 0.35);

    box-shadow:
        0 8px 20px rgba(13, 19, 33, 0.06);
}

.exit-ticket-choice input:checked
+ .exit-ticket-choice-content {
    border-color: var(--excelcs-blue);

    background:
        linear-gradient(
            135deg,
            rgba(109, 40, 217, 0.05),
            rgba(37, 99, 235, 0.06),
            rgba(6, 182, 212, 0.05)
        );

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.10);
}

.exit-ticket-choice-title {
    color: var(--excelcs-navy);
    font-weight: 650;
}

.exit-ticket-textarea {
    min-height: 150px;
    padding: 16px;

    border-radius: 14px;

    resize: vertical;
}

.exit-ticket-confidence-choice {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 14px 16px;

    border: 1px solid #d7dce3;
    border-radius: 12px;

    background: #fff;

    cursor: pointer;
}

.exit-ticket-confidence-choice input {
    width: 18px;
    height: 18px;

    accent-color: var(--excelcs-blue);
}

.exit-ticket-navigation {
    display: flex;
    align-items: center;

    margin-top: 36px;
    padding-top: 24px;

    border-top: 1px solid #eef0f3;
}

.exit-ticket-complete {
    padding: 24px 0 10px;
}

.exit-ticket-complete-icon {
    width: 78px;
    height: 78px;

    margin-left: auto;
    margin-right: auto;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            rgba(109, 40, 217, 0.12),
            rgba(37, 99, 235, 0.12),
            rgba(6, 182, 212, 0.12)
        );

    color: var(--excelcs-blue);

    font-size: 2rem;
    font-weight: 800;
}

@media (max-width: 767px) {

    .exit-ticket-card {
        padding: 28px 22px;
    }

    .exit-ticket-choice-grid,
    .exit-ticket-choice-grid-three {
        grid-template-columns: 1fr;
    }

    .exit-ticket-choice-content {
        min-height: 68px;
    }

}

/* =========================================
   LESSON REVIEW
   ========================================= */

.review-nav {
    gap: 4px;
}

.review-nav .nav-link {
    color: var(--excelcs-muted);
    border-radius: 10px;
    font-weight: 600;
    padding: 0.65rem 1rem;
    white-space: nowrap;
}

.review-nav .nav-link:hover:not(:disabled) {
    color: var(--excelcs-navy);
    background: #f3f5f8;
}

.review-nav .nav-link.active {
    color: #fff;
    background: var(--excelcs-gradient);
}

.review-nav .nav-link:disabled {
    opacity: 0.45;
}

/* =========================================
   STUDENT LESSONS
   ========================================= */

.student-lessons-section {
    margin-bottom: 3rem;
}

.student-lessons-card {
    background: #fff;
    border: 1px solid rgba(13, 19, 33, 0.06);
    border-radius: var(--excelcs-radius);
    box-shadow: var(--excelcs-shadow);
    overflow: hidden;
}

.student-lessons-table {
    margin-bottom: 0;
}

.student-lessons-table th {
    padding: 14px 18px;
    background: #f7f9fc;
    border-bottom: 1px solid rgba(13, 19, 33, 0.08);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--excelcs-muted);
    font-weight: 700;
    white-space: nowrap;
}

.student-lessons-table td {
    padding: 15px 18px;
    vertical-align: middle;
}

.student-lesson-title {
    font-weight: 650;
    color: var(--excelcs-navy);
}

.student-attendance-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.student-attendance-attended {
    color: #087443;
    background: #ecfdf3;
}

.student-attendance-absent {
    color: var(--excelcs-muted);
    background: #f2f4f7;
}

.student-feedback-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--excelcs-blue);
    background: #eef2ff;
}

.student-feedback-reviewed {
    color: var(--excelcs-muted);
    font-size: 0.85rem;
}

.student-lesson-view-btn {
    border: 1px solid rgba(13, 19, 33, 0.15);
    background: #fff;
    color: var(--excelcs-navy);
    border-radius: 10px;
    padding: 0.45rem 0.8rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.student-lesson-view-btn:hover {
    background: #f3f5f8;
    color: var(--excelcs-navy);
}

.student-lessons-empty {
    padding: 32px;
    text-align: center;
    color: var(--excelcs-muted);
}

@media (max-width: 767px) {

    .student-lessons-card {
        overflow-x: auto;
    }

    .student-lessons-table {
        min-width: 760px;
    }

}

/* =========================================
   STUDENT LESSON REVIEW
   ========================================= */

.student-lesson-review-status {
    border-radius: var(--excelcs-radius);
}

.student-lesson-review-activity {
    position: relative;
}

.student-lesson-review-result {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
}

.student-lesson-review-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--excelcs-navy);
}

/* =========================================
   SHARED LESSON REVIEW COMPONENTS
   ========================================= */

.review-field-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--excelcs-muted);
}

.review-student-answer {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 12px 16px;
    border-radius: 12px;
    background: #f7f9fc;
    border: 1px solid rgba(13, 19, 33, 0.07);
    line-height: 1.5;
    white-space: pre-line;
}

.student-review-status {
    padding: 18px 20px;
    border-radius: 14px;
    border: 1px solid rgba(13, 19, 33, 0.08);
}

.student-review-status-ready {
    background: #ecfdf3;
    border-color: rgba(25, 135, 84, 0.2);
}

.student-review-status-pending {
    background: #f7f9fc;
}

.student-review-activity {
    padding: 24px;
}

.student-review-summary-card {
    padding: 22px 24px;
}

.student-review-summary-label {
    margin-bottom: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--excelcs-muted);
}

.student-review-summary-value {
    font-size: 1.7rem;
    line-height: 1.1;
    font-weight: 800;
    color: var(--excelcs-navy);
}

.student-review-question {
    padding: 14px 16px;
    border-radius: 12px;
    background: #f7f9fc;
    border: 1px solid rgba(13, 19, 33, 0.06);
}

.student-review-feedback {
    padding: 14px 16px;
    border-radius: 12px;
    border-left: 4px solid var(--excelcs-blue);
    background: #f5f8ff;
}

.student-review-correct {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #ecfdf3;
    color: #087443;
    font-size: 0.78rem;
    font-weight: 700;
}

.student-review-incorrect {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fef2f2;
    color: #b42318;
    font-size: 0.78rem;
    font-weight: 700;
}

/* =========================================
   STUDENT PROGRESS
   ========================================= */

.student-progress-summary-topic { font-size: 1.05rem; font-weight: 700; line-height: 1.3; color: var(--excelcs-navy); }
.student-progress-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.student-progress-band, .student-progress-evidence, .student-progress-topic-code { display: inline-flex; align-items: center; border-radius: 999px; padding: 0.32rem 0.68rem; font-size: 0.72rem; font-weight: 700; }
.student-progress-topic-code { background: #f3f4f6; color: var(--excelcs-muted); }
.student-progress-evidence { background: #f3f5f8; color: var(--excelcs-text); }
.student-progress-emerging { background: #fef2f2; color: #b42318; }
.student-progress-developing { background: #fffbeb; color: #a15c00; }
.student-progress-secure { background: #eef2ff; color: var(--excelcs-blue); }
.student-progress-mastered { background: #ecfdf3; color: #087443; }
.student-progress-not-assessed { background: #f3f4f6; color: var(--excelcs-muted); }
.student-progress-bar { height: 9px; border-radius: 99px; overflow: hidden; background: #e9edf3; }
.student-progress-bar-fill { height: 100%; border-radius: inherit; background: var(--excelcs-gradient); }
.student-progress-score { min-width: 125px; text-align: right; }
.student-progress-score strong { display: block; color: var(--excelcs-navy); font-size: 2rem; line-height: 1; }
.student-progress-score span { display: block; margin-top: 7px; font-size: 0.8rem; color: var(--excelcs-muted); }
.student-progress-empty { padding: 14px 16px; border-radius: 12px; background: #f7f9fc; border: 1px solid rgba(13, 19, 33, 0.06); color: var(--excelcs-muted); font-size: 0.9rem; }
@media (max-width: 991px) { .student-progress-score { min-width: 0; text-align: left; } }
/* Progress information */

.student-progress-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid rgba(13, 19, 33, 0.15);
    border-radius: 50%;
    background: #fff;
    color: var(--excelcs-muted);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.15s ease;
}

.student-progress-info-btn:hover {
    border-color: var(--excelcs-blue);
    color: var(--excelcs-blue);
    background: #f7f9fc;
}

.student-progress-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(13, 19, 33, 0.06);
}

.student-progress-info-row:last-child {
    border-bottom: 0;
}

.student-progress-evidence-guide {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.student-progress-evidence-guide > div {
    padding: 12px 14px;
    border-radius: 10px;
    background: #f7f9fc;
}

.student-progress-evidence-guide strong,
.student-progress-evidence-guide span {
    display: block;
}

.student-progress-evidence-guide strong {
    color: var(--excelcs-navy);
}

.student-progress-evidence-guide span {
    margin-top: 2px;
    font-size: 0.78rem;
    color: var(--excelcs-muted);
}

.excelcs-modal {
    border: 0;
    border-radius: var(--excelcs-radius);
    box-shadow: var(--excelcs-shadow);
}

/* =========================================
   SPECIFICATION TOPIC PICKER
   ========================================= */

.spec-topic-picker {
    display: grid;
    gap: 12px;
}

.spec-topic-none,
.spec-topic-option {
    cursor: pointer;
}

.spec-topic-none {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(13, 19, 33, 0.10);
    border-radius: 12px;
    background: #fff;
}

.spec-topic-paper {
    border: 1px solid rgba(13, 19, 33, 0.10);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.spec-topic-paper-summary,
.spec-topic-parent-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    list-style: none;
}

.spec-topic-paper-summary::-webkit-details-marker,
.spec-topic-parent-summary::-webkit-details-marker {
    display: none;
}

.spec-topic-paper-summary {
    padding: 15px 16px;
    font-weight: 600;
}

.spec-topic-paper[open] > .spec-topic-paper-summary {
    border-bottom: 1px solid rgba(13, 19, 33, 0.07);
}

.spec-topic-paper-body {
    padding: 12px;
    display: grid;
    gap: 10px;
}

.spec-topic-parent {
    border: 1px solid rgba(13, 19, 33, 0.08);
    border-radius: 12px;
    background: #f9fafb;
    overflow: hidden;
}

.spec-topic-parent-summary {
    padding: 12px 14px;
    font-size: 0.92rem;
}

.spec-topic-parent[open] > .spec-topic-parent-summary {
    border-bottom: 1px solid rgba(13, 19, 33, 0.07);
}

.spec-topic-children {
    display: grid;
    gap: 8px;
    padding: 10px;
}

.spec-topic-option {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid rgba(13, 19, 33, 0.08);
    border-radius: 10px;
    background: #fff;
    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.spec-topic-option:hover {
    border-color: rgba(37, 99, 235, 0.35);
    background: #f8fbff;
}

.spec-topic-option input,
.spec-topic-none input {
    flex: 0 0 auto;
}

.spec-topic-option-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.spec-topic-option-text strong {
    color: var(--excelcs-navy);
    font-size: 0.8rem;
}

.spec-topic-option-text span {
    color: var(--excelcs-text);
    font-size: 0.9rem;
}

.spec-topic-selected-tick,
.spec-topic-path-tick {
    color: #087443;
    font-weight: 800;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.spec-topic-option.selected {
    border-color: rgba(37, 99, 235, 0.35);
    background: #eef6ff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.06);
}

.spec-topic-option.selected .spec-topic-selected-tick {
    opacity: 1;
}

.spec-topic-paper.selected-path {
    border-color: rgba(37, 99, 235, 0.30);
}

.spec-topic-parent.selected-path {
    border-color: rgba(37, 99, 235, 0.25);
    background: #f5f8ff;
}

.spec-topic-paper.selected-path
    > .spec-topic-paper-summary
    .spec-topic-path-tick,

.spec-topic-parent.selected-path
    > .spec-topic-parent-summary
    .spec-topic-path-tick {

    opacity: 1;
}

/* =========================================
   STUDENT PROGRESS - PAPER OVERVIEW / HIERARCHY
   ========================================= */

.student-paper-donut-wrap {
    flex: 0 0 auto;
}

.student-paper-donut {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
}

.student-paper-donut::after {
    content: "";
    position: absolute;
    inset: 24px;
    border-radius: 50%;
    background: #fff;
}

.student-paper-donut-empty {
    background: #e9edf3;
}

.student-paper-donut-centre {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.student-paper-donut-centre strong {
    color: var(--excelcs-navy);
    font-size: 1.9rem;
    line-height: 1;
}

.student-paper-donut-centre span {
    margin-top: 5px;
    color: var(--excelcs-muted);
    font-size: 0.75rem;
}

.student-progress-paper-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
}

.student-progress-paper-legend > div {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
    color: var(--excelcs-muted);
}

.student-progress-paper-legend strong {
    margin-left: auto;
    color: var(--excelcs-navy);
}

.student-paper-legend-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 50%;
}

.student-paper-mastered-dot {
    background: #087443;
}

.student-paper-secure-dot {
    background: var(--excelcs-blue);
}

.student-paper-developing-dot {
    background: #a15c00;
}

.student-paper-emerging-dot {
    background: #b42318;
}

.student-progress-topic-card {
    overflow: hidden;
}

.student-progress-topic-card > summary {
    list-style: none;
}

.student-progress-topic-card > summary::-webkit-details-marker {
    display: none;
}

.student-progress-topic-summary {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    padding: 24px;
    cursor: pointer;
}

.student-progress-topic-summary:hover {
    background: rgba(247, 249, 252, 0.45);
}

.student-progress-topic-main {
    flex: 1;
    min-width: 0;
}

.student-progress-topic-side {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 0 0 auto;
}

.student-progress-expand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f3f5f8;
    color: var(--excelcs-muted);
    font-size: 1.15rem;
    font-weight: 700;
    transition: transform 0.18s ease;
}

.student-progress-topic-card[open]
    .student-progress-expand-icon {
    transform: rotate(180deg);
}

.student-progress-subtopics {
    padding: 0 24px 24px;
    border-top: 1px solid rgba(13, 19, 33, 0.07);
    background: #f9fafc;
}

.student-progress-subtopics-heading {
    padding: 20px 0 14px;
}

.student-progress-subtopic {
    padding: 18px;
    border: 1px solid rgba(13, 19, 33, 0.08);
    border-radius: 12px;
    background: #fff;
}

.student-progress-subtopic-score strong {
    font-size: 1.5rem;
}

@media (max-width: 767px) {

    .student-paper-donut {
        width: 128px;
        height: 128px;
    }

    .student-paper-donut::after {
        inset: 21px;
    }

    .student-progress-paper-legend {
        grid-template-columns: 1fr;
    }

    .student-progress-topic-summary {
        flex-direction: column;
        gap: 18px;
    }

    .student-progress-topic-side {
        justify-content: space-between;
    }

    .student-progress-topic-side
        .student-progress-score {
        text-align: left;
    }

}


/* =========================================
   TUTOR RESOURCES
   ========================================= */

.resources-empty-icon {
    font-size: 2.5rem;
}

.resource-section-list {
    display: grid;
    gap: 10px;
}

.resource-section-empty {
    padding: 18px;
    border-radius: 12px;
    background: #f7f9fc;
    border: 1px dashed rgba(13, 19, 33, 0.12);
    color: var(--excelcs-muted);
    text-align: center;
}

.resource-manage-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(13, 19, 33, 0.08);
    background: #fff;
}

.resource-manage-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 10px;
    background: #f3f5f8;
    font-size: 1.15rem;
}
.resource-class-picker {
    display: grid;
    gap: 8px;
}

.resource-class-picker-scroll {
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
}

.resource-class-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(13, 19, 33, 0.08);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.resource-class-option:hover {
    background: #f7f9fc;
    border-color: rgba(37, 99, 235, 0.25);
}

.resource-class-option:has(input:checked) {
    background: #f3f7ff;
    border-color: rgba(37, 99, 235, 0.30);
}

.resource-class-option input {
    margin: 0;
    flex: 0 0 auto;
}

.resource-class-option span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--excelcs-navy);
}
.resource-type-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.resource-type-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(13, 19, 33, 0.10);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}

.resource-type-option.active {
    background: #f3f7ff;
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.05);
}

.resource-type-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 10px;
    background: #f3f5f8;
    font-size: 1.1rem;
}

@media (max-width: 575px) {

    .resource-type-picker {
        grid-template-columns: 1fr;
    }

}
.resource-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    flex: 0 0 24px;
    color: var(--excelcs-muted);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -3px;
    cursor: grab;
    user-select: none;
}

.resource-drag-handle:active {
    cursor: grabbing;
}

.resource-manage-title {
    display: inline-block;
    color: var(--excelcs-navy);
    font-weight: 600;
    text-decoration: none;
}

a.resource-manage-title:hover {
    color: var(--excelcs-blue);
    text-decoration: underline;
}

.resource-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: var(--excelcs-muted);
    font-size: 1.25rem;
}

.resource-action-btn:hover,
.resource-action-btn:focus {
    background: #f3f5f8;
    color: var(--excelcs-navy);
}

.min-width-0 {
    min-width: 0;
}
.resource-sort-ghost {
    opacity: 0.35;
}

.resource-sort-chosen {
    box-shadow:
        0 8px 24px
        rgba(13, 19, 33, 0.12);
}

.resource-manage-row {
    transition:
        box-shadow 0.15s ease,
        opacity 0.15s ease;
}
.resource-manage-icon i,
.resource-type-icon i {
    font-size: 1.15rem;
}

.resource-drag-handle i {
    font-size: 1.15rem;
}

.resource-action-btn i {
    font-size: 1.1rem;
}
.resource-current-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #f7f9fc;
    border: 1px solid rgba(13, 19, 33, 0.08);
    border-radius: 10px;
    color: var(--excelcs-navy);
    font-size: 0.9rem;
    font-weight: 600;
}

.resource-current-file i {
    color: var(--excelcs-blue);
    font-size: 1.1rem;
}
.resource-section-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 36px;
    flex: 0 0 28px;
    color: var(--excelcs-muted);
    cursor: grab;
    user-select: none;
}

.resource-section-drag-handle:active {
    cursor: grabbing;
}

.resource-section-drag-handle i {
    font-size: 1.2rem;
}

.resource-section-card {
    transition:
        box-shadow 0.15s ease,
        opacity 0.15s ease;
}
/* =========================================
   RESOURCE CLASS FILTER
   ========================================= */

.resource-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 18px;
    border: 1px solid rgba(13, 19, 33, 0.08);
    border-radius: 14px;
    background: #fff;
}

.resource-filter-controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.resource-filter-controls .form-select {
    min-width: 220px;
}


/*
 * Section order is global, not class-specific.
 * Prevent dragging while a filter is active.
 */
.resource-section-filter-active
    .resource-section-drag-handle {
    opacity: 0.3;
    pointer-events: none;
    cursor: default;
}


@media (max-width: 767px) {

    .resource-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .resource-filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .resource-filter-controls .form-select {
        min-width: 0;
        width: 100%;
    }

}
/* =========================================
   STUDENT RESOURCES
   ========================================= */


/* -----------------------------------------
   MASONRY GRID
   ----------------------------------------- */

.student-resource-grid {
    position: relative;
    margin-left: -12px;
    margin-right: -12px;
}

.student-resource-section {
    width: calc(50% - 24px);
    margin: 0 12px 24px;
    overflow: hidden;
}


/* -----------------------------------------
   SECTION HEADER
   ----------------------------------------- */

.student-resource-section-header {
    padding: 20px;
    border-bottom: 1px solid rgba(13, 19, 33, 0.07);
}


/* -----------------------------------------
   RESOURCE LIST
   ----------------------------------------- */

.student-resource-list {
    display: grid;
}

.student-resource-row {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 18px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(13, 19, 33, 0.06);
    transition:
        background 0.15s ease;
}

.student-resource-row:last-child {
    border-bottom: 0;
}

.student-resource-row:hover {
    background: #f7f9fc;
}


/* -----------------------------------------
   RESOURCE ICON
   ----------------------------------------- */

.student-resource-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 11px;
    background: #f3f7ff;
    color: var(--excelcs-blue);
}

.student-resource-icon i {
    font-size: 1.15rem;
}


/* -----------------------------------------
   RESOURCE TEXT
   ----------------------------------------- */

.student-resource-details {
    flex: 1;
    min-width: 0;
}

.student-resource-title {
    color: var(--excelcs-navy);
    font-weight: 650;
}


/* -----------------------------------------
   RESOURCE ACTION ICON
   ----------------------------------------- */

.student-resource-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 9px;
    color: var(--excelcs-muted);
    transition:
        color 0.15s ease,
        background 0.15s ease;
}

.student-resource-row:hover
    .student-resource-action {
    background: #eef3fb;
    color: var(--excelcs-blue);
}


/* -----------------------------------------
   EMPTY SECTION
   ----------------------------------------- */

.student-resource-section-empty {
    padding: 24px;
    color: var(--excelcs-muted);
    text-align: center;
    background: #fafbfc;
}


/* -----------------------------------------
   PAGE EMPTY STATE
   ----------------------------------------- */

.student-resources-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: #f3f7ff;
    color: var(--excelcs-blue);
}

.student-resources-empty-icon i {
    font-size: 1.7rem;
}


/* -----------------------------------------
   TABLET / MOBILE
   ----------------------------------------- */

@media (max-width: 767px) {

    .student-resource-grid {
        margin-left: 0;
        margin-right: 0;
    }

    .student-resource-section {
        width: 100%;
        margin: 0 0 24px;
    }

}


@media (max-width: 575px) {

    .student-resource-section-header {
        padding: 20px;
    }

    .student-resource-row {
        padding: 15px 18px;
    }

    .student-resource-action {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

}


/* =========================================
   STUDENT MESSAGES
   ========================================= */

.student-chat-card {
    overflow: hidden;
}

.student-chat-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(13, 19, 33, 0.07);
    background: #fff;
}

.student-chat-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    background: #f3f7ff;
    color: var(--excelcs-blue);
}

.student-chat-avatar i {
    font-size: 1.15rem;
}

.student-chat-tutor-name {
    color: var(--excelcs-navy);
}

.student-chat-thread {
    height: 350px;
    overflow-y: auto;
    padding: 24px;
    background: #f7f9fc;
}

.student-chat-empty {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.student-chat-empty-icon,
.student-messages-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-bottom: 14px;
    border-radius: 16px;
    background: #eef3fb;
    color: var(--excelcs-blue);
}

.student-chat-empty-icon i,
.student-messages-empty-icon i {
    font-size: 1.5rem;
}

.student-message-row {
    display: flex;
    margin-bottom: 14px;
}

.student-message-row:last-child {
    margin-bottom: 0;
}

.student-message-row-own {
    justify-content: flex-end;
}

.student-message-row-tutor {
    justify-content: flex-start;
}

.student-message-bubble {
    max-width: 72%;
    padding: 11px 14px 9px;
    border-radius: 15px;
}

.student-message-own {
    background: var(--excelcs-blue);
    color: #fff;
    border-bottom-right-radius: 5px;
}

.student-message-tutor {
    background: #fff;
    color: var(--excelcs-navy);
    border: 1px solid rgba(13, 19, 33, 0.08);
    border-bottom-left-radius: 5px;
}

.student-message-text {
    font-size: 0.92rem;
    line-height: 0.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.student-message-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    font-size: 0.68rem;
}

.student-message-own
    .student-message-meta {
    color: rgba(255, 255, 255, 0.72);
}

.student-message-tutor
    .student-message-meta {
    color: var(--excelcs-muted);
}

.student-chat-composer {
    padding: 18px 22px;
    border-top: 1px solid rgba(13, 19, 33, 0.07);
    background: #fff;
}

.student-chat-compose-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.student-chat-textarea {
    min-height: 54px;
    max-height: 160px;
    resize: vertical;
}

.student-chat-send-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 54px;
    padding-left: 18px;
    padding-right: 18px;
}


@media (max-width: 767px) {

    .student-chat-thread {
        height: 460px;
        padding: 18px;
    }

    .student-message-bubble {
        max-width: 86%;
    }

}


@media (max-width: 575px) {

    .student-chat-header,
    .student-chat-composer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .student-chat-thread {
        height: 420px;
        padding: 16px;
    }

    .student-chat-compose-row {
        gap: 8px;
    }

    .student-chat-send-btn {
        min-width: 52px;
        padding-left: 14px;
        padding-right: 14px;
    }

}

/* =========================================
   TUTOR MESSAGES
   ========================================= */

.tutor-messages-unread-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 0.85rem;
    font-weight: 600;
}

.tutor-messages-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    height: 600px;
    overflow: hidden;
}


/* -----------------------------------------
   STUDENT SIDEBAR
   ----------------------------------------- */

.tutor-message-sidebar {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    border-right: 1px solid rgba(13, 19, 33, 0.07);
    background: #fff;
}

.tutor-message-sidebar-header {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(13, 19, 33, 0.07);
}

.tutor-message-student-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.tutor-message-student {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 18px;
    border-bottom: 1px solid rgba(13, 19, 33, 0.06);
    color: inherit;
    text-decoration: none;
    transition:
        background 0.15s ease;
}

.tutor-message-student:hover {
    background: #f7f9fc;
}

.tutor-message-student.active {
    background: #f3f7ff;
}

.tutor-message-student.has-unread
    .tutor-message-student-name {
    font-weight: 800;
}

.tutor-message-student-avatar,
.tutor-message-conversation-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    background: #f3f7ff;
    color: var(--excelcs-blue);
    font-size: 0.8rem;
    font-weight: 800;
}

.tutor-message-student-details {
    flex: 1;
    min-width: 0;
}

.tutor-message-student-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tutor-message-student-name {
    flex: 1;
    min-width: 0;
    color: var(--excelcs-navy);
    font-size: 0.9rem;
    font-weight: 650;
}

.tutor-message-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--excelcs-blue);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}

.tutor-message-preview {
    margin-top: 3px;
    overflow: hidden;
    color: var(--excelcs-muted);
    font-size: 0.78rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.tutor-message-preview-time {
    margin-top: 4px;
    color: var(--excelcs-muted);
    font-size: 0.68rem;
}

.tutor-message-student-empty {
    padding: 28px 20px;
    color: var(--excelcs-muted);
    text-align: center;
}


/* -----------------------------------------
   CONVERSATION
   ----------------------------------------- */

.tutor-message-conversation {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    background: #fff;
}

.tutor-message-conversation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(13, 19, 33, 0.07);
}

.tutor-message-thread {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 24px;
    background: #f7f9fc;
}

.tutor-message-conversation-header {
    flex: 0 0 auto;
}

.tutor-message-composer {
    flex: 0 0 auto;
}

.tutor-message-no-selection,
.tutor-message-thread-empty {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.tutor-message-no-selection {
    flex: 1;
}

.tutor-message-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-bottom: 14px;
    border-radius: 16px;
    background: #eef3fb;
    color: var(--excelcs-blue);
}

.tutor-message-empty-icon i {
    font-size: 1.5rem;
}


/* -----------------------------------------
   MESSAGE BUBBLES
   ----------------------------------------- */

.tutor-message-row {
    display: flex;
    margin-bottom: 14px;
}

.tutor-message-row:last-child {
    margin-bottom: 0;
}

.tutor-message-row-own {
    justify-content: flex-end;
}

.tutor-message-row-student {
    justify-content: flex-start;
}

.tutor-message-bubble {
    max-width: 72%;
    padding: 11px 14px 9px;
    border-radius: 15px;
}

.tutor-message-own {
    background: var(--excelcs-blue);
    color: #fff;
    border-bottom-right-radius: 5px;
}

.tutor-message-from-student {
    background: #fff;
    color: var(--excelcs-navy);
    border: 1px solid rgba(13, 19, 33, 0.08);
    border-bottom-left-radius: 5px;
}

.tutor-message-text {
    font-size: 0.92rem;
    line-height: 0.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.tutor-message-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    font-size: 0.68rem;
}

.tutor-message-own
    .tutor-message-meta {
    color: rgba(255, 255, 255, 0.72);
}

.tutor-message-from-student
    .tutor-message-meta {
    color: var(--excelcs-muted);
}


/* -----------------------------------------
   COMPOSER
   ----------------------------------------- */

.tutor-message-composer {
    padding: 18px 22px;
    border-top: 1px solid rgba(13, 19, 33, 0.07);
    background: #fff;
}

.tutor-message-compose-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.tutor-message-textarea {
    min-height: 54px;
    max-height: 160px;
    resize: vertical;
}

.tutor-message-send-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 54px;
    padding-left: 18px;
    padding-right: 18px;
}


/* -----------------------------------------
   RESPONSIVE
   ----------------------------------------- */

@media (max-width: 991px) {

    .tutor-messages-layout {
        grid-template-columns: 260px minmax(0, 1fr);
    }

}


@media (max-width: 767px) {

    .tutor-messages-layout {
        display: block;
        height: auto;
    }

    .tutor-message-sidebar {
        border-right: 0;
        border-bottom: 1px solid rgba(13, 19, 33, 0.07);
    }

    .tutor-message-student-list {
        max-height: 280px;
    }

    .tutor-message-thread {
        height: 430px;
        flex: none;
        padding: 18px;
    }

    .tutor-message-bubble {
        max-width: 86%;
    }

}


@media (max-width: 575px) {

    .tutor-message-conversation-header,
    .tutor-message-composer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .tutor-message-thread {
        height: 400px;
        padding: 16px;
    }

    .tutor-message-compose-row {
        gap: 8px;
    }

    .tutor-message-send-btn {
        min-width: 52px;
        padding-left: 14px;
        padding-right: 14px;
    }

}

/* =========================================
   MESSAGE NAV NOTIFICATION
   ========================================= */

.excelcs-message-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.excelcs-message-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 18px;
    height: 18px;

    border-radius: 50%;

    background: #fff;
    color: var(--excelcs-blue);

    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;

    box-shadow:
        0 0 0 2px
        rgba(255, 255, 255, 0.12);
}


/* =========================================
   MOBILE MESSAGE NOTIFICATION
   ========================================= */

.excelcs-nav-toggle {
    position: relative;
}

.excelcs-mobile-message-badge {
    position: absolute;

    top: 2px;
    right: 2px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 18px;
    height: 18px;

    border-radius: 50%;

    background: #fff;
    color: var(--excelcs-blue);

    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;

    z-index: 20;

    pointer-events: none;

    box-shadow:
        0 0 0 2px
        rgba(13, 19, 33, 0.18);
}


/*
 * Explicitly hide when no unread
 * messages exist.
 */
.excelcs-mobile-message-badge.d-none {
    display: none !important;
}

.excelcs-mobile-message-badge i {
    font-size: 0.7rem;
    line-height: 1;
}

/*
 * Desktop navigation already shows
 * the notification next to Messages,
 * so the hamburger badge is not needed.
 */
@media (min-width: 992px) {

    .excelcs-mobile-message-badge {
        display: none !important;
    }

}


/* =========================================
   DASHBOARD MESSAGE ALERT
   ========================================= */

.dashboard-message-alert-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;
    flex: 0 0 46px;

    border-radius: 12px;

    background: #f3f7ff;
    color: var(--excelcs-blue);

    font-size: 1.25rem;
}


@media (max-width: 575px) {

    [data-dashboard-message-alert]
    > .d-flex {
        align-items: flex-start !important;
        flex-direction: column;
    }

    [data-dashboard-message-alert]
    .excelcs-btn-primary {
        width: 100%;
    }

}

/* =========================================
   STUDENT FILTERS
   ========================================= */

.student-filter-search {
    padding-left: 42px;
}

.student-filter-search-icon {
    position: absolute;
    top: 50%;
    left: 15px;

    transform: translateY(-50%);

    color: var(--excelcs-muted);

    pointer-events: none;
}

.student-filter-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 52px;
    height: 52px;

    border-radius: 14px;

    background: #f3f7ff;
    color: var(--excelcs-blue);

    font-size: 1.3rem;
}

/* =========================================
   STUDENT CLASS MANAGEMENT
   ========================================= */

.student-class-selection {
    display: grid;
    gap: 10px;
}

.student-class-option {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 13px 15px;

    border: 1px solid rgba(13, 19, 33, 0.08);
    border-radius: 10px;

    background: #fff;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.student-class-option:hover {
    background: #f7f9fc;
    border-color: rgba(37, 99, 235, 0.2);
}

.student-class-option:has(
    .form-check-input:checked
) {
    background: #f3f7ff;
    border-color: rgba(37, 99, 235, 0.25);
}

.student-class-option span {
    font-weight: 600;
    color: var(--excelcs-navy);
}

/* =========================================
   STUDENT PROFILE SUMMARY
   ========================================= */

.student-summary-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;
    flex: 0 0 46px;

    border-radius: 12px;

    background: #f3f7ff;
    color: var(--excelcs-blue);

    font-size: 1.2rem;
}
/* =========================================
   SUMMARY CARD ACTION LINK
   ========================================= */

.excelcs-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;

    color: var(--excelcs-blue);

    font-size: 0.8rem;
    font-weight: 600;

    text-decoration: none;
    white-space: nowrap;
}

.excelcs-card-link:hover {
    text-decoration: underline;
}

/* =========================================
   CLASS LESSON ACTIONS
   ========================================= */

.excelcs-lesson-action {
    width: 150px;
    min-height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    white-space: nowrap;
}

/* =========================================
   UPCOMING LESSON STATUS
   ========================================= */

.excelcs-lesson-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;

    padding: 0.4rem 0.65rem;

    border-radius: 999px;

    background: #f1f3f5;
    color: #495057;

    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}

.excelcs-lesson-status-scheduled {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.excelcs-lesson-status-live {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}


/* =========================================================
   TUTOR DASHBOARD
   ========================================================= */


/* ---------------------------------------------------------
   Section heading icon
   --------------------------------------------------------- */

.dashboard-section-icon {
    font-size: 1.1rem;
    color: #6D28D9;
}


/* ---------------------------------------------------------
   Attention alerts
   --------------------------------------------------------- */

.dashboard-attention-card {
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.dashboard-alert-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.15rem;
}

.dashboard-alert-icon-review {
    background: rgba(109, 40, 217, 0.1);
    color: #6D28D9;
}

.dashboard-alert-icon-message {
    background: rgba(37, 99, 235, 0.1);
    color: #2563EB;
}


/* ---------------------------------------------------------
   Statistic cards
   --------------------------------------------------------- */

.dashboard-stat-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.dashboard-stat-link:hover {
    color: inherit;
}

.dashboard-stat-card {
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.dashboard-stat-link:hover .dashboard-stat-card {
    transform: translateY(-2px);
}

.dashboard-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(37, 99, 235, 0.08);
    color: #2563EB;
    font-size: 1.1rem;
}

.dashboard-stat-card-attention .dashboard-stat-icon {
    background: rgba(109, 40, 217, 0.1);
    color: #6D28D9;
}


/* ---------------------------------------------------------
   Upcoming lessons
   --------------------------------------------------------- */

.dashboard-lesson-list {
    display: flex;
    flex-direction: column;
}

.dashboard-lesson-item {
    padding: 1.35rem 0;
    border-bottom: 1px solid rgba(13, 19, 33, 0.08);
}

.dashboard-lesson-item:first-child {
    padding-top: 0;
}

.dashboard-lesson-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.dashboard-next-lesson {
    position: relative;
}

.dashboard-next-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: rgba(109, 40, 217, 0.1);
    color: #6D28D9;
    font-size: 0.72rem;
    line-height: 1;
    font-weight: 700;
}

.dashboard-lesson-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.85rem;
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
}

.dashboard-lesson-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.dashboard-lesson-meta i {
    color: #2563EB;
}

.dashboard-more-link {
    color: #2563EB;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.dashboard-more-link:hover {
    text-decoration: underline;
}


/* ---------------------------------------------------------
   Empty upcoming lessons
   --------------------------------------------------------- */

.dashboard-empty-state {
    padding: 3rem 1rem;
}

.dashboard-empty-icon {
    width: 58px;
    height: 58px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.08);
    color: #2563EB;
    font-size: 1.4rem;
}


/* ---------------------------------------------------------
   Quick actions
   --------------------------------------------------------- */

.dashboard-quick-action {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(13, 19, 33, 0.1);
    border-radius: 12px;
    color: #0D1321;
    text-decoration: none;
    background: transparent;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

.dashboard-quick-action:hover {
    color: #0D1321;
    background: rgba(37, 99, 235, 0.035);
    border-color: rgba(37, 99, 235, 0.2);
    transform: translateX(2px);
}

.dashboard-quick-action-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(37, 99, 235, 0.08);
    color: #2563EB;
    font-size: 1rem;
}

.dashboard-quick-action-primary {
    border-color: transparent;
    background: linear-gradient(
        135deg,
        #6D28D9,
        #2563EB,
        #06B6D4
    );
    color: #ffffff;
}

.dashboard-quick-action-primary:hover {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(
        135deg,
        #6D28D9,
        #2563EB,
        #06B6D4
    );
}

.dashboard-quick-action-primary .dashboard-quick-action-icon {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}


/* ---------------------------------------------------------
   Lessons to review
   --------------------------------------------------------- */

.dashboard-review-count {
    min-width: 34px;
    height: 34px;
    padding: 0 0.6rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(109, 40, 217, 0.1);
    color: #6D28D9;
    font-size: 0.85rem;
    font-weight: 700;
}

.dashboard-review-list {
    display: flex;
    flex-direction: column;
}

.dashboard-review-item {
    padding: 1.2rem 0;
    border-bottom: 1px solid rgba(13, 19, 33, 0.08);
}

.dashboard-review-item:first-child {
    padding-top: 0;
}

.dashboard-review-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.dashboard-review-meta {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    color: var(--bs-secondary-color);
    font-size: 0.86rem;
}

.dashboard-review-meta > div {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.dashboard-review-meta i {
    width: 18px;
    color: #6D28D9;
}

.dashboard-review-ready {
    color: #198754;
    font-weight: 600;
}


/* ---------------------------------------------------------
   Review empty state
   --------------------------------------------------------- */

.dashboard-review-empty {
    padding: 1.5rem 0 0.75rem;
}

.dashboard-review-complete-icon {
    width: 48px;
    height: 48px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
    font-size: 1.2rem;
}


/* ---------------------------------------------------------
   Responsive adjustments
   --------------------------------------------------------- */

@media (max-width: 767.98px) {

    .dashboard-lesson-meta {
        gap: 0.55rem 0.8rem;
    }

    .dashboard-quick-action:hover {
        transform: none;
    }

}

/* =========================================================
   STUDENT DASHBOARD
   ========================================================= */


/* ---------------------------------------------------------
   Dashboard alerts
   --------------------------------------------------------- */

.student-dashboard-alert {
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.student-dashboard-alert-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.15rem;
}

.student-dashboard-feedback-icon {
    background: rgba(109, 40, 217, 0.1);
    color: #6D28D9;
}

.student-dashboard-message-icon {
    background: rgba(37, 99, 235, 0.1);
    color: #2563EB;
}


/* ---------------------------------------------------------
   Current lesson state
   --------------------------------------------------------- */

.student-dashboard-current-lesson {
    border-width: 2px;
    border-style: solid;
}

.student-dashboard-live {
    border-color: #DC2626;
}

.student-dashboard-feedback {
    border-color: #2563EB;
}


/* ---------------------------------------------------------
   Quick-link cards
   --------------------------------------------------------- */

.student-dashboard-link-card {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.student-dashboard-link-card:hover {
    color: inherit;
}

.student-dashboard-link-card .excelcs-card {
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.student-dashboard-link-card:hover .excelcs-card {
    transform: translateY(-2px);
}

.student-dashboard-link-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.08);
    color: #2563EB;
    font-size: 1.1rem;
}


/* ---------------------------------------------------------
   Responsive adjustments
   --------------------------------------------------------- */

@media (max-width: 767.98px) {

    .student-dashboard-alert .btn {
        width: 100%;
    }

}

.dashboard-waiting-card {
    border-left: 4px solid #06B6D4;
}

.dashboard-alert-icon-waiting {
    background: rgba(6, 182, 212, 0.12);
    color: #0891B2;
}