/* Student portal. These rules use !important so later page styles cannot turn the sidebar white or hide banners. */

.student-shell {
    background: #f4f7fb !important;
}

body:has(.student-shell) .site-footer {
    display: none !important;
}

body:has(.student-shell) main {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.student-shell > link {
    display: none !important;
}

.student-shell {
    display: grid !important;
    grid-template-columns: 250px minmax(0, 1fr) !important;
    align-items: start !important;
    width: 100% !important;
    min-height: calc(100vh - 76px) !important;
    background: #f4f7fb !important;
}

.student-shell .student-sidebar {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 250px !important;
    min-width: 250px !important;
    max-width: 250px !important;
    background: #0b1f3a !important;
    color: #d5e2ef !important;
    position: sticky !important;
    top: 76px !important;
    align-self: flex-start !important;
    height: calc(100vh - 76px) !important;
    min-height: calc(100vh - 76px) !important;
    overflow: auto !important;
    padding: 1rem 0.75rem 1.5rem !important;
}

.student-shell .student-sidebar .nav-label {
    color: #7fd3e5 !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase !important;
    margin: 0.35rem 0.85rem 0.75rem !important;
}

.student-shell .student-sidebar a {
    display: flex !important;
    align-items: center !important;
    margin: 0 0 0.15rem !important;
    padding: 0.7rem 0.9rem !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #d5e2ef !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

.student-shell .student-sidebar a:hover,
.student-shell .student-sidebar a.active {
    background: rgba(20, 184, 212, 0.18) !important;
    color: #fff !important;
}

.student-shell .student-sidebar a.logout {
    color: #f3b4b4 !important;
    margin-top: 0.8rem !important;
}

.student-shell .main-content,
.student-shell .main-content {
    display: block !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    background: #f4f7fb !important;
    padding: 1.5rem !important;
}

.student-shell .stu-banner {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: #0b1f3a !important;
    background-color: #0b1f3a !important;
    color: #fff !important;
    border-radius: 14px !important;
    padding: 1.4rem 1.5rem !important;
    margin: 0 0 1.25rem !important;
}

.student-shell .stu-banner h1,
.student-shell .stu-banner h2,
.student-shell .stu-banner p {
    margin: 0 !important;
    color: #fff !important;
    position: static !important;
}

.student-shell .stu-banner h1,
.student-shell .stu-banner h2 {
    font-size: 1.7rem !important;
    line-height: 1.2 !important;
}

.student-shell .stu-banner p {
    margin-top: 0.35rem !important;
    color: #d5e2ef !important;
}

.student-shell .stu-stat {
    background: #fff !important;
    border: 1px solid #e4ebf3 !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    padding: 1rem !important;
}

.student-shell .stu-card .card-body,
.student-shell .stu-card .card-footer,
.student-shell .stu-panel .card-body {
    padding: 1rem !important;
}

.student-shell .stu-stat h4,
.student-shell .stu-stat p,
.student-shell .stu-stat i {
    color: #0b1f3a !important;
}

.student-shell .main-content .row {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.student-shell .main-content .row > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

@media (min-width: 768px) {
    .student-shell .main-content .row > .col-md-3 { width: 25% !important; max-width: 25% !important; }
    .student-shell .main-content .row > .col-md-4 { width: 33.333% !important; max-width: 33.333% !important; }
    .student-shell .main-content .row > .col-md-6 { width: 50% !important; max-width: 50% !important; }
    .student-shell .main-content .row > .col-md-8 { width: 66.666% !important; max-width: 66.666% !important; }
    .student-shell .main-content .row > .col-md-9 { width: 75% !important; max-width: 75% !important; }
}

@media (min-width: 992px) {
    .student-shell .main-content .row > .col-lg-3 { width: 25% !important; max-width: 25% !important; }
    .student-shell .main-content .row > .col-lg-4 { width: 33.333% !important; max-width: 33.333% !important; }
    .student-shell .main-content .row > .col-lg-6 { width: 50% !important; max-width: 50% !important; }
    .student-shell .main-content .row > .col-lg-8 { width: 66.666% !important; max-width: 66.666% !important; }
    .student-shell .main-content .row > .col-lg-9 { width: 75% !important; max-width: 75% !important; }
}

.student-shell .stu-stats,
.student-shell .stu-cards,
.student-shell .stu-split {
    display: grid !important;
    gap: 1rem !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 1.25rem !important;
}

.student-shell .stu-stats {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
}

.student-shell .stu-cards,
.student-shell .stu-split {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
}

.student-shell .stu-cards.stu-cards-compact {
    grid-template-columns: repeat(auto-fill, minmax(200px, 220px)) !important;
    justify-content: start !important;
    gap: 0.75rem !important;
}

.student-shell .stu-cards-compact .stu-cover {
    height: 96px !important;
    max-height: 96px !important;
}

.student-shell .stu-cards-compact .stu-card .card-body,
.student-shell .stu-cards-compact .stu-card .card-footer {
    padding: 0.65rem 0.75rem !important;
}

.student-shell .stu-cards-compact .card-title {
    font-size: 0.92rem !important;
    line-height: 1.3 !important;
    margin: 0 0 0.2rem !important;
}

.student-shell .stu-stats > *,
.student-shell .stu-cards > *,
.student-shell .stu-split > * {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.student-shell .stu-panel {
    background: #fff !important;
    border: 1px solid #e4ebf3 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    min-width: 0 !important;
    margin: 0 0 1.25rem !important;
}

.student-shell .stu-panel h2,
.student-shell .stu-panel h4 {
    margin: 0 !important;
    padding: 1rem 1rem 0.75rem !important;
    color: #0b1f3a !important;
    font-size: 1.05rem !important;
}

.student-shell .stu-item {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.75rem 1rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0.9rem 1rem !important;
    border-top: 1px solid #e4ebf3 !important;
    background: #fff !important;
    min-width: 0 !important;
}

.student-shell .stu-item > div {
    flex: 1 1 180px !important;
    min-width: 0 !important;
}

.student-shell .stu-item strong,
.student-shell .stu-item small {
    display: block !important;
    overflow-wrap: anywhere !important;
}

.student-shell .stu-item strong { color: #0b1f3a !important; }
.student-shell .stu-item small { color: #5b6b7c !important; }

.student-shell .stu-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.4rem !important;
    margin-left: auto !important;
}

.student-shell .stu-act,
.student-shell .stu-actions .btn,
.student-shell .stu-actions button {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.35rem 0.65rem !important;
    border: 1px solid #d5e0ea !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #0b1f3a !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

.student-shell .stu-cover {
    display: block !important;
    width: 100% !important;
    height: 160px !important;
    max-height: 160px !important;
    object-fit: cover !important;
}

.student-shell .stu-mini {
    width: 56px !important;
    height: 42px !important;
    max-width: 56px !important;
    flex: 0 0 56px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
}

.student-shell .stu-card {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    background: #fff !important;
    border: 1px solid #e4ebf3 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
}

.student-shell .stu-card .card-body,
.student-shell .stu-card .card-footer {
    min-width: 0 !important;
}

.student-shell .main-content .card,
.student-shell .main-content table {
    max-width: 100% !important;
}

.student-shell .main-content .table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
}

@media (max-width: 860px) {
    .student-shell {
        display: block !important;
    }

    .student-shell .student-sidebar {
        width: 100% !important;
        max-width: none !important;
        height: auto !important;
        min-height: 0 !important;
        position: static !important;
    }
}

body.student-portal .d-flex > .sidebar {
    background: #0b1f3a !important;
    color: #d5e2ef !important;
    width: 250px !important;
    flex: 0 0 250px !important;
}

body.student-portal .d-flex > .sidebar .sidebar-link,
body.student-portal .d-flex > .sidebar a {
    color: #d5e2ef !important;
}

body.student-portal .d-flex > .sidebar .sidebar-link.active,
body.student-portal .d-flex > .sidebar .sidebar-link:hover {
    background: rgba(20, 184, 212, 0.18) !important;
    color: #fff !important;
}

body.student-portal .main-content .py-4 {
    background: #0b1f3a !important;
    color: #fff !important;
    border-radius: 14px !important;
    padding: 1.4rem 1.5rem !important;
}

body.student-portal .main-content .py-4 h2,
body.student-portal .main-content .py-4 p {
    color: #fff !important;
}

body.student-portal .main-content img {
    max-width: 100% !important;
    max-height: 160px !important;
    object-fit: cover !important;
}

body.student-portal .d-flex > .main-content {
    min-width: 0 !important;
    overflow: auto !important;
}

.student-shell .assign-panel {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 0 1rem !important;
    clear: both !important;
    float: none !important;
    transform: none !important;
    overflow: hidden !important;
}

.student-shell .assign-body {
    padding: 0 1rem 1rem !important;
    min-width: 0 !important;
}

.student-shell .assign-facts {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 0.75rem !important;
    width: 100% !important;
    margin: 0 0 1rem !important;
}

.student-shell .assign-facts > * {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0.75rem !important;
    background: #f4f7fb !important;
    border-radius: 10px !important;
}

.student-shell .assign-facts small,
.student-shell .assign-note small {
    display: block !important;
    color: #5b6b7c !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
}

.student-shell .assign-facts p,
.student-shell .assign-block p,
.student-shell .assign-text {
    margin: 0.25rem 0 0 !important;
    color: #0b1f3a !important;
    overflow-wrap: anywhere !important;
    white-space: pre-wrap !important;
}

.student-shell .assign-block {
    margin-top: 0.9rem !important;
    min-width: 0 !important;
}

.student-shell .assign-note {
    background: #f4f7fb !important;
    border-radius: 10px !important;
    padding: 0.9rem !important;
    margin-bottom: 1rem !important;
}

.student-shell .assign-panel textarea,
.student-shell .assign-panel input,
.student-shell .assign-panel select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.student-shell .assign-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    margin-top: 0.9rem !important;
}

.student-shell .assign-back {
    margin: 0 0 1rem !important;
}
