/* =========================================================
   PROFILE.CSS
   Student Performance Analytics Portal
   Profile Page — Part 1
   ========================================================= */


/* ==================== PROFILE PAGE LAYOUT ==================== */

.profile-container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 20px 0 50px;
}


.profile-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}


/* ==================== PROFILE SIDEBAR ==================== */

.profile-sidebar {
    position: sticky;
    top: 90px;

    padding: 28px 22px;

    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;

    text-align: center;

    box-shadow:
        0 12px 30px rgba(15, 23, 42, 0.07);
}


.profile-avatar {
    width: 120px;
    height: 120px;

    margin: 0 auto 18px;

    border-radius: 50%;

    overflow: hidden;

    background: #eef2ff;

    border: 4px solid #e0e7ff;

    box-shadow:
        0 8px 20px rgba(49, 46, 129, 0.12);
}


.profile-avatar img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}


.profile-sidebar h2 {
    margin: 0;

    color: #1e293b;

    font-size: 1.05rem;
    font-weight: 700;

    line-height: 1.4;
}


.profile-role {
    margin: 6px 0 10px;

    color: #64748b;

    font-size: 0.78rem;
}


.profile-status {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 5px 12px;

    border-radius: 999px;

    background: #dcfce7;
    color: #166534;

    font-size: 0.68rem;
    font-weight: 600;
}


.profile-status::before {
    content: "";

    width: 6px;
    height: 6px;

    margin-right: 6px;

    border-radius: 50%;

    background: #22c55e;
}


/* ==================== PROFILE IMAGE ACTIONS ==================== */

.profile-image-actions {
    display: flex;

    flex-direction: column;

    gap: 9px;

    margin-top: 22px;
}


.profile-image-actions .btn {
    width: 100%;
}


.profile-image-actions input[type="file"] {
    display: none;
}


/* ==================== PROFILE MAIN CONTENT ==================== */

.profile-content {
    min-width: 0;
}


.profile-content>.dashboard-toolbar {
    margin-bottom: 22px;
}


.section-title {
    margin: 0 0 18px;

    color: #1e293b;

    font-size: 1.25rem;
    font-weight: 700;
}


/* ==================== PROFILE FORM ==================== */

.profile-form {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 18px;

    padding: 25px;

    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 18px;

    box-shadow:
        0 10px 28px rgba(15, 23, 42, 0.06);
}


.profile-form>div {
    min-width: 0;
}


.profile-form .full-width {
    grid-column: 1 / -1;
}


.profile-form label {
    display: block;

    margin-bottom: 7px;

    color: #334155;

    font-size: 0.76rem;
    font-weight: 600;
}


.profile-form input,
.profile-form select,
.profile-form textarea {
    width: 100%;

    box-sizing: border-box;

    padding: 11px 13px;

    border: 1px solid #d7dee8;
    border-radius: 10px;

    background: #ffffff;

    color: #0f172a;

    font-family: inherit;
    font-size: 0.78rem;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.profile-form input,
.profile-form select {
    min-height: 45px;
}


.profile-form textarea {
    min-height: 100px;

    resize: vertical;

    line-height: 1.6;
}


.profile-form input::placeholder,
.profile-form textarea::placeholder {
    color: #94a3b8;
}


.profile-form input:hover,
.profile-form select:hover,
.profile-form textarea:hover {
    border-color: #a5b4fc;
}


.profile-form input:focus,
.profile-form select:focus,
.profile-form textarea:focus {
    border-color: #4f46e5;

    box-shadow:
        0 0 0 3px rgba(79, 70, 229, 0.09);
}


/* ==================== PROFILE ACTIONS ==================== */

.profile-actions {
    display: flex;

    align-items: center;

    gap: 10px;

    flex-wrap: wrap;

    margin-top: 4px;
}


.profile-actions .btn {
    min-width: 125px;
}


/* ==================== PASSWORD CARD ==================== */

.password-card {
    margin-top: 24px;

    padding: 25px;

    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 18px;

    box-shadow:
        0 10px 28px rgba(15, 23, 42, 0.06);
}


.password-card h3 {
    margin: 0 0 18px;

    color: #1e293b;

    font-size: 1rem;
    font-weight: 700;
}


.password-card .profile-form {
    padding: 0;

    border: 0;

    box-shadow: none;

    background: transparent;
}


.password-card .profile-actions {
    margin-top: 18px;
}


/* ==================== ACCOUNT INFORMATION ==================== */

.account-info {
    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 14px;

    margin-top: 24px;
}


.info-card {
    padding: 18px;

    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 14px;

    box-shadow:
        0 8px 20px rgba(15, 23, 42, 0.05);
}


.info-card h4 {
    margin: 0 0 7px;

    color: #64748b;

    font-size: 0.68rem;
    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: 0.04em;
}


.info-card p {
    margin: 0;

    color: #1e293b;

    font-size: 0.78rem;
    font-weight: 600;

    line-height: 1.5;
}


/* ==================== PROFILE STATISTICS ==================== */

.profile-stats {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 14px;

    margin-top: 24px;
}


.profile-stat {
    padding: 20px;

    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 14px;

    text-align: center;

    box-shadow:
        0 8px 20px rgba(15, 23, 42, 0.05);
}


.profile-stat .stat-number {
    margin: 0 0 6px;

    color: #312e81;

    font-size: 1.35rem;
    font-weight: 700;
}


.profile-stat>p:last-child {
    margin: 0;

    color: #64748b;

    font-size: 0.7rem;
}


/* ==================== PROFILE BOTTOM CARDS ==================== */

.profile-content>.dashboard-cards {
    margin-top: 24px;
}


/* ==================== DARK THEME ==================== */

.dark-theme .profile-sidebar,
.dark-theme .profile-form,
.dark-theme .password-card,
.dark-theme .info-card,
.dark-theme .profile-stat {
    background: #111827;

    border-color: #334155;

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.20);
}


.dark-theme .profile-sidebar h2,
.dark-theme .section-title,
.dark-theme .password-card h3,
.dark-theme .info-card p {
    color: #f1f5f9;
}


.dark-theme .profile-role {
    color: #94a3b8;
}


.dark-theme .profile-form label {
    color: #cbd5e1;
}


.dark-theme .profile-form input,
.dark-theme .profile-form select,
.dark-theme .profile-form textarea {
    background: #1e293b;

    border-color: #334155;

    color: #f8fafc;
}


.dark-theme .profile-form input::placeholder,
.dark-theme .profile-form textarea::placeholder {
    color: #64748b;
}


.dark-theme .profile-form input:focus,
.dark-theme .profile-form select:focus,
.dark-theme .profile-form textarea:focus {
    border-color: #6366f1;

    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.12);
}


.dark-theme .info-card h4,
.dark-theme .profile-stat>p:last-child {
    color: #94a3b8;
}


.dark-theme .profile-stat .stat-number {
    color: #a5b4fc;
}


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

@media (max-width: 950px) {

    .profile-grid {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 18px;
    }


    .profile-sidebar {
        padding: 24px 16px;
    }


    .profile-avatar {
        width: 100px;
        height: 100px;
    }


    .account-info {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 760px) {

    .profile-container {
        width: min(100% - 28px, 650px);

        padding-top: 15px;
    }


    .profile-grid {
        grid-template-columns: 1fr;
    }


    .profile-sidebar {
        position: static;

        width: 100%;

        box-sizing: border-box;
    }


    .profile-image-actions {
        flex-direction: row;

        justify-content: center;
    }


    .profile-image-actions .btn {
        width: auto;
    }


    .profile-form {
        grid-template-columns: 1fr;

        padding: 20px;
    }


    .profile-form .full-width {
        grid-column: auto;
    }


    .profile-actions {
        justify-content: center;
    }


    .profile-actions .btn {
        flex: 1 1 130px;
    }

}


@media (max-width: 520px) {

    .profile-container {
        width: calc(100% - 20px);
    }


    .profile-form,
    .password-card {
        padding: 17px;
    }


    .profile-image-actions {
        flex-direction: column;
    }


    .profile-image-actions .btn {
        width: 100%;
    }


    .account-info {
        grid-template-columns: 1fr;
    }


    .profile-stats {
        grid-template-columns: 1fr;
    }


    .profile-actions {
        flex-direction: column;
    }


    .profile-actions .btn {
        width: 100%;
    }

}


/* ==================== REDUCED MOTION ==================== */

@media (prefers-reduced-motion: reduce) {

    .profile-form input,
    .profile-form select,
    .profile-form textarea {
        transition: none;
    }

}


/* =========================================================
   END — PROFILE.CSS PART 1
   ========================================================= */








/* =========================================================
   PROFILE CSS — PART 2
   Avatar, Image Upload/Remove UX + Form Refinement
   Student Performance Analytics Portal
   ========================================================= */


/* =========================================================
   1. PROFILE SIDEBAR REFINEMENT
   ========================================================= */

.profile-sidebar {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 20px;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.profile-sidebar:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}


/* =========================================================
   2. PROFILE AVATAR
   ========================================================= */

.profile-avatar {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 1.25rem;
    padding: 5px;
    border-radius: 50%;
    background: linear-gradient(135deg,
            #312e81,
            #4f46e5,
            #6366f1);
    box-shadow:
        0 0 0 4px rgba(79, 70, 229, 0.08),
        0 12px 28px rgba(49, 46, 129, 0.20);
    overflow: hidden;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.profile-avatar:hover {
    transform: translateY(-3px);
    box-shadow:
        0 0 0 5px rgba(79, 70, 229, 0.10),
        0 16px 34px rgba(49, 46, 129, 0.25);
}

.profile-avatar::after {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    pointer-events: none;
}

.profile-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: #eef2ff;
}


/* =========================================================
   3. PROFILE NAME + ROLE
   ========================================================= */

.profile-sidebar #userName {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-color, #111827);
}

.profile-role {
    margin: 0.4rem 0 0.7rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted, #6b7280);
}


/* =========================================================
   4. PROFILE STATUS
   ========================================================= */

.profile-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.10);
    color: #059669;
    font-size: 0.78rem;
    font-weight: 600;
}

