/* =============================
   Variables globales de color
   ============================= */
:root {
    /* Primarios */
    --color-primary: #1f60ab;
    --color-primary-gradient-end: #3786e1;
    --color-primary-hover-start: #2a6fbe;
    --color-primary-hover-end: #4794ef;

    /* Secundarios / Neutros oscuros */
    --color-secondary: #000000;
    --color-secondary-gradient-end: #333333;
    --color-secondary-hover-start: #111111;
    --color-secondary-hover-end: #444444;

    /* Éxito */
    --color-success: #0f8f55;
    --color-success-gradient-end: #25c275;
    --color-success-hover-start: #13a964;
    --color-success-hover-end: #31d283;

    /* Peligro */
    --color-danger: #c62828;
    --color-danger-gradient-end: #ff5252;
    --color-danger-hover-start: #d73232;
    --color-danger-hover-end: #ff6262;

    /* Advertencia */
    --color-warning: #f6a100;
    --color-warning-gradient-end: #ffd257;
    --color-warning-hover-start: #ffb014;
    --color-warning-hover-end: #ffe07a;

    /* Info */
    --color-info: #138496;
    --color-info-gradient-end: #20c0e8;
    --color-info-hover-start: #1492a6;
    --color-info-hover-end: #39c9ed;

    /* Light */
    --color-light: #ffffff;
    --color-light-alt: #e9ecef;
    --color-light-hover: #dfe2e4;

    /* Dark */
    --color-dark: #212529;
    --color-dark-gradient-end: #3a3f44;
    --color-dark-hover-start: #2c3237;
    --color-dark-hover-end: #4a5056;

    /* Sidebar gradient */
    --sidebar-gradient-start: rgba(0,0,0,0.85);
    --sidebar-gradient-end: rgba(31,96,171,0.85);

    /* Misceláneos */
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.5);
    --overlay-bg: rgba(0,0,0,0.4);
    --btn-radius: 16px;
}

body {
    overflow-x: hidden;
    background-color: var(--color-light-alt);
}

/* ====== Auth (no session) ====== */
body.auth-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d1117;
}

/* Blobs azules para fondo de auth-layout */
body.auth-layout::before {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    left: 13%;
    top: 7%;
    filter: blur(80px);
    background: radial-gradient(circle at 40% 40%, rgba(31,96,171,0.38) 0%, rgba(31,96,171,0.12) 55%, transparent 80%), radial-gradient(circle at 60% 60%, rgba(55,134,225,0.32) 0%, rgba(55,134,225,0.08) 55%, transparent 80%);
    z-index: -1;
    animation: circleMove 12s linear infinite alternate;
    opacity: 0.85;
    pointer-events: none;
}

body.auth-layout::after {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    right: 17%;
    top: 3%;
    filter: blur(80px);
    background: radial-gradient(circle at 30% 30%, rgba(31,96,171,0.55) 0%, rgba(31,96,171,0.14) 50%, transparent 68%), radial-gradient(circle at 75% 15%, rgba(55,134,225,0.45) 0%, rgba(55,134,225,0.10) 48%, transparent 65%), radial-gradient(circle at 60% 60%, rgba(55,134,225,0.32) 0%, rgba(55,134,225,0.08) 55%, transparent 80%);
    z-index: -1;
    animation: circleMove 18s ease-in-out infinite alternate;
    opacity: 0.85;
    pointer-events: none;
}

@media (max-width: 992px) {
    /* Blobs azules para fondo de auth-layout */
    body.auth-layout::before {
        position: absolute;
        width: 200px;
        height: 200px;
        left: 47%;
        top: 7%;
        filter: blur(40px);
        background: radial-gradient(circle at 40% 40%, rgba(31,96,171,0.38) 0%, rgba(31,96,171,0.12) 55%, transparent 80%), radial-gradient(circle at 60% 60%, rgba(55,134,225,0.32) 0%, rgba(55,134,225,0.08) 55%, transparent 80%);
        z-index: -1;
        opacity: 0.85;
        pointer-events: none;
        animation: none;
    }

    body.auth-layout::after {
        position: absolute;
        width: 200px;
        height: 200px;
        right: 47%;
        top: 70%;
        filter: blur(80px);
        background: radial-gradient(circle at 30% 30%, rgba(31,96,171,0.55) 0%, rgba(31,96,171,0.14) 50%, transparent 68%), radial-gradient(circle at 75% 15%, rgba(55,134,225,0.45) 0%, rgba(55,134,225,0.10) 48%, transparent 65%), radial-gradient(circle at 60% 60%, rgba(55,134,225,0.32) 0%, rgba(55,134,225,0.08) 55%, transparent 80%);
        z-index: -1;
        opacity: 0.85;
        pointer-events: none;
        animation: none;
    }
}

@keyframes circleMove {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(150px, 150px) rotate(45deg);
    }
    50% {
        transform: translate(0, 320px) rotate(90deg);
    }
    75% {
        transform: translate(-150px, 150px) rotate(135deg);
    }
    100% {
        transform: translate(0, 0) rotate(180deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

a, a:hover {
    text-decoration: none !important;
}

/* Bootstrap grid: col-xxs y col-xxxs */
.col-xxs, .col-xxxs {
    position: relative;
    width: 100%;
    padding-right: 12px;
    padding-left: 12px;
}

@media (min-width: 460px) {
    .col-xxs {
        flex: 1 0 0%;
        max-width: 100%;
    }
    .col-xxs-auto { flex: 0 0 auto; width: auto; max-width: none; }
    .col-xxs-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-xxs-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-xxs-3 { flex: 0 0 25%; max-width: 25%; }
    .col-xxs-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-xxs-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-xxs-6 { flex: 0 0 50%; max-width: 50%; }
    .col-xxs-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-xxs-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-xxs-9 { flex: 0 0 75%; max-width: 75%; }
    .col-xxs-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-xxs-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-xxs-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 320px) {
    .col-xxxs {
        flex: 1 0 0%;
        max-width: 100%;
    }
    .col-xxxs-auto { flex: 0 0 auto; width: auto; max-width: none; }
    .col-xxxs-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-xxxs-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-xxxs-3 { flex: 0 0 25%; max-width: 25%; }
    .col-xxxs-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-xxxs-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-xxxs-6 { flex: 0 0 50%; max-width: 50%; }
    .col-xxxs-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-xxxs-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-xxxs-9 { flex: 0 0 75%; max-width: 75%; }
    .col-xxxs-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-xxxs-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-xxxs-12 { flex: 0 0 100%; max-width: 100%; }
}

/* Bootstrap grid: col-xxl y col-xxxl */
.col-xxl, .col-xxxl {
    position: relative;
    width: 100%;
    padding-right: 12px;
    padding-left: 12px;
}

@media (min-width: 1400px) {
    .col-xxl {
        flex: 1 0 0%;
        max-width: 100%;
    }
    .col-xxl-auto { flex: 0 0 auto; width: auto; max-width: none; }
    .col-xxl-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-xxl-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-xxl-3 { flex: 0 0 25%; max-width: 25%; }
    .col-xxl-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-xxl-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-xxl-6 { flex: 0 0 50%; max-width: 50%; }
    .col-xxl-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-xxl-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-xxl-9 { flex: 0 0 75%; max-width: 75%; }
    .col-xxl-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-xxl-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-xxl-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 1800px) {
    .col-xxxl {
        flex: 1 0 0%;
        max-width: 100%;
    }
    .col-xxxl-auto { flex: 0 0 auto; width: auto; max-width: none; }
    .col-xxxl-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-xxxl-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-xxxl-3 { flex: 0 0 25%; max-width: 25%; }
    .col-xxxl-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-xxxl-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-xxxl-6 { flex: 0 0 50%; max-width: 50%; }
    .col-xxxl-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-xxxl-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-xxxl-9 { flex: 0 0 75%; max-width: 75%; }
    .col-xxxl-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-xxxl-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-xxxl-12 { flex: 0 0 100%; max-width: 100%; }
}

/* Truncar a 1 línea */
.text-truncate-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

/* Truncar a 2 líneas */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

.card {
    border-radius: 16px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    border: 0;
    transition: box-shadow .3s ease;
}

.card:hover {
    box-shadow: 4px 8px 20px rgba(0,0,0,0.25);
}

/* Card específica para notificaciones (estilo ligero basado en .card) */
.card-notification {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    border-radius: 14px;
    padding: 0.9rem 1rem;
    background: var(--card-bg, #fff);
    color: var(--card-color, #222);
    box-shadow: 2px 4px 12px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.03);
    transition: box-shadow .2s ease, transform .12s ease;
}

.card-notification { position: relative; }

.card-notification:hover {
    box-shadow: 6px 12px 26px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.card-notification .cn-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.card-notification .cn-body {
    flex: 1 1 auto;
    min-width: 0;
}

.card-notification .cn-title {
    font-weight: 600;
    margin-bottom: 0.15rem;
    font-size: 0.95rem;
}

.card-notification .cn-message {
    color: rgba(0,0,0,0.6);
    font-size: 0.86rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-notification .cn-time {
    font-size: 0.78rem;
    color: rgba(0,0,0,0.45);
}

.card-notification .cn-actions {
    margin-left: 0.5rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.card-notification .cn-unread {
    display: inline-block;
    background: var(--color-primary, #0d6efd);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.25rem 0.45rem;
    border-radius: 10px;
}

/* Variantes por tipo */
.card-notification.info .cn-icon { background: rgba(13,110,253,0.08); color: var(--color-primary); }
.card-notification.success .cn-icon { background: rgba(25,135,84,0.08); color: var(--bs-success, #198754); }
.card-notification.warning .cn-icon { background: rgba(255,193,7,0.08); color: var(--bs-warning, #ffc107); }
.card-notification.error .cn-icon { background: rgba(220,53,69,0.08); color: var(--bs-danger, #dc3545); }

/* Modo oscuro / sobre fondos oscuros — mantener contraste */
body.theme-dark .card-notification {
    background: rgba(255,255,255,0.03);
    color: #eee;
    border-color: rgba(255,255,255,0.04);
}

/* Resaltar notificaciones no leídas */
.card-notification.unread {
    border: 1.5px solid rgba(13,110,253,0.18);
    box-shadow: 0 6px 18px rgba(13,110,253,0.06);
}

.card-notification.unread.info { border-color: rgba(13,110,253,0.22); }
.card-notification.unread.success { border-color: rgba(25,135,84,0.22); box-shadow: 0 6px 18px rgba(25,135,84,0.05); }
.card-notification.unread.warning { border-color: rgba(255,193,7,0.22); box-shadow: 0 6px 18px rgba(255,193,7,0.04); }
.card-notification.unread.error { border-color: rgba(220,53,69,0.22); box-shadow: 0 6px 18px rgba(220,53,69,0.05); }

/* Pulse sutil para no leídas (opcional) */
.card-notification.unread.pulse {
    animation: notificationPulse 1.5s 1;
}
/* Estilos compactos para dropdown/topbar */
.dropdown-menu .card-notification,
.navbar .dropdown-menu .card-notification {
    padding: 0.5rem 0.6rem;
    gap: .6rem;
    background: transparent;
    box-shadow: none;
    border: 0;
    color: var(--navbar-color, #fff);
}

.dropdown-menu .card-notification .cn-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 8px;
    font-size: 1rem;
}

.dropdown-menu .card-notification .cn-title {
    font-size: 0.9rem;
    color: var(--navbar-color, #fff);
}

.dropdown-menu .card-notification .cn-message {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.8);
    white-space: normal;
}

.dropdown-menu .card-notification .cn-time { display: none; }

.dropdown-menu .card-notification .cn-actions { gap: .4rem; }

.dropdown-menu .card-notification + .card-notification { border-top: 1px solid rgba(255,255,255,0.04); }



.fade-in {
    animation: fadeIn .45s both;
}

.auth-card {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
    color: #fff;
}

.auth-card.wide {
    max-width: 560px;
}

.auth-logo img {
    max-height: 90px;
}

#login-form .form-control, .form-select {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
}

#login-form .form-control:focus {
    background: rgba(255,255,255,0.15);
    color: #fff;
}



a {
    color: var(--color-primary);
    text-decoration: none;
}

.text-secondary {
    color: rgba(255,255,255,.65) !important;
}

.small-muted {
    font-size: .75rem;
    opacity: .7;
}

/* Glassmorphism */
.glass {
    background: var(--glass-bg);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    border: 1px solid var(--glass-border);
    transition: padding .3s ease, max-height .3s ease, border-radius .3s ease;
}

/* Sidebar glassmorphism */
#sidebar {
    width: 300px;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--sidebar-gradient-start), var(--sidebar-gradient-end));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    transition: all 0.3s;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
}

/* Sidebar colapsada parcialmente (solo iconos) */
#sidebar.collapsed {
    width: 110px;
    overflow-x: hidden;
}

/* Ocultar subtítulos y chevrons cuando está colapsado */
#sidebar.collapsed .nav-link i.fas.fa-chevron-down {
    display: none;
}

/* Transición suave */
#sidebar, #content {
    transition: margin-left .3s ease, width .3s ease;
}

#sidebar .nav-link {
    color: #fff;
    transition: all 0.2s;
}

#sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

#sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 0.375rem;
}

#sidebar .nav-link .link-text {
    transition: opacity 0.2s, transform 0.2s;
    font-size: 1.1rem;
}

#sidebar.collapsed .nav-link .link-text { 
    opacity: 0; 
    transform: translateX(-20px); 
}

/* Estilos de enlaces del sidebar */
#sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .925rem;
    padding: .75rem .95rem;
    color: #fff;
    transition: all 0.2s;
}

#sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    filter: brightness(1.15);
}

#sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 0.375rem;
}

#sidebar .nav-link .link-text {
    transition: opacity 0.2s, transform 0.2s;
    font-size: 1.1rem;
}

#sidebar .nav-link i.fas, #sidebar .nav-link i.fa {
    width: 20px;
    text-align: center;
    font-size: 1.05rem;
}

/* =============================
   Insignias de Valor (VB) UI
   ============================= */
.vb-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    padding: 6px;
}
.vb-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--color-dark);
}
.vb-levels {
    display: flex;
    gap: .5rem;
    align-items: center;
}
.vb-level {
    padding: .75rem 1rem; /* más padding para mejorar legibilidad */
    border-radius: 8px;
    display: flex;
    gap: .6rem;
    align-items: center;
    justify-content: flex-start;
    background: #f5f5f5;
    color: #222;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.vb-level.locked {
    opacity: .6;
}
.vb-level__icon {
    font-size: 1.35rem; /* mantener icono legible */
}
.vb-level__label {
    font-size: 1.25rem; /* aumentar tamaño del texto principal */
    line-height: 1.1;
    color: #111;
    font-weight: 600;
}
.vb-level__label small {
    display: block;
    font-size: .95rem; /* aumentar tamaño del paréntesis/valor */
    color: rgba(0,0,0,0.65);
    font-weight: 500;
}
.vb-level--bronze { background: linear-gradient(180deg,#f7efe9,#f0dbca); }
.vb-level--silver { background: linear-gradient(180deg,#f3f6f8,#e9eef3); }
.vb-level--gold { background: linear-gradient(180deg,#fff7e6,#ffefc7); }
.vb-level--diamond { background: linear-gradient(180deg,#eafff9,#d7fff1); }

/* Pulse animation for unlock
   Applied only once per unlock via JS/localStorage */
@keyframes vbPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(0,0,0,0); }
    50% { transform: scale(1.06); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(0,0,0,0); }
}
.vb-pulse {
    animation: vbPulse .9s ease-in-out both;
}

.vb-count {
    margin-top: .5rem;
    color: rgba(0,0,0,0.65);
}

/* Valor Badges UI */
.vb-row {
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    padding: 1rem;
}
.vb-icon { width:64px; height:64px; display:block; margin:0 auto;  }
.vb-name { font-weight:700; opacity:.9; }
.vb-level {  text-align:left; padding:20px; border-radius:10px; color:#fff; box-shadow:0 6px 18px rgba(0,0,0,0.06); transition:transform .18s ease, box-shadow .18s ease, opacity .18s ease; opacity:0.95; background:#f0f0f0; color:#6c757d; border:1px solid #e6e6e6; }
.vb-level.locked { opacity:0.6; color:#6c757d; background:#f6f6f6; box-shadow:none; }
.vb-level.unlocked { opacity:1; transform:translateY(-4px); }
.vb-level__icon { font-size:20px; }
.vb-level__label { margin-top:0; font-size:1.15rem; }

.vb-level__label small { display:block; opacity:0.95; font-size:13px; }

.vb-level__img-container {
    position: relative;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--overlay-bg);
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(31,96,171,0.10);
    overflow: hidden;
}

/* Imagen del icono del nivel (PNG local) */
.vb-level__img {
    width:48px;
    height:48px;
    object-fit:contain;
    display:block;
}

/* Overlay de check (cuando está desbloqueado) */
.vb-level__check {
    position:absolute;
    right:8px;
    top:8px;
    background: rgba(255,255,255,0.9);
    color: #0a0;
    border-radius: 50%;
    width:22px;
    height:22px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transform: translateY(-6px);
}

/* Overlay de candado (cuando está bloqueado) */
.vb-level__lock {
    position:absolute;
    right:0px;
    bottom:0px;
    background: rgba(0,0,0,0.06);
    color: rgba(0,0,0,0.55);
    border-radius: 50%;
    width:22px;
    height:22px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:14px;
}

/* Posicionamiento relativo para el icon wrapper */
.vb-level__icon { position: relative; }
.vb-name { font-size:1.1rem; color:var(--color-dark); opacity:0.98; font-weight:700; }

.vb-level--bronze.unlocked { background: linear-gradient(135deg, #bf8970, #d2a58b); box-shadow: 0 8px 20px rgba(191,137,112,0.18); }
.vb-level--silver.unlocked { background: linear-gradient(135deg, rgba(192,192,192,1), #ededed); color:#111; box-shadow: 0 8px 20px rgba(192,192,192,0.12); }
.vb-level--gold.unlocked { background: linear-gradient(135deg, #d9ad26, #f1c85a); box-shadow: 0 8px 20px rgba(217,173,38,0.18); }
.vb-level--diamond.unlocked { background: linear-gradient(135deg, #34EBC9, #9ff0e0); color:#063; box-shadow: 0 10px 26px rgba(52,235,201,0.12); }

.vb-count { margin-top:.5rem; color:var(--color-dark); opacity:0.7; font-size:.9rem; }

/* Pulse animation for unlocked level */
.vb-pulse {
    animation: vbPulse 1s ease-out 0s 2;
}

@keyframes vbPulse {
    0% { transform: scale(1); box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
    50% { transform: scale(1.06); box-shadow: 0 12px 30px rgba(0,0,0,0.12); }
    100% { transform: scale(1); box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
}

/* Tooltip simple (title handled by browser) */
.vb-level[title] { cursor: help; }


#sidebar.collapsed .nav-link .link-text {
    opacity: 0;
    transform: translateX(-20px);
}

#sidebar.collapsed .nav-link {
    justify-content: center;
    gap: 0;
    padding: 0;
    flex-direction: column;
    height: 56px;
}

#sidebar.collapsed .nav-link i.fas, #sidebar.collapsed .nav-link i.fa {
    margin: 0 !important;
    font-size: 1.25rem;
    line-height: 1;
}

#sidebar.collapsed .nav-link > span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#sidebar.collapsed .nav-item {
    position: relative;
}

#sidebar.collapsed .nav-item .nav-link:after {
    content: "";
    position: absolute;
    inset: 0;
}

#sidebar.collapsed .nav-item + .nav-item {
    margin-top: .15rem;
}

/* Ajustar hr separador en colapsado */
#sidebar hr {
    transition: margin .3s ease;
}

#sidebar.collapsed hr {
    margin-left: .75rem;
    margin-right: .75rem;
}

/* Logo */
#sidebar #container-logo {
    height: 120px;
}

#sidebar .logo {
    object-fit: contain;
}

/* Contenido principal */
#content {
    transition: all 0.3s;
    margin-left: 300px;
    min-height: 100vh;
}

/* Botón toggle flecha */
.toggle-arrow-btn {
    position: relative;
    overflow: hidden;
}

.toggle-arrow-btn .toggle-icon-wrapper, .search-toggle-btn .toggle-icon-wrapper {
    width: 20px;
    height: 20px;
}

.toggle-arrow-btn .toggle-icon {
    transition: transform .35s ease;
}

#sidebar.collapsed ~ #content .toggle-arrow-btn .toggle-icon {
    transform: rotate(180deg);
}

/* Ajuste cuando usamos position fixed del sidebar: rotar al cambiar la clase en body mediante JS */
.sidebar-collapsed .toggle-arrow-btn .toggle-icon {
    transform: rotate(180deg);
}

/* Ajustes visuales específicos para el botón de búsqueda cuando comparte estilo del toggle */
.search-toggle-btn.toggle-arrow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; /* igual tamaño que .toggle-arrow-btn si es necesario */
    height: 42px;
    padding: 0; /* ya se usa p-0 en markup, asegurar consistencia */
    border-radius: .45rem; /* coincide con otros botones pequeños */
    box-shadow: 0 4px 10px rgba(var(--btn-shadow-color,0,0,0), .08);
}

.search-toggle-btn.toggle-arrow-btn:focus {
    outline: 3px solid rgba(13,110,253,0.14);
    outline-offset: 1px;
}

/* Mantener separaciones en la zona flotante */
.floating-buttons-wrapper .search-toggle-btn {
    margin-right: .5rem;
}


/* Overlay para menú móvil */
#sidebarOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s;
    z-index: 999;
}

#sidebarOverlay.show {
    opacity: 1;
    visibility: visible;
}

/* Responsive: menú oculto inicialmente y a pantalla completa */
@media (max-width: 991.98px) {
    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 100%; /* ocupar todo el ancho cuando esté visible */
        transform: translateX(-100%); /* oculto por defecto */
        transition: transform .3s ease;
    }
    #sidebar.mobile-open {
        transform: translateX(0);
    }
    #sidebar .sidebar-scroll {
        overflow-y: auto !important;
    }
    #sidebar.collapsed .sidebar-scroll {
        overflow-y: auto;
    }
    #content {
        margin-left: 0 !important;
        width: 100%;
    }
    #sidebar.collapsed {
        width: 260px;
    }
    #sidebar .nav-link .link-text {
        opacity: 1 !important;
        transform: none !important;
    }

    /* En móvil: ocultar cualquier botón de búsqueda flotante y mostrar la lupa dentro del sidebar cuando se abre */
    .floating-buttons-wrapper .search-toggle-btn { display: none !important; }

    /* Cuando el sidebar está abierto en móvil (clase aplicada en body o en sidebar), mostrar el wrapper interno con la lupa a la derecha */
    #sidebar.mobile-open .sidebar-toggle-wrapper,
    body.sidebar-open #sidebar .sidebar-toggle-wrapper {
        display: flex !important;
        justify-content: flex-end !important;
        padding-right: .5rem;
    }
}

