
/* =====================================================
   CODETRADITIONS FINAL UI REFINEMENTS
===================================================== */

/* NAVIGATION CONSISTENCY */

body header nav a,
body header nav a.active,
body header nav a:visited {
    color: #ffffff !important;
    background: transparent !important;
    text-decoration: none;
    box-shadow: none !important;
}

body header nav a:hover {
    color: #dbeafe !important;
}

body header nav form {
    display: inline-flex !important;
    align-items: center;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

body header nav form button[type="submit"] {
    appearance: none !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #ffffff !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: 600 !important;
    cursor: pointer;
}

body header nav form button[type="submit"]:hover {
    color: #dbeafe !important;
}

body header nav a:focus-visible,
body header nav button:focus-visible {
    outline: 2px solid #ffffff !important;
    outline-offset: 5px;
}


/* =====================================================
   STUDENT DASHBOARD
===================================================== */

.ct-student-dashboard .dashboard-page {
    width: 100%;
    box-sizing: border-box;
    padding-left: 24px;
    padding-right: 24px;
}

.ct-student-dashboard .dashboard-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    min-width: 0;
    box-sizing: border-box;
}

.ct-student-dashboard .dashboard-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
    margin: 0 0 24px;
}

.ct-student-dashboard .dashboard-summary .summary-card {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    min-height: 110px;
    height: 100%;
    padding: 20px;
    margin: 0;
    box-sizing: border-box;
}

.ct-student-dashboard .summary-icon {
    flex-shrink: 0;
}

.ct-student-dashboard .summary-card strong {
    font-size: 19px;
    overflow-wrap: anywhere;
}

.ct-student-dashboard .dashboard-main-grid,
.ct-student-dashboard .action-grid {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.ct-student-dashboard .dashboard-panel,
.ct-student-dashboard .action-card,
.ct-student-dashboard .detail-box {
    min-width: 0;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}

.ct-student-dashboard .details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}


/* ENROLLED COURSES */

.ct-enrolled-section {
    margin: 0 0 25px;
    padding: 25px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 6px 22px rgba(0,0,0,.05);
    box-sizing: border-box;
}

.ct-enrolled-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.ct-enrolled-heading h2 {
    margin: 0;
    color: #131B40;
    font-size: 24px;
}

.ct-enrolled-count {
    color: #131B40;
    background: #edf3ff;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.ct-enrolled-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.ct-enrolled-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 22px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-sizing: border-box;
}

.ct-enrolled-card h3 {
    color: #131B40;
    font-size: 19px;
    line-height: 1.4;
    margin: 14px 0 10px;
    overflow-wrap: anywhere;
}

.ct-enrolled-card p {
    color: #475569;
    margin: 0 0 16px;
}

.ct-enrollment-status {
    align-self: flex-start;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.ct-enrollment-active {
    background: #dcfce7;
    color: #166534;
}

.ct-enrollment-completed {
    background: #dbeafe;
    color: #1e40af;
}

.ct-enrollment-pending {
    background: #fef3c7;
    color: #92400e;
}

.ct-enrolled-actions {
    margin-top: auto;
    padding-top: 12px;
}

.ct-enrolled-card .dashboard-classroom-button,
.ct-enrolled-card .dashboard-certificate-button {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: #131B40;
    color: #ffffff !important;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
}

.ct-enrolled-card .dashboard-classroom-button:hover,
.ct-enrolled-card .dashboard-certificate-button:hover {
    background: #131B40;
}

.ct-enrolled-empty {
    grid-column: 1 / -1;
    padding: 24px;
    text-align: center;
    color: #64748b;
}


/* LIVE CLASSES */

.ct-student-dashboard .live-classes-section {
    margin: 24px 0;
    padding: 24px;
    box-sizing: border-box;
}

.ct-student-dashboard .live-class-grid {
    grid-template-columns:
        repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}


/* =====================================================
   DISCUSSION DIRECTORY
===================================================== */

.directory-grid {
    align-items: stretch;
}

.directory-grid .directory-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 22px;
    box-sizing: border-box;
}

.directory-grid .directory-card h2 {
    min-height: 2.8em;
    line-height: 1.4;
    margin: 12px 0 8px;
    overflow-wrap: anywhere;
}

.directory-grid .directory-card .muted {
    margin: 0 0 12px;
}

.directory-grid .directory-stats {
    margin: auto 0 16px;
    padding-top: 8px;
}

.directory-grid .directory-stat {
    min-width: 0;
}

.directory-grid .directory-actions {
    display: flex;
    gap: 10px;
    margin-top: 0;
}

.directory-grid .directory-actions .btn {
    flex: 1 1 auto;
    text-align: center;
}


/* =====================================================
   PUBLIC COURSE CARDS
===================================================== */

.ct-courses-page .course-grid {
    align-items: stretch;
}

.ct-courses-page .course-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    transform: none !important;
    box-sizing: border-box;
}

.ct-courses-page .course-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    padding: 20px;
}

.ct-courses-page .course-content h2 {
    min-height: 2.8em;
    line-height: 1.4;
    margin: 0 0 14px;
}

.ct-courses-page .ct-course-duration {
    margin-bottom: 12px;
}

.ct-courses-page .ct-course-price-section {
    margin-bottom: 18px;
}

.ct-courses-page .ct-course-price-section .price {
    min-height: 112px;
    line-height: 1.4;
}

.ct-courses-page .ct-register-link {
    margin-top: auto;
}

.ct-courses-page .ct-promo-pricing {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 8px;
}

.ct-courses-page .ct-promo-pricing small {
    flex-basis: 100%;
}


/* =====================================================
   STAFF MANAGEMENT
===================================================== */

.ct-staff-management {
    padding: 0 !important;
}

.ct-staff-management > .container {
    width: calc(100% - 48px);
    max-width: 1200px;
    margin: 28px auto;
}


/* =====================================================
   RESPONSIVE DESIGN
===================================================== */

@media (max-width: 1050px) {

    .ct-student-dashboard .dashboard-summary,
    .ct-student-dashboard .action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 700px) {

    .ct-student-dashboard .dashboard-page {
        padding-left: 15px;
        padding-right: 15px;
    }

    .ct-student-dashboard .dashboard-main-grid,
    .ct-enrolled-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ct-enrolled-section {
        padding: 18px;
    }

    .ct-enrolled-card {
        padding: 18px;
    }

    .ct-student-dashboard .details-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ct-courses-page .course-content h2,
    .ct-courses-page .ct-course-price-section .price,
    .directory-grid .directory-card h2 {
        min-height: 0;
    }

}

@media (max-width: 480px) {

    .ct-student-dashboard .dashboard-summary,
    .ct-student-dashboard .action-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ct-student-dashboard .dashboard-summary .summary-card {
        min-height: 85px;
    }

    .ct-staff-management > .container {
        width: calc(100% - 30px);
    }

}

