/* =====================================================================
   Vanpicks 777 — Admin UX layer
   Animaciones de entrada + mejoras de legibilidad (sin dependencias)
   ===================================================================== */

:root {
    --vp-green: #22E06B;
    --vp-ease: cubic-bezier(.22, .8, .24, 1);
}

/* ---------- Keyframes ---------- */
@keyframes vpFadeUp   { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes vpFadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes vpSlideIn  { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
@keyframes vpDropIn   { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes vpPop      { 0% { opacity: 0; transform: scale(.94); } 100% { opacity: 1; transform: none; } }
@keyframes vpPulseDot { 0%, 100% { box-shadow: 0 0 0 0 rgba(240, 101, 72, .55); } 50% { box-shadow: 0 0 0 6px rgba(240, 101, 72, 0); } }

/* ---------- Entrada de página ---------- */
.page-content .container-fluid > .row,
.page-content .container-fluid > .card,
.page-content .container-fluid > .vp-page-header,
.page-content .container-fluid > .alert,
.page-content .container-fluid > .vp-section {
    animation: vpFadeUp .5s var(--vp-ease) backwards;
}
.page-content .container-fluid > :nth-child(1) { animation-delay: .00s; }
.page-content .container-fluid > :nth-child(2) { animation-delay: .06s; }
.page-content .container-fluid > :nth-child(3) { animation-delay: .12s; }
.page-content .container-fluid > :nth-child(4) { animation-delay: .18s; }
.page-content .container-fluid > :nth-child(5) { animation-delay: .24s; }
.page-content .container-fluid > :nth-child(6) { animation-delay: .30s; }
.page-content .container-fluid > :nth-child(n+7) { animation-delay: .36s; }

/* KPI / tarjetas dentro de filas: escalonado */
.page-content .row > [class*="col-"] > .card { animation: vpPop .45s var(--vp-ease) backwards; }
.page-content .row > [class*="col-"]:nth-child(1) > .card { animation-delay: .08s; }
.page-content .row > [class*="col-"]:nth-child(2) > .card { animation-delay: .14s; }
.page-content .row > [class*="col-"]:nth-child(3) > .card { animation-delay: .20s; }
.page-content .row > [class*="col-"]:nth-child(4) > .card { animation-delay: .26s; }
.page-content .row > [class*="col-"]:nth-child(n+5) > .card { animation-delay: .32s; }

/* Filas de tabla (las marca admin-ux.js con .vp-row y --i) */
tbody tr.vp-row { animation: vpFadeUp .4s var(--vp-ease) backwards; animation-delay: calc(var(--i, 0) * 28ms + .15s); }

/* Alertas / toasts */
.alert { animation: vpDropIn .35s var(--vp-ease) backwards; }

/* Modales y dropdowns */
.modal.fade .modal-dialog { transition: transform .3s var(--vp-ease), opacity .25s ease; }
.dropdown-menu.show { animation: vpDropIn .18s var(--vp-ease); }

/* Sidebar: items entran en cascada */
.app-menu .navbar-nav > .nav-item,
.app-menu .navbar-nav > .menu-title { animation: vpSlideIn .45s var(--vp-ease) backwards; }
.app-menu .navbar-nav > :nth-child(1)  { animation-delay: .02s; }
.app-menu .navbar-nav > :nth-child(2)  { animation-delay: .05s; }
.app-menu .navbar-nav > :nth-child(3)  { animation-delay: .08s; }
.app-menu .navbar-nav > :nth-child(4)  { animation-delay: .11s; }
.app-menu .navbar-nav > :nth-child(5)  { animation-delay: .14s; }
.app-menu .navbar-nav > :nth-child(6)  { animation-delay: .17s; }
.app-menu .navbar-nav > :nth-child(7)  { animation-delay: .20s; }
.app-menu .navbar-nav > :nth-child(8)  { animation-delay: .23s; }
.app-menu .navbar-nav > :nth-child(9)  { animation-delay: .26s; }
.app-menu .navbar-nav > :nth-child(10) { animation-delay: .29s; }
.app-menu .navbar-nav > :nth-child(n+11) { animation-delay: .32s; }

/* ---------- Sidebar: jerarquía visual más clara ---------- */
.navbar-menu .navbar-nav .menu-title {
    margin-top: 10px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .12em;
    opacity: .75;
}
.navbar-menu .navbar-nav .nav-link.menu-link {
    border-radius: 8px;
    margin: 1px 10px;
    padding: 9px 12px;
    transition: background-color .2s ease, color .2s ease, transform .2s var(--vp-ease);
}
.navbar-menu .navbar-nav .nav-link.menu-link:hover { transform: translateX(3px); }
.navbar-menu .navbar-nav .nav-link.menu-link.active { background: rgba(34, 224, 107, .12); }
.navbar-menu .navbar-nav .nav-link.menu-link.active::after { opacity: 1; }
.navbar-menu .navbar-nav .menu-dropdown .nav-sm .nav-link {
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 12.5px;
    transition: background-color .2s ease, color .2s ease, padding-left .2s var(--vp-ease);
}
.navbar-menu .navbar-nav .menu-dropdown .nav-sm .nav-link:hover { padding-left: 14px; }
.navbar-menu .navbar-nav .menu-dropdown .nav-sm .nav-link.active {
    background: rgba(34, 224, 107, .14);
    color: #fff;
    font-weight: 600;
}

/* ---------- Tarjetas ---------- */
.card { transition: transform .25s var(--vp-ease), box-shadow .25s ease; }
.card.card-animate:hover, .vp-kpi:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(15, 23, 42, .12); }

/* ---------- Cabecera de página ---------- */
.vp-page-header {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 12px; margin: 4px 0 18px;
}
.vp-page-header h4 { margin: 0; font-weight: 700; }
.vp-page-header .vp-subtitle { color: var(--vz-secondary-color, #878a99); font-size: 13px; margin-top: 2px; }

/* ---------- KPI ---------- */
.vp-kpi { border: 0; box-shadow: 0 1px 2px rgba(56, 65, 74, .08); }
.vp-kpi .vp-kpi-icon {
    width: 44px; height: 44px; border-radius: 12px; display: inline-flex;
    align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
}
.vp-kpi .vp-kpi-value { font-size: 24px; font-weight: 700; line-height: 1.1; }
.vp-kpi .vp-kpi-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--vz-secondary-color, #878a99); }

/* ---------- Pestañas tipo "chip" ---------- */
.vp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vp-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px;
    font-size: 12.5px; font-weight: 600; text-decoration: none;
    background: var(--vz-light, #f3f6f9); color: var(--vz-body-color, #495057);
    border: 1px solid transparent; transition: all .2s var(--vp-ease);
}
.vp-chip:hover { transform: translateY(-1px); border-color: rgba(34, 224, 107, .5); }
.vp-chip .vp-chip-count { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: rgba(0, 0, 0, .07); }
.vp-chip.active { background: var(--vp-green); color: #04130A; }
.vp-chip.active .vp-chip-count { background: rgba(4, 19, 10, .15); }
.vp-chip.chip-live.active { background: #f06548; color: #fff; }
.vp-chip.chip-live.active .vp-chip-count { background: rgba(255, 255, 255, .25); }

/* ---------- Tablas ---------- */
.table > :not(caption) > * > * { padding-top: .8rem; padding-bottom: .8rem; }
.table-hover > tbody > tr { transition: background-color .15s ease; }
.vp-team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vp-team img { width: 24px; height: 24px; object-fit: contain; flex-shrink: 0; }
.vp-team span { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp-versus { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; min-width: 340px; }
.vp-versus .vp-team:first-child { justify-content: flex-end; text-align: right; }
.vp-score {
    display: inline-flex; align-items: center; justify-content: center; min-width: 64px;
    padding: 4px 12px; border-radius: 8px; background: #0f172a; color: #fff;
    font-weight: 700; font-size: 14px; letter-spacing: .04em;
}
.vp-score.is-pending { background: var(--vz-light, #eef2f6); color: var(--vz-secondary-color, #878a99); font-weight: 600; }
.vp-live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #f06548; margin-right: 6px; animation: vpPulseDot 1.6s infinite; }

/* ---------- Tarjetas de acción (sincronización) ---------- */
.vp-action-card { height: 100%; border: 1px solid var(--vz-border-color, #e9ebec); border-radius: 12px; padding: 14px 16px; transition: all .25s var(--vp-ease); }
.vp-action-card:hover { border-color: var(--vp-green); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(34, 224, 107, .12); }
.vp-action-card h6 { margin: 0 0 2px; font-weight: 700; font-size: 14px; }
.vp-action-card p { margin: 0 0 10px; font-size: 12.5px; color: var(--vz-secondary-color, #878a99); }

/* Botones: feedback táctil */
.btn { transition: transform .15s var(--vp-ease), box-shadow .2s ease, background-color .2s ease; }
.btn:active { transform: scale(.97); }

/* ---------- Accesibilidad: respeta "reducir movimiento" ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
