﻿/* =========================
   CRM SPLASH (aislado)
   ========================= */
/* =========================
   CRM SPLASH (aislado)
   ========================= */
#crm-splash {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    background: radial-gradient(1200px 700px at 20% 10%, rgba(255,255,255,.06), transparent 60%), radial-gradient(900px 600px at 80% 20%, rgba(255,255,255,.05), transparent 55%), rgba(10,10,10,.96);
    color: rgba(255,255,255,.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity .25s ease, visibility .25s ease;
}

    #crm-splash.hide {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

/* Card más compacta */
.crm-splash-card {
    width: min(720px, calc(100vw - 40px));
    border-radius: 18px;
    padding: 14px 18px; /* ↓ mucho menos */
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 18px 60px rgba(0,0,0,.55);
    text-align: center;
}

/* Menos aire entre elementos */
.crm-splash-top {
    display: grid;
    gap: 2px; /* ↓ */
    justify-items: center;
    margin-bottom: 4px;
}

/* Logo grande y limpio */
.crm-splash-logo {
    width: 250px;
    height: 250px;
    margin: 0;
    padding: 0;
    display: grid;
    place-items: center;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
}

    .crm-splash-logo img {
        width: 250px;
        height: 250px; /* ✅ antes tenías 5600px */
        object-fit: contain;
        display: block;
        filter: drop-shadow(0 10px 22px rgba(0,0,0,.45));
        transform: scale(1.12);
        transform-origin: center;
    }
.crm-splash-title {
    font-weight: 800;
    letter-spacing: .2px;
    font-size: 26px;
    margin: 0;
    line-height: 1.05;
}

.crm-splash-subtitle {
    margin: 0;
    font-size: 18px;
    line-height: 1.05; /* ✅ */
    color: rgba(255,255,255,.78);
    color: rgba(255,255,255,.78);
}

/* Ruleta más grande */
.crm-spinner {
    width: 120px;
    height: 120px;
    border-radius: 999px;
    border: 4px solid rgba(255,255,255,.16);
    border-top-color: rgba(255,255,255,.90);
    animation: crmSpin .85s linear infinite;
    margin: 8px auto 6px auto; /* ↓ */
}

@keyframes crmSpin {
    to {
        transform: rotate(360deg);
    }
}

/* El texto de estado (Listo/Error/etc) */
.crm-loading-text {
    font-size: 22px;
    margin: 0; /* ✅ */
    line-height: 1.1; /* ✅ */
    color: rgba(255,255,255,.72);
}

/* Accesibilidad: reduce motion */
@media (prefers-reduced-motion: reduce) {
    .crm-spinner {
        animation: none;
    }

    #crm-splash {
        transition: none;
    }
}

/* Oculta la app hasta que termine el splash */
#crm-app.crm-app-hidden {
    visibility: hidden;
    opacity: 0;
}

    #crm-app.crm-app-hidden * {
        pointer-events: none;
    }
.crm-splash-logo img {
    transform: scale(1.12);
}

/* =========================================================
   NOTIFICACIONES (GLOBAL)
   - Solo selectores con prefijo notif-
   - No toca nada genérico (div, button, etc.)
   ========================================================= */

/* ===== Overlay ===== */
.notif-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 9998;
}

/* ===== Botón campana + badge (en topbar) ===== */
.notif-bell {
    position: relative;
}

    .notif-bell .notif-badge {
        position: absolute;
        top: -6px;
        right: -6px;
        min-width: 18px;
        height: 18px;
        padding: 0 6px;
        border-radius: 999px;
        background: #0d6efd;
        color: #fff;
        font-weight: 800;
        font-size: 12px;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid #f7f7f7;
    }

/* ===== Panel lateral ===== */
.notif-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100vh;
    z-index: 9999;
    background: #fff;
    border-left: 1px solid rgba(0,0,0,.08);
    box-shadow: -12px 0 32px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
    transition: right .18s ease;
}

    .notif-panel.open {
        right: 0;
    }

/* Móvil: ocupa toda la pantalla */
@media (max-width: 768px) {
    .notif-panel {
        width: 100vw;
        right: -100vw;
    }
}

/* ===== Header ===== */
.notif-head {
    position: sticky;
    top: 0;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px;
    border-bottom: 1px solid rgba(0,0,0,.08);
}

.notif-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
}

.notif-title-ico {
    font-size: 16px;
}

.notif-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,.12);
    background: #fff;
    display: grid;
    place-items: center;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

    .notif-close:hover {
        background: rgba(0,0,0,.03);
    }

/* ===== Toolbar / filtros ===== */
.notif-toolbar,
.notif-filters {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(0,0,0,.06);
}

.notif-toolbar {
    flex-wrap: wrap;
}

.notif-sep {
    width: 1px;
    height: 22px;
    background: rgba(0,0,0,.10);
    margin: 0 6px;
}

.notif-chip {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.12);
    background: rgba(0,0,0,.02);
}

/* ===== Lista ===== */
.notif-list {
    padding: 12px 14px;
    overflow: auto;
    flex: 1;
    background: rgba(0,0,0,.02);
}

.notif-empty {
    margin-top: 10px;
    padding: 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px dashed rgba(0,0,0,.18);
    opacity: .8;
    text-align: center;
}

.notif-error {
    margin: 12px 14px 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(176,0,32,.06);
    border: 1px solid rgba(176,0,32,.18);
    color: #b00020;
}

/* ===== Tarjetas ===== */
.notif-item {
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 10px;
    background: #fff;
}

    .notif-item.unread {
        border-color: rgba(0,0,0,.18);
        box-shadow: 0 6px 18px rgba(0,0,0,.06);
    }

    .notif-item.read {
        opacity: .92;
    }

.notif-item-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
}

.notif-item-title {
    font-weight: 900;
}

.notif-item-date {
    opacity: .7;
    font-size: 12px;
    white-space: nowrap;
}

.notif-item-msg {
    margin-top: 6px;
    opacity: .92;
}

.notif-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.notif-footer {
    padding: 10px 0 16px;
    display: flex;
    justify-content: center;
}


/* ===== FIX layout filtros (móvil y general) ===== */
.notif-filters {
    flex-wrap: wrap; /* ✅ permitir salto de línea */
    align-items: center;
}

.notif-chip {
    max-width: 100%; /* ✅ que el chip no “reviente” */
    flex: 0 1 auto;
}

    .notif-chip span {
        white-space: nowrap; /* ✅ evita "Solo / no / leídas" */
    }

    .notif-chip input[type="checkbox"] {
        margin: 0; /* ✅ evita rarezas de alineación */
    }


/* ===========================
   Blazor Reconnect UI (custom)
   =========================== */
#components-reconnect-modal {
    position: fixed;
    inset: 0;
    display: none; /* Blazor lo muestra/oculta */
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0,0,0,.35);
    z-index: 99999;
}

    #components-reconnect-modal .reconnect-card {
        width: min(520px, 100%);
        background: #fff;
        border-radius: 14px;
        padding: 18px 18px 14px;
        box-shadow: 0 14px 40px rgba(0,0,0,.25);
    }

    #components-reconnect-modal .reconnect-title {
        margin: 0 0 10px;
        font-size: 1.15rem;
        font-weight: 700;
    }

    #components-reconnect-modal .reconnect-body {
        margin: 0 0 12px;
    }

    #components-reconnect-modal .reconnect-p {
        margin: 0 0 6px;
    }

    #components-reconnect-modal .reconnect-try {
        opacity: .8;
        font-size: .95rem;
    }

    #components-reconnect-modal .reconnect-actions {
        display: flex;
        gap: 10px;
    }

    #components-reconnect-modal .reconnect-btn {
        border: 0;
        border-radius: 10px;
        padding: 10px 14px;
        cursor: pointer;
    }

    #components-reconnect-modal .reconnect-small {
        margin: 10px 0 0;
        opacity: .75;
        font-size: .9rem;
    }
