/* ============ Centro de notificaciones ============ */

#notificaciones-lista.dropdown-menu {
    padding: 0;
    border: none;
    border-radius: 14px;
    min-width: 330px;
    max-width: 330px;
    overflow: hidden;
    background: #0c2038;
    box-shadow: 0 18px 40px -16px rgba(0, 40, 90, .45), 0 0 0 1px rgba(255, 255, 255, .04);
}

.notif-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.notif-header-title {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
}

.notif-header-subtitle {
    color: #8fa9c7;
    font-size: .72rem;
    margin-top: 2px;
}

.notif-btn-marcar-todas {
    flex: 0 0 auto;
    background: #0d6efd;
    color: #fff !important;
    font-size: .7rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    white-space: nowrap;
    transition: background .15s ease;
}

.notif-btn-marcar-todas:hover {
    color: #fff;
    text-decoration: none;
    background: #0b5ed7;
}

.notif-body {
    max-height: 360px;
    overflow-y: auto;
    padding: 10px;
}

.notif-body::-webkit-scrollbar {
    width: 6px;
}

.notif-body::-webkit-scrollbar-thumb {
    background: rgba(13, 110, 253, .35);
    border-radius: 999px;
}

.notif-empty {
    display: block;
    text-align: center;
    color: #7b93b8;
    font-size: .82rem;
    padding: 26px 10px;
}

/* Tarjetas blancas, compactas, sobre el panel azul oscuro */
.notif-card {
    position: relative;
    display: block;
    background: #ffffff;
    border: none;
    border-left: 3px solid var(--notif-color, #0d6efd);
    border-radius: 8px;
    padding: 9px 11px;
    margin-bottom: 8px;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
    transition: box-shadow .15s ease, opacity .15s ease;
}

.notif-card:last-child {
    margin-bottom: 0;
}

.notif-card:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
    text-decoration: none;
}

/* Notificación ya leída: se conserva en el historial pero atenuada */
.notif-card.notif-leida {
    opacity: .62;
}

.notif-card.notif-leida:hover {
    opacity: .9;
}

.notif-card:not(.notif-leida) .notif-card-clickable {
    cursor: pointer;
}

.notif-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

/* Badges suaves: fondo pastel, texto en tono oscuro del mismo color */
.notif-badge {
    display: inline-block;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
    color: var(--notif-badge-text, #0b5ed7);
    background: var(--notif-badge-bg, #e7f1ff);
}

.notif-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--notif-color, #0d6efd);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--notif-color, #0d6efd) 55%, transparent);
    animation: notif-pulse 1.8s infinite;
}

.notif-card.notif-leida .notif-dot {
    display: none;
}

@keyframes notif-pulse {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--notif-color, #0d6efd) 45%, transparent); }
    70% { box-shadow: 0 0 0 6px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

.notif-card-title {
    color: #1f2937;
    font-weight: 600;
    font-size: .82rem;
    margin-bottom: 2px;
}

.notif-card-conversacion {
    max-height: 160px;
    overflow-y: auto;
    margin-bottom: 4px;
}

.notif-card-conversacion::-webkit-scrollbar {
    width: 4px;
}

.notif-card-conversacion::-webkit-scrollbar-thumb {
    background: #d8e3f0;
    border-radius: 999px;
}

.notif-msg {
    max-width: 88%;
    background: #f1f4f8;
    border-radius: 8px;
    padding: 5px 8px;
    margin-bottom: 5px;
}

.notif-msg:last-child {
    margin-bottom: 0;
}

.notif-msg-propio {
    margin-left: auto;
    background: #e7f1ff;
}

.notif-msg-autor {
    color: #6b7684;
    font-size: .62rem;
    font-weight: 700;
    margin-bottom: 1px;
}

.notif-msg-propio .notif-msg-autor {
    color: #0b5ed7;
}

.notif-msg-texto {
    color: #374151;
    font-size: .76rem;
    line-height: 1.3;
    white-space: pre-line;
    word-break: break-word;
}

.notif-msg-hora {
    color: #9aa4b2;
    font-size: .6rem;
    margin-top: 1px;
    text-align: right;
}

.notif-card-time {
    color: #9aa4b2;
    font-size: .65rem;
}

.notif-card-destino {
    color: #9aa4b2;
    font-size: .65rem;
}

.notif-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

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

.notif-action-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: .68rem;
    font-weight: 600;
    color: #6b7684;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.notif-action-btn:hover {
    color: #0d6efd;
}

.notif-action-btn.notif-btn-eliminar:hover {
    color: #dc3545;
}

/* Caja de respuesta inline */
.notif-reply-box {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eef1f5;
}

.notif-reply-input {
    width: 100%;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: .76rem;
    color: #1f2937;
    resize: none;
}

.notif-reply-input:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 .15rem rgba(13, 110, 253, .15);
}

.notif-reply-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
}

.notif-reply-actions button {
    font-size: .7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    border: none;
}

.notif-btn-reply-cancelar {
    background: #f1f3f5;
    color: #6b7684;
}

.notif-btn-reply-enviar {
    background: #0d6efd;
    color: #fff;
}

/* ============ Modal enviar notificación ============ */

.notif-modal-content {
    border: none;
    border-radius: 14px;
    overflow: hidden;
}

.notif-modal-header {
    background: #0c2038;
    border: none;
    padding: 16px 20px;
}

.notif-modal-header .modal-title {
    color: #fff;
    font-weight: 700;
}

.notif-modal-header .close {
    color: #fff;
    opacity: .85;
    text-shadow: none;
}

.notif-modal-header .close:hover {
    opacity: 1;
    color: #fff;
}

.notif-form-label {
    font-weight: 600;
    font-size: .82rem;
    color: #33465e;
}

.notif-input {
    border-radius: 8px;
    border: 1px solid #d8e3f0;
    padding: 9px 11px;
}

.notif-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .15);
}

.notif-tipo-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.notif-tipo-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 11px;
    border-radius: 8px;
    border: 1.5px solid #d8e3f0;
    font-size: .8rem;
    font-weight: 600;
    color: #5b6b81;
    cursor: pointer;
    transition: all .15s ease;
}

.notif-tipo-chip input {
    display: none;
}

.notif-tipo-chip:hover {
    border-color: #9cc4f5;
}

.notif-tipo-chip.active {
    color: var(--notif-color);
    background: color-mix(in srgb, var(--notif-color) 10%, transparent);
    border-color: var(--notif-color);
}

.notif-modal-footer {
    border-top: 1px solid #e7eef8;
    padding: 12px 20px;
}

.notif-btn-cancel {
    color: #5b6b81;
    font-weight: 600;
}

.notif-btn-enviar {
    background: #0d6efd;
    color: #fff;
    font-weight: 600;
    border-radius: 999px;
    padding: 7px 18px;
    border: none;
}

.notif-btn-enviar:hover {
    color: #fff;
    background: #0b5ed7;
}
