/* Collapse sidebar */
#adminSidebar.collapsed {
    width: 70px !important;
    min-width: 70px !important;
    overflow: hidden;
}

/* Hide text blocks */
#adminSidebar.collapsed .sidebar-logo-text,
#adminSidebar.collapsed .sidebar-upcoming,
#adminSidebar.collapsed .sidebar-user-role,
#adminSidebar.collapsed .sidebar-user-email {
    display: none !important;
}

/* Make collapsed nav items true square icon buttons */
#adminSidebar.collapsed .sidebar-nav-item {
    position: relative;
    display: block !important;
    width: 40px;
    height: 40px;
    margin: 6px auto;
    padding: 0 !important;
    font-size: 0;
    line-height: 0;
    text-align: center;
    border-radius: 10px;
}

/* Center icon exactly */
#adminSidebar.collapsed .sidebar-nav-item::before {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    line-height: 1;
}

/* Icons */
#adminSidebar.collapsed .sidebar-nav-item[data-section="home"]::before { content: "⌂"; }
#adminSidebar.collapsed .sidebar-nav-item[data-section="candidates"]::before { content: "👥"; }
#adminSidebar.collapsed .sidebar-nav-item[data-section="calendar"]::before { content: "📅"; }
#adminSidebar.collapsed .sidebar-nav-item[data-section="materials"]::before { content: "▦"; }
#adminSidebar.collapsed .sidebar-nav-item[data-section="email"]::before { content: "✉"; }
#adminSidebar.collapsed .sidebar-nav-item[data-section="mentors"]::before { content: "🎓"; }
#adminSidebar.collapsed .sidebar-nav-item[data-section="settings"]::before { content: "⚙"; }

/* Active item */
#adminSidebar.collapsed .sidebar-nav-item.active {
    background: rgba(137, 237, 147, 0.12);
    color: #89ed93;
}

/* Logout button */
#adminSidebar.collapsed .sidebar-logout-btn {
    position: relative;
    display: block;
    width: 40px;
    height: 40px;
    margin: 8px auto 0;
    padding: 0 !important;
    font-size: 0;
    line-height: 0;
    border-radius: 10px;
}

#adminSidebar.collapsed .sidebar-logout-btn::before {
    content: "⎋";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    line-height: 1;
}
.sidebar-toggle-btn {
    border: none;
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
    background: rgba(255,255,255,0.12);
}

#adminSidebar.collapsed .sidebar-toggle-btn {
    transform: rotate(180deg);
}

#adminSidebar.collapsed .sidebar-nav-item {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    margin: 6px auto;
    width: 44px;
    height: 44px;
}
/* Add User shortcut inside sidebar */
.add-member-shortcut {
    margin-top: 10px;
    padding-top: 10px;
}

.btn-add-member {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;

    padding: 12px 14px;
    background: linear-gradient(180deg, rgba(137,237,147,0.16), rgba(137,237,147,0.08));
    color: #89ed93;

    border: 1px solid rgba(137,237,147,0.22);
    border-radius: 10px;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;

    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.btn-add-member:hover {
    background: linear-gradient(180deg, rgba(137,237,147,0.22), rgba(137,237,147,0.12));
    border-color: rgba(137,237,147,0.38);
    color: #c9ffd0;
    transform: translateY(-1px);
}

.btn-add-member:active {
    transform: translateY(0);
}

.btn-add-member-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 6px;
    background: rgba(137,237,147,0.14);
    border: 1px solid rgba(137,237,147,0.18);

    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
}

.btn-add-member-label {
    flex: 1;
    text-align: left;
    white-space: nowrap;
}

/* Collapsed sidebar version */
#adminSidebar.collapsed .add-member-shortcut {
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

#adminSidebar.collapsed .btn-add-member {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    border-radius: 10px;
}

#adminSidebar.collapsed .btn-add-member-label {
    display: none;
}

#adminSidebar.collapsed .btn-add-member-icon {
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    font-size: 18px;
}
.user-shortcuts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.btn-view-members {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.04);
    color: #d7d7d7;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-view-members:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(137,237,147,0.22);
    color: #fff;
}

.user-modal {
    max-width: 760px;
}

.user-modal .modal-body {
    padding: 22px 24px;
}

#userMgmtModalList .user-mgmt-list,
#userMgmtModalList.user-mgmt-list {
    margin-top: 0;
}

#adminSidebar.collapsed .user-shortcuts {
    align-items: center;
}

#adminSidebar.collapsed .btn-view-members,
#adminSidebar.collapsed .btn-add-member {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
}

#adminSidebar.collapsed .btn-view-members .btn-add-member-label,
#adminSidebar.collapsed .btn-add-member .btn-add-member-label {
    display: none;
}
 .user-mgmt-wrap {
     margin: 0 auto;
    padding: 20px 24px 36px;
}

.user-mgmt-topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 16px;
    margin-bottom: 18px;
}

.user-mgmt-heading h3 {
    margin: 0;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.1;
}

.user-mgmt-heading p {
    margin: 6px 0 0;
    color: rgba(255,255,255,0.62);
    font-size: 0.92rem;
}

.btn-users-add {
    height: 44px;
    padding: 0 18px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #89ed93, #6fdb7d);
    color: #08140b;
    font-size: 0.92rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(137,237,147,0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    align-self: center;
}

.btn-users-add:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(137,237,147,0.24);
}
.user-mgmt-notice {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    animation: fadeSlide 0.25s ease;
}

/* show */
.user-mgmt-notice.active {
    display: flex;
}

/* success */
.user-mgmt-notice.success {
    background: rgba(139, 233, 147, 0.12);
    color: #57c96b;
    border: 1px solid rgba(139, 233, 147, 0.35);
}

/* error */
.user-mgmt-notice.error {
    background: rgba(255, 92, 92, 0.12);
    color: #ff6262;
    border: 1px solid rgba(255, 92, 92, 0.35);
}

/* info */
.user-mgmt-notice.info {
    background: rgba(255,255,255,0.06);
    color: #cbd5e1;
    border: 1px solid rgba(255,255,255,0.12);
}

/* animation */
@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.user-mgmt-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.user-mgmt-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f8fa 100%);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 28px rgba(0,0,0,0.16);
}

.user-mgmt-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.user-mgmt-name {
    font-size: 1rem;
    font-weight: 800;
    color: #15202b;
    line-height: 1.2;
    word-break: break-word;
}

.user-mgmt-email {
    font-size: 0.88rem;
    color: #64707d;
    line-height: 1.3;
    word-break: break-word;
}

.user-mgmt-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: nowrap;
}

.user-mgmt-role-badge {
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
    width: fit-content;
}
.user-mgmt-role-badge.super-admin {
    background: rgba(255, 215, 0, 0.15);
    color: #e6c200;
    border: 1px solid rgba(255, 215, 0, 0.35);
}

.user-mgmt-role-badge.admin {
    background: rgba(139, 233, 147, 0.15);
    color: #57c96b;
}

.user-mgmt-role-badge.member {
    background: rgba(255,255,255,0.08);
    color: #cbd5e1;
}

.user-role-select {
    appearance: none;
    min-width: 124px;
    height: 42px;
    padding: 0 38px 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(180deg, #102042 0%, #0b1734 100%);
    color: #fff;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.user-role-select:hover,
.user-role-select:focus {
    border-color: rgba(137,237,147,0.45);
}

.btn-user-remove-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255,92,92,0.16);
    background: rgba(255,92,92,0.08);
    color: #ff6262;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease;
    flex-shrink: 0;
}

.btn-user-remove-icon:hover {
    background: rgba(255,92,92,0.14);
    transform: translateY(-1px);
}

.btn-user-remove-icon svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 900px) {
    .user-mgmt-wrap {
        padding-left: 16px;
        padding-right: 16px;
    }

    .user-mgmt-topbar {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .btn-users-add {
        width: 100%;
    }

    .user-mgmt-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .user-mgmt-controls {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}
/* ===== Add User Modal Fix ===== */
#addUserModalOverlay .modal {
    max-width: 720px;
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 24px 60px rgba(0,0,0,0.28);
}

#addUserModalOverlay .modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid #e8eaee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#addUserModalOverlay .modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 800;
    color: #1a1f2b;
}

#addUserModalOverlay .modal-body {
    padding: 24px 28px 28px;
}

.add-user-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.add-user-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.add-user-fields .full-width {
    grid-column: 1 / -1;
}

.add-user-form input,
.add-user-form select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid #d8dde6;
    border-radius: 12px;
    background: #fff;
    color: #1a1f2b;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
}

.add-user-form input:focus,
.add-user-form select:focus {
    border-color: #89ed93;
    box-shadow: 0 0 0 3px rgba(137,237,147,0.18);
}

.add-user-role-hint {
    margin-top: -2px;
    font-size: 0.84rem;
    line-height: 1.6;
    color: #6b7280;
    background: #f8faf9;
    border: 1px solid #e6ece8;
    border-radius: 12px;
    padding: 14px 16px;
}

.add-user-role-hint strong {
    color: #253140;
}

.add-user-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 6px;
}

.btn-add-user-cancel,
.btn-add-user-submit {
    min-width: 120px;
    height: 44px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-add-user-cancel {
    background: #fff;
    color: #253140;
    border: 1px solid #d8dde6;
}

.btn-add-user-cancel:hover {
    background: #f7f8fa;
}

.btn-add-user-submit {
    background: linear-gradient(135deg, #89ed93, #6fdb7d);
    color: #08140b;
    border: none;
    box-shadow: 0 10px 24px rgba(137,237,147,0.18);
}

.btn-add-user-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(137,237,147,0.24);
}

@media (max-width: 700px) {
    #addUserModalOverlay .modal {
        max-width: calc(100vw - 24px);
    }

    #addUserModalOverlay .modal-header,
    #addUserModalOverlay .modal-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .add-user-fields {
        grid-template-columns: 1fr;
    }

    .add-user-actions {
        flex-direction: column-reverse;
    }

    .btn-add-user-cancel,
    .btn-add-user-submit {
        width: 100%;
    }
}
.user-role-control {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 130px;
}

.user-role-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #6b7280;
    line-height: 1;
}

.user-role-select-wrap {
    position: relative;
    min-width: 130px;
}

.user-role-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    height: 42px;
    padding: 0 38px 0 14px;
    border-radius: 12px;
    border: 1px solid #d8dde6;
    background: #fff;
    color: #15202b;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.user-role-select:hover {
    border-color: #b8c2cf;
}

.user-role-select:focus {
    border-color: #89ed93;
    box-shadow: 0 0 0 3px rgba(137, 237, 147, 0.18);
}

.user-role-chevron {
    position: absolute;
    right: 12px;
    top: 40%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1;
}
.compose-confirm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2100;
    background: rgba(0,0,0,0.58);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.compose-confirm-overlay.active { display: flex; }

.compose-confirm-modal {
    width: min(920px, 96vw);
    max-height: 92vh;
    overflow: hidden;
    border-radius: 18px;
    background: #161616;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
}

.compose-confirm-header,
.compose-confirm-footer {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.compose-confirm-footer {
    border-bottom: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.compose-confirm-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.compose-confirm-header h3 {
    margin: 0 0 4px;
    font-size: 1.15rem;
}

.compose-confirm-header p {
    margin: 0;
    color: rgba(255,255,255,0.65);
    font-size: 0.88rem;
}

.compose-confirm-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}

.compose-confirm-body {
    padding: 22px;
    overflow: auto;
}

.compose-confirm-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.compose-confirm-meta-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 14px;
}

.compose-confirm-meta-card .label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 6px;
}

.compose-confirm-email-shell {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    overflow: hidden;
}

.compose-confirm-email-top {
    padding: 16px 18px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.compose-confirm-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255,255,255,0.72);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.compose-confirm-recipient-list-wrap,
.compose-confirm-message-wrap {
    padding: 18px;
}

.compose-confirm-recipient-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.compose-confirm-recipient-pill {
    background: rgba(137,237,147,0.12);
    color: #9bf3a4;
    border: 1px solid rgba(137,237,147,0.24);
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 0.8rem;
}

.compose-confirm-message {
    white-space: pre-wrap;
    line-height: 1.65;
    color: rgba(255,255,255,0.92);
    background: rgba(0,0,0,0.16);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 16px;
    min-height: 140px;
}

.compose-confirm-warning {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(253,126,20,0.10);
    border: 1px solid rgba(253,126,20,0.22);
    color: #ffcf9d;
    font-size: 0.88rem;
}