/* Chevron rotation */
.rotate-180 {
    transform: rotate(180deg);
    transition: transform 0.3s;
}

.rotate-0 {
    transform: rotate(0deg);
    transition: transform 0.3s;
}


/* Utilidades de bordes y sombras */
.rounded {
    border-radius: 16px !important;
}

.rounded-top {
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
}

.rounded-bottom {
    border-bottom-left-radius: 16px !important;
    border-bottom-right-radius: 16px !important;
}

.rounded-left {
    border-top-left-radius: 16px !important;
    border-bottom-left-radius: 16px !important;
}

.rounded-right {
    border-top-right-radius: 16px !important;
    border-bottom-right-radius: 16px !important;
}

.rounded-sm {
    border-radius: 8px !important;
}

.rounded-sm-top {
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
}

.rounded-sm-bottom {
    border-bottom-left-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}

.rounded-sm-left {
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
}

.rounded-sm-right {
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}

.shadow-sm {
    box-shadow: 0 1px 3px rgba(0,0,0,.1) !important;
}

.shadow {
    box-shadow: 0 4px 6px rgba(0,0,0,.1) !important;
}

.shadow-lg {
    box-shadow: 0 10px 15px rgba(0,0,0,.2) !important;
}


/* Botones gradiente modernos */
.btn {
    border-radius: 16px !important;
    border: 0;
    position: relative;
    overflow: hidden;
    transition: background .35s ease, transform .18s ease, box-shadow .35s ease, filter .35s ease, color .35s ease;
    padding: 10px 20px;
}

.btn:focus {
    box-shadow: 0 0 0 .2rem rgba(31,96,171,.25);
}
.btn-primary {
    --bs-btn-bg: var(--color-primary);
    --bs-btn-border-color: var(--color-primary);
    --btn-shadow-color:31,96,171;
    background:linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-gradient-end) 100%);
    color:#fff;
}
 .btn-primary:hover {
    background: linear-gradient(135deg,var(--color-primary-hover-start) 0%, var(--color-primary-hover-end) 100%);
}
.btn-secondary {
    --bs-btn-bg: var(--color-secondary);
    --bs-btn-border-color: var(--color-secondary);
    color: #fff;
    --btn-shadow-color:0,0,0;
    background: linear-gradient(135deg,var(--color-secondary) 0%, var(--color-secondary-gradient-end) 100%);
}

.btn-secondary:hover {
    background: linear-gradient(135deg,var(--color-secondary-hover-start) 0%, var(--color-secondary-hover-end) 100%);
}
.btn-success {
    --bs-btn-bg: var(--color-success);
    --bs-btn-border-color: var(--color-success);
    color: #fff;
    --btn-shadow-color:15,143,85;
    background: linear-gradient(135deg,var(--color-success) 0%, var(--color-success-gradient-end) 100%);
}

.btn-success:hover {
    background: linear-gradient(135deg,var(--color-success-hover-start) 0%, var(--color-success-hover-end) 100%);
}
.btn-danger {
    --bs-btn-bg: var(--color-danger);
    --bs-btn-border-color: var(--color-danger);
    color: #fff;
    --btn-shadow-color:198,40,40;
    background: linear-gradient(135deg,var(--color-danger) 0%, var(--color-danger-gradient-end) 100%);
}

.btn-danger:hover {
    background: linear-gradient(135deg,var(--color-danger-hover-start) 0%, var(--color-danger-hover-end) 100%);
}
.btn-warning {
    --bs-btn-bg: var(--color-warning);
    --bs-btn-border-color: var(--color-warning);
    color: #212529;
    --btn-shadow-color:246,161,0;
    background: linear-gradient(135deg,var(--color-warning) 0%, var(--color-warning-gradient-end) 100%);
}

.btn-warning:hover {
    background: linear-gradient(135deg,var(--color-warning-hover-start) 0%, var(--color-warning-hover-end) 100%);
}
.btn-info {
    --bs-btn-bg: var(--color-info);
    --bs-btn-border-color: var(--color-info);
    color: #fff;
    --btn-shadow-color:19,132,150;
    background: linear-gradient(135deg,var(--color-info) 0%, var(--color-info-gradient-end) 100%);
}

.btn-info:hover {
    background: linear-gradient(135deg,var(--color-info-hover-start) 0%, var(--color-info-hover-end) 100%);
}
.btn-light {
    --bs-btn-bg: var(--color-light);
    color: #212529;
    --btn-shadow-color:200,200,200;
    background: linear-gradient(135deg,var(--color-light) 0%, var(--color-light-alt) 100%);
    border: 1.5px solid var(--color-light-hover);
}

.btn-light:hover {
    background: linear-gradient(135deg,var(--color-light) 0%, var(--color-light-hover) 100%);
}

.btn-dark {
    --bs-btn-bg: var(--color-dark);
    color: #fff;
    --btn-shadow-color:33,37,41;
    background: linear-gradient(135deg,var(--color-dark) 0%, var(--color-dark-gradient-end) 100%);
}

.btn-dark:hover {
    background: linear-gradient(135deg,var(--color-dark-hover-start) 0%, var(--color-dark-hover-end) 100%);
}

.btn-icon {
    padding: 8px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px !important;
    border: 1.5px solid rgba(0,0,0,0.05);
}

/* Background gradient classes */
.bg-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-gradient-end) 100%) !important;
    color: #fff !important;
}

.bg-secondary {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-gradient-end) 100%) !important;
    color: #fff !important;
}

.bg-success {
    background: linear-gradient(135deg, var(--color-success) 0%, var(--color-success-gradient-end) 100%) !important;
    color: #fff !important;
}

.bg-danger {
    background: linear-gradient(135deg, var(--color-danger) 0%, var(--color-danger-gradient-end) 100%) !important;
    color: #fff !important;
}

.bg-warning {
    background: linear-gradient(135deg, var(--color-warning) 0%, var(--color-warning-gradient-end) 100%) !important;
    color: #212529 !important;
}

.bg-info {
    background: linear-gradient(135deg, var(--color-info) 0%, var(--color-info-gradient-end) 100%) !important;
    color: #fff !important;
}

.bg-light {
    background: linear-gradient(135deg, var(--color-light) 0%, var(--color-light-alt) 100%) !important;
    border: 1.5px solid var(--color-light-hover);
    color: #212529 !important;
}

.bg-dark {
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-gradient-end) 100%) !important;
    color: #fff !important;
}

/* Text color classes (no gradient) */
.text-primary {
    color: var(--color-primary) !important;
}

.text-secondary {
    color: var(--color-secondary) !important;
}

.text-success {
    color: var(--color-success) !important;
}

.text-danger {
    color: var(--color-danger) !important;
}

.text-warning {
    color: var(--color-warning) !important;
}

.text-info {
    color: var(--color-info) !important;
}

.text-light {
    color: var(--color-light) !important;
}

.text-dark {
    color: var(--color-dark) !important;
}

/* Pagination modern styles */
.page-item {
    display: inline-block;
    margin-right: 8px;
}

.page-item:last-child {
    margin-right: 0;
}

@media (max-width: 576px) {
    .pagination {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
        max-width: 576px;
        margin: 0 auto;
    }
    .page-item {
        display: block;
        width: 100%;
        margin-right: 0;
    }
    .page-link {
        width: 100%;
        text-align: center;
    }
}

.page-link {
    color: var(--color-primary);
    background-color: var(--color-light);
    border: 1.5px solid var(--color-light-alt);
    border-radius: 16px;
    padding: 0.5rem 1rem;
    margin: 0 2px;
    font-weight: 500;
    transition: all 0.2s;
}

.page-link:hover, .page-link:focus {
    color: #fff;
    background: linear-gradient(135deg, var(--color-primary-hover-start) 0%, var(--color-primary-hover-end) 100%);
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(31,96,171,0.08);
    outline: none;
}

.page-item.active .page-link {
    color: #fff;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-gradient-end) 100%);
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(31,96,171,0.12);
}

.page-item.disabled .page-link {
    color: var(--color-secondary);
    background-color: var(--color-light-alt);
    border-color: var(--color-light-hover);
    opacity: 0.6;
    cursor: not-allowed;
}

.dt-length select, #dt-search-0 {
    margin-left: 5px !important;
}

@media (max-width: 767.98px) {
    .dt-search {
        text-align: right !important;
        margin-bottom: 1rem;
    }
}



/* Transiciones y estados activos */
.btn:not(:disabled):not(.disabled):hover {
    filter: brightness(1.05);
    box-shadow: 0 6px 14px -4px rgba(var(--btn-shadow-color,0,0,0), .45);
}

.btn:not(:disabled):not(.disabled):active:hover {
    transform: translateY(0);
}

.btn:active {
    transform: translateY(2px);
    filter: brightness(.95);
}

.btn.disabled, .btn:disabled {
    opacity: .65;
    background-image: none !important;
}

/* Outline buttons */
.btn-outline-primary {
    background: rgba(31,96,171,.06);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    --btn-shadow-color:31,96,171;
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    color: #fff;
    background: linear-gradient(135deg,var(--color-primary) 0%, var(--color-primary-gradient-end) 100%);
    box-shadow: 0 6px 14px -4px rgba(31,96,171,.45);
}

.btn-outline-secondary {
    background: rgba(0,0,0,.06);
    color: var(--color-secondary);
    border: 2px solid var(--color-secondary);
    --btn-shadow-color:0,0,0;
}

.btn-outline-secondary:hover, .btn-outline-secondary:focus {
    color: #fff;
    background: linear-gradient(135deg,var(--color-secondary) 0%, var(--color-secondary-gradient-end) 100%);
    box-shadow: 0 6px 14px -4px rgba(0,0,0,.5);
}

.btn-outline-success {
    background: rgba(15,143,85,.07);
    color: var(--color-success);
    border: 2px solid var(--color-success);
    --btn-shadow-color:15,143,85;
}

.btn-outline-success:hover, .btn-outline-success:focus {
    color: #fff;
    background: linear-gradient(135deg,var(--color-success) 0%, var(--color-success-gradient-end) 100%);
    box-shadow: 0 6px 14px -4px rgba(15,143,85,.45);
}

.btn-outline-danger {
    background: rgba(198,40,40,.07);
    color: var(--color-danger);
    border: 2px solid var(--color-danger);
    --btn-shadow-color:198,40,40;
}

.btn-outline-danger:hover, .btn-outline-danger:focus {
    color: #fff;
    background: linear-gradient(135deg,var(--color-danger) 0%, var(--color-danger-gradient-end) 100%);
    box-shadow: 0 6px 14px -4px rgba(198,40,40,.45);
}