.profile-status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}


/* =========================================================
   5. IMAGE ACTION AREA
   ========================================================= */

.profile-image-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.7rem;
    margin-top: 0.25rem;
}

.profile-image-actions .btn {
    width: 100%;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
}


/* Upload button */

.profile-image-actions label.btn {
    cursor: pointer;
}


/* Remove button */

#removeProfileImageBtn {
    background: transparent;
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.25);
}

#removeProfileImageBtn:hover {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.40);
}


/* =========================================================
   6. PROFILE CONTENT
   ========================================================= */

.profile-content {
    min-width: 0;
}

.profile-content .dashboard-toolbar {
    margin-bottom: 1.5rem;
}


/* =========================================================
   7. SECTION TITLE
   ========================================================= */

.section-title {
    margin: 0 0 1.25rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-color, #111827);
}


/* =========================================================
   8. PROFILE FORM
   ========================================================= */

.profile-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    padding: 1.5rem;
    border-radius: 18px;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}


/* Form field */

.profile-form>div {
    min-width: 0;
}

.profile-form label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-color, #374151);
}


/* Inputs */

.profile-form input,
.profile-form select,
.profile-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.78rem 0.9rem;
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 10px;
    background: var(--input-bg, #ffffff);
    color: var(--text-color, #111827);
    font: inherit;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.profile-form textarea {
    min-height: 110px;
    resize: vertical;
}


/* Focus */

.profile-form input:focus,
.profile-form select:focus,
.profile-form textarea:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}


/* Placeholder */

.profile-form input::placeholder,
.profile-form textarea::placeholder {
    color: #9ca3af;
}


/* =========================================================
   9. FULL WIDTH FORM FIELDS
   ========================================================= */

.profile-form .full-width {
    grid-column: 1 / -1;
}


/* =========================================================
   10. PROFILE ACTION BUTTONS
   ========================================================= */

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.profile-actions .btn {
    min-width: 130px;
}


/* =========================================================
   11. PASSWORD CARD REFINEMENT
   ========================================================= */

.password-card {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 18px;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.password-card h3 {
    margin: 0 0 1.25rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-color, #111827);
}

.password-card .profile-form {
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
}


/* =========================================================
   12. ACCOUNT INFORMATION CARDS
   ========================================================= */

.account-info {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.info-card {
    padding: 1.15rem;
    border-radius: 15px;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.info-card h4 {
    margin: 0 0 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, #6b7280);
}

.info-card p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color, #111827);
}


/* =========================================================
   13. PROFILE STATISTICS
   ========================================================= */

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.profile-stat {
    padding: 1.25rem;
    text-align: center;
    border-radius: 15px;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
}

.profile-stat .stat-number {
    margin: 0 0 0.35rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: #312e81;
}

.profile-stat p:last-child {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted, #6b7280);
}


/* =========================================================
   14. PROFILE COMPLETION / EXTRA CARDS
   ========================================================= */

.profile-content>.dashboard-cards {
    margin-top: 1.5rem;
}


/* =========================================================
   15. DARK MODE SUPPORT
   ========================================================= */

[data-theme="dark"] .profile-sidebar,
[data-theme="dark"] .profile-form,
[data-theme="dark"] .password-card,
[data-theme="dark"] .info-card,
[data-theme="dark"] .profile-stat {
    background: #111827;
    border-color: #263244;
}

[data-theme="dark"] .profile-form input,
[data-theme="dark"] .profile-form select,
[data-theme="dark"] .profile-form textarea {
    background: #0f172a;
    border-color: #334155;
    color: #f8fafc;
}

[data-theme="dark"] .profile-form input::placeholder,
[data-theme="dark"] .profile-form textarea::placeholder {
    color: #64748b;
}

[data-theme="dark"] .profile-sidebar #userName,
[data-theme="dark"] .section-title,
[data-theme="dark"] .password-card h3,
[data-theme="dark"] .profile-form label,
[data-theme="dark"] .info-card p {
    color: #f8fafc;
}

[data-theme="dark"] .profile-role,
[data-theme="dark"] .info-card h4,
[data-theme="dark"] .profile-stat p:last-child {
    color: #94a3b8;
}

[data-theme="dark"] #removeProfileImageBtn {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.3);
}

[data-theme="dark"] #removeProfileImageBtn:hover {
    background: rgba(248, 113, 113, 0.08);
}


/* =========================================================
   16. RESPONSIVE — TABLET
   ========================================================= */

@media (max-width: 900px) {

    .account-info {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-form {
        gap: 1rem;
    }
}


/* =========================================================
   17. RESPONSIVE — MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .profile-sidebar {
        padding: 1.5rem 1.2rem;
    }

    .profile-avatar {
        width: 125px;
        height: 125px;
    }

    .profile-form {
        grid-template-columns: 1fr;
        padding: 1.2rem;
    }

    .profile-form .full-width {
        grid-column: auto;
    }

    .profile-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-actions .btn {
        width: 100%;
    }

    .account-info {
        grid-template-columns: 1fr;
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   18. SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .profile-avatar {
        width: 110px;
        height: 110px;
    }

    .profile-sidebar #userName {
        font-size: 1.1rem;
    }

    .profile-form {
        padding: 1rem;
        border-radius: 14px;
    }

    .password-card {
        padding: 1rem;
        border-radius: 14px;
    }

    .info-card {
        padding: 1rem;
    }
}



/* =========================================================
   PROFILE CSS — PART 3
   Final Components, Statistics, Notifications & UX Polish
   Student Performance Analytics Portal
   ========================================================= */


/* =========================================================
   1. PROFILE CONTENT SPACING
   ========================================================= */

.profile-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0;
}


/* Keep toolbar visually separated */

.profile-content>.dashboard-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}


/* =========================================================
   2. PROFILE ACTION BUTTON REFINEMENT
   ========================================================= */

.profile-actions .btn {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.profile-actions .btn:hover {
    transform: translateY(-2px);
}

.profile-actions .btn:active {
    transform: translateY(0);
}

.profile-actions .btn:focus-visible {
    outline: 3px solid rgba(79, 70, 229, 0.20);
    outline-offset: 2px;
}


/* =========================================================
   3. ACCOUNT INFORMATION REFINEMENT
   ========================================================= */

.account-info {
    position: relative;
}

.info-card {
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #4f46e5;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.info-card:hover::before {
    opacity: 1;
}


/* Different visual accent for active status */

.info-card p {
    line-height: 1.5;
}


/* =========================================================
   4. PROFILE STATISTICS REFINEMENT
   ========================================================= */

.profile-stats {
    position: relative;
}

.profile-stat {
    position: relative;
    overflow: hidden;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.profile-stat::after {
    content: "";
    position: absolute;
    width: 80px;
    height: 80px;
    right: -35px;
    bottom: -35px;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.07);
    pointer-events: none;
}

.profile-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.profile-stat .stat-number {
    position: relative;
    z-index: 1;
}


/* =========================================================
   5. EXTRA PROFILE CARDS
   ========================================================= */

.profile-content>.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.profile-content>.dashboard-cards .card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.profile-content>.dashboard-cards .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.09);
}


/* =========================================================
   6. PROFILE COMPLETION
   ========================================================= */

#profileCompletionLabel {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted, #6b7280);
}

#profileCompletion {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: #312e81;
}


/* =========================================================
   7. PASSWORD CARD UX
   ========================================================= */

.password-card {
    position: relative;
    overflow: hidden;
}

.password-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            #312e81,
            #4f46e5,
            #6366f1);
}

.password-card .profile-actions {
    justify-content: flex-end;
    margin-top: 1.25rem;
}


/* Password inputs */

#currentPassword,
#newPassword,
#confirmPassword {
    letter-spacing: 0.02em;
}


/* =========================================================
   8. NOTIFICATION PANEL — PROFILE PAGE
   ========================================================= */

#notificationPanel {
    z-index: 1000;
}

.notification-panel {
    width: min(390px, calc(100vw - 2rem));
    max-height: min(620px, calc(100vh - 2rem));
    overflow: hidden;
    border-radius: 18px;
    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.20),
        0 5px 15px rgba(15, 23, 42, 0.08);
}

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.notification-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.notification-header button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.notification-header button:hover {
    background: rgba(79, 70, 229, 0.08);
    transform: rotate(4deg);
}


/* Notification search */

.notification-search {
    width: 100%;
    box-sizing: border-box;
    margin: 0.8rem 0;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 9px;
    background: var(--input-bg, #ffffff);
    color: var(--text-color, #111827);
    font: inherit;
    outline: none;
}

.notification-search:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.10);
}


/* Notification list */

.notification-list,
#notificationList {
    max-height: 470px;
    overflow-y: auto;
    scrollbar-width: thin;
}


/* Individual notification */

.notification-item {
    padding: 0.9rem;
    border-radius: 10px;
    transition: background-color 0.2s ease;
}

.notification-item:hover {
    background: rgba(79, 70, 229, 0.05);
}

.notification-item h4 {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
}

.notification-item p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
}

.notification-item small {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    color: var(--text-muted, #6b7280);
}


/* =========================================================
   9. LOADING OVERLAY
   ========================================================= */

.loading-overlay {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.loading-overlay .loader-circle {
    filter: drop-shadow(0 5px 12px rgba(49, 46, 129, 0.20));
}

.loading-overlay p {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    font-weight: 500;
}


/* =========================================================
   10. PROFILE PAGE FORM VALIDATION UX
   ========================================================= */

.profile-form input:invalid:not(:placeholder-shown),
.profile-form select:invalid,
.profile-form textarea:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

.profile-form input:invalid:not(:placeholder-shown):focus,
.profile-form select:invalid:focus,
.profile-form textarea:invalid:not(:placeholder-shown):focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.10);
}


/* =========================================================
   11. DISABLED FORM CONTROLS
   ========================================================= */

.profile-form input:disabled,
.profile-form select:disabled,
.profile-form textarea:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}


/* =========================================================
   12. FILE INPUT ACCESSIBILITY
   ========================================================= */

#profileImage {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}


/* =========================================================
   13. KEYBOARD FOCUS
   ========================================================= */

.profile-sidebar .btn:focus-visible,
.profile-content .btn:focus-visible,
.notification-panel button:focus-visible,
.notification-search:focus-visible {
    outline: 3px solid rgba(79, 70, 229, 0.20);
    outline-offset: 2px;
}


/* =========================================================
   14. DARK MODE — FINAL REFINEMENT
   ========================================================= */

[data-theme="dark"] .profile-content>.dashboard-cards .card,
[data-theme="dark"] .profile-stat,
[data-theme="dark"] .info-card,
[data-theme="dark"] .password-card {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.20);
}

[data-theme="dark"] #profileCompletion {
    color: #a5b4fc;
}

[data-theme="dark"] #profileCompletionLabel {
    color: #94a3b8;
}

[data-theme="dark"] .notification-panel {
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.40),
        0 5px 15px rgba(0, 0, 0, 0.20);
}

[data-theme="dark"] .notification-search {
    background: #0f172a;
    border-color: #334155;
    color: #f8fafc;
}

[data-theme="dark"] .notification-item:hover {
    background: rgba(129, 140, 248, 0.08);
}

[data-theme="dark"] .notification-item small {
    color: #94a3b8;
}


/* =========================================================
   15. TABLET LAYOUT
   ========================================================= */

@media (max-width: 900px) {

    .profile-content>.dashboard-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-content>.dashboard-cards .card:last-child {
        grid-column: 1 / -1;
    }

    .profile-sidebar {
        position: relative;
    }

}


/* =========================================================
   16. MOBILE LAYOUT
   ========================================================= */

@media (max-width: 700px) {

    .profile-content>.dashboard-toolbar {
        justify-content: stretch;
    }

    .profile-content>.dashboard-toolbar .btn {
        flex: 1 1 140px;
    }

    .profile-content>.dashboard-cards {
        grid-template-columns: 1fr;
    }

    .profile-content>.dashboard-cards .card:last-child {
        grid-column: auto;
    }

    .password-card .profile-actions {
        justify-content: stretch;
    }

    .password-card .profile-actions .btn {
        width: 100%;
    }

    .notification-panel {
        width: calc(100vw - 1.5rem);
        max-height: calc(100vh - 1.5rem);
        border-radius: 15px;
    }

}


/* =========================================================
   17. SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .profile-content>.dashboard-toolbar {
        flex-direction: column;
    }

    .profile-content>.dashboard-toolbar .btn {
        width: 100%;
        flex: none;
    }

    .profile-stat .stat-number {
        font-size: 1.45rem;
    }

    #profileCompletion {
        font-size: 1.75rem;
    }

    .notification-panel {
        width: calc(100vw - 1rem);
    }

}


/* =========================================================
   18. REDUCED MOTION ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .profile-sidebar,
    .profile-avatar,
    .profile-stat,
    .info-card,
    .profile-content>.dashboard-cards .card,
    .profile-actions .btn,
    .notification-item,
    .notification-header button {
        transition: none;
    }

    .profile-sidebar:hover,
    .profile-avatar:hover,
    .profile-stat:hover,
    .info-card:hover,
    .profile-content>.dashboard-cards .card:hover,
    .profile-actions .btn:hover {
        transform: none;
    }
}



/* =========================================================
   PROFILE CSS — PART 4
   Advanced Layout Polish & Professional UX
   Student Performance Analytics Portal
   ========================================================= */


/* =========================================================
   1. PROFILE PAGE MAIN CONTAINER
   ========================================================= */

.profile-container {
    width: min(1200px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1rem 0 3rem;
}

.profile-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}


/* =========================================================
   2. STICKY PROFILE SIDEBAR
   ========================================================= */

.profile-sidebar {
    position: sticky;
    top: 1.5rem;
    z-index: 5;
}


/* =========================================================
   3. PROFILE AVATAR STATUS RING
   ========================================================= */

.profile-avatar {
    isolation: isolate;
}

.profile-avatar::before {
    content: "";
    position: absolute;
    inset: -7px;
    z-index: -1;
    border-radius: 50%;
    border: 1px solid rgba(99, 102, 241, 0.25);
    opacity: 0;
    transform: scale(0.92);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.profile-avatar:hover::before {
    opacity: 1;
    transform: scale(1);
}


/* =========================================================
   4. PROFILE SIDEBAR DETAILS
   ========================================================= */

.profile-sidebar .profile-role {
    line-height: 1.5;
}

.profile-sidebar .profile-status {
    user-select: none;
}


/* =========================================================
   5. IMAGE ACTION BUTTONS
   ========================================================= */

.profile-image-actions {
    position: relative;
}

.profile-image-actions .btn {
    min-height: 44px;
    font-size: 0.86rem;
    font-weight: 600;
}

.profile-image-actions label.btn {
    user-select: none;
}

.profile-image-actions label.btn:hover {
    cursor: pointer;
}


/* =========================================================
   6. PROFILE CONTENT PANELS
   ========================================================= */

.profile-content {
    width: 100%;
}

.profile-content>.profile-form,
.profile-content>.password-card,
.profile-content>.account-info,
.profile-content>.profile-stats {
    width: 100%;
    box-sizing: border-box;
}


/* =========================================================
   7. FORM FIELD VISUAL HIERARCHY
   ========================================================= */

.profile-form>div {
    position: relative;
}

.profile-form input,
.profile-form select,
.profile-form textarea {
    min-height: 45px;
}

.profile-form textarea {
    line-height: 1.55;
}


/* Date input */

.profile-form input[type="date"] {
    min-height: 45px;
    cursor: pointer;
}


/* Select */

.profile-form select {
    cursor: pointer;
}


/* =========================================================
   8. FORM HOVER STATES
   ========================================================= */

.profile-form input:hover,
.profile-form select:hover,
.profile-form textarea:hover {
    border-color: #a5b4fc;
}


/* =========================================================
   9. SAVE ACTION EMPHASIS
   ========================================================= */

#profileForm .profile-actions .btn[type="submit"] {
    background: #312e81;
    color: #ffffff;
    border-color: #312e81;
}

#profileForm .profile-actions .btn[type="submit"]:hover {
    background: #3730a3;
    box-shadow: 0 8px 18px rgba(49, 46, 129, 0.20);
}


/* =========================================================
   10. RESET BUTTON
   ========================================================= */

#profileForm .profile-actions .btn[type="reset"] {
    background: transparent;
    color: var(--text-color, #374151);
    border: 1px solid var(--border-color, #d1d5db);
}

#profileForm .profile-actions .btn[type="reset"]:hover {
    background: rgba(107, 114, 128, 0.07);
}


/* =========================================================
   11. EXPORT BUTTON
   ========================================================= */

#exportProfileBtn {
    background: rgba(79, 70, 229, 0.08);
    color: #4338ca;
    border: 1px solid rgba(79, 70, 229, 0.20);
}

#exportProfileBtn:hover {
    background: rgba(79, 70, 229, 0.14);
}


/* =========================================================
   12. PASSWORD SECTION FIELD GRID
   ========================================================= */

.password-card .profile-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.password-card .profile-form>div {
    min-width: 0;
}


/* =========================================================
   13. PASSWORD ACTION
   ========================================================= */

#updatePasswordBtn {
    background: #312e81;
    color: #ffffff;
    border-color: #312e81;
}

#updatePasswordBtn:hover {
    background: #3730a3;
    box-shadow: 0 8px 18px rgba(49, 46, 129, 0.18);
}


/* =========================================================
   14. ACCOUNT INFORMATION VISUAL ACCENTS
   ========================================================= */

.info-card:nth-child(1)::after {
    content: "ID";
}

.info-card:nth-child(2)::after {
    content: "DEPT";
}

.info-card:nth-child(3)::after {
    content: "STATUS";
}

.info-card:nth-child(4)::after {
    content: "ACCOUNT";
}

.info-card::after {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    padding: 0.18rem 0.4rem;
    border-radius: 5px;
    background: rgba(79, 70, 229, 0.07);
    color: #6366f1;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}


/* =========================================================
   15. PROFILE STATISTICS — NUMBER EMPHASIS
   ========================================================= */

.profile-stat {
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.profile-stat .stat-number {
    line-height: 1.1;
}


/* =========================================================
   16. STATISTIC VALUE COLORS
   ========================================================= */

#totalCourses {
    color: #312e81;
}

#averageGPA {
    color: #4f46e5;
}

#attendanceRate {
    color: #059669;
}


/* =========================================================
   17. EXTRA DASHBOARD CARDS
   ========================================================= */

.profile-content>.dashboard-cards .card {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.profile-content>.dashboard-cards .card h2 {
    margin: 0.25rem 0 0;
}

.profile-content>.dashboard-cards .card h3 {
    margin: 0;
}


/* =========================================================
   18. NOTIFICATION PANEL POLISH
   ========================================================= */

.notification-panel {
    animation: profileNotificationIn 0.22s ease;
}

@keyframes profileNotificationIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }

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


/* =========================================================
   19. NOTIFICATION EMPTY STATE
   ========================================================= */

#notificationList:empty::before {
    content: "No notifications available.";
    display: block;
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted, #6b7280);
    font-size: 0.85rem;
}


/* =========================================================
   20. NOTIFICATION SCROLLBAR
   ========================================================= */

#notificationList::-webkit-scrollbar {
    width: 6px;
}

#notificationList::-webkit-scrollbar-track {
    background: transparent;
}

#notificationList::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.35);
    border-radius: 999px;
}

#notificationList::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.55);
}


/* =========================================================
   21. PROFILE PAGE SELECTION
   ========================================================= */

.profile-content ::selection,
.profile-sidebar ::selection {
    background: rgba(99, 102, 241, 0.20);
}


/* =========================================================
   22. DARK MODE
   ========================================================= */

[data-theme="dark"] .profile-sidebar {
    background: #111827;
    border-color: #263244;
}

[data-theme="dark"] .profile-form {
    background: #111827;
    border-color: #263244;
}

[data-theme="dark"] .password-card {
    background: #111827;
    border-color: #263244;
}

[data-theme="dark"] .profile-form input:hover,
[data-theme="dark"] .profile-form select:hover,
[data-theme="dark"] .profile-form textarea:hover {
    border-color: #6366f1;
}

[data-theme="dark"] #profileForm .profile-actions .btn[type="reset"] {
    color: #e5e7eb;
    border-color: #475569;
}

[data-theme="dark"] #profileForm .profile-actions .btn[type="reset"]:hover {
    background: rgba(148, 163, 184, 0.08);
}

[data-theme="dark"] #exportProfileBtn {
    background: rgba(129, 140, 248, 0.10);
    color: #a5b4fc;
    border-color: rgba(129, 140, 248, 0.25);
}

[data-theme="dark"] .info-card::after {
    background: rgba(129, 140, 248, 0.10);
    color: #a5b4fc;
}

[data-theme="dark"] #totalCourses {
    color: #a5b4fc;
}

[data-theme="dark"] #averageGPA {
    color: #818cf8;
}

[data-theme="dark"] #attendanceRate {
    color: #34d399;
}


/* =========================================================
   23. TABLET
   ========================================================= */

@media (max-width: 900px) {

    .profile-grid {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 1.25rem;
    }

    .profile-sidebar {
        top: 1rem;
    }

    .profile-avatar {
        width: 125px;
        height: 125px;
    }

    .account-info {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* =========================================================
   24. MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .profile-container {
        width: min(100% - 1.25rem, 600px);
        padding-bottom: 2rem;
    }

    .profile-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .profile-sidebar {
        position: relative;
        top: auto;
    }

    .profile-avatar {
        width: 135px;
        height: 135px;
    }

    .profile-image-actions {
        max-width: 300px;
    }

    .password-card .profile-form {
        grid-template-columns: 1fr;
    }

    .account-info {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   25. SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .profile-container {
        width: calc(100% - 1rem);
    }

    .profile-sidebar {
        padding: 1.25rem 1rem;
        border-radius: 16px;
    }

    .profile-avatar {
        width: 115px;
        height: 115px;
    }

    .profile-sidebar #userName {
        font-size: 1.05rem;
    }

    .profile-image-actions {
        max-width: 100%;
    }

    .profile-form {
        gap: 0.9rem;
    }

    .profile-form input,
    .profile-form select,
    .profile-form textarea {
        font-size: 0.9rem;
    }

    .profile-stat {
        min-height: 95px;
    }

}


/* =========================================================
   26. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .notification-panel {
        animation: none;
    }

    .profile-avatar::before {
        transition: none;
    }

}





/* =========================================
   PROFILE PAGE HEADER
   ========================================= */

/* .profile-page-header {
    text-align: center;
}

.profile-page-header h1,
.profile-page-header p {
    text-align: center;
} */

/* =========================================
   PROFILE HEADER SUBTITLE FIX
   ========================================= */

/* .profile-page-header p {
    width: 100%;
    max-width: none;
    margin: 12px 0 0;
    text-align: center;
} */








/* =========================================
   PROFILE HEADER
   ========================================= */

/*==================================================
    PROFILE PAGE HEADER
==================================================*/

/* .profile-page-header {
    width: 100%;
    text-align: center;

    padding: 45px 30px 35px;
    margin: 0 auto 30px;

    border-radius: 0 0 20px 20px;

    background:
        linear-gradient(135deg,
            rgba(49, 46, 129, 0.10),
            rgba(99, 102, 241, 0.06));

    border-bottom: 1px solid rgba(79, 70, 229, 0.12);

    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease;
}

.profile-page-header h1 {
    margin: 0;
    text-align: center;
}

.profile-page-header p {
    margin: 10px auto 0;
    width: 100%;
    text-align: center;
} */



/* =========================================================
   PROFILE HEADER — DARK MODE
   ========================================================= */

[data-theme="dark"] .profile-page-header {
    background:
        radial-gradient(circle at 0% 100%,
            rgba(129, 140, 248, 0.14) 0,
            rgba(129, 140, 248, 0.14) 115px,
            transparent 116px),
        radial-gradient(circle at 100% 0%,
            rgba(129, 140, 248, 0.14) 0,
            rgba(129, 140, 248, 0.14) 150px,
            transparent 151px),
        linear-gradient(135deg,
            #1e1b4b 0%,
            #312e81 55%,
            #3730a3 100%);

    box-shadow:
        0 20px 45px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .profile-page-header h1 {
    color: #ffffff;
}

[data-theme="dark"] .profile-page-header p {
    color: rgba(255, 255, 255, 0.78);
}





/* =========================================================
   PROFILE PAGE HEADER
   Same design as Student Dashboard Header
   ========================================================= */

.profile-page-header {
    position: relative;

    width: calc(100% - 40px);
    max-width: 1250px;

    margin: 24px auto 35px;

    padding: 48px 30px;

    text-align: center;

    background:
        radial-gradient(circle at 0% 100%,
            rgba(255, 255, 255, 0.10) 0,
            rgba(255, 255, 255, 0.10) 115px,
            transparent 116px),
        radial-gradient(circle at 100% 0%,
            rgba(255, 255, 255, 0.10) 0,
            rgba(255, 255, 255, 0.10) 150px,
            transparent 151px),
        linear-gradient(135deg,
            #312e81 0%,
            #4f46b5 55%,
            #5b50d6 100%);

    border-radius: 24px;

    box-shadow:
        0 20px 45px rgba(49, 46, 129, 0.18);

    overflow: hidden;
}

/* Profile Header Title */

.profile-page-header h1 {
    position: relative;
    z-index: 2;

    margin: 0 0 14px;

    text-align: center;

    font-size: clamp(2rem, 4vw, 3rem);

    font-weight: 700;

    line-height: 1.15;

    color: #ffffff;
}

/* Profile Header Subtitle */

.profile-page-header p {
    position: relative;
    z-index: 2;

    margin: 0 auto;

    max-width: 800px;

    text-align: center;

    font-size: 1.05rem;

    line-height: 1.7;

    font-weight: 400;

    color: rgba(255, 255, 255, 0.82);
}