html, body {
    height: 100%;
}

.nxl-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nxl-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

.page-header {
    margin-bottom: 25px;
}

.nxl-content {
   padding: 30px;
}

.modal-backdrop.show {
    backdrop-filter: blur(4px);
    background-color: rgba(0,0,0,0.4);
}

/* Quitar cualquier blur del layout cuando hay modal */
body.modal-open .nxl-navigation,
body.modal-open .nxl-header,
body.modal-open .nxl-container,
body.modal-open .main-content {
    filter: none !important;
    backdrop-filter: none !important;
}

/* Garantizar que el modal esté 100% nítido */
.modal,
.modal-dialog,
.modal-content {
    filter: none !important;
    backdrop-filter: none !important;
}

.modal-backdrop.show {
    backdrop-filter: blur(6px);
    background-color: rgba(0, 0, 0, 0.4);
}

.btn-reniec {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.btn-reniec:hover {
    background-color: #f1b0b7;
    color: #58151c;
}

#menu-principal .nav-link {
    font-weight: 500;
    color: #5c677d;
}

#menu-principal .nav-link.active {
    background-color: #ffffff;
    color: #050505;
}

/* 🔥 FORZAR INLINE REAL */
.acciones-crm {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
}

/* 🔥 RESET TOTAL A BOTONES */
.acciones-crm .btn-icon {
    display: inline-flex !important;
    width: auto !important;
    height: auto !important;
    padding: 6px !important;
    align-items: center;
    justify-content: center;
}

/* 🔥 EVITA QUE <a> SE VUELVA BLOQUE */
.acciones-crm a {
    display: inline-flex !important;
    width: auto !important;
}

.dropdown-menu {
    border-radius: 10px;
    border: none;
    padding: 6px;
}

.dropdown-item {
    border-radius: 8px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: #eef2ff;
    padding-left: 14px;
}

.nxl-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white; /* crema elegante */
    border-bottom: 1px solid #e6dfd3;
}

/* ===== HEADER MENU PREMIUM ===== */
#menu-principal .nav-link {
    font-weight: 500;
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 10px;
    transition: all 0.25s ease;
}

#menu-principal .nav-link:hover {
    background: #f0debe;
    color: #2563eb;
}

/* ===== DROPDOWN ===== */
.dropdown-premium {
    min-width: 240px;
    padding: 8px;
    border-radius: 14px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.08);
}

.dropdown-premium .dropdown-item {
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.dropdown-premium .dropdown-item:hover {
    background: #eff6ff;
    color: #2563eb;
    padding-left: 18px;
}

/* =========================
   DROPDOWN PREMIUM
========================= */

.dropdown-premium {
    min-width: 230px;
    border-radius: 16px;
    padding: 10px;
    margin-top: 10px;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.04);
    animation: fadeDropdown .25s ease;
}

.dropdown-premium .dropdown-item {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #2c2c2c;
    transition: all .25s ease;
}

.dropdown-premium .dropdown-item:hover {
    background: #f5f7fb;
    transform: translateX(4px);
    color: #0d6efd;
}

/* animación */
@keyframes fadeDropdown {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 992px) {
    .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}
/* ===== Dropdown menú premium vertical ===== */
#menu-principal .dropdown-menu {
    display: none;
    min-width: 220px;
    padding: 8px 0;
    flex-direction: column !important;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1050;
    background: #fff;
    border-radius: 12px;
}

/* Mostrar al abrir */
#menu-principal .dropdown-menu.show {
    display: block !important;
}

/* Items verticales */
#menu-principal .dropdown-menu li {
    display: block;
    width: 100%;
}

/* Links del submenu */
#menu-principal .dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 18px;
    font-size: 14px;
    white-space: nowrap;
}

/* Hover elegante */
#menu-principal .dropdown-item:hover {
    background: #f8f9fa;
    color: #0d6efd;
}
#menu-principal .dropdown-menu:not(.show) {
    display: none !important;
}

/* =====================================
   ELIMINAR ESPACIO RESERVADO DEL SIDEBAR
===================================== */

.nxl-container,
.nxl-content,
.main-content,
.nxl-main,
main {
    margin-left: 0 !important;
    padding-left: 0 !important;
    left: 0 !important;
    width: 100% !important;
}

/* si el template usa body con clase sidebar */
body .nxl-container {
    margin-left: 0 !important;
}

/* eliminar cualquier ancho calculado */
.nxl-container {
    width: 100% !important;
    max-width: 100% !important;
}
/* =====================================
   ELIMINAR ESPACIO FANTASMA EN HEADER
===================================== */

.nxl-header {
    left: 0 !important;
    margin-left: 0 !important;
    width: 100% !important;
}

.nxl-header .header-wrapper {
    margin-left: 0 !important;
    padding-left: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* =====================================
   FIX COLOR HEADER NXL
===================================== */

.nxl-header,
.nxl-header .header-wrapper,
.nxl-header .header-inner,
.nxl-header .navbar,
.nxl-header .container,
.nxl-header .container-fluid {
    background: #5685d1 !important;
}

/* ================= PERFIL ================= */

.card-perfil {
    border-radius: 16px;
}

/* HEADER CREMA PRO */
.perfil-header {
    background: linear-gradient(135deg, #3b82f6, #f5e6c8);
    padding: 30px 20px 50px;
    border-bottom: 1px solid #e6dfd3;
}

/* AVATAR */
.avatar-perfil {
    width: 95px;
    height: 95px;
    background: #ffffff;
    color: #b08968;
    border-radius: 50%;
    font-size: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

/* WHATSAPP */
.btn-whatsapp {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 45px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all .25s ease;
}

.btn-whatsapp:hover {
    transform: translateX(-50%) scale(1.1);
}

/* ================= MENU ================= */

.menu-paciente {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    color: #6b5e4a;
    text-decoration: none;
    font-weight: 500;
    transition: all .25s ease;
}

.menu-item i {
    font-size: 16px;
}

/* HOVER */
.menu-item:hover {
    background: #f9f4ea;
    color: #b08968;
    transform: translateX(4px);
}

/* ACTIVO CREMA PREMIUM */
.menu-item.active {
    background: linear-gradient(135deg, #ecd19a, #f5e6c8);
    color: #5c4b3b;
    box-shadow: 0 6px 14px rgba(0,0,0,0.05);
}

/* ================= DERECHA ================= */

.card-tratamientos {
    border-radius: 16px;
}

.tratamiento-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    background: #fdfaf4;
    margin-bottom: 10px;
    transition: all .2s ease;
}

.tratamiento-item:hover {
    transform: scale(1.02);
    background: #f5e6c8;
}