@import './base.css?v=20260721c';
@import "./components/gradbtn.css?v=20260721c";
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    /* Logical, not physical: the sidebar slides in from the reading-start
       side (right in RTL, left in LTR) so a page's dir -- which now varies
       per teacher instead of being permanently "rtl" -- decides the side,
       not a hardcoded `right`. A physical `right`/`border-left` always slid
       in (and bordered) the same screen edge regardless of dir, which put
       the panel on the opposite side from the hamburger button in English. */
    position: fixed;
    inset-inline-start: calc(-1 * var(--sidebar-width));
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--primary-color);
    border-inline-end: 2px solid var(--accent-color);
    padding: 1.5rem;
    transition: inset-inline-start 0.4s ease;
    z-index: 999;
    overflow-y: auto;
}

.sidebar.active {
    inset-inline-start: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--dark-gray);
}

.sidebar-header h2 {
    color: var(--accent-color);
    font-weight: 700;
}

.close-sidebar {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-sidebar:hover {
    color: var(--secondary-color);
}

.profile-sidebar {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-sidebar .profile-pic {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid var(--accent-color);
}

.profile-sidebar .profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-sidebar #sidebarStudentName,
.profile-sidebar #sidebarTeacherName {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.profile-sidebar #sidebarStudentGrade,
.profile-sidebar #sidebarTeacherSubject {
    font-size: 0.9rem;
    color: #555;
}

.sidebar-menu {
    list-style: none;
    margin-bottom: 2rem;
}

.sidebar-menu li {
    margin-bottom: 0.8rem;
}

.sidebar-menu a {
    color: var(--accent-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
    font-weight: 500;
}

.sidebar-menu a i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.sidebar-menu a:hover,
.sidebar-menu a.active-link {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    transform: translateX(-5px);
}

.logout-button-sidebar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    width: 100%;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

.logout-button-sidebar:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.header {
    background: var(--primary-color);
    height: 70px;
    padding: 0 2rem;
    border-bottom: 2px solid var(--accent-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 900;
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.menu-toggle:hover {
    color: var(--secondary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

.theme-toggle:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}

.header-icon-btn {
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color, #333);
    font-size: 1.2rem;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
    text-decoration: none;
}

.header-icon-btn:hover {
    background: var(--hover-bg, rgba(0, 0, 0, 0.1));
    transform: scale(1.1);
    color: var(--accent-color);
}

/* ============================================
   LIVE CLASS NOW BANNER
   ============================================ */

.live-now-banner {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 15px;
    background: linear-gradient(135deg, #e53935 0%, #b71c1c 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(229, 57, 53, 0.35);
    animation: liveBannerIn 0.4s ease;
}

@keyframes liveBannerIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.live-now-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

.live-now-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    animation: liveDotPulse 1.4s ease-in-out infinite;
}

@keyframes liveDotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.75); }
}

.live-now-info {
    flex: 1;
    min-width: 0;
}

.live-now-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-now-subtitle {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
}

.live-now-join-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 0.7rem 1.3rem;
    background: #fff;
    color: #b71c1c;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.live-now-join-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 600px) {
    .live-now-banner {
        flex-wrap: wrap;
    }

    .live-now-join-btn {
        width: 100%;
        justify-content: center;
    }
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#userNameText {
    font-weight: 500;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.2rem;
    overflow: hidden;
    border: 2px solid var(--accent-color);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-content {
    padding: 0 2rem 2rem 2rem;
}

.profile-header-section {
    background-color: var(--white);
    border-radius: 15px;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.welcome-cover-container {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
}

.welcome-content {
    z-index: 2;
}

.welcome-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.welcome-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.profile-details-area {
    display: flex;
    align-items: flex-end;
    padding: 0 2rem 1.5rem 2rem;
    margin-top: -80px;
    position: relative;
    z-index: 2;
}

.profile-picture-large-container {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 5px solid var(--primary-color);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-left: 1.5rem;
    background-color: var(--secondary-color);
    position: relative;
}

.profile-picture-large-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.edit-profile-pic-button {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    transition: background-color 0.3s, border-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.3s, opacity 0.3s, filter 0.3s;
}

.profile-picture-large-container:hover .edit-profile-pic-button {
    opacity: 1;
}

.hidden-file-input {
    display: none;
}

.profile-name-large-container {
    background-color: var(--white);
    backdrop-filter: blur(4px);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    position: relative;
}

#userProfileNameLarge {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-color);
    margin-bottom: 0.25rem;
}

#userProfileGradeLarge {
    font-size: 1.1rem;
    color: var(--accent-color);
    opacity: 0.8;
}

#userBiography {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--accent-color);
    max-width: 400px;
}

.edit-profile-btn {
    position: absolute;
    top: -15px;
    /* moves button above the container */
    left: -15px;
    background: var(--accent-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

.edit-profile-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

/* Profile Edit Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.profile-edit-modal,
.announcement-modal
{
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal-overlay.active .profile-edit-modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
}

.modal-header h2 {
    color: var(--accent-color);
    font-weight: 700;
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

.close-modal-btn:hover {
    background: var(--light-gray);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--dark-gray);
    border-radius: 8px;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: var(--white);
    color: var(--accent-color);
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

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

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-save {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    font-weight: 600;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

.btn-save:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.btn-cancel {
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    padding: 0.8rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    font-weight: 600;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

.btn-cancel:hover {
    background: var(--accent-color);
    color: var(--white);
}

/* Instructions Bar */
.instructions-section {
    background: var(--white);
    border-radius: 15px;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.instructions-header {
    background: var(--info-color);
    color: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.instructions-toggle {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.instructions-toggle.rotated {
    transform: rotate(180deg);
}

.instructions-content {
    padding: 2rem;
    display: block;
}

.instructions-content.hidden {
    display: none;
}

.instruction-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--light-gray);
    border-radius: 8px;
}

.instruction-icon {
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.dashboard-card {
    background-color: var(--primary-color);
    border: 1px solid var(--dark-gray);
    border-radius: 15px;
    padding: 1.8rem;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.dashboard-card:hover {
    transform: translateY(-8px);
    border-color: var(--secondary-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-color);
}

.card-icon {
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.8rem;
    transition: transform 0.3s ease;
}

.dashboard-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.stats {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.stats-description {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 1.5rem;
}

.action-button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--btn-bg);
    color: var(--btn-text, var(--primary-color));
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
    text-align: center;
    border: none;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
}

.action-button:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

/* Performance card special styling */
.performance-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.metric-item {
    text-align: center;
    padding: 1rem;
    background: var(--light-gray);
    border-radius: 8px;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.metric-label {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-top: 0.5rem;
}

/* Teacher List Styling */
.teacher-list {
    max-height: 200px;
    overflow-y: auto;
}

.teacher-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    margin-bottom: 0.8rem;
    background: var(--light-gray);
    border-radius: 8px;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

.teacher-item:hover {
    background: var(--secondary-color);
    color: var(--white);
}

.teacher-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    overflow: hidden;
}

.teacher-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-info h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.teacher-info span {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Recent Items Styling */
.recent-list {
    max-height: 200px;
    overflow-y: auto;
}

.recent-item {
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--light-gray);
    border-radius: 8px;
    border-right: 4px solid var(--secondary-color);
}

.recent-item h4 {
    font-size: 1rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.recent-item p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.recent-item .date {
    font-size: 0.8rem;
    color: var(--secondary-color);
    font-weight: 500;
}

@media (min-width: 993px) {

    body.sidebar-push .header,
    body.sidebar-push .main-content {
        margin-inline-start: var(--sidebar-width);
    }
}

@media (max-width: 992px) {
    .header {
        padding: 0 1rem;
    }

    .main-content {
        padding: 1.5rem;
    }

    .welcome-cover-container {
        height: 200px;
    }

    .welcome-content h1 {
        font-size: 2rem;
    }

    .profile-details-area {
        flex-direction: column;
        align-items: center;
        margin-top: -60px;
        text-align: center;
        padding: 0 1rem 1.5rem;
    }

    .profile-picture-large-container {
        width: 120px;
        height: 120px;
        margin: 0 0 1rem 0;
    }

    #userProfileNameLarge {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .sidebar {
        width: 100%;
        inset-inline-start: -100%;
    }

    .user-info #userNameText {
        display: none;
    }

    .welcome-content h1 {
        font-size: 1.8rem;
    }

    .performance-metrics {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem;
    }

    .dashboard-card {
        padding: 1.5rem;
    }

    .welcome-cover-container {
        height: 160px;
    }

    .welcome-content h1 {
        font-size: 1.5rem;
    }

    .profile-picture-large-container {
        width: 100px;
        height: 100px;
    }

    .profile-details-area {
        margin-top: -50px;
    }

    #userProfileNameLarge {
        font-size: 1.4rem;
    }

    .instructions-section {
        padding: 1rem;
    }
}


/* Container for all alerts */
#alert-container {
    position: fixed;
    /* Stays in place when scrolling */
    top: 20px;
    /* Distance from the top */
    right: 20px;
    /* Distance from the right */
    z-index: 1000;
    /* Ensures it's on top of other elements */
    max-width: 350px;
    /* Limits the width of the alert box */
}

/* Base style for an individual alert */
.alert {
    padding: 15px 20px;
    margin-bottom: 10px;
    /* Space between multiple alerts */
    border-radius: 6px;
    font-family: Arial, sans-serif;
    font-size: 16px;
    color: #fff;
    /* White text */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    /* Soft shadow */
    opacity: 1;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    /* For fading/moving out */
}

/* Style for a SUCCESS alert */
.alert.success {
    background-color: #4CAF50;
    /* Green */
    border-left: 5px solid #388E3C;
}

/* Style for an ERROR alert */
.alert.error {
    background-color: #F44336;
    /* Red */
    border-left: 5px solid #D32F2F;
}

/* Style for when the alert is being hidden (optional, for a slide-out effect) */
.alert.hide {
    opacity: 0;
    transform: translateX(100%);
    /* Moves it off-screen to the right */
}

.alert.info {
    background-color: #2196F3;
    /* Blue */
    border-left: 5px solid #0D47A1;
}








/* ////////////////// */


/* Personal Details Section */
.personal-details-section {
    background: var(--white);
    border-radius: 15px;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 2rem;
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
}

.details-title {
    font-size: 1.5rem;
    color: var(--accent-color);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.edit-details-btn {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

.edit-details-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light-gray);
    border-radius: 10px;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

.detail-item:hover {
    transform: translateY(-2px);
}

.detail-icon {
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.1rem;
}

.detail-content {
    flex: 1;
}

.detail-label {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.detail-value {
    color: var(--dark-gray);
    font-size: 1rem;
}

.privacy-indicator {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--dark-gray);
    cursor: pointer;
}

.privacy-public {
    color: var(--secondary-color);
}

.privacy-private {
    color: var(--accent-color);
}

.privacy-limited {
    color: var(--warning-color);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.dashboard-card {
    background-color: var(--primary-color);
    border: 1px solid var(--dark-gray);
    border-radius: 15px;
    padding: 1.8rem;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.dashboard-card:hover {
    transform: translateY(-8px);
    border-color: var(--secondary-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-color);
}

.card-icon {
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.8rem;
    transition: transform 0.3s ease;
}

.dashboard-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.stats {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.stats-description {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 1.5rem;
}

.action-button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--btn-bg);
    color: var(--btn-text, var(--primary-color));
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
    text-align: center;
}

.action-button:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

/* Teacher Code Card Styles */
.teacher-code-card {
    background: linear-gradient(135deg, var(--white) 0%, var(--light-gray) 100%);
    border: 2px solid var(--secondary-color);
}

.teacher-code-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 15px 30px rgba(170, 198, 93, 0.2);
}

.teacher-code-container {
    text-align: center;
}

.code-display {
    background: var(--white);
    border: 2px dashed var(--secondary-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

.code-display:hover {
    border-color: var(--accent-color);
    background: var(--light-gray);
}

.code-text {
    font-family: 'Courier New', monospace;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent-color);
    letter-spacing: 2px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.copy-code-btn {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 0.8rem;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
    font-size: 1.1rem;
}

.copy-code-btn:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

.code-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.code-info {
    margin: 1rem 0;
    text-align: center;
}

.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid #28a745;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.info-badge i {
    font-size: 1rem;
}

.code-actions .action-button {
    flex: 1;
    min-width: 150px;
    font-size: 0.9rem;
    padding: 0.7rem 1rem;
}

/* Toast Notifications */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

/* Responsive Design for Teacher Code */
@media (max-width: 768px) {
    .code-display {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .code-text {
        font-size: 1.4rem;
        letter-spacing: 1px;
    }

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

    .code-actions .action-button {
        min-width: auto;
        width: 100%;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light-gray);
}

.modal-title {
    font-size: 1.5rem;
    color: var(--accent-color);
    font-weight: 700;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-gray);
    cursor: pointer;
    padding: 0.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Student targeting styles */
.students-search-container {
    position: relative;
    margin-bottom: 1rem;
}

.students-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    background: var(--input-bg, #fff);
    margin-top: 0.5rem;
    display: none;
}

.students-list.show {
    display: block;
}

.student-item {
    padding: 0.8rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.student-item:hover {
    background-color: #f5f5f5;
}

.student-item:last-child {
    border-bottom: none;
}

.student-info {
    display: flex;
    flex-direction: column;
}

.student-name {
    font-weight: 600;
    color: var(--text-color, #333);
}

.student-grade {
    font-size: 0.85rem;
    color: var(--text-muted, #666);
}

.selected-students {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    min-height: 60px;
}

.selected-students:empty::before {
    content: "لم يتم اختيار أي طلاب بعد";
    color: #6c757d;
    font-style: italic;
}

.selected-student-tag {
    display: inline-flex;
    align-items: center;
    background: var(--primary-color, #007bff);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    margin: 0.25rem;
    font-size: 0.85rem;
}

.selected-student-tag .remove-student {
    margin-left: 0.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    line-height: 1;
}

.selected-student-tag .remove-student:hover {
    opacity: 0.7;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--accent-color);
}

.form-input,
.form-select,
.form-textarea {
    padding: 0.8rem;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.privacy-selector {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.privacy-option {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.privacy-option input[type="radio"] {
    margin: 0;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

.btn-primary {
    background: var(--btn-bg);
    color: var(--btn-text, var(--white));
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--accent-color);
}

.btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

@media (min-width: 993px) {

    body.sidebar-push .header,
    body.sidebar-push .main-content {
        margin-inline-start: var(--sidebar-width);
    }
}

@media (max-width: 992px) {
    .header {
        padding: 0 1rem;
    }

    .main-content {
        padding: 1.5rem;
    }

    .welcome-cover-container {
        height: 200px;
    }

    .welcome-content h1 {
        font-size: 2rem;
    }

    .profile-details-area {
        flex-direction: column;
        align-items: center;
        margin-top: -60px;
        text-align: center;
        padding: 0 1rem 1.5rem;
    }

    .profile-picture-large-container {
        width: 120px;
        height: 120px;
        margin: 0 0 1rem 0;
    }

    #userProfileNameLarge {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .sidebar {
        width: 100%;
        inset-inline-start: -100%;
    }

    .user-info #userNameText {
        display: none;
    }

    .welcome-content h1 {
        font-size: 1.8rem;
    }

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

@media (max-width: 480px) {
    .main-content {
        padding: 1rem;
    }

    .dashboard-card {
        padding: 1.5rem;
    }

    .welcome-cover-container {
        height: 160px;
    }

    .welcome-content h1 {
        font-size: 1.5rem;
    }

    .profile-picture-large-container {
        width: 100px;
        height: 100px;
    }

    .profile-details-area {
        margin-top: -50px;
    }

    #userProfileNameLarge {
        font-size: 1.4rem;
    }

    .personal-details-section {
        padding: 1rem;
    }
}


.requests-container {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin: 2rem;
}

.requests-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.requests-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.requests-table {
    width: 100%;
    border-collapse: collapse;
}

.requests-table th,
.requests-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--light-gray);
}

.requests-table th {
    background: var(--secondary-color);
    color: var(--primary-color);
    font-weight: 700;
}

.requests-table tr:hover {
    background-color: var(--light-gray);
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
}

.status-pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid #ffc107;
}

.status-approved {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid #28a745;
}

.status-rejected {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid #dc3545;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
    font-size: 0.9rem;
}

.approve-btn {
    background: #28a745;
}

.approve-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.reject-btn {
    background: #dc3545;
}

.reject-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}


.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-btn {
    background: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}


.requests-container {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin: 2rem;
}

.requests-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.requests-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.requests-table {
    width: 100%;
    border-collapse: collapse;
}

.requests-table th,
.requests-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--light-gray);
}

.requests-table th {
    background: var(--secondary-color);
    color: var(--primary-color);
    font-weight: 700;
}

.requests-table tr:hover {
    background-color: var(--light-gray);
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
}

.status-pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid #ffc107;
}

.status-approved {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid #28a745;
}

.status-rejected {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid #dc3545;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
    font-size: 0.9rem;
}

.approve-btn {
    background: #28a745;
}

.approve-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.reject-btn {
    background: #dc3545;
}

.reject-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.no-requests {
    text-align: center;
    color: var(--dark-gray);
    padding: 2rem;
    font-size: 1.2rem;
    font-style: italic;
}
/**/
/**/
/* ============================================
   FIX: Mobile Layout Issues Under 440px
   ============================================ */

/* Prevent horizontal scroll and layout overflow */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Ensure sidebar stays hidden on all screen sizes until activated */
@media (max-width: 440px) {
    /* Force sidebar to stay hidden */
    .sidebar {
        /* No transform here: translateX(100%) is a physical rightward shift
           and would fight inset-inline-start in dir="ltr" instead of mirroring
           it, so the off-screen position comes from inset-inline-start alone. */
        width: 100%;
        inset-inline-start: -100%;
        visibility: hidden;
    }

    /* Only show when active class is added */
    .sidebar.active {
        inset-inline-start: 0;
        visibility: visible;
    }

    /* Hide overlay by default */
    .sidebar-overlay {
        display: none;
    }

    .sidebar-overlay.active {
        display: block;
    }

    /* Fix main content overflow */
    .main-content {
        padding: 0.75rem;
        overflow-x: hidden;
        width: 100%;
        box-sizing: border-box;
    }

    /* Fix header overflow */
    .header {
        padding: 0 0.75rem;
        width: 100%;
        box-sizing: border-box;
    }

    /* Fix requests container overflow */
    .requests-container {
        margin: 1rem 0.5rem;
        padding: 1rem;
        overflow-x: auto;
    }

    /* Make table scrollable horizontally */
    .requests-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Fix profile section */
    .profile-header-section {
        border-radius: 10px;
        margin-bottom: 1.5rem;
    }

    .profile-details-area {
        padding: 0 0.5rem 1rem;
    }

    .profile-name-large-container {
        padding: 0.5rem 1rem;
    }

    /* Fix personal details section */
    .personal-details-section {
        padding: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .details-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .detail-item {
        padding: 0.75rem;
    }

    /* Fix dashboard cards */
    .dashboard-card {
        padding: 1rem;
    }

    .card-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .stats {
        font-size: 1.8rem;
    }

    /* Fix code display */
    .code-text {
        font-size: 1.2rem;
        word-break: break-all;
        white-space: normal;
    }

    /* Fix modal on small screens */
    .modal-content,
    .profile-edit-modal,
    .announcement-modal {
        width: 95%;
        padding: 1rem;
        margin: 0.5rem;
    }

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

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

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

    /* Fix action buttons */
    .action-button {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    /* Fix user info in header */
    .user-info {
        gap: 0.5rem;
    }

    .user-avatar {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    /* Fix instructions section */
    .instructions-section {
        margin-bottom: 1.5rem;
    }

    .instructions-header {
        padding: 0.75rem 1rem;
    }

    .instructions-content {
        padding: 1rem;
    }

    .instruction-item {
        flex-direction: column;
        text-align: center;
        padding: 0.75rem;
    }
}

/* Extra small devices (under 360px) */
@media (max-width: 360px) {
    .sidebar {
        inset-inline-start: -100%;
        width: 100%;
        padding: 1rem;
    }

    .sidebar.active {
        inset-inline-start: 0;
    }

    .welcome-content h1 {
        font-size: 1.3rem;
    }

    .welcome-content p {
        font-size: 1rem;
    }

    .profile-picture-large-container {
        width: 80px;
        height: 80px;
    }

    #userProfileNameLarge {
        font-size: 1.2rem;
    }

    .details-title,
    .requests-title,
    .page-title {
        font-size: 1.3rem;
    }

    .card-title {
        font-size: 1.2rem;
    }
}

/* Ensure all fixed/absolute elements don't cause overflow */
.sidebar,
.sidebar-overlay,
.modal-overlay,
.modal,
#alert-container {
    max-width: 100vw;
}

/**/
/**/

/* ==========================================
   COVER IMAGE STYLES
   ========================================== */

.welcome-cover-container {
    position: relative;
    min-height: 200px;
    max-height: 300px;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--secondary-color, #667eea), var(--accent-color, #764ba2));
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

.welcome-cover-container .cover-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.welcome-cover-container .cover-overlay {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.15);
    transition: background 0.3s ease;
}

.welcome-cover-container.has-cover .cover-overlay {
    background: rgba(0, 0, 0, 0.4);
}

.welcome-cover-container .cover-actions {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cover-edit-btn,
.cover-remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
    backdrop-filter: blur(10px);
}

.cover-edit-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

.cover-edit-btn:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cover-remove-btn {
    background: rgba(220, 53, 69, 0.9);
    color: #fff;
    /* Icon-only, so it's given an equal square footprint (same height as
       cover-edit-btn, width matching it) rather than shrinking to the
       icon's own width -- next to the wider text+icon pill, a bare icon at
       its natural width read as mismatched/misaligned. */
    width: 36px;
    padding: 0;
}

.cover-remove-btn:hover {
    background: rgba(220, 53, 69, 1);
    transform: translateY(-2px);
}

/* ==========================================
   REQUESTS BADGE IN HEADER
   ========================================== */

.requests-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.requests-bell {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    color: var(--text-color, #333);
    font-size: 1.2rem;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.requests-bell:hover {
    background: var(--hover-bg, rgba(0, 0, 0, 0.05));
    color: var(--accent-color, #667eea);
}

.requests-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-color, #fff);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

.requests-badge.hidden {
    display: none;
}

.requests-badge.has-requests {
    animation: requestPulse 2s infinite;
}

@keyframes requestPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* ==========================================
   CARD IMAGE STYLES
   ========================================== */

.dashboard-card {
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

.dashboard-card.has-card-image {
    cursor: pointer;
}

.dashboard-card.has-card-image:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-image-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.card-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.dashboard-card.has-card-image:hover .card-bg-img {
    transform: scale(1.05);
}

.dashboard-card .card-body-content {
    position: relative;
    z-index: 1;
}

.dashboard-card.has-card-image .card-body-content {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(6px);
    border-radius: inherit;
    height: 100%;
    padding: inherit;
}

[data-theme="dark"] .dashboard-card.has-card-image .card-body-content {
    background: rgba(30, 30, 46, 0.88);
}

.card-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-edit-img-btn,
.card-remove-img-btn {
    background: none;
    border: 1px solid var(--border-color, #e0e0e0);
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 6px;
    color: var(--text-secondary, #888);
    font-size: 0.85rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.card-edit-img-btn:hover {
    background: var(--accent-color, #667eea);
    color: #fff;
    border-color: var(--accent-color, #667eea);
}

.card-remove-img-btn {
    color: #dc3545;
    border-color: #dc3545;
}

.card-remove-img-btn:hover {
    background: #dc3545;
    color: #fff;
}

.hidden-file-input {
    display: none !important;
}

/* ==========================================
   CARD HEADER LAYOUT FIX
   ========================================== */

.dashboard-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-card .card-header .card-title {
    flex: 1;
}

.welcome-cover-container.has-cover #welcomeContent {
    display: none;
}

.welcome-cover-container.has-cover .cover-overlay {
    background: transparent;
}

@media (max-width: 768px) {
    .cover-actions {
        top: 10px;
        bottom: auto;
        left: 10px;
        right: auto;
    }

    .cover-edit-btn span {
        display: none;
    }

    .cover-edit-btn,
    .cover-remove-btn {
        width: 38px;
        height: 38px;
        padding: 0;
        justify-content: center;
    }
}

.sidebar-teacher-code {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
}

.sidebar-teacher-code-label {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    opacity: 0.85;
}

.sidebar-teacher-code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    background: rgba(0,0,0,0.15);
}

#sidebarTeacherCodeText {
    font-family: monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

#sidebarCopyTeacherCodeBtn {
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
}



/**/
/**/

/* ==========================================================================
   1. Cover Container Zoom Effect (Large Screens)
   ========================================================================== */
@media (min-width: 1200px) {
    .welcome-cover-container {
        overflow: hidden; /* Ensures the zoomed image doesn't bleed out */
        position: relative;
    }

    .welcome-cover-container .cover-image {
        transition: transform 0.5s ease-in-out;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Zooms the cover image slightly when hovering over the container */
    .welcome-cover-container:hover .cover-image {
        transform: scale(1.04);
    }
}

/* ==========================================================================
   2. Dashboard Card Image Behavior Adjustment
   ========================================================================== */
.dashboard-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Base style for the image container inside the card */
.dashboard-card .card-image-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Sits behind the actions but in front of old content */
}

.dashboard-card .card-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* When the card receives an image: */
.dashboard-card.has-card-image .card-body-content {
    position: relative;
    height: 100%;
    min-height: 220px; /* Ensures consistent sizing */
    z-index: 2;
}

/* Hide the body content elements (text, links, stats, specific icons) */
.dashboard-card.has-card-image .card-content,
.dashboard-card.has-card-image .card-title,
.dashboard-card.has-card-image .card-icon {
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease;
}

/* Force Header Actions to remain completely visible and operational on top */
.dashboard-card.has-card-image .card-header {
    border-bottom: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    box-sizing: border-box;
    display: flex;
    justify-content: flex-end; /* Keeps the buttons aligned perfectly */
    z-index: 10;
}

.dashboard-card.has-card-image .card-header-actions {
    display: flex !important;
    gap: 0.5rem;
    pointer-events: auto !important; /* Ensures edit and remove clicks work */
}

/* Button style adjustments to guarantee visibility on dark or light images */
.dashboard-card.has-card-image .card-edit-img-btn,
.dashboard-card.has-card-image .card-remove-img-btn {
    background: rgba(255, 255, 255, 0.85);
    color: #333;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background 0.2s ease, color 0.2s ease;
}

.dashboard-card.has-card-image .card-edit-img-btn:hover {
    background: #fff;
    color: #007bff;
}

.dashboard-card.has-card-image .card-remove-img-btn {
    color: #dc3545;
}

.dashboard-card.has-card-image .card-remove-img-btn:hover {
    background: #dc3545;
    color: #fff;
}

/* Hide the card content entirely from layout flow when an image exists */
.dashboard-card.has-card-image .card-content {
    display: none !important;
}

/* Hide specific elements inside the header while preserving layout structure */
.dashboard-card.has-card-image .card-title,
.dashboard-card.has-card-image .card-icon {
    display: none !important;
}

/* Ensure the white background/blur overlay resets completely to transparent */
.dashboard-card.has-card-image,
.dashboard-card.has-card-image .card-body-content {
    background: transparent !important;
    background-color: transparent !important;
    backdrop-filter: none !important; /* Removes any unwanted blur effect if present */
    -webkit-backdrop-filter: none !important;
}

/* Keep the header container pinned cleanly over the background picture */
.dashboard-card.has-card-image .card-header {
    border-bottom: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    box-sizing: border-box;
    display: flex;
    justify-content: flex-end; /* Keeps control icons top-aligned to the corner */
    z-index: 10;
}

/* ==========================================
   HEADER RESPONSIVENESS FIX
   ========================================== */
@media (max-width: 768px) {
    .header {
        padding: 0 1rem;
    }
    .page-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .header-left {
        gap: 0.5rem;
    }
    .page-title {
        font-size: 1.1rem;
    }
    .back-btn {
        font-size: 0;
        padding: 0.5rem 0.6rem;
    }
    .back-btn i {
        font-size: 1.1rem;
        margin: 0;
    }
}
/* ===== إشعار تغيير المرحلة الدراسية (نافذة تعديل الملف الشخصي) ===== */
.phase-change-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    background: rgba(23, 162, 184, 0.12);
    border-right: 4px solid #17a2b8;
}

.phase-change-notice.pending {
    background: rgba(255, 193, 7, 0.14);
    border-right-color: #ffc107;
}

.phase-change-notice p {
    margin: 0.3rem 0 0;
    opacity: 0.9;
}

.phase-change-notice .btn-cancel {
    margin-top: 0.6rem;
    padding: 0.35rem 1rem;
    font-size: 0.82rem;
}
