.nm-wrap {
    max-width: 760px;
    margin: 0 auto;
}

.nm-page {
    padding: 2.5rem 0 4rem;
    direction: rtl;
}

.nm-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    direction: rtl;
}

.nm-hero h1,
.nm-hero h2 {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 700;
}

.nm-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    border: 0;
    border-radius: 999px;
    padding: .7rem 1.2rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.nm-btn:hover {
    transform: translateY(-1px);
    opacity: .95;
}

.nm-btn-primary {
    background: var(--bs-primary, #066ac9);
    color: #fff;
    box-shadow: 0 8px 20px rgba(6, 106, 201, .25);
}

.nm-btn-outline {
    background: #fff;
    color: var(--bs-primary, #066ac9);
    border: 1px solid rgba(6, 106, 201, .25);
}

.nm-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}

.nm-empty {
    text-align: center;
    padding: 3.2rem 1.5rem;
}

.nm-empty-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 106, 201, .1);
    color: var(--bs-primary, #066ac9);
    font-size: 1.8rem;
}

.nm-empty h3 {
    margin-bottom: .4rem;
}

.nm-empty p {
    color: #64748b;
    margin-bottom: 1.25rem;
}

.nm-conv-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.15rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    direction: rtl;
    text-align: right;
}

.nm-conv-item:last-child {
    border-bottom: 0;
}

.nm-conv-item:hover {
    background: #f8fbff;
}

.nm-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #4c9be8, #066ac9);
    color: #fff;
    font-weight: 700;
}

.nm-conv-item h5 {
    margin: 0 0 .2rem;
    font-size: 1rem;
}

.nm-conv-item p {
    margin: 0;
    color: #64748b;
    font-size: .9rem;
    max-width: 420px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nm-meta {
    margin-inline-start: auto;
    text-align: start;
    flex-shrink: 0;
}

.nm-badge {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e11d48;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nm-gate {
    padding: 2.4rem;
    text-align: center;
}

.nm-gate .nm-empty-icon {
    width: 84px;
    height: 84px;
    font-size: 2rem;
}

.nm-gate-actions {
    display: flex;
    justify-content: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.nm-chat {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 120px);
    min-height: 520px;
    direction: rtl;
}

.nm-chat-head {
    background: var(--bs-primary, #066ac9);
    color: #fff;
    padding: .9rem 1.1rem;
    display: flex;
    align-items: center;
    gap: .8rem;
    flex-shrink: 0;
    direction: rtl;
}

.nm-chat-head a {
    color: #fff;
    text-decoration: none;
    opacity: .9;
}

/* LTR row axis keeps WhatsApp sides: mine=right, theirs=left */
.nm-chat-body {
    direction: ltr;
    background: #eef4fb;
    background-image: radial-gradient(rgba(6, 106, 201, .06) 1px, transparent 1px);
    background-size: 18px 18px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.1rem;
    -webkit-overflow-scrolling: touch;
}

.nm-date-separator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: .45rem 0 .25rem;
    margin-bottom: .45rem;
    direction: rtl;
    pointer-events: none;
}

.nm-date-separator span {
    display: inline-block;
    padding: .3rem .85rem;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 700;
    font-family: 'Almarai', sans-serif;
    color: #475569;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
    border: 1px solid rgba(15, 23, 42, .06);
}

.nm-bubble-row {
    display: flex;
    margin-bottom: .7rem;
}

.nm-bubble-row.mine {
    justify-content: flex-end;
}

.nm-bubble-row.theirs {
    justify-content: flex-start;
}

.nm-bubble {
    direction: rtl;
    max-width: 76%;
    padding: .75rem .9rem;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
    position: relative;
}

.nm-bubble.mine {
    background: #d7ecff;
    border-bottom-right-radius: 6px;
}

.nm-bubble.theirs {
    background: #fff;
    border-bottom-left-radius: 6px;
}

.nm-bubble img,
.nm-bubble video {
    max-width: 220px;
    width: 100%;
    border-radius: 12px;
    display: block;
}

.nm-thumb {
    max-width: 180px !important;
    max-height: 180px !important;
    width: auto !important;
    height: auto !important;
    object-fit: cover;
    cursor: zoom-in;
    border-radius: 12px !important;
    display: block;
}

.nm-bubble audio {
    width: 100%;
    min-width: 0;
}

.nm-audio-player {
    width: min(100%, 340px);
    min-width: min(100%, 280px);
    max-width: 100%;
}

.nm-audio-player audio,
.adm-bubble .nm-audio-player audio,
.nm-bubble .nm-audio-player audio {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100%;
    height: 42px;
}

.adm-bubble:has(.nm-audio-player),
.nm-bubble:has(.nm-audio-player) {
    max-width: min(92%, 420px);
    min-width: min(92%, 300px);
}

.nm-sender-label {
    font-size: 12px;
    font-weight: 700;
    color: #0b6cb5;
    margin-bottom: .35rem;
}

.nm-msg-actions {
    display: flex;
    gap: .55rem;
    margin-top: .45rem;
    flex-wrap: wrap;
}

.nm-msg-actions .nm-action-btn,
.adm-bubble .nm-msg-actions .nm-action-btn,
.nm-bubble .nm-msg-actions .nm-action-btn {
    appearance: none !important;
    -webkit-appearance: none !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    font-family: 'Almarai', sans-serif !important;
    line-height: 1.2 !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 0 !important;
    height: auto !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.nm-msg-actions .nm-action-btn:hover,
.adm-bubble .nm-msg-actions .nm-action-btn:hover,
.nm-bubble .nm-msg-actions .nm-action-btn:hover {
    color: #0b6cb5 !important;
    background: transparent !important;
}

.nm-msg-actions .nm-action-btn.is-danger:hover {
    color: #b91c1c !important;
}

.nm-caption {
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: .45rem;
}

.nm-reply-chip {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: .55rem .75rem;
    margin-bottom: .55rem;
    font-size: .85rem;
    color: #1e3a8a;
}

.nm-reply-chip.is-visible {
    display: flex;
}

.nm-reply-quote {
    border-right: 3px solid #066ac9;
    background: rgba(6, 106, 201, .08);
    border-radius: 8px;
    padding: .4rem .55rem;
    margin-bottom: .45rem;
    font-size: .8rem;
    color: #334155;
    cursor: pointer;
}

.adm-bubble.mine .nm-reply-quote,
.nm-bubble.mine .nm-reply-quote {
    border-right-color: #fff;
    background: rgba(255, 255, 255, .18);
    color: inherit;
}

.nm-flash .adm-bubble,
.nm-flash .nm-bubble {
    outline: 2px solid #066ac9;
    outline-offset: 2px;
}

.nm-deleted {
    color: #94a3b8;
    font-style: italic;
    font-size: .9rem;
}

.nm-edited {
    font-size: 10px;
    color: #94a3b8;
    margin-inline-start: .35rem;
}

button.nm-video-placeholder,
.nm-video-placeholder {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 220px;
    max-width: 100%;
    min-height: 140px;
    border: 0 !important;
    border-radius: 12px !important;
    background: linear-gradient(160deg, #0f172a, #1e293b) !important;
    color: #fff !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    cursor: pointer;
    padding: 1rem !important;
    text-align: center;
    box-shadow: none !important;
    margin: 0 !important;
    height: auto !important;
    line-height: 1.3 !important;
}

.nm-video-placeholder i {
    font-size: 1.8rem;
    color: #fff !important;
}

.nm-video-placeholder span {
    font-size: .85rem;
    opacity: .9;
    color: #fff !important;
}

.nm-video-wrap video {
    max-width: 240px;
    width: 100%;
    border-radius: 12px;
    background: #0f172a;
}

.nm-lightbox {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 200000 !important;
    background: rgba(15, 23, 42, .92) !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    margin: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.nm-lightbox.is-open {
    display: flex !important;
}

.nm-lightbox img,
.nm-lightbox #nm-lightbox-img {
    max-width: min(920px, 94vw) !important;
    max-height: 88vh !important;
    width: auto !important;
    height: auto !important;
    border-radius: 12px !important;
    object-fit: contain !important;
    box-shadow: 0 20px 50px rgba(0,0,0,.35);
}

.nm-lightbox-close,
button.nm-lightbox-close {
    appearance: none !important;
    -webkit-appearance: none !important;
    position: absolute !important;
    top: 18px !important;
    right: 18px !important;
    left: auto !important;
    width: 44px !important;
    height: 44px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,.18) !important;
    color: #fff !important;
    cursor: pointer !important;
    font-size: 28px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    z-index: 2;
}

.nm-lightbox-close:hover {
    background: rgba(255,255,255,.3) !important;
    color: #fff !important;
}

.nm-time {
    margin-top: .35rem;
    font-size: 11px;
    color: #64748b;
}

.nm-composer {
    background: #fff;
    border-top: 1px solid rgba(15, 23, 42, .08);
    padding: .65rem .75rem;
}

.nm-wa-row {
    display: flex;
    align-items: flex-end;
    gap: .45rem;
    direction: ltr;
}

.nm-wa-menu-wrap {
    position: relative;
    flex-shrink: 0;
}

.nm-wa-btn {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
}

.nm-wa-btn:hover {
    background: rgba(15, 23, 42, .06);
    color: #334155;
}

.nm-wa-input {
    flex: 1;
    min-width: 0;
    min-height: 42px;
    max-height: 140px;
    height: 42px;
    border: 0;
    border-radius: 22px;
    background: #f8fafc;
    padding: .65rem 1rem;
    font-size: .95rem;
    font-family: 'Almarai', sans-serif;
    box-shadow: inset 0 0 0 1px #e2e8f0;
    direction: rtl;
    text-align: right;
    resize: none;
    overflow-y: auto;
    line-height: 1.4;
    field-sizing: content;
}

.nm-wa-input:focus {
    outline: none;
    box-shadow: inset 0 0 0 1px #066ac9;
    background: #fff;
}

.nm-wa-action {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #94a3b8;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s ease;
}

.nm-wa-action.has-content,
.nm-wa-action.recording {
    background: var(--bs-primary, #066ac9);
}

.nm-wa-action.has-content:hover,
.nm-wa-action.recording:hover {
    background: #055aa8;
}

.nm-wa-action.recording {
    background: #e11d48;
}

.nm-wa-action.recording:hover {
    background: #be123c;
}

.nm-wa-action .nm-icon-send,
.nm-wa-action .nm-icon-stop {
    display: inline-block;
}

.nm-wa-action .nm-icon-stop {
    display: none;
}

.nm-wa-action.recording .nm-icon-send {
    display: none;
}

.nm-wa-action.recording .nm-icon-stop {
    display: inline-block;
}

.nm-wa-menu {
    position: absolute;
    bottom: calc(100% + .45rem);
    left: 0;
    min-width: 160px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .14);
    border: 1px solid rgba(15, 23, 42, .08);
    padding: .35rem;
    z-index: 20;
}

.nm-wa-menu-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    width: 100%;
    border: 0;
    background: transparent;
    border-radius: 10px;
    padding: .55rem .7rem;
    font-size: .88rem;
    font-family: 'Almarai', sans-serif;
    color: #334155;
    text-align: right;
    cursor: pointer;
}

.nm-wa-menu-item:hover {
    background: #f1f5f9;
}

.nm-wa-menu-item.is-hidden {
    display: none;
}

.nm-wa-btn.is-hidden,
.nm-wa-menu-wrap .nm-wa-btn.is-hidden {
    display: none;
}

.nm-composer-row {
    display: flex;
    align-items: flex-end;
    gap: .55rem;
}

.nm-icon-btn,
.nm-send-btn {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
}

.nm-icon-btn {
    background: #f1f5f9;
    color: #334155;
}

.nm-send-btn {
    background: var(--bs-primary, #066ac9);
    color: #fff;
}

.nm-composer textarea {
    flex: 1;
    min-height: 44px;
    max-height: 140px;
    resize: none;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: .7rem .9rem;
}

.nm-file-chip {
    display: none;
    align-items: center;
    gap: .5rem;
    margin-bottom: .55rem;
    background: #f8fafc;
    border-radius: 12px;
    padding: .45rem .7rem;
    font-size: .85rem;
}

.nm-file-chip.is-visible {
    display: flex;
}

.nm-type-pills {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    margin-bottom: .65rem;
}

.nm-type-pills button {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 999px;
    padding: .35rem .75rem;
    font-size: .85rem;
}

.nm-type-pills button.active {
    background: rgba(6, 106, 201, .1);
    border-color: rgba(6, 106, 201, .35);
    color: var(--bs-primary, #066ac9);
    font-weight: 700;
}

.nm-fab {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 1050;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--bs-primary, #066ac9);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 28px rgba(6, 106, 201, .35);
    text-decoration: none;
}

.nm-fab:hover {
    color: #fff;
    transform: scale(1.05);
}

.nm-fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #e11d48;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 0 0 2px #fff;
}

.nm-team-btn {
    width: 100%;
    text-align: start;
    border: 1px solid rgba(6, 106, 201, .18);
    background: #fff;
    border-radius: 14px;
    padding: .9rem 1rem;
}

.nm-team-btn:hover {
    background: #f8fbff;
}

.nm-admin-actions .btn {
    margin-bottom: 0;
}

@media (max-width: 767px) {
    .nm-hero {
        flex-direction: column;
        align-items: stretch;
    }
    .nm-bubble,
    .adm-bubble {
        max-width: 88%;
    }
    .adm-bubble:has(.nm-audio-player),
    .nm-bubble:has(.nm-audio-player) {
        max-width: 94%;
        min-width: 0;
        width: 94%;
    }
    .nm-audio-player {
        width: 100%;
        min-width: 0;
    }
    .nm-fab {
        left: 12px;
        bottom: calc(14px + env(safe-area-inset-bottom, 0px));
        width: 52px;
        height: 52px;
    }
    .nm-page {
        padding: 0;
    }
    .nm-wrap {
        max-width: none;
        margin: 0;
    }
    .nm-chat-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: none !important;
    }
    .nm-chat {
        height: calc(100dvh - 64px);
        min-height: 0;
        border-radius: 0;
    }
    .nm-card.nm-chat {
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }
}

body.nm-student-chat-open {
    overflow: hidden;
}

body.nm-student-chat-open .nm-page {
    padding-top: .5rem;
}

@media (max-width: 767px) {
    body.nm-student-chat-open .nm-page {
        padding: 0;
    }
}

/* Admin messaging: full-bleed chat shell + mobile no side margins */
body.nm-messaging-open {
    overflow: hidden;
}

body.nm-messaging-open .min-height-300 {
    display: none;
}

body.nm-messaging-open .main-content > .container-fluid {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
}

body.nm-messaging-open .nm-admin-chat-page {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
}

body.nm-messaging-open .adm-chat {
    border-radius: 0;
    box-shadow: none;
    height: calc(100dvh - 64px);
    min-height: 0;
}

body.nm-messaging-open .nm-admin-breadcrumb {
    display: none;
}

body.nm-messaging-open .adm-composer {
    flex-shrink: 0;
    position: relative;
    z-index: 5;
}

@media (max-width: 1199.98px) {
    body.nm-messaging-open.g-sidenav-show .main-content {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    body.nm-messaging-open #sidenav-main {
        z-index: 1100;
    }

    body.nm-messaging-open .navbar-main {
        display: none !important;
    }

    body.nm-messaging-open .adm-chat {
        height: 100dvh !important;
        max-height: 100dvh !important;
        min-height: 0 !important;
    }

    body.nm-messaging-open .adm-chat-head {
        padding: .7rem .85rem;
    }

    body.nm-messaging-open .adm-chat-toolbar {
        padding: .55rem .75rem;
        gap: .35rem;
    }

    body.nm-messaging-open .adm-action {
        padding: .4rem .7rem;
        font-size: .8rem;
    }

    body.nm-messaging-open .adm-chat-body {
        min-height: 0 !important;
        flex: 1 1 auto !important;
    }

    body.nm-messaging-open .adm-composer {
        position: sticky;
        bottom: 0;
        flex-shrink: 0 !important;
        padding: .65rem .75rem calc(.65rem + env(safe-area-inset-bottom, 0px));
        background: #f7fafc;
        border-top: 1px solid rgba(15, 23, 42, .08);
        box-shadow: 0 -6px 18px rgba(15, 23, 42, .06);
    }

    body.nm-messaging-open .adm-wa-row {
        gap: .4rem;
    }
}

.adm-chat {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
    height: calc(100dvh - 160px);
    min-height: 560px;
    display: flex;
    flex-direction: column;
}

.adm-chat-head {
    background: linear-gradient(180deg, #0b6cb5, #066ac9);
    color: #fff;
    padding: 1rem 1.15rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.adm-chat-toolbar {
    display: flex;
    gap: .55rem;
    flex-wrap: wrap;
    align-items: center;
    padding: .75rem 1.15rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.adm-action {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    border: 0;
    border-radius: 12px;
    padding: .55rem 1rem;
    font-size: .9rem;
    font-weight: 700;
    font-family: 'Almarai', sans-serif;
    line-height: 1.2;
    cursor: pointer;
}

.adm-action i {
    font-size: .85rem;
}

.adm-action-primary {
    background: #066ac9;
    color: #fff;
}

.adm-action-primary:hover {
    background: #055aa8;
    color: #fff;
}

.adm-action-muted {
    background: #e2e8f0;
    color: #334155;
}

.adm-action-muted:hover {
    background: #cbd5e1;
    color: #1e293b;
}

.adm-action-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.adm-action-danger:hover {
    background: #fecaca;
    color: #991b1b;
}

.adm-action.is-hidden {
    display: none;
}

.adm-chat-user {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-width: 0;
}

.adm-chat-avatar {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: rgba(255,255,255,.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.adm-chat-user h5 {
    margin: 0;
    color: #fff;
    font-size: 1.05rem;
}

.adm-chat-name-row {
    display: flex;
    align-items: center;
    gap: .45rem;
}

.adm-student-info-btn {
    border: 0;
    background: rgba(255,255,255,.18);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.adm-student-info-btn:hover {
    background: rgba(255,255,255,.28);
}

.adm-notes-indicator {
    position: relative;
    border: 0;
    background: rgba(255,255,255,.18);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.adm-notes-indicator:hover {
    background: rgba(255,255,255,.28);
}

.adm-notes-indicator.is-hidden {
    display: none !important;
}

.adm-notes-indicator-dot {
    position: absolute;
    top: -4px;
    left: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #f59e0b;
    color: #111;
    font-size: 10px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
}

.adm-notes-toolbar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    display: inline-block;
    margin-inline-start: .15rem;
}

.adm-notes-toolbar-dot.is-hidden {
    display: none !important;
}

.adm-inbox-notes-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff7ed;
    color: #d97706;
    border: 1px solid #fdba74;
    flex-shrink: 0;
}

.adm-inbox-notes-dot:hover {
    background: #ffedd5;
    color: #b45309;
}

.adm-chat-username {
    opacity: .9;
}

.adm-alias-row {
    display: flex;
    gap: .4rem;
    align-items: center;
}

.adm-meta-alias {
    flex: 1 1 100%;
    min-width: 220px;
}

.adm-student-info-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(15, 23, 42, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.adm-student-info-modal.is-hidden {
    display: none !important;
}

.adm-student-info-sheet {
    width: min(560px, 100%);
    max-height: min(84dvh, 720px);
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .2);
}

.adm-student-info-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .85rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.adm-student-info-body {
    padding: 1rem;
}

.adm-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .7rem;
    margin-bottom: 1rem;
}

.adm-info-grid > div {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: .65rem .75rem;
}

.adm-info-grid span {
    display: block;
    font-size: .72rem;
    color: #64748b;
    margin-bottom: .2rem;
}

.adm-info-grid strong {
    font-size: .9rem;
    color: #0f172a;
    word-break: break-word;
}

.adm-info-block {
    margin-bottom: .9rem;
}

.adm-info-block h6 {
    font-size: .85rem;
    margin-bottom: .35rem;
}

.adm-info-block ul {
    margin: 0;
    padding-right: 1.1rem;
}

.adm-info-block li {
    margin-bottom: .25rem;
    font-size: .86rem;
}

.adm-chat-user p {
    margin: 0;
    opacity: .85;
    font-size: .82rem;
}

.adm-chat-body {
    direction: ltr;
    flex: 1;
    min-height: 0;
    background: #dbe7f4;
    background-image: radial-gradient(rgba(6, 106, 201, .08) 1px, transparent 1px);
    background-size: 18px 18px;
    padding: 1.15rem;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.adm-row {
    display: flex;
    margin-bottom: .75rem;
}

.adm-row.mine {
    justify-content: flex-end;
}

.adm-row.theirs {
    justify-content: flex-start;
}

.adm-bubble {
    direction: rtl;
    max-width: 72%;
    padding: .8rem .95rem;
    border-radius: 16px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .06);
    position: relative;
}

.adm-bubble.mine {
    background: #d7ecff;
    border-bottom-right-radius: 6px;
}

.adm-bubble.theirs {
    background: #fff;
    border-bottom-left-radius: 6px;
}

.adm-bubble img,
.adm-bubble video {
    max-width: 220px;
    width: 100%;
    border-radius: 12px;
    display: block;
}

.adm-bubble audio {
    display: block;
    width: 100%;
    min-width: 0;
}

.adm-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.adm-panel-toggle {
    border: 1px solid rgba(255,255,255,.35);
    background: rgba(255,255,255,.12);
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    flex-shrink: 0;
}

.adm-panel-toggle.is-open i {
    transform: rotate(180deg);
}

.adm-tools-panel {
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    background: #f8fafc;
    padding: .65rem .75rem .85rem;
}

.adm-tags-manage {
    display: flex;
    gap: .4rem;
    margin-top: .55rem;
    flex-wrap: wrap;
}

.adm-tags-admin-list {
    margin-top: .45rem;
    display: grid;
    gap: .25rem;
}

.adm-tag-admin-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
}

.nm-msg-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: .35rem;
    flex-wrap: wrap;
}

.adm-time {
    margin-top: .4rem;
    font-size: 11px;
    color: #64748b;
}

.nm-msg-footer .adm-time,
.nm-msg-footer .nm-time {
    margin-top: 0;
    margin-inline-start: auto;
}

.nm-msg-link {
    color: #0b6bcb;
    text-decoration: underline;
    word-break: break-word;
}

.nm-emoji-panel {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    padding: .45rem;
    margin-bottom: .45rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    max-height: 120px;
    overflow: auto;
}

.nm-emoji-item {
    border: 0;
    background: transparent;
    font-size: 1.2rem;
    line-height: 1;
    padding: .15rem;
    cursor: pointer;
}

.adm-chat-body {
    min-height: 45vh;
}

.adm-composer {
    background: #f7fafc;
    border-top: 1px solid rgba(15, 23, 42, .08);
    padding: .65rem .75rem;
    flex-shrink: 0;
    position: relative;
    z-index: 20;
    overflow: visible;
}

.adm-tools {
    display: flex;
    gap: .45rem;
    margin-bottom: .65rem;
    flex-wrap: wrap;
}

.adm-tool {
    border: 1px solid #dbe3ee;
    background: #fff;
    border-radius: 999px;
    padding: .4rem .85rem;
    font-size: .85rem;
    color: #334155;
}

.adm-tool.active,
.adm-tool.recording {
    background: #066ac9;
    border-color: #066ac9;
    color: #fff;
}

.adm-tool.recording {
    background: #e11d48;
    border-color: #e11d48;
}

.adm-composer-row {
    display: flex;
    align-items: flex-end;
    gap: .55rem;
}

.adm-wa-row {
    display: flex;
    align-items: flex-end;
    gap: .5rem;
}

.adm-wa-menu-wrap {
    position: relative;
    flex-shrink: 0;
}

.adm-wa-btn {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    flex-shrink: 0;
}

.adm-wa-btn:hover {
    background: rgba(15, 23, 42, .06);
    color: #334155;
}

.adm-wa-quick-btn {
    color: #d97706;
}

.adm-wa-quick-btn:hover {
    color: #b45309;
    background: rgba(217, 119, 6, .1);
}

.adm-wa-input {
    flex: 1;
    min-width: 0;
    min-height: 42px;
    max-height: 140px;
    height: 42px;
    border: 0;
    border-radius: 22px;
    background: #fff;
    padding: .65rem 1rem;
    font-size: .95rem;
    font-family: 'Almarai', sans-serif;
    box-shadow: inset 0 0 0 1px #dbe3ee;
    resize: none;
    overflow-y: auto;
    line-height: 1.4;
    direction: rtl;
    text-align: right;
}

.adm-wa-input:focus {
    outline: none;
    box-shadow: inset 0 0 0 1px #066ac9;
}

.adm-wa-action {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #066ac9;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
}

.adm-wa-action:hover {
    background: #055aa8;
}

.adm-wa-action.recording {
    background: #e11d48;
}

.adm-wa-action.recording:hover {
    background: #be123c;
}

.adm-wa-action .adm-icon-send,
.adm-wa-action .adm-icon-mic,
.adm-wa-action .adm-icon-stop {
    display: none;
}

.adm-wa-action.mode-send .adm-icon-send,
.adm-wa-action.mode-mic .adm-icon-mic,
.adm-wa-action.recording .adm-icon-stop {
    display: inline-block;
}

.adm-wa-menu {
    position: absolute;
    bottom: calc(100% + .45rem);
    right: 0;
    min-width: 148px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .14);
    border: 1px solid rgba(15, 23, 42, .08);
    padding: .35rem;
    z-index: 20;
}

.adm-quick-menu {
    min-width: 220px;
    max-width: min(320px, calc(100vw - 16px));
    max-height: min(280px, 45vh);
    overflow-y: auto;
    direction: rtl;
}

.adm-wa-menu-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    width: 100%;
    border: 0;
    background: transparent;
    border-radius: 10px;
    padding: .55rem .7rem;
    font-size: .88rem;
    font-family: 'Almarai', sans-serif;
    color: #334155;
    text-align: right;
    cursor: pointer;
}

.adm-wa-menu-item-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
}

.adm-wa-menu-badge {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(217, 119, 6, .12);
    color: #d97706;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
}

.adm-wa-menu-item.is-voice .adm-wa-menu-item-title {
    font-weight: 700;
}

.adm-wa-menu-item:hover {
    background: #f1f5f9;
}

.adm-wa-menu-item i {
    width: 18px;
    text-align: center;
    color: #64748b;
}

.adm-wa-menu-empty {
    padding: .65rem .75rem;
    font-size: .82rem;
    color: #94a3b8;
    text-align: center;
}

.adm-composer textarea {
    flex: 1;
    min-height: 46px;
    max-height: 140px;
    resize: none;
    border-radius: 16px;
    border: 1px solid #dbe3ee;
    padding: .75rem .95rem;
}

.adm-send {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: #066ac9;
    color: #fff;
}

.adm-chip {
    display: none;
    align-items: center;
    gap: .5rem;
    margin-bottom: .55rem;
    background: #fff;
    border-radius: 12px;
    padding: .45rem .7rem;
    font-size: .85rem;
    flex-wrap: wrap;
}

.adm-voice-preview {
    display: none;
    height: 36px;
    max-width: 240px;
    flex: 1 1 180px;
}

.adm-voice-preview.is-visible {
    display: inline-block;
}

.adm-chip.is-visible {
    display: flex;
}

.adm-quick-text-preview {
    flex: 1 1 auto;
    min-width: 0;
    white-space: pre-wrap;
    text-align: right;
    line-height: 1.45;
    max-height: 4.5em;
    overflow: hidden;
}

.nm-swal {
    font-family: 'Almarai', sans-serif !important;
    border-radius: 18px !important;
    padding: 1.5rem 1.25rem 1.25rem !important;
}

.nm-swal-title {
    font-family: 'Almarai', sans-serif !important;
    font-size: 1.25rem !important;
}

.nm-swal-text {
    font-family: 'Almarai', sans-serif !important;
    color: #475569 !important;
    font-size: .95rem !important;
}

.nm-swal-confirm,
.nm-swal-cancel {
    border: 0 !important;
    border-radius: 999px !important;
    padding: .55rem 1.2rem !important;
    font-family: 'Almarai', sans-serif !important;
    font-weight: 700 !important;
    margin: 0 .25rem !important;
}

.nm-swal-confirm {
    background: #066ac9 !important;
    color: #fff !important;
}

.nm-swal-cancel {
    background: #e2e8f0 !important;
    color: #334155 !important;
}

/* Professional messaging extras */
.nm-typing-indicator {
    font-size: .78rem;
    opacity: .9;
    margin-top: .15rem;
    font-weight: 600;
    animation: nm-typing-pulse 1.2s ease-in-out infinite;
}

@keyframes nm-typing-pulse {
    0%, 100% { opacity: .55; }
    50% { opacity: 1; }
}

.adm-meta-bar,
.adm-search-bar,
.adm-transfer-panel,
.nm-student-search {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    align-items: flex-end;
    padding: .65rem 1.15rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.adm-meta-field {
    min-width: 140px;
}

.adm-meta-field label {
    display: block;
    font-size: .75rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: .2rem;
}

.adm-meta-tags {
    flex: 1;
    min-width: 220px;
}

.adm-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem .7rem;
}

.adm-tag-check {
    font-size: .8rem;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}

.adm-transfer-panel {
    align-items: center;
    background: #eff6ff;
}

.adm-transfer-panel .form-control {
    max-width: 220px;
}

.adm-chat-main {
    display: flex;
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

.adm-chat-main .adm-chat-body {
    flex: 1;
}

.nm-notes-panel {
    width: 280px;
    max-width: 42vw;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 4;
    min-height: 0;
}

.nm-notes-backdrop {
    display: none;
}

.nm-notes-backdrop.is-hidden {
    display: none !important;
}

.nm-notes-panel.is-hidden {
    display: none;
}

.nm-notes-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .7rem .85rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.nm-notes-list {
    flex: 1;
    overflow-y: auto;
    padding: .75rem;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.nm-note-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: .65rem .75rem;
    margin-bottom: .55rem;
}

.nm-note-meta {
    font-size: .72rem;
    color: #64748b;
    margin-bottom: .3rem;
}

.nm-note-body {
    font-size: .88rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.nm-note-actions {
    display: flex;
    gap: .65rem;
    margin-top: .45rem;
}

.nm-note-action {
    border: 0;
    background: transparent;
    color: #066ac9;
    font-size: .78rem;
    font-weight: 700;
    padding: 0;
    cursor: pointer;
    font-family: 'Almarai', sans-serif;
}

.nm-note-action-danger {
    color: #dc2626;
}

.nm-notes-form {
    border-top: 1px solid #e2e8f0;
    padding: .7rem;
    flex-shrink: 0;
    background: #fff;
}

.nm-notes-form textarea {
    width: 100%;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    padding: .55rem .7rem;
    margin-bottom: .5rem;
    resize: vertical;
}

.adm-quick-replies {
    min-width: 160px;
}

.adm-quick-replies select {
    border-radius: 999px;
    height: 34px;
}

.nm-doc-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: #066ac9;
    font-weight: 700;
    text-decoration: none;
    background: rgba(6, 106, 201, .08);
    border-radius: 10px;
    padding: .45rem .7rem;
}

.nm-doc-link:hover {
    color: #055aa8;
    background: rgba(6, 106, 201, .14);
}

.nm-search-hit {
    background: #fde68a;
    color: inherit;
    padding: 0 .1rem;
    border-radius: 3px;
}

.nm-priority-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .2rem .65rem;
    font-size: .75rem;
    font-weight: 700;
}

.nm-priority-normal {
    background: #e2e8f0;
    color: #334155;
}

.nm-priority-high {
    background: #ffedd5;
    color: #c2410c;
}

.nm-priority-urgent {
    background: #fee2e2;
    color: #b91c1c;
}

.nm-status-label {
    font-size: .85rem;
    color: #475569;
    font-weight: 600;
}

.nm-rating-panel {
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 1rem 1.1rem;
    text-align: center;
    flex-shrink: 0;
}

.nm-rating-stars {
    display: flex;
    justify-content: center;
    gap: .35rem;
}

.nm-star-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: #cbd5e1;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.nm-star-btn.is-active,
.nm-star-btn:hover {
    color: #f59e0b;
}

.nm-staff-unread-badge {
    vertical-align: middle;
}

.adm-composer.is-hidden,
.adm-action.is-hidden,
.nm-composer.is-hidden,
.nm-composer-blocked.is-hidden,
.adm-composer-blocked.is-hidden,
.nm-icon-btn.is-hidden,
.adm-student-check.is-hidden {
    display: none !important;
}

.adm-composer-blocked,
.nm-composer-blocked {
    padding: .9rem 1rem;
    text-align: center;
    color: #64748b;
    background: #f8fafc;
    border-top: 1px solid rgba(15, 23, 42, .08);
    font-weight: 600;
}

.adm-student-controls {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem .75rem;
    align-items: center;
    padding: .55rem .75rem .75rem;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
}

.adm-student-check {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .85rem;
    margin: 0;
}

.nm-composer-tools {
    display: flex;
    gap: .45rem;
    margin-bottom: .45rem;
}

.nm-voice-preview {
    display: none;
    max-width: 220px;
}

.nm-voice-preview.is-visible {
    display: block;
}

.nm-icon-btn.recording {
    background: #fee2e2;
    color: #dc2626;
}

@media (max-width: 991.98px) {
    .adm-chat.notes-open {
        overflow: hidden;
    }

    .nm-notes-backdrop:not(.is-hidden) {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, .45);
        z-index: 1040;
    }

    .nm-notes-panel {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        z-index: 1050;
        border: 0;
        box-shadow: none;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    body.nm-messaging-open .nm-notes-panel {
        height: 100dvh;
        max-height: 100dvh;
    }

    body.nm-notes-sheet-open {
        overflow: hidden;
    }
}

/* Site header profile menu vs course sidebar */
header.header-static {
    z-index: 1040;
}

header.header-static .navbar,
header.header-static .navbar > .container-fluid {
    overflow: visible;
}

@media (min-width: 1200px) {
    header.header-static .navbar-expand-xl .navbar-collapse {
        width: auto !important;
        flex: 1 1 auto;
        min-width: 0;
    }

    .nm-header-profile {
        flex: 0 0 auto;
        margin-inline-start: .75rem;
    }
}

.nm-header-profile .nm-profile-menu {
    z-index: 1060 !important;
    min-width: 15rem;
    max-width: min(18rem, calc(100vw - 24px));
}

.nm-header-profile .nm-profile-menu .h6,
.nm-header-profile .nm-profile-menu .small,
.nm-header-profile .nm-profile-menu .dropdown-item {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.nm-header-profile .nm-profile-menu .dropdown-item {
    white-space: normal;
}

@media (min-width: 1200px) {
    .nm-header-profile .nm-profile-menu.show {
        position: fixed !important;
        transform: none !important;
    }
}

@media (max-width: 1199.98px) {
    .nm-header-profile .nm-profile-menu.show {
        position: fixed !important;
        top: auto !important;
        transform: none !important;
        max-width: calc(100vw - 24px);
    }
}

.openbtn {
    z-index: 1010 !important;
}

.sidebar {
    z-index: 1030 !important;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .35);
    z-index: 1025;
}

.sidebar-backdrop.is-visible {
    display: block;
}