.btn-outline-warning {
    background: rgba(246,161,0,.09);
    color: #b57600;
    border: 2px solid var(--color-warning);
    --btn-shadow-color:246,161,0;
}

.btn-outline-warning:hover, .btn-outline-warning:focus {
    color: #212529;
    background: linear-gradient(135deg,var(--color-warning) 0%, var(--color-warning-gradient-end) 100%);
    box-shadow: 0 6px 14px -4px rgba(246,161,0,.45);
}

.btn-outline-info {
    background: rgba(19,132,150,.08);
    color: var(--color-info);
    border: 2px solid var(--color-info);
    --btn-shadow-color:19,132,150;
}

.btn-outline-info:hover, .btn-outline-info:focus {
    color: #fff;
    background: linear-gradient(135deg,var(--color-info) 0%, var(--color-info-gradient-end) 100%);
    box-shadow: 0 6px 14px -4px rgba(19,132,150,.45);
}

.btn-outline-light {
    background: rgba(233,236,239,.4);
    color: #6c757d;
    border: 2px solid var(--color-light-alt);
    --btn-shadow-color:180,183,186;
}

.btn-outline-light:hover, .btn-outline-light:focus {
    color: #212529;
    background: linear-gradient(135deg,var(--color-light) 0%, var(--color-light-alt) 100%);
    box-shadow: 0 6px 14px -4px rgba(110,117,124,.35);
}

.btn-outline-dark {
    background: rgba(33,37,41,.07);
    color: #212529;
    border: 2px solid var(--color-dark);
    --btn-shadow-color:33,37,41;
}

.btn-outline-dark:hover, .btn-outline-dark:focus {
    color: #fff;
    background: linear-gradient(135deg,var(--color-dark) 0%, var(--color-dark-gradient-end) 100%);
    box-shadow: 0 6px 14px -4px rgba(33,37,41,.5);
}

/* Estados activos para outline */
.btn-outline-primary:active,
.btn-outline-secondary:active,
.btn-outline-success:active,
.btn-outline-danger:active,
.btn-outline-warning:active,
.btn-outline-info:active,
.btn-outline-light:active,
.btn-outline-dark:active {
    transform: translateY(2px);
}

/* Sidebar scrollbar styles */
#sidebar .sidebar-scroll {
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.6) transparent;
}

#sidebar .sidebar-scroll::-webkit-scrollbar {
    width: 0.5px;
}

#sidebar .sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}

#sidebar .sidebar-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.15));
    border-radius: 20px;
}

#sidebar .sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255,255,255,.8), rgba(255,255,255,.25));
}

#sidebar.collapsed .sidebar-scroll {
    overflow-y: visible;
}

@media (max-width: 991.98px) {
    #sidebar .sidebar-scroll {
        overflow-y: auto;
    }
}

/* Sidebar scroll fix (flex + min-height to enable overflow) */
#sidebar .sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100vh;
    overflow: hidden;
}

#sidebar .sidebar-scroll {
    flex: 1 1 auto;
    min-height: 0;
    padding-right: 4px;
    /* Limita el área de scroll al 90% de la altura total para dejar ~10% libre */
    max-height: calc(100vh - 280px);
}

@media (max-width: 991.98px) {
    #sidebar .sidebar-inner {
        min-height: 100%;
    }
}

/* Botón flotante responsive */
#sidebarToggleFloating {
    position: fixed;
    left: 14px;
    bottom: 14px;
    z-index: 1500;
    display: none;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 50%;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#sidebarToggle {
        width: 46px;
    height: 46px;
}

#sidebarToggleFloating .toggle-icon-wrapper {
    width: 20px;
    height: 20px;
}

#sidebarToggleFloating .toggle-icon {
    transition: transform .35s ease;
}

/* Mantener botón visible también cuando el sidebar está abierto en mobile */

@media (max-width: 991.98px) {
    #sidebarToggleFloating {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    body.sidebar-open #sidebarToggleFloating {
        display: inline-flex;
    }
    body.sidebar-open #sidebarToggleFloating .toggle-icon {
        transform: rotate(180deg);
    }
}

body.sidebar-collapsed #content {
    margin-left: 110px;
}

/* =============================
   Estilos modernos para formularios
   ============================= */

/* Form Controls modernos */
.form-control, 
.form-select {
    background-color: var(--color-light);
    border: 1.5px solid var(--color-light-alt);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-dark);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    min-height: 48px;
}

.form-control:focus, 
.form-select:focus {
    border-color: var(--color-primary);
    background-color: var(--color-light);
    box-shadow: 0 0 0 3px rgba(31, 96, 171, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
    outline: none;
    transform: translateY(-1px);
}

.form-control:hover:not(:disabled):not(:focus), 
.form-select:hover:not(:disabled):not(:focus) {
    border-color: var(--color-light-hover);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Estados de validación */
.form-control.is-valid, 
.form-select.is-valid {
    border-color: var(--color-success);
    background-color: var(--color-light);
}

.form-control.is-valid:focus, 
.form-select.is-valid:focus {
    border-color: var(--color-success);
    box-shadow: 0 0 0 3px rgba(15, 143, 85, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
}

.form-control.is-invalid, 
.form-select.is-invalid {
    border-color: var(--color-danger);
    background-color: var(--color-light);
}

.form-control.is-invalid:focus, 
.form-select.is-invalid:focus {
    border-color: var(--color-danger);
    box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Disabled state */
.form-control:disabled, 
.form-select:disabled {
    background-color: var(--color-light-alt);
    border-color: var(--color-light-hover);
    color: var(--color-secondary);
    opacity: 0.6;
    cursor: not-allowed;
}

/* Placeholder styling */
.form-control::placeholder {
    color: var(--color-secondary);
    font-weight: 400;
    opacity: 0.5;
}

/* Form Select específico */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23666666' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

.form-select:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%231f60ab' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
}

/* Form labels modernos */
.form-label {
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

/* Input groups */
.input-group .form-control,
.input-group .form-select {
    border-radius: 0;
}

.input-group .form-control:first-child,
.input-group .form-select:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.input-group .form-control:last-child,
.input-group .form-select:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.input-group-text {
    background-color: var(--color-light);
    border: 1.5px solid var(--color-light-alt);
    color: var(--color-secondary);
    font-weight: 500;
    padding: 0.75rem 1rem;
}

/* Form floating labels */
.form-floating > .form-control,
.form-floating > .form-select {
    height: 58px;
    padding: 1rem 0.75rem;
}

.form-floating > label {
    padding: 1rem 0.75rem;
    color: var(--color-secondary);
    font-weight: 400;
    opacity: 0.6;
}

/* Textarea específico */
textarea.form-control {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

/* Form check y radio modernos */
.form-check-input {
    width: 1.2em;
    height: 1.2em;
    border: 2px solid var(--color-light-hover);
    border-radius: 6px;
    background-color: var(--color-light);
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.form-check-input:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(31, 96, 171, 0.08);
}

.form-check-input[type="radio"] {
    border-radius: 50%;
}

.form-check-label {
    color: var(--color-dark);
    font-weight: 500;
    margin-left: 0.5rem;
}

/* File input moderno */
.form-control[type="file"] {
    padding: 0.5rem;
}

.form-control[type="file"]::file-selector-button {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-gradient-end) 100%);
    color: var(--color-light);
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-control[type="file"]::file-selector-button:hover {
    background: linear-gradient(135deg, var(--color-primary-hover-start) 0%, var(--color-primary-hover-end) 100%);
    transform: translateY(-1px);
}

/* Range slider moderno */
.form-range {
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, var(--color-primary) 0%, var(--color-primary) var(--value, 0%), var(--color-light-alt) var(--value, 0%), var(--color-light-alt) 100%);
}

.form-range::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 3px solid var(--color-light);
    box-shadow: 0 2px 8px rgba(31, 96, 171, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(31, 96, 171, 0.4);
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .form-control, 
    .form-select {
        font-size: 16px; /* Previene zoom en iOS */
        padding: 0.7rem 0.9rem;
    }
}

.table-responsive {
    min-height: calc(100vh - 250px);
}

/* ====================================
   Dropdowns modernos de Bootstrap
   ==================================== */

/* Dropdown toggle button */
.dropdown-toggle {
    border-radius: var(--btn-radius) !important;
    border: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dropdown-toggle::after {
    transition: transform 0.3s ease;
}

.dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* Dropdown menu container */
.dropdown-menu {
    border: none;
    border-radius: 16px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 
                0 4px 20px rgba(0, 0, 0, 0.1),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 8px;
    margin-top: 8px !important;
    min-width: 180px;
    transform: scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    transform-origin: top center;
}

.dropdown-menu.show {
    transform: scale(1);
    opacity: 1;
    pointer-events: all;
}

/* Dropdown items */
.dropdown-item {
    border-radius: 12px !important;
    padding: 10px 16px;
    margin: 2px 0;
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-gradient-end) 100%);
    color: white !important;
    box-shadow: 0 4px 12px rgba(31, 96, 171, 0.25);
}

.dropdown-item:active {
    background: linear-gradient(135deg, var(--color-primary-hover-start) 0%, var(--color-primary-hover-end) 100%);
}

/* Dropdown items con iconos */
.dropdown-item i {
    width: 16px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.dropdown-item:hover i,
.dropdown-item:focus i {
    opacity: 1;
}

/* Dropdown divider */
.dropdown-divider {
    height: 0;
    margin: 8px 12px;
    overflow: hidden;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(90deg, transparent, rgba(31, 96, 171, 0.2), transparent);
}

/* Dropdown header */
.dropdown-header {
    padding: 8px 16px 4px;
    margin-bottom: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(31, 96, 171, 0.1);
}

/* Dropdown en estado disabled */
.dropdown-item.disabled,
.dropdown-item:disabled {
    color: #adb5bd;
    pointer-events: none;
    background-color: transparent;
    opacity: 0.5;
}

/* Dropdown dark theme */
.dropdown-menu[data-bs-theme="dark"] {
    background: rgba(33, 37, 41, 0.95);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 
                0 4px 20px rgba(0, 0, 0, 0.2),
                0 0 0 1px rgba(255, 255, 255, 0.1);
}

.dropdown-menu[data-bs-theme="dark"] .dropdown-item {
    color: #f8f9fa;
}

.dropdown-menu[data-bs-theme="dark"] .dropdown-item:hover,
.dropdown-menu[data-bs-theme="dark"] .dropdown-item:focus {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-gradient-end) 100%);
    color: white !important;
}

.dropdown-menu[data-bs-theme="dark"] .dropdown-header {
    color: var(--color-primary-gradient-end);
    border-bottom-color: rgba(55, 134, 225, 0.2);
}

.dropdown-menu[data-bs-theme="dark"] .dropdown-divider {
    border-top-color: rgba(255, 255, 255, 0.1);
    background: linear-gradient(90deg, transparent, rgba(55, 134, 225, 0.3), transparent);
}

/* Dropdowns con diferentes variantes de color */
.dropdown-menu.dropdown-menu-success .dropdown-item:hover,
.dropdown-menu.dropdown-menu-success .dropdown-item:focus {
    background: linear-gradient(135deg, var(--color-success) 0%, var(--color-success-gradient-end) 100%);
}

.dropdown-menu.dropdown-menu-danger .dropdown-item:hover,
.dropdown-menu.dropdown-menu-danger .dropdown-item:focus {
    background: linear-gradient(135deg, var(--color-danger) 0%, var(--color-danger-gradient-end) 100%);
}

.dropdown-menu.dropdown-menu-warning .dropdown-item:hover,
.dropdown-menu.dropdown-menu-warning .dropdown-item:focus {
    background: linear-gradient(135deg, var(--color-warning) 0%, var(--color-warning-gradient-end) 100%);
    color: #212529 !important;
}

.dropdown-menu.dropdown-menu-info .dropdown-item:hover,
.dropdown-menu.dropdown-menu-info .dropdown-item:focus {
    background: linear-gradient(135deg, var(--color-info) 0%, var(--color-info-gradient-end) 100%);
}

/* Animaciones */
@keyframes dropdownFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Dropdown submenu (si se usa) */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
    margin-left: -1px;
}

/* Dropdown con búsqueda interna */
.dropdown-menu .dropdown-search {
    padding: 8px 12px;
    margin-bottom: 4px;
}

.dropdown-menu .dropdown-search input {
    width: 100%;
    padding: 6px 12px;
    border: 1px solid rgba(31, 96, 171, 0.2);
    border-radius: 8px;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
}

.dropdown-menu .dropdown-search input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(31, 96, 171, 0.1);
    background: white;
}

/* Responsive adjustments para dropdowns */
@media (max-width: 576px) {
    .dropdown-menu {
        min-width: 260px;
        max-width: calc(100vw - 40px);
        margin-left: auto;
        margin-right: auto;
    }
    
    .dropdown-item {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
}

/* ====================================
   Badges de notificaciones modernos
   ==================================== */

/* Contenedor de notificaciones */
.dropdown.position-relative {
    position: relative !important;
}

/* Badge específico de notificaciones */
.notification-badge {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    font-size: 0.7rem !important;
    min-width: 18px !important;
    height: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    border: 2px solid white !important;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4) !important;
    animation: notificationPulse 1.5s infinite;
    z-index: 10 !important;
    transform: none !important;
}

/* Badge principal de notificaciones (backup) */
.nav-link .badge {
    font-size: 0.7rem !important;
    min-width: 18px;
    height: 18px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    line-height: 1;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    animation: notificationPulse 1.5s 1;
}

/* Animación sutil para el badge: solo un pulso con scale */
@keyframes notificationPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.98);
    }
    100% {
        transform: scale(1);
    }
}

/* Hover effect para el icono de notificaciones */
.nav-link:hover .fas.fa-bell {
    color: var(--color-primary) !important;
    transition: color 0.2s ease;
}

/* Contenedor del icono de notificaciones */
.nav-link .fas.fa-bell {
    transition: all 0.2s ease;
    color: #f6a100; /* Color warning más específico */
}

/* Efectos hover para el contenedor completo */
.dropdown.position-relative .nav-link:hover {
    background-color: rgba(246, 161, 0, 0.1);
    border-radius: 50%;
    transition: all 0.2s ease;
}

/* Badge cuando no hay notificaciones (oculto) */
.nav-link .badge.d-none,
.notification-badge.d-none {
    display: none !important;
}

/* Estilos para diferentes tipos de badges */
.badge.bg-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-gradient-end) 100%) !important;
    border-color: rgba(255, 255, 255, 0.9);
}

.badge.bg-success {
    background: linear-gradient(135deg, var(--color-success) 0%, var(--color-success-gradient-end) 100%) !important;
    border-color: rgba(255, 255, 255, 0.9);
}

.badge.bg-warning {
    background: linear-gradient(135deg, var(--color-warning) 0%, var(--color-warning-gradient-end) 100%) !important;
    border-color: rgba(255, 255, 255, 0.9);
    color: #212529 !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, var(--color-danger) 0%, var(--color-danger-gradient-end) 100%) !important;
    border-color: rgba(255, 255, 255, 0.9);
}

/* Badge en topbar */
.navbar .nav-link {
    transition: all 0.2s ease;
}

.navbar .nav-link:hover {
    color: var(--color-primary) !important;
}

.logo-profile {
    height:40px;
    width:40px;
    object-fit:cover
}

/* ==========================================================================
   Estilos del layout principal - movidos desde main.php
   ========================================================================== */

/* Animación para el indicador de timesheet */
@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

/* Estilos para el indicador de timesheet */
.timesheet-indicator {
    transition: all 0.2s ease;
}

.timesheet-times {
    font-size: 0.65rem;
    line-height: 1.1;
    min-width: 35px;
}

.timesheet-badge {
    font-size: 0.5rem;
    padding: 2px 4px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estilos personalizados para el tooltip de timesheet */
.timesheet-tooltip {
    font-size: 0.875rem;
}

.timesheet-tooltip .tooltip-inner {
    background-color: rgba(33, 37, 41, 0.95);
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
}

.timesheet-tooltip .tooltip-arrow::before {
    border-bottom-color: rgba(33, 37, 41, 0.95) !important;
}

/* Estilos para breadcrumb responsive */
.breadcrumb-responsive {
    font-size: 0.875rem;
}

.breadcrumb-responsive .breadcrumb-item + .breadcrumb-item::before {
    color: #6c757d;
}

/* Estilos para el badge de notificaciones */
.notification-badge {
    top: 0;
    right: 0;
    transform: translate(25%, -25%);
    min-width: 1.25rem;
    height: 1.25rem;
    font-size: 0.75rem;
}

/* Fin estilos tarta/vela */

/* Contenedor principal de tarjetas */
.sortable-cards {
    gap: 1.5rem 1rem; /* Espacio vertical y horizontal entre tarjetas */
    padding: 0 0.5rem; /* Padding lateral para mejor espaciado */
    margin-top: 1rem; /* Espacio superior */
}

/* Mejoras adicionales para el contenedor */
.home-cards-container {
    padding: 2rem 0;
}

.home-cards-container .container-fluid {
    max-width: 1400px;
}

/* Título y controles del home */
.home-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(31, 96, 171, 0.1);
}


.card-overlay .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.8rem;
    transition: all 0.25s ease;
    margin: 1px;
}

.card-overlay .btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Estado responsive para tarjetas */
@media (max-width: 1199.98px) {
    .favorite-card-item {
        margin-bottom: 1.25rem !important;
    }
}

@media (max-width: 991.98px) {
    .favorite-card-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .favorite-card-item .card-title {
        font-size: 0.9rem;
        min-height: 2.4rem;
    }
    
    .favorite-card-item .card-text {
        font-size: 0.75rem;
        min-height: 2.25rem;
    }
}

@media (max-width: 575.98px) {
    .sortable-cards {
        gap: 1rem;
        padding: 0;
    }
    
    .favorite-card-item {
        margin-bottom: 1rem !important;
        padding: 0;
    }
    
    .favorite-card-icon {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
    }
    
    .favorite-card-item .card {
        min-height: 180px;
    }
}

/* ====================================
   Estilos para modo de ordenación (SortableJS)
   ==================================== */

/* Contenedor en modo ordenación */
.sortable-cards.sort-mode-active {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.02) 0%, rgba(33, 150, 243, 0.05) 100%);
    border: 2px dashed rgba(33, 150, 243, 0.2);
    border-radius: 20px;
    padding: 1rem;
    margin: 0.5rem 0;
}

/* Tarjetas en modo ordenación */
.favorite-card-item.sort-mode {
    cursor: grab;
    pointer-events: auto;
}

.favorite-card-item.sort-mode:active {
    cursor: grabbing;
}

.favorite-card-item.sort-mode .card {
    border: 2px solid rgba(33, 150, 243, 0.15);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
}

.favorite-card-item.sort-mode:hover .card {
    border-color: rgba(33, 150, 243, 0.3);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.2);
    transform: translateY(-2px) scale(1.01);
}

/* Estados de SortableJS */
.sortable-ghost {
    opacity: 0.4;
    transform: scale(0.95) rotate(3deg);
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1) 0%, rgba(33, 150, 243, 0.2) 100%);
    border-radius: 20px;
}

.sortable-chosen {
    z-index: 1000;
}

.sortable-drag {
    opacity: 0.8;
    transform: rotate(8deg) scale(1.05);
    z-index: 2000;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3) !important;
    transition: none !important;
}

/* Tarjeta siendo arrastrada */
.favorite-card-item.dragging {
    transform: rotate(5deg) scale(1.03);
    z-index: 1500;
    opacity: 0.9;
}

.favorite-card-item.dragging .card {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25) !important;
    border: 2px solid rgba(33, 150, 243, 0.5) !important;
}

/* Animaciones suaves para las transiciones */
.favorite-card-item:not(.dragging) {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Helper de ordenación */
#sortHelper {
    animation: slideDown 0.3s ease-out;
    border-left: 4px solid #17a2b8;
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1) 0%, rgba(23, 162, 184, 0.05) 100%);
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modo oscuro para ordenación */
@media (prefers-color-scheme: dark) {
    .sortable-cards.sort-mode-active {
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.1) 0%, rgba(33, 150, 243, 0.15) 100%);
        border-color: rgba(33, 150, 243, 0.3);
    }
    
    .sortable-ghost {
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.2) 0%, rgba(33, 150, 243, 0.3) 100%);
    }
}

/* Loading placeholders */
.placeholder-glow .placeholder {
    animation: placeholder-glow 2s ease-in-out infinite alternate;
}

@keyframes placeholder-glow {
    50% {
        opacity: 0.5;
    }
}

#cardPreview {
    max-width: 250px;
    margin: 0 auto;
}

#cardPreview .favorite-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: 1.2rem;
}

.card-primary #previewIcon { background: linear-gradient(45deg, #2196f3, #21cbf3); }
.card-success #previewIcon { background: linear-gradient(45deg, #4caf50, #8bc34a); }
.card-warning #previewIcon { background: linear-gradient(45deg, #ff9800, #ffc107); }
.card-danger #previewIcon { background: linear-gradient(45deg, #f44336, #e91e63); }
.card-info #previewIcon { background: linear-gradient(45deg, #00bcd4, #009688); }
.card-secondary #previewIcon { background: linear-gradient(45deg, #6c757d, #adb5bd); }
.card-dark #previewIcon { background: linear-gradient(45deg, #343a40, #6c757d); }

.character-counter {
    margin-top: 0.25rem;
}

.icon-error {
    margin-top: 0.25rem;
}

/* ====================================
   Estilos para accesos directos compactos
   ==================================== */

/* Botones de acceso directo inline */
.shortcut-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
    border-radius: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: none;
    color: white;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-gradient-end) 100%);
    box-shadow: 0 4px 12px rgba(31, 96, 171, 0.3);
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.shortcut-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.shortcut-btn:hover {
    color: white;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(31, 96, 171, 0.4), 0 4px 12px rgba(31, 96, 171, 0.2);
    text-decoration: none;
    background: linear-gradient(135deg, var(--color-primary-hover-start) 0%, var(--color-primary-hover-end) 100%);
}

.shortcut-btn:hover::before {
    opacity: 1;
}

.shortcut-btn:active {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 4px 15px rgba(31, 96, 171, 0.35);
}

.shortcut-btn i {
    font-size: 0.9rem;
    margin-right: 0.5rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Variantes de color para botones */
.shortcut-btn.btn-success {
    background: linear-gradient(135deg, var(--color-success) 0%, var(--color-success-gradient-end) 100%);
    box-shadow: 0 4px 12px rgba(15, 143, 85, 0.3);
}

.shortcut-btn.btn-success:hover {
    background: linear-gradient(135deg, var(--color-success-hover-start) 0%, var(--color-success-hover-end) 100%);
    box-shadow: 0 8px 25px rgba(15, 143, 85, 0.4), 0 4px 12px rgba(15, 143, 85, 0.2);
}

.shortcut-btn.btn-warning {
    background: linear-gradient(135deg, var(--color-warning) 0%, var(--color-warning-gradient-end) 100%);
    box-shadow: 0 4px 12px rgba(246, 161, 0, 0.3);
}

.shortcut-btn.btn-warning:hover {
    background: linear-gradient(135deg, var(--color-warning-hover-start) 0%, var(--color-warning-hover-end) 100%);
    box-shadow: 0 8px 25px rgba(246, 161, 0, 0.4), 0 4px 12px rgba(246, 161, 0, 0.2);
}

.shortcut-btn.btn-info {
    background: linear-gradient(135deg, var(--color-info) 0%, var(--color-info-gradient-end) 100%);
    box-shadow: 0 4px 12px rgba(19, 132, 150, 0.3);
}

.shortcut-btn.btn-info:hover {
    background: linear-gradient(135deg, var(--color-info-hover-start) 0%, var(--color-info-hover-end) 100%);
    box-shadow: 0 8px 25px rgba(19, 132, 150, 0.4), 0 4px 12px rgba(19, 132, 150, 0.2);
}

/* Contenedor de accesos directos inline */
.shortcuts-inline {
    flex-wrap: nowrap;
    overflow: hidden;
    max-width: 100%;
}

/* Dropdown de accesos adicionales */
#shortcutsDropdown .dropdown-menu {
    border-radius: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    min-width: 250px;
}

#shortcutsDropdown .dropdown-item {
    padding: 0.75rem 1rem;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

#shortcutsDropdown .dropdown-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
}

#shortcutsDropdown .dropdown-item i {
    width: 1.5rem;
    text-align: center;
    color: var(--bs-primary);
    opacity: 0.8;
}

#shortcutsDropdown .dropdown-item .fw-medium {
    font-size: 0.9rem;
    line-height: 1.2;
    margin-bottom: 0.1rem;
}

#shortcutsDropdown .dropdown-item small {
    font-size: 0.75rem;
    opacity: 0.7;
    line-height: 1.1;
}

/* Botón estrella de favoritos */
.shortcuts-star-btn {
    padding: 0.5rem;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4a 100%);
    color: #f39c12;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.shortcuts-star-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.shortcuts-star-btn:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.5), 0 4px 12px rgba(255, 215, 0, 0.3);
    color: #e67e22;
}

.shortcuts-star-btn:hover::before {
    opacity: 1;
}

.shortcuts-star-btn:active {
    transform: translateY(0) scale(1.05);
}

.shortcuts-star-btn i {
    font-size: 1rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
    animation: starPulse 2s ease-in-out infinite;
}

@keyframes starPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Dropdown del botón estrella */
.shortcuts-star-dropdown .dropdown-menu {
    /* Heredar los estilos estándar del sistema, solo ajustar el tamaño */
    min-width: 280px;
}

.shortcuts-star-dropdown .dropdown-item {
    /* Usar los estilos estándar del sistema */
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.shortcuts-star-dropdown .dropdown-item i {
    width: 1.25rem;
    text-align: center;
    font-size: 0.9rem;
}

.shortcuts-star-dropdown .dropdown-item .fw-medium {
    font-size: 0.9rem;
    line-height: 1.2;
    margin-bottom: 0.1rem;
}

.shortcuts-star-dropdown .dropdown-item small {
    font-size: 0.75rem;
    opacity: 0.7;
    line-height: 1.1;
}


/* Contenedor de accesos directos inline */
.shortcuts-inline {
    flex-wrap: nowrap;
    overflow: hidden;
    max-width: 100%;
    min-width: 0; /* Permite que el flex item se reduzca */
}

/* Ajustes para el col-8 */
.home-header .col-md-8 .d-flex {
    min-width: 0; /* Evita overflow del flex container */
}

/* Botones de tarjetas compactas para móvil */
.favorite-card-button {
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    text-decoration: none;
    border: none;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 4.5rem;
    position: relative;
    overflow: hidden;
}

.favorite-card-button::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(31, 96, 171, 0.05) 0%, rgba(31, 96, 171, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.favorite-card-button:hover {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-gradient-end) 100%);
    color: white;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(31, 96, 171, 0.3), 0 4px 12px rgba(31, 96, 171, 0.2);
    text-decoration: none;
}

.favorite-card-button:hover::before {
    opacity: 1;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
}

.favorite-card-button .fw-medium {
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
    color: #2c3e50;
    font-weight: 700;
    transition: color 0.3s ease;
}

.favorite-card-button:hover .fw-medium {
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.favorite-card-button small {
    font-size: 0.8rem;
    opacity: 0.8;
    line-height: 1.2;
    color: #7f8c8d;
    transition: color 0.3s ease;
}

.favorite-card-button:hover small {
    color: rgba(255, 255, 255, 0.9);
}

.favorite-card-button i {
    font-size: 1.25rem;
    color: var(--color-primary);
    opacity: 0.9;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.favorite-card-button:hover i {
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.favorite-card-button .fa-chevron-right {
    font-size: 0.9rem;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.favorite-card-button:hover .fa-chevron-right {
    transform: translateX(3px);
    opacity: 1;
    color: white;
}

/* Ajustes responsive para el header */
@media (max-width: 991.98px) {
    .shortcuts-inline {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    .home-header .col-md-4,
    .home-header .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .home-header .col-md-8 {
        margin-top: 1rem;
    }
    
    .home-header .d-flex {
        justify-content: center !important;
    }
}

/* Animaciones de carga para accesos directos */
.shortcuts-loading {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Efectos adicionales para botones */
.shortcut-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(31, 96, 171, 0.3);
}

.shortcuts-star-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.4);
}

/* Animación de entrada para botones inline */
.shortcut-btn {
    animation: slideInFromLeft 0.6s ease-out forwards;
    opacity: 0;
    transform: translateX(-20px);
}

.shortcut-btn:nth-child(1) { animation-delay: 0.1s; }
.shortcut-btn:nth-child(2) { animation-delay: 0.2s; }
.shortcut-btn:nth-child(3) { animation-delay: 0.3s; }
.shortcut-btn:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInFromLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mejoras para el dropdown del botón estrella */
.shortcuts-star-dropdown .dropdown-menu {
    /* Heredar todos los estilos estándar del sistema */
    min-width: 280px;
}

/* Estados especiales para accesos sin dropdown */
.dropdown-item-text {
    font-style: italic;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0.5rem;
    margin: 0.25rem 0.75rem;
}

/* ============================
   Estilos para Modal de Shortcuts
   ============================ */

/* Estilos para el modal de shortcuts */
.shortcut-card {
    transition: all 0.2s ease;
    cursor: default;
}

.shortcut-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

.drag-handle {
    cursor: grab;
    user-select: none;
}

.drag-handle:active {
    cursor: grabbing;
}

.sortable-ghost {
    opacity: 0.5;
}

.sortable-chosen {
    transform: scale(1.02);
}

.sortable-drag {
    transform: rotate(5deg);
}

.shortcut-item {
    transition: all 0.3s ease;
}

#shortcut_preview {
    pointer-events: none;
}

.form-text {
    font-size: 0.875rem;
}

.card-header h6 {
    font-weight: 600;
}

.btn-group .btn {
    border-radius: 0.25rem;
}

.btn-group .btn:not(:last-child) {
    margin-right: 0.25rem;
}

/* Responsivo para el modal */
@media (max-width: 992px) {
    .modal-xl {
        max-width: 95%;
    }
    
    .shortcut-card .row {
        flex-direction: column;
        text-align: center;
    }
    
    .shortcut-card .col-auto,
    .shortcut-card .col {
        margin-bottom: 0.5rem;
    }
}

/* =============================
   Topbars Temáticos
   ============================= */

/* San Valentín */
.theme-sanvalentin {
    background-image: url('../img/sanvalentin.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.theme-sanvalentin .breadcrumb {
    background: rgba(255, 255, 255, 0.9) !important;
    padding: 10px 16px !important;
    border-radius: 16px !important;
    backdrop-filter: blur(5px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* Día de la Mujer */
.theme-8m {
    background-image: url('../img/8m.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.theme-8m .breadcrumb {
    background: rgba(255, 255, 255, 0.9) !important;
    padding: 10px 16px !important;
    border-radius: 16px !important;
    backdrop-filter: blur(5px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* Día del Orgullo */
.theme-pride {
    background-image: url('../img/pride.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.theme-pride .breadcrumb {
    background: rgba(255, 255, 255, 0.9) !important;
    padding: 10px 16px !important;
    border-radius: 16px !important;
    backdrop-filter: blur(5px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* Halloween */
.theme-halloween {
    background-image: url('../img/halloween.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.theme-halloween .breadcrumb {
    background: rgba(255, 255, 255, 0.9) !important;
    padding: 10px 16px !important;
    border-radius: 16px !important;
    backdrop-filter: blur(5px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* Navidad */
.theme-navidad {
    background-image: url('../img/navidad.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.theme-sanvalentin .breadcrumb .breadcrumb-item,
.theme-8m .breadcrumb .breadcrumb-item,
.theme-pride .breadcrumb .breadcrumb-item,
.theme-halloween .breadcrumb .breadcrumb-item,
.theme-navidad .breadcrumb .breadcrumb-item {
    padding: 10px;
}

.theme-sanvalentin .breadcrumb,
.theme-8m .breadcrumb,
.theme-pride .breadcrumb,
.theme-halloween .breadcrumb,
.theme-navidad .breadcrumb {
    background: rgba(255, 255, 255, 0.9) !important;
    padding: 10px 16px !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}


.theme-navidad .container-actions,
.theme-sanvalentin .container-actions,
.theme-8m .container-actions,
.theme-pride .container-actions,
.theme-halloween .container-actions {
    background: rgba(255, 255, 255, 0.9) !important;
    padding: 10px 16px !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    z-index: 1050;
}

/* =============================
   Switch de Temas Temáticos
   ============================= */

.theme-toggle-container .form-check-label {
    font-size: 0.875rem;
    color: #6c757d;
    user-select: none;
    cursor: pointer;
}

.theme-toggle-container .form-check-input {
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle-container .form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.theme-toggle-container .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(31, 96, 171, 0.25);
}

/* Estilos para temas activos */
.navbar.theme-sanvalentin .theme-toggle-container .form-check-label,
.navbar.theme-8m .theme-toggle-container .form-check-label,
.navbar.theme-pride .theme-toggle-container .form-check-label,
.navbar.theme-halloween .theme-toggle-container .form-check-label,
.navbar.theme-navidad .theme-toggle-container .form-check-label {
    color: #333 !important;
    font-weight: 500;
}

.navbar.theme-sanvalentin .theme-toggle-container .form-check-input:checked,
.navbar.theme-8m .theme-toggle-container .form-check-input:checked,
.navbar.theme-pride .theme-toggle-container .form-check-input:checked,
.navbar.theme-halloween .theme-toggle-container .form-check-input:checked,
.navbar.theme-navidad .theme-toggle-container .form-check-input:checked {
    background-color: #28a745;
    border-color: #28a745;
}

/* Animación cuando se oculta/muestra el toggle */
.theme-toggle-container.fade-out {
    opacity: 0;
    transform: translateX(-20px);
}

.theme-toggle-container.fade-in {
    opacity: 1;
    transform: translateX(0);
}

/* VR personalizado para temas */
.navbar.theme-sanvalentin .vr,
.navbar.theme-8m .vr,
.navbar.theme-pride .vr,
.navbar.theme-halloween .vr,
.navbar.theme-navidad .vr {
    border-color: rgba(0, 0, 0, 0.2) !important;
}

/* ============================
   Dashboard Cards Personalizadas
   ============================ */

/* Card base moderna */
.dashboard-card {
    border-radius: 16px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    border: 0;
    transition: box-shadow .3s ease;
    min-height: 100%;
}

.dashboard-card:hover {
    box-shadow: 4px 8px 20px rgba(0,0,0,0.25);
}

/* Headers de cards con gradientes */
.dashboard-card-header {
    border-radius: 16px 16px 0 0;
    padding: 0.75rem 1rem;
}

.dashboard-card-header.primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-gradient-end));
}

.dashboard-card-header.warning {
    background: linear-gradient(135deg, var(--color-warning), var(--color-warning-gradient-end));
}

.dashboard-card-header.success {
    background: linear-gradient(135deg, var(--color-success), var(--color-success-gradient-end));
}

.dashboard-card-header.info {
    background: linear-gradient(135deg, var(--color-info), var(--color-info-gradient-end));
}

.dashboard-card-header.danger {
    background: linear-gradient(135deg, var(--color-danger), var(--color-danger-gradient-end));
}

/* Contenido scrolleable de cards */
.dashboard-card-scroll {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Items de lista en cards */
.dashboard-card-item {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
}

.dashboard-card-item:not(:last-child) {
    border-bottom: 1px solid #e5e7eb;
}

/* Avatar personalizado para cards */
.dashboard-avatar {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    object-fit: cover;
}

.dashboard-avatar-initials {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--color-primary);
    font-size: 0.625rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estilos específicos para la card del gráfico */
.dashboard-card .chart-container {
    position: relative;
    height: 250px;
    width: 100%;
}

.dashboard-card #periodFilter option {
    background-color: #fff;
    color: #333;
}

.dashboard-card .dashboard-card-header.info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.dashboard-card .row .col-4 {
    padding: 0.5rem;
}

.dashboard-card .row .col-4 .fs-6 {
    font-size: 1.1rem !important;
    margin-bottom: 0.25rem;
}

.dashboard-card .row .col-4 .fs-8 {
    font-size: 0.75rem !important;
}

@media (max-width: 576px) {
    .dashboard-card .chart-container {
        height: 200px;
    }
    
    .dashboard-card-header .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .dashboard-card #periodFilter {
        min-width: 100px;
    }
}

/* Estado badges circulares */
.status-badge-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
}

/* Animación pulse para estados pendientes */
.pulse {
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% { box-shadow: 0 0 0 0px rgba(var(--bs-warning-rgb), 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(var(--bs-warning-rgb), 0); }
    100% { box-shadow: 0 0 0 0px rgba(var(--bs-warning-rgb), 0); }
}

.pulse.pulse-success {
    animation: pulse-success-animation 2s infinite;
}

@keyframes pulse-success-animation {
    0% { box-shadow: 0 0 0 0px rgba(var(--bs-success-rgb), 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(var(--bs-success-rgb), 0); }
    100% { box-shadow: 0 0 0 0px rgba(var(--bs-success-rgb), 0); }
}

/* Botones de cards */
.dashboard-card-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.15s ease-in-out;
}


@media (max-width: 991.98px) {
    .fa-2x {
        font-size: 1.25em !important;
    }
    .shortcuts-star-btn {
        width: 1.75rem;
        height: 1.75rem;
    }
    .logo-profile {
        width: 2rem;
        height: 2rem;
        font-size: 0.9rem;
    }
}

/* Tarta de cumpleaños */

.modal-cake {
    height: 500px;
    background-color: transparent !important;
}

.cake {
  position: absolute;
  width: 250px;
  height: 200px;
  top: 50%;
  left: 50%;
  margin-top: -15px;
  margin-left: -125px;
}

.plate {
  width: 270px;
  height: 110px;
  position: absolute;
  bottom: -10px;
  left: -10px;
  background-color: #ccc;
  border-radius: 50%;
  box-shadow: 0 2px 0 #b3b3b3, 0 4px 0 #b3b3b3, 0 5px 40px rgba(0, 0, 0, 0.5);
}

.cake > * {
  position: absolute;
}

.layer {
  position: absolute;
  display: block;
  width: 250px;
  height: 100px;
  border-radius: 50%;
  background-color: #553c13;
  box-shadow: 0 2px 0px #6a4b18, 0 4px 0px #33240b, 0 6px 0px #32230b, 0 8px 0px #31230b, 0 10px 0px #30220b, 0 12px 0px #2f220b, 0 14px 0px #2f210a, 0 16px 0px #2e200a, 0 18px 0px #2d200a, 0 20px 0px #2c1f0a, 0 22px 0px #2b1f0a, 0 24px 0px #2a1e09, 0 26px 0px #2a1d09, 0 28px 0px #291d09, 0 30px 0px #281c09;
}

.layer-top {
  top: 0px;
}

.layer-middle {
  top: 33px;
}

.layer-bottom {
  top: 66px;
}

.icing {
  top: 2px;
  left: 5px;
  background-color: #f0e4d0;
  width: 240px;
  height: 90px;
  border-radius: 50%;
}
.icing:before {
  content: "";
  position: absolute;
  top: 4px;
  right: 5px;
  bottom: 6px;
  left: 5px;
  background-color: #f4ebdc;
  box-shadow: 0 0 4px #f6efe3, 0 0 4px #f6efe3, 0 0 4px #f6efe3;
  border-radius: 50%;
  z-index: 1;
}

.drip {
  display: block;
  width: 50px;
  height: 60px;
  border-bottom-left-radius: 25px;
  border-bottom-right-radius: 25px;
  background-color: #f0e4d0;
}

.drip1 {
  top: 53px;
  left: 5px;
  transform: skewY(15deg);
  height: 48px;
  width: 40px;
}

.drip2 {
  top: 69px;
  left: 181px;
  transform: skewY(-15deg);
}

.drip3 {
  top: 54px;
  left: 90px;
  width: 80px;
  border-bottom-left-radius: 40px;
  border-bottom-right-radius: 40px;
}

.candle {
  background-color: #7b020b;
  width: 16px;
  height: 50px;
  border-radius: 8px/4px;
  top: -20px;
  left: 50%;
  margin-left: -8px;
  z-index: 10;
}
.candle:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 8px;
  border-radius: 50%;
  background-color: #ad030f;
}

.flame {
  position: absolute;
  background-color: orange;
  width: 15px;
  height: 35px;
  border-radius: 10px 10px 10px 10px/25px 25px 10px 10px;
  top: -34px;
  left: 50%;
  margin-left: -7.5px;
  z-index: 10;
  box-shadow: 0 0 10px rgba(255, 165, 0, 0.5), 0 0 20px rgba(255, 165, 0, 0.5), 0 0 60px rgba(255, 165, 0, 0.5), 0 0 80px rgba(255, 165, 0, 0.5);
  transform-origin: 50% 90%;
  animation: flicker 1s ease-in-out alternate infinite;
}

@keyframes flicker {
  0% {
    transform: skewX(5deg);
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.2), 0 0 20px rgba(255, 165, 0, 0.2), 0 0 60px rgba(255, 165, 0, 0.2), 0 0 80px rgba(255, 165, 0, 0.2);
  }
  25% {
    transform: skewX(-5deg);
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.5), 0 0 20px rgba(255, 165, 0, 0.5), 0 0 60px rgba(255, 165, 0, 0.5), 0 0 80px rgba(255, 165, 0, 0.5);
  }
  50% {
    transform: skewX(10deg);
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.3), 0 0 20px rgba(255, 165, 0, 0.3), 0 0 60px rgba(255, 165, 0, 0.3), 0 0 80px rgba(255, 165, 0, 0.3);
  }
  75% {
    transform: skewX(-10deg);
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.4), 0 0 20px rgba(255, 165, 0, 0.4), 0 0 60px rgba(255, 165, 0, 0.4), 0 0 80px rgba(255, 165, 0, 0.4);
  }
  100% {
    transform: skewX(5deg);
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.5), 0 0 20px rgba(255, 165, 0, 0.5), 0 0 60px rgba(255, 165, 0, 0.5), 0 0 80px rgba(255, 165, 0, 0.5);
  }
}

/* ====================================
   Estilos para tarjetas favoritas de homepage
   ====================================== */

/* ======= Ajustes para tarta/vela: humo y estado apagado (no redeclarar .candle/.flame) ======= */
/* Humo que aparece al soplar (inicialmente oculto) */
.candle-smoke { position: absolute; left: 50%; transform: translateX(-50%); top: -90px; width: 140px; height: 120px; pointer-events: none; opacity: 0; }
.candle-smoke .smoke-puff { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%) scale(0.6); width: 18px; height: 18px; background: rgba(200,200,200,0.9); border-radius: 50%; filter: blur(6px); opacity: 0; }
.candle-smoke .smoke-puff.p1 { left: 45%; }
.candle-smoke .smoke-puff.p2 { left: 55%; }
.candle-smoke .smoke-puff.p3 { left: 50%; }

/* Animación de apagado que reutiliza la clase .flame ya existente */
.blow-out .flame { animation: none !important; opacity: 0; transform: scaleY(0.2) translateY(6px); transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease; box-shadow: none !important; }
.blow-out .candle { background: #e9e9e9; }
.blow-out #candle-smoke { opacity: 1; }
.blow-out #candle-smoke .smoke-puff { animation: smokeRise 2s forwards cubic-bezier(.2,.8,.2,1); }
.blow-out #candle-smoke .smoke-puff.p2 { animation-delay: 0.15s; }
.blow-out #candle-smoke .smoke-puff.p3 { animation-delay: 0.3s; }

@keyframes smokeRise {
    0% { opacity: 0; transform: translateY(0) scale(0.6); }
    10% { opacity: 0.7; }
    100% { opacity: 0; transform: translateY(-60px) scale(1.4); }
}

/* Botón con micro animación */
#blow-candle-btn { transition: transform 0.12s ease; }
#blow-candle-btn:active { transform: translateY(1px) scale(0.995); }

/* Responsive: adaptar tarta y humo en móviles */
@media (max-width: 575.98px) {
    .modal-cake { height: auto; padding: 2rem 1rem; }
    .cake { position: relative; width: 200px; height: 160px; margin: 0 auto; top: 0; left: 0; transform: none; }
    .candle { left: 50%; margin-left: -8px; top: -18px; }
    .flame { left: 50%; margin-left: -7.5px; top: -28px; width: 12px; height: 28px; }
    .candle-smoke { top: -70px; width: 120px; height: 90px; }
    #blow-candle-btn { width: 100%; justify-content: center; }
}

/* Si el overlay contiene una imagen, que escale bien */
.vb-level__check img, .vb-level__lock img {
    width: 25px;
    height: 25px;
    display: block;
    object-fit: contain;
}

    /* ---------- Notificaciones dropdown ---------- */
    .notifications-dropdown-lg {
        width: calc(100vw - 32px);
        max-width: 100%;
    }

    @media (min-width: 540px) {
        .notifications-dropdown-lg {
            width: 500px;
            min-width: 500px;
            max-width: 500px;
        }
    }

.notifications-dropdown-lg li { word-break: break-word; }

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -22px;
    top: 15px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 1;
}

.timeline-marker i {
    font-size: 8px;
}

.timeline-content {
    margin-left: 10px;
}

.reunion-status {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.75rem;
}

.reunion-card {
    border-left: 4px solid;
}

.reunion-card.agendada {
    border-left-color: #ffc107;
}

.reunion-card.celebrada {
    border-left-color: #28a745;
}

.reunion-card.cancelada {
    border-left-color: #dc3545;
}

/* Botones de acción para cards de proyectos */
.project-card-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: white;
    position: relative;
}

.project-card-action-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.project-card-action-btn:active {
    transform: scale(0.95);
}

.project-card-action-btn--primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-gradient-end) 100%);
}

.project-card-action-btn--info {
    background: linear-gradient(135deg, var(--color-info) 0%, var(--color-info-gradient-end) 100%);
}

.project-card-action-btn--warning {
    background: linear-gradient(135deg, var(--color-warning) 0%, var(--color-warning-gradient-end) 100%);
}

.project-card-action-btn--secondary {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-gradient-end) 100%);
}

.project-card-action-btn--danger {
    background: linear-gradient(135deg, var(--color-danger) 0%, var(--color-danger-gradient-end) 100%);
}

.project-card-action-btn--success {
    background: linear-gradient(135deg, var(--color-success) 0%, var(--color-success-gradient-end) 100%);
}

/* =============================
   Timeline Styles
   ============================= */

.project-timeline {
    position: relative;
    padding: 20px 0;
}

.timeline-horizontal {
    position: relative;
    height: 60px;
    margin: 20px 0;
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-gradient-end));
    border-radius: 2px;
    transform: translateY(-50%);
}

.timeline-point {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.timeline-point:hover {
    z-index: 3;
}

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.timeline-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.timeline-label {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.timeline-point:hover .timeline-label {
    opacity: 1;
}

.timeline-dates {
    font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .timeline-horizontal {
        height: 50px;
        margin: 15px 0;
    }

    .timeline-icon {
        width: 32px;
        height: 32px;
    }

    .timeline-icon i {
        font-size: 0.9rem;
    }

    .timeline-label {
        top: -25px;
        font-size: 0.8rem;
    }
}

/* Estilos para el formulario de roles */

.permissions-grid {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

.permissions-grid::-webkit-scrollbar {
    width: 8px;
}

.permissions-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.permissions-grid::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.permissions-grid::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.permission-module {
    border: 1px solid #dee2e6;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.permission-module:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.permission-module .card-header {
    background-color: #f0f4ff !important;
    border-bottom: 2px solid #e8e8ff;
}

.permission-module .card-header h5 {
    color: #3f6ad8;
    font-weight: 600;
    font-size: 0.95rem;
}

.permission-item {
    transition: all 0.2s ease;
    background-color: #fff;
}

.permission-item.border-primary {
    background-color: #f0f4ff !important;
}

.permission-item:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
    border-color: #3f6ad8 !important;
}

.permission-item .form-check {
    position: relative;
}

.permission-item .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.15rem;
    cursor: pointer;
    border: 2px solid #dee2e6;
    transition: all 0.2s ease;
}

.permission-item .form-check-input:checked {
    background-color: #3f6ad8;
    border-color: #3f6ad8;
    box-shadow: inset 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.permission-item .form-check-label {
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
}

.access-levels {
    flex-wrap: wrap;
    gap: 1.5rem !important;
}

.access-levels .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
}

.access-levels .form-check-input {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0;
    cursor: pointer;
}

.access-levels .form-check-label {
    font-size: 0.85rem;
    margin-bottom: 0;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #495057;
}

/* Colores específicos para cada tipo de acceso */
.access-levels .form-check-input.can-read:checked {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
}

.access-levels .form-check-input.can-write:checked {
    background-color: #ffc107;
    border-color: #ffc107;
}

.access-levels .form-check-input.can-delete:checked {
    background-color: #dc3545;
    border-color: #dc3545;
}

.access-levels .form-check-input.can-restore:checked {
    background-color: #198754;
    border-color: #198754;
}

.access-levels .form-check-input.can-export:checked {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Responsive */
@media (max-width: 768px) {
    .permission-item {
        padding: 1.5rem !important;
    }
    
    .access-levels {
        gap: 1rem !important;
        margin-top: 1rem;
    }
    
    .access-levels .form-check {
        gap: 0.4rem;
    }
    
    .access-levels .form-check-label {
        font-size: 0.8rem;
    }
}

/* Animación al mostrar/ocultar niveles de acceso */
.access-level-group {
    animation: slideIn 0.2s ease-in-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos para pequeñas etiquetas descriptivas */
.permission-item .text-muted {
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Accesibilidad */
.permission-item .form-check-input:focus,
.access-levels .form-check-input:focus {
    outline: 2px solid #3f6ad8;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(63, 106, 216, 0.25);
}

/* Estado deshabilitado */
.permission-item .form-check-input:disabled,
.access-levels .form-check-input:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.permission-item .form-check-label.disabled,
.access-levels .form-check-label.disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

/* Sin permisos asignados */
.permission-item.border-secondary {
    opacity: 0.8;
}

/* Badge para indicar estado */
.permission-status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.permission-status-badge.assigned {
    background-color: #d1ecf1;
    color: #0c5460;
}

.permission-status-badge.not-assigned {
    background-color: #f8d7da;
    color: #721c24;
}

.version-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.version-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.version-card.selected {
    border-color: #009ef7 !important;
    background-color: rgba(0, 158, 247, 0.05) !important;
}

.version-number {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cursor-pointer {
    cursor: pointer;
}

.transition-all {
    transition: all 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {

    .version-card {
        margin-bottom: 0.5rem;
    }
}

/* ============================================
   ESTILOS PARA PRESUPUESTOS - FORM.PHP
   ============================================ */

/* Estilos para drag & drop */
.sortable-ghost {
    opacity: 0.4;
    background: #f8f9fa;
}

.sortable-chosen {
    cursor: move;
}

.sortable-drag {
    opacity: 0.8;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    transform: rotate(2deg);
}

.drag-handle-hija {
    cursor: default;
    transition: background-color 0.2s ease;
}

.modo-reordenar .drag-handle-hija {
    cursor: move;
    background-color: rgba(0,123,255,0.05);
}

.drag-handle-hija:hover {
    background-color: rgba(0,0,0,0.02);
}

.modo-reordenar .drag-handle-hija:hover {
    background-color: rgba(0,123,255,0.1);
}

.card-header {
    cursor: move;
}

.linea-hija {
    transition: all 0.3s ease;
}

.linea-hija:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

.modo-reordenar {
    background-color: rgba(0,123,255,0.02);
    border: 2px dashed rgba(0,123,255,0.3);
    padding: 10px;
    border-radius: 8px;
}

.modo-reordenar .linea-hija {
    border-left: 3px solid #007bff;
}

/* Estilos para edición inline */
.view-mode {
    display: block;
}

.edit-mode {
    display: none;
}

.card-linea.editing .view-mode,
.linea-hija.editing .view-mode {
    display: none;
}

.card-linea.editing .edit-mode,
.linea-hija.editing .edit-mode {
    display: block;
}

/* Botones de acción */
.action-buttons-view {
    display: inline-flex;
}

.action-buttons-edit {
    display: none;
}

.card-linea.editing .action-buttons-view,
.linea-hija.editing .action-buttons-view {
    display: none;
}

.card-linea.editing .action-buttons-edit,
.linea-hija.editing .action-buttons-edit {
    display: inline-flex;
}

/* FACTURACION */
#lineas_body tr.linea-item > td {
    border-bottom: none !important;
}
/* ⭐ Purple */
.badge-light-purple {
    background-color: #f3e8ff !important;
    color: #6b21a8 !important;
}
.text-purple {
    color: #6b21a8 !important;
}

/* ⭐ Teal/Turquesa (para aprobada cliente si no quieres cyan repetido) */
.badge-light-teal {
    background-color: #ccfbf1 !important;
    color: #0f766e !important;
}
.text-teal {
    color: #0f766e !important;
}

/* Estilos para el drag handle de líneas hijas */
.drag-handle-hija {
    cursor: move !important;
    transition: all 0.2s ease;
}

.drag-handle-hija:hover {
    transform: scale(1.05);
}

/* Estilos para el drag handle de líneas padre */
.drag-handle-padre {
    cursor: move !important;
    transition: all 0.2s ease;
}

.drag-handle-padre:hover {
    opacity: 0.8;
}

/* Estilos para líneas padre anidadas - también pueden arrastrarse */
.lineas-hijas-container .card-linea .drag-handle-padre {
    cursor: move !important;
}

.lineas-hijas-container .card-linea .drag-handle-padre:hover {
    background: rgba(31,96,171,0.05);
    border-radius: 0.375rem;
}

/* Estilos para líneas pendientes */
.card-linea[data-es-pendiente="1"] {
    background-color: rgba(220, 53, 69, 0.05) !important;
    border-left: 4px solid #dc3545 !important;
}

.card-linea[data-es-pendiente="1"] .card-header {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.05) 100%) !important;
    border-bottom: 1px solid rgba(220, 53, 69, 0.2) !important;
}

.linea-hija[data-es-pendiente="1"] {
    background-color: rgba(220, 53, 69, 0.05) !important;
    border-left: 4px solid #dc3545 !important;
}

/* Badge de pendiente */
.badge-pendiente {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    font-weight: bold;
    padding: 0.35rem 0.65rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

/* Estilos para los estados de sortable */
.sortable-ghost {
    opacity: 0.4;
    background: linear-gradient(135deg, rgba(31,96,171,0.1) 0%, rgba(55,134,225,0.05) 100%);
    border: 2px dashed var(--color-primary) !important;
}

.sortable-chosen {
    cursor: grabbing !important;
}

.sortable-drag {
    opacity: 0.8;
    transform: rotate(2deg);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15) !important;
}

/* Indicador visual para áreas donde se puede soltar */
.lineas-hijas-container .row {
    min-height: 80px;
    transition: all 0.3s ease;
}

.lineas-hijas-container .row:empty::before {
    content: "Arrastra líneas aquí para organizarlas";
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    border: 2px dashed rgba(108,117,125,0.3);
    border-radius: 8px;
    color: rgba(108,117,125,0.5);
    font-size: 0.9rem;
    font-style: italic;
}

/* Cursor para elementos arrastrables */
.linea-hija .drag-handle-hija * {
    cursor: move !important;
}

/* Animación suave al soltar */
.linea-hija {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.linea-hija:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}