
:root {
    /* Colores principales */
    --primary: #00a651;
    --primary-dark: #008a43;
    --primary-light: #00d66a;
    --secondary: #1a472a;
    --secondary-dark: #0f2818;
    --accent: #ffd700;
    --accent-dark: #ffc400;
    
    /* Colores de estado */
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    /* Colores de texto */
    --text: #2c3e50;
    --text-light: #666;
    --text-dark: #1a202c;
    
    /* Fondos */
    --bg: #f8faf9;
    --bg-alt: #f0f4f3;
    --card-bg: #ffffff;
    
    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 166, 81, 0.2);
    --shadow-xl: 0 15px 50px rgba(0, 166, 81, 0.3);
    --shadow-xxl: 0 25px 80px rgba(0, 0, 0, 0.4);
    
    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-xxl: 25px;
    
    /* Espaciado */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* ==================== RESET Y BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    position: relative;
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
}

/* ==================== FONDO ANIMADO DE CAMPO ==================== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 15% 40%, rgba(0, 166, 81, 0.04) 0%, transparent 60%),
        radial-gradient(circle at 85% 60%, rgba(26, 71, 42, 0.04) 0%, transparent 60%),
        repeating-linear-gradient(0deg, transparent, transparent 60px, rgba(0, 166, 81, 0.015) 60px, rgba(0, 166, 81, 0.015) 120px),
        repeating-linear-gradient(90deg, transparent, transparent 60px, rgba(0, 166, 81, 0.015) 60px, rgba(0, 166, 81, 0.015) 120px);
    z-index: -2;
    animation: fieldMoveSlow 40s linear infinite;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at center, transparent 0%, rgba(0, 166, 81, 0.02) 100%);
    z-index: -1;
    pointer-events: none;
}

@keyframes fieldMoveSlow {
    0% { 
        background-position: 0 0, 100% 100%, 0 0, 0 0;
    }
    100% { 
        background-position: 0 0, 100% 100%, 0 120px, 120px 0;
    }
}

/* ==================== PARTÍCULAS FLOTANTES ==================== */
.floating-ball {
    position: fixed;
    font-size: 2.5rem;
    opacity: 0.035;
    pointer-events: none;
    z-index: 0;
    animation: floatBallReservas 22s ease-in-out infinite;
    filter: blur(1px);
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.1);
}

.floating-ball:nth-child(even) {
    animation-direction: reverse;
    animation-duration: 28s;
}

.floating-ball:nth-child(3n) {
    animation-duration: 20s;
    opacity: 0.05;
    font-size: 2rem;
}

@keyframes floatBallReservas {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 0.035;
    }
    20% {
        transform: translate(60px, -80px) rotate(72deg) scale(1.15);
        opacity: 0.06;
    }
    40% {
        transform: translate(30px, -120px) rotate(144deg) scale(0.85);
        opacity: 0.07;
    }
    60% {
        transform: translate(-50px, -70px) rotate(216deg) scale(1.1);
        opacity: 0.05;
    }
    80% {
        transform: translate(-30px, -40px) rotate(288deg) scale(0.95);
        opacity: 0.04;
    }
}

/* ==================== HEADER MEJORADO ==================== */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 1.3rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 
        0 5px 25px rgba(0, 166, 81, 0.5),
        0 12px 45px rgba(0, 166, 81, 0.25),
        inset 0 -1px 0 rgba(255, 255, 255, 0.12);
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow: hidden;
    backdrop-filter: blur(12px);
    animation: headerSlideDown 0.6s ease;
}

@keyframes headerSlideDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Patrón de césped en header */
header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 18px,
            rgba(255, 255, 255, 0.025) 18px,
            rgba(255, 255, 255, 0.025) 36px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 18px,
            rgba(0, 0, 0, 0.025) 18px,
            rgba(0, 0, 0, 0.025) 36px
        );
    animation: headerPatternSpin 50s linear infinite;
    pointer-events: none;
}

/* Círculo central decorativo */
header::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: circlePulse 4s ease-in-out infinite;
}

@keyframes headerPatternSpin {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(60px, 60px) rotate(360deg); }
}

@keyframes circlePulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.08;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 0.12;
    }
}

/* Logo mejorado */
.logo {
    font-size: 1.7rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 2;
    text-shadow: 
        2px 2px 5px rgba(0, 0, 0, 0.35),
        0 0 25px rgba(255, 215, 0, 0.4);
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all var(--transition-normal);
    animation: logoFadeIn 0.8s ease 0.2s backwards;
}

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.logo:hover {
    transform: scale(1.08) translateY(-2px);
    text-shadow: 
        2px 2px 5px rgba(0, 0, 0, 0.4),
        0 0 35px rgba(255, 215, 0, 0.6);
}

.logo i {
    animation: ballBounceHeader 3s ease-in-out infinite;
    filter: drop-shadow(4px 4px 6px rgba(0, 0, 0, 0.5));
    font-size: 2.2rem;
}

@keyframes ballBounceHeader {
    0%, 100% { 
        transform: translateY(0) rotate(0deg) scale(1); 
    }
    12% { 
        transform: translateY(-15px) rotate(36deg) scale(1.12); 
    }
    24% { 
        transform: translateY(0) rotate(72deg) scale(1); 
    }
    36% { 
        transform: translateY(-10px) rotate(108deg) scale(1.08); 
    }
    48% { 
        transform: translateY(0) rotate(144deg) scale(1); 
    }
    60% { 
        transform: translateY(-7px) rotate(180deg) scale(1.05); 
    }
    72% { 
        transform: translateY(0) rotate(216deg) scale(1); 
    }
    84% { 
        transform: translateY(-4px) rotate(252deg) scale(1.03); 
    }
    96% { 
        transform: translateY(0) rotate(288deg) scale(1); 
    }
}

/* Botón volver mejorado */
.btn-back-header {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-xxl);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    z-index: 2;
    overflow: hidden;
    backdrop-filter: blur(12px);
    animation: btnBackFadeIn 0.8s ease 0.1s backwards;
}

@keyframes btnBackFadeIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.btn-back-header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.7s ease, height 0.7s ease;
}

.btn-back-header:hover::before {
    width: 350px;
    height: 350px;
}

.btn-back-header:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.45);
    transform: translateX(-6px);
    box-shadow: 
        0 6px 25px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-back-header i,
.btn-back-header span {
    position: relative;
    z-index: 1;
}

.btn-back-header:hover i {
    animation: arrowBounceBack 0.7s ease infinite;
}

@keyframes arrowBounceBack {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-10px); }
}

.btn-back-header:active {
    transform: translateX(-4px) scale(0.97);
}

/* User Info mejorado */
#userInfo {
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    z-index: 2;
    animation: userInfoFadeIn 0.8s ease 0.3s backwards;
}

@keyframes userInfoFadeIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.user-greeting {
    color: white;
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all var(--transition-normal);
}

.user-greeting:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.user-greeting strong {
    color: var(--accent);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
    font-weight: 800;
}

/* Botón logout mejorado */
.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 22px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(220, 38, 38, 0.95));
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-xl);
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 18px rgba(239, 68, 68, 0.4);
}

.btn-logout::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-logout:hover::before {
    width: 350px;
    height: 350px;
}

.btn-logout:hover {
    background: linear-gradient(135deg, rgba(220, 38, 38, 1), rgba(185, 28, 28, 1));
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.6);
}

.btn-logout i,
.btn-logout span {
    position: relative;
    z-index: 1;
}

.btn-logout:hover i {
    animation: logoutShakeIcon 0.6s ease;
}

@keyframes logoutShakeIcon {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(-12deg); }
    40% { transform: rotate(12deg); }
    60% { transform: rotate(-8deg); }
    80% { transform: rotate(8deg); }
}

.btn-logout:active {
    transform: translateY(-1px) scale(0.97);
}

/* ==================== CONTAINER ==================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
    position: relative;
    z-index: 1;
    animation: containerFadeInUp 0.7s ease 0.3s backwards;
}

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

/* ==================== RESPONSIVE HEADER ==================== */
@media (max-width: 1024px) {
    header {
        padding: 1.2rem 2rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .logo i {
        font-size: 1.9rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem 1.5rem;
        flex-wrap: wrap;
        gap: 0.8rem;
    }
    
    .logo {
        font-size: 1.35rem;
        gap: 10px;
    }
    
    .logo i {
        font-size: 1.7rem;
    }
    
    .btn-back-header {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    
    #userInfo {
        width: 100%;
        justify-content: space-between;
        gap: 12px;
        order: 3;
        margin-top: 0.5rem;
    }
    
    .user-greeting {
        font-size: 0.95rem;
        padding: 8px 14px;
        flex: 1;
    }
    
    .btn-logout {
        padding: 9px 16px;
        font-size: 0.9rem;
    }
    
    .container {
        padding: var(--spacing-lg) var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    header {
        padding: 0.9rem 1rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .logo i {
        font-size: 1.5rem;
    }
    
    .btn-back-header span {
        display: none;
    }
    
    .btn-back-header {
        padding: 10px 14px;
    }
    
    .user-greeting {
        font-size: 0.9rem;
        padding: 7px 12px;
    }
    
    .btn-logout span {
        display: none;
    }
    
    .btn-logout {
        padding: 9px 14px;
    }
    
    .container {
        padding: var(--spacing-md) var(--spacing-xs);
    }
}
/* =================================================================
   PARTE 2: TÍTULO, TABLA, BADGES Y ESTADOS
   ================================================================= */

/* ==================== PAGE TITLE ==================== */
.page-title {
    font-size: 2.8rem;
    color: var(--secondary);
    margin-bottom: var(--spacing-xl);
    text-align: center;
    position: relative;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    animation: titleBounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.4s backwards;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.06);
}

@keyframes titleBounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-10deg);
    }
    50% {
        transform: scale(1.1) rotate(3deg);
    }
    70% {
        transform: scale(0.95) rotate(-2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.title-icon {
    font-size: 3rem;
    animation: iconFloatTitle 4s ease-in-out infinite;
    filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.15));
}

@keyframes iconFloatTitle {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-12px) rotate(-5deg); }
    75% { transform: translateY(-6px) rotate(5deg); }
}

.title-decoration {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 5px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    border-radius: 3px;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.4);
    animation: decorationGlow 2s ease-in-out infinite;
}

@keyframes decorationGlow {
    0%, 100% {
        box-shadow: 0 2px 10px rgba(255, 215, 0, 0.4);
        opacity: 1;
    }
    50% {
        box-shadow: 0 2px 20px rgba(255, 215, 0, 0.7);
        opacity: 0.8;
    }
}

/* ==================== ALERT CONTAINER ==================== */
#alert-container {
    margin-bottom: var(--spacing-lg);
    animation: alertSlideIn 0.6s ease 0.5s backwards;
}

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

/* ==================== TABLE WRAPPER ==================== */
.table-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #f8fef9 100%);
    border-radius: var(--radius-xxl);
    box-shadow: 
        var(--shadow-xl),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    overflow: hidden;
    border: 2px solid rgba(0, 166, 81, 0.1);
    animation: tableSlideUp 0.8s ease 0.6s backwards;
    margin-bottom: var(--spacing-xl);
}

@keyframes tableSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==================== TABLE HEADER ==================== */
.table-header {
    padding: 2rem 2.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Patrón de fondo en table header */
.table-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 15px,
            rgba(255, 255, 255, 0.03) 15px,
            rgba(255, 255, 255, 0.03) 30px
        );
    animation: patternSlide 20s linear infinite;
}

@keyframes patternSlide {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

.table-header h3 {
    font-size: 1.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: headerTitleSlide 0.6s ease;
}

@keyframes headerTitleSlide {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.table-header h3 i {
    animation: listIconBounce 2s ease-in-out infinite;
}

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

/* Stats */
.stats {
    display: flex;
    gap: 2rem;
    position: relative;
    z-index: 1;
    animation: statsSlideIn 0.6s ease 0.2s backwards;
}

@keyframes statsSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 1.05rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all var(--transition-normal);
    cursor: default;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.stat-item i {
    font-size: 1.3rem;
    animation: statIconPulse 2s ease-in-out infinite;
}

@keyframes statIconPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* ==================== TABLE RESPONSIVE ==================== */
.table-responsive {
    overflow-x: auto;
    position: relative;
}

.table-responsive::-webkit-scrollbar {
    height: 10px;
}

.table-responsive::-webkit-scrollbar-track {
    background: var(--bg-alt);
}

.table-responsive::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, var(--primary-dark), var(--secondary));
}

/* ==================== RESERVAS TABLE ==================== */
.reservas-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.reservas-table thead {
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.reservas-table thead tr {
    border-bottom: 3px solid var(--primary);
}

.reservas-table th {
    padding: 1.3rem 1rem;
    text-align: left;
    font-weight: 800;
    color: var(--secondary);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    position: relative;
}

.reservas-table th i {
    margin-right: 6px;
    color: var(--primary);
    font-size: 1rem;
}

.reservas-table tbody tr {
    border-bottom: 1px solid rgba(0, 166, 81, 0.1);
    transition: all var(--transition-normal);
    animation: rowSlideIn 0.5s ease backwards;
}

.reservas-table tbody tr:nth-child(1) { animation-delay: 0.1s; }
.reservas-table tbody tr:nth-child(2) { animation-delay: 0.15s; }
.reservas-table tbody tr:nth-child(3) { animation-delay: 0.2s; }
.reservas-table tbody tr:nth-child(4) { animation-delay: 0.25s; }
.reservas-table tbody tr:nth-child(5) { animation-delay: 0.3s; }

@keyframes rowSlideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.reservas-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(0, 166, 81, 0.05), rgba(0, 166, 81, 0.08), rgba(0, 166, 81, 0.05));
    transform: scale(1.01);
    box-shadow: 0 4px 15px rgba(0, 166, 81, 0.15);
}

.reservas-table tbody tr:last-child {
    border-bottom: none;
}

.reservas-table td {
    padding: 1.2rem 1rem;
    color: var(--text);
    font-size: 0.95rem;
    vertical-align: middle;
}

.reservas-table td i {
    margin-right: 6px;
    color: var(--primary);
    opacity: 0.7;
}

.reservas-table td strong {
    color: var(--secondary);
    font-weight: 800;
    font-size: 1.05rem;
}

/* ==================== AMOUNT CELLS ==================== */
.amount-cell {
    font-weight: 700;
    color: var(--secondary);
    font-size: 1.05rem;
}

.pending-amount {
    display: block;
    color: var(--warning);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 4px;
    animation: pendingBlink 2s ease-in-out infinite;
}

@keyframes pendingBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ==================== BADGES ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-xl);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    animation: badgePop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) backwards;
}

@keyframes badgePop {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    70% {
        transform: scale(1.1) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.badge:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: var(--shadow-md);
}

.badge i {
    font-size: 1rem;
}

/* Badge Success */
.badge-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 2px solid var(--success);
}

.badge-success:hover {
    background: linear-gradient(135deg, #a7f3d0 0%, #6ee7b7 100%);
}

/* Badge Warning */
.badge-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 2px solid var(--warning);
    animation: badgePop 0.5s backwards, warningPulseSubtle 2s ease-in-out infinite;
}

@keyframes warningPulseSubtle {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    }
    50% {
        box-shadow: 0 2px 15px rgba(245, 158, 11, 0.5);
    }
}

.badge-warning:hover {
    background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
}

/* Badge Info */
.badge-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 2px solid var(--info);
}

.badge-info:hover {
    background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
}

/* Badge Danger */
.badge-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 2px solid var(--error);
}

.badge-danger:hover {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
}

/* Badge Secondary */
.badge-secondary {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #4b5563;
    border: 2px solid #9ca3af;
}

.badge-secondary:hover {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

/* ==================== ACTION CELL ==================== */
.action-cell {
    text-align: center;
}

/* Text states */
.text-success {
    color: var(--success);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.text-info {
    color: var(--info);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    animation: infoGlow 2s ease-in-out infinite;
}

@keyframes infoGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.text-muted {
    color: #9ca3af;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ==================== ACTION BUTTONS ==================== */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.btn-action::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.btn-action:hover::before {
    width: 300px;
    height: 300px;
}

.btn-action i,
.btn-action span {
    position: relative;
    z-index: 1;
}

.btn-upload {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--secondary);
    border: 2px solid var(--accent);
}

.btn-upload:hover {
    background: linear-gradient(135deg, var(--accent-dark) 0%, #f0a500 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.btn-upload:hover i {
    animation: uploadBounce 0.6s ease infinite;
}

@keyframes uploadBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.btn-upload:active {
    transform: translateY(-1px) scale(0.98);
}

/* ==================== LOADING Y EMPTY STATES ==================== */
.loading-cell,
.empty-cell,
.error-cell {
    text-align: center;
    padding: 4rem 2rem !important;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.ball-bounce {
    font-size: 5rem;
    display: inline-block;
    animation: ballLoadingBounce 1.2s ease-in-out infinite;
    filter: drop-shadow(0 12px 25px rgba(0, 0, 0, 0.3));
}

@keyframes ballLoadingBounce {
    0%, 100% { 
        transform: translateY(0) rotate(0deg) scale(1); 
    }
    25% { 
        transform: translateY(-40px) rotate(90deg) scale(1.15); 
    }
    50% { 
        transform: translateY(0) rotate(180deg) scale(1); 
    }
    75% { 
        transform: translateY(-20px) rotate(270deg) scale(1.08); 
    }
}

.loading-spinner p {
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 700;
    animation: loadingTextPulse 1.5s ease-in-out infinite;
}

@keyframes loadingTextPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
}

.empty-state i {
    font-size: 5rem;
    color: var(--text-light);
    opacity: 0.4;
    animation: emptyIconFloat 3s ease-in-out infinite;
}

@keyframes emptyIconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.empty-state p {
    font-size: 1.3rem;
    color: var(--text-light);
    font-weight: 600;
}

.btn-primary-small {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 700;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.btn-primary-small:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Error Cell */
.error-cell {
    color: var(--error);
    font-weight: 700;
    font-size: 1.1rem;
}

.error-cell i {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    animation: errorShake 0.5s ease;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}
/* =================================================================
   PARTE 3: MODALES, FORMULARIOS Y UPLOAD
   ================================================================= */

/* ==================== MODAL OVERLAY ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 71, 42, 0.92);
    backdrop-filter: blur(15px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    animation: modalOverlayFadeIn 0.4s ease;
}

.modal-overlay.active {
    display: flex;
}

@keyframes modalOverlayFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(15px);
    }
}

/* Patrón de campo en overlay */
.modal-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 60px,
            rgba(255, 255, 255, 0.015) 60px,
            rgba(255, 255, 255, 0.015) 120px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 60px,
            rgba(255, 255, 255, 0.015) 60px,
            rgba(255, 255, 255, 0.015) 120px
        );
    pointer-events: none;
    animation: fadeIn 0.6s ease 0.3s backwards;
}

/* ==================== MODAL CONTENT CUSTOM ==================== */
.modal-content-custom {
    background: linear-gradient(135deg, #ffffff 0%, #f8fef9 100%);
    border-radius: var(--radius-xxl);
    width: 100%;
    max-width: 550px;
    position: relative;
    box-shadow: 
        var(--shadow-xxl),
        0 0 0 1px rgba(0, 166, 81, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    animation: modalBounceInCustom 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

@keyframes modalBounceInCustom {
    0% {
        opacity: 0;
        transform: scale(0.4) translateY(-100px) rotate(-15deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.1) translateY(15px) rotate(5deg);
    }
    70% {
        transform: scale(0.95) translateY(-8px) rotate(-3deg);
    }
    85% {
        transform: scale(1.03) translateY(3px) rotate(1deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotate(0);
    }
}

/* Partículas en modal */
.modal-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* ==================== MODAL HEADER CUSTOM ==================== */
.modal-header-custom {
    padding: 3rem 2.5rem 2.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xxl) var(--radius-xxl) 0 0;
}

/* Patrón de césped en header */
.modal-header-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 12px,
            rgba(255, 255, 255, 0.04) 12px,
            rgba(255, 255, 255, 0.04) 24px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 12px,
            rgba(0, 0, 0, 0.04) 12px,
            rgba(0, 0, 0, 0.04) 24px
        );
    animation: patternMoveModal 30s linear infinite;
}

@keyframes patternMoveModal {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(24px, 24px) rotate(360deg); }
}

/* Ícono del modal */
.modal-icon-ball {
    font-size: 5rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: modalIconBounce 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.3s both;
    filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.4));
    position: relative;
    z-index: 1;
}

@keyframes modalIconBounce {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.3) rotate(20deg);
    }
    70% {
        transform: scale(0.9) rotate(-10deg);
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

/* Título del modal */
.modal-title-custom {
    font-size: 1.9rem;
    font-weight: 900;
    margin: 0;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.35);
    letter-spacing: 0.5px;
    animation: modalTitleSlide 0.6s ease 0.5s backwards;
}

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

/* Botón cerrar */
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    z-index: 2;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg) scale(1.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.modal-close:active {
    transform: rotate(90deg) scale(1);
}

/* ==================== MODAL BODY CUSTOM ==================== */
.modal-body-custom {
    padding: 2.5rem;
    position: relative;
    z-index: 1;
    animation: modalBodyFadeIn 0.6s ease 0.7s backwards;
}

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

/* Modal Info */
.modal-info {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 2rem;
    padding: 1.2rem;
    background: linear-gradient(135deg, rgba(0, 166, 81, 0.05), rgba(0, 166, 81, 0.08));
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary);
    line-height: 1.7;
}

.modal-info strong {
    color: var(--primary);
    font-weight: 800;
    font-size: 1.2rem;
}

/* ==================== FORM GROUPS ==================== */
.form-group {
    margin-bottom: 2rem;
    animation: formGroupSlide 0.5s ease backwards;
}

.form-group:nth-child(1) { animation-delay: 0.8s; }
.form-group:nth-child(2) { animation-delay: 0.9s; }

@keyframes formGroupSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
}

.form-group label i {
    color: var(--primary);
    font-size: 1.2rem;
}

/* ==================== FILE UPLOAD ==================== */
.file-upload-wrapper {
    position: relative;
    margin-bottom: 0.8rem;
}

.file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.file-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-alt) 100%);
    border: 3px dashed rgba(0, 166, 81, 0.3);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-weight: 700;
    color: var(--text);
    font-size: 1.05rem;
}

.file-upload-btn:hover {
    background: linear-gradient(135deg, rgba(0, 166, 81, 0.08), rgba(0, 166, 81, 0.12));
    border-color: var(--primary);
    border-style: solid;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.file-upload-btn i {
    font-size: 2rem;
    color: var(--primary);
    animation: uploadIconFloat 2s ease-in-out infinite;
}

@keyframes uploadIconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.file-input:focus + .file-upload-btn {
    outline: 3px solid rgba(0, 166, 81, 0.3);
    outline-offset: 2px;
}

.file-name {
    margin-top: 0.8rem;
    font-size: 0.95rem;
    color: #999;
    font-weight: 600;
    padding: 0.8rem;
    background: var(--bg);
    border-radius: var(--radius-md);
    text-align: center;
    transition: all var(--transition-normal);
}

.file-name:not(:empty) {
    color: var(--primary);
    background: rgba(0, 166, 81, 0.08);
}

/* Form Help */
.form-help {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: 0.6rem;
    padding-left: 0.5rem;
}

/* ==================== FORM SELECT ==================== */
.form-select {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid rgba(0, 166, 81, 0.2);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    background: white;
    cursor: pointer;
    transition: all var(--transition-normal);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2300a651' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.2rem center;
    padding-right: 3rem;
}

.form-select:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 166, 81, 0.1);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 5px rgba(0, 166, 81, 0.15);
    transform: translateY(-2px);
}

.form-select option {
    padding: 1rem;
    font-weight: 600;
}

/* ==================== MODAL FOOTER CUSTOM ==================== */
.modal-footer-custom {
    padding: 1.5rem 2.5rem 2.5rem;
    background: linear-gradient(to top, rgba(0, 166, 81, 0.03), transparent);
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: modalFooterSlide 0.6s ease 1s backwards;
}

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

/* ==================== MODAL BUTTONS ==================== */
.btn-modal-primary,
.btn-modal-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 35px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    min-width: 160px;
}

/* Efecto de onda */
.btn-modal-primary::before,
.btn-modal-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-modal-primary:hover::before,
.btn-modal-secondary:hover::before {
    width: 400px;
    height: 400px;
}

.btn-modal-primary span,
.btn-modal-secondary span {
    position: relative;
    z-index: 1;
}

/* Primary Button */
.btn-modal-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--secondary);
    border: 2px solid var(--accent);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.btn-modal-primary:hover {
    background: linear-gradient(135deg, var(--accent-dark) 0%, #f0a500 100%);
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 10px 35px rgba(255, 215, 0, 0.6);
}

.btn-modal-primary:disabled {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--shadow-sm);
    opacity: 0.6;
}

/* Secondary Button */
.btn-modal-secondary {
    background: white;
    color: var(--text);
    border: 2px solid #e0e0e0;
    box-shadow: var(--shadow-sm);
}

.btn-modal-secondary:hover {
    background: #f8f9fa;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-modal-primary:active,
.btn-modal-secondary:active {
    transform: translateY(-1px) scale(1);
    box-shadow: var(--shadow-sm);
}

/* ==================== MODAL ALERT ==================== */
.modal-alert {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 71, 42, 0.92);
    backdrop-filter: blur(15px);
    justify-content: center;
    align-items: center;
    z-index: 11000;
    padding: 1rem;
    animation: modalAlertFadeIn 0.4s ease;
}

.modal-alert.active {
    display: flex;
}

@keyframes modalAlertFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(15px);
    }
}

/* Patrón de campo en modal alert */
.modal-alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 50px,
            rgba(255, 255, 255, 0.02) 50px,
            rgba(255, 255, 255, 0.02) 100px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 50px,
            rgba(255, 255, 255, 0.02) 50px,
            rgba(255, 255, 255, 0.02) 100px
        );
    pointer-events: none;
    animation: fadeIn 0.5s ease 0.2s backwards;
}

/* ==================== MODAL ALERT CONTENT ==================== */
.modal-alert-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fef9 100%);
    border-radius: var(--radius-xxl);
    width: 100%;
    max-width: 500px;
    position: relative;
    box-shadow: 
        var(--shadow-xxl),
        0 0 0 1px rgba(0, 166, 81, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    animation: modalAlertBounce 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

@keyframes modalAlertBounce {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-100px) rotateX(40deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.1) translateY(12px) rotateX(-12deg);
    }
    70% {
        transform: scale(0.95) translateY(-6px) rotateX(6deg);
    }
    85% {
        transform: scale(1.03) translateY(2px) rotateX(-2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotateX(0);
    }
}

/* ==================== MODAL ALERT HEADER ==================== */
.modal-alert-header {
    padding: 3rem 2.5rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xxl) var(--radius-xxl) 0 0;
}

/* Patrón de césped en alert header */
.modal-alert-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.12;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 12px,
            currentColor 12px,
            currentColor 24px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 12px,
            currentColor 12px,
            currentColor 24px
        );
    animation: patternMoveAlert 28s linear infinite;
}

@keyframes patternMoveAlert {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(24px, 24px) rotate(360deg); }
}

/* Colores según tipo */
.modal-alert.success .modal-alert-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.modal-alert.error .modal-alert-header {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.modal-alert.warning .modal-alert-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.modal-alert.confirm .modal-alert-header {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: white;
}

/* ==================== MODAL ALERT ICON ==================== */
.modal-alert-icon {
    font-size: 5.5rem;
    margin-bottom: 1rem;
    animation: alertIconPop 0.9s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.3s both;
    display: inline-block;
    filter: drop-shadow(4px 4px 10px rgba(0, 0, 0, 0.35));
    position: relative;
    z-index: 1;
}

@keyframes alertIconPop {
    0% {
        transform: scale(0) rotate(-200deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.35) rotate(25deg);
    }
    70% {
        transform: scale(0.9) rotate(-12deg);
    }
    85% {
        transform: scale(1.08) rotate(6deg);
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

/* Animaciones específicas por tipo */
.modal-alert.success .modal-alert-icon {
    animation: alertIconPop 0.9s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.3s both,
               successIconGlow 2.5s ease-in-out 1.3s infinite;
}

@keyframes successIconGlow {
    0%, 100% { 
        filter: drop-shadow(4px 4px 10px rgba(0, 0, 0, 0.35)); 
    }
    50% { 
        filter: drop-shadow(4px 4px 10px rgba(0, 0, 0, 0.35)) 
                drop-shadow(0 0 35px rgba(16, 185, 129, 0.9)); 
    }
}

.modal-alert.warning .modal-alert-icon {
    animation: alertIconPop 0.9s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.3s both,
               warningIconPulse 2.2s ease-in-out 1.3s infinite;
}

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

.modal-alert.error .modal-alert-icon {
    animation: alertIconPop 0.9s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.3s both,
               errorIconShake 0.7s ease 1.3s;
}

@keyframes errorIconShake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    15% { transform: translateX(-18px) rotate(-10deg); }
    30% { transform: translateX(18px) rotate(10deg); }
    45% { transform: translateX(-14px) rotate(-7deg); }
    60% { transform: translateX(14px) rotate(7deg); }
    75% { transform: translateX(-8px) rotate(-4deg); }
    90% { transform: translateX(8px) rotate(4deg); }
}

.modal-alert.confirm .modal-alert-icon {
    animation: alertIconPop 0.9s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.3s both,
               confirmIconBounce 2.8s ease-in-out 1.3s infinite;
}

@keyframes confirmIconBounce {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
    }
    25% { 
        transform: translateY(-18px) rotate(90deg); 
    }
    50% { 
        transform: translateY(0) rotate(180deg); 
    }
    75% { 
        transform: translateY(-10px) rotate(270deg); 
    }
}
/* =================================================================
   PARTE 4: MODAL ALERT FINAL, INFO NOTE Y RESPONSIVE COMPLETO
   ================================================================= */

/* ==================== MODAL ALERT TITLE ==================== */
.modal-alert-title {
    font-size: 2rem;
    font-weight: 900;
    margin: 0;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.35);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    animation: alertTitleSlide 0.7s ease 0.5s backwards;
}

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

/* ==================== MODAL ALERT BODY ==================== */
.modal-alert-body {
    padding: 2.5rem 3rem;
    text-align: center;
    color: var(--text);
    font-size: 1.2rem;
    line-height: 1.9;
    position: relative;
    animation: alertBodyFadeIn 0.7s ease 0.7s backwards;
}

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

/* Decoración de balones en alert body */
.modal-alert-body::before,
.modal-alert-body::after {
    content: '⚽';
    position: absolute;
    font-size: 3.5rem;
    opacity: 0.04;
    animation: floatBallAlert 9s ease-in-out infinite;
}

.modal-alert-body::before {
    top: 12%;
    left: 6%;
    animation-delay: 0s;
}

.modal-alert-body::after {
    bottom: 12%;
    right: 6%;
    animation-delay: 4s;
    animation-direction: reverse;
}

@keyframes floatBallAlert {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(18px, -18px) rotate(90deg);
    }
    50% {
        transform: translate(0, -30px) rotate(180deg);
    }
    75% {
        transform: translate(-18px, -18px) rotate(270deg);
    }
}

/* ==================== MODAL ALERT FOOTER ==================== */
.modal-alert-footer {
    padding: 1.8rem 3rem 3rem;
    background: linear-gradient(to top, rgba(0, 166, 81, 0.04), transparent);
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: alertFooterSlide 0.7s ease 0.9s backwards;
}

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

/* ==================== MODAL ALERT BUTTONS ==================== */
.modal-alert-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 40px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.08rem;
    font-weight: 800;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    min-width: 150px;
}

/* Efecto de onda en alert buttons */
.modal-alert-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.7s ease, height 0.7s ease;
}

.modal-alert-btn:hover::before {
    width: 400px;
    height: 400px;
}

.modal-alert-btn span {
    position: relative;
    z-index: 1;
}

/* Alert Button Primary */
.modal-alert-btn.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: 2px solid var(--primary-light);
    box-shadow: 0 6px 22px rgba(0, 166, 81, 0.45);
}

.modal-alert-btn.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
    transform: translateY(-5px) scale(1.04);
    box-shadow: 0 12px 40px rgba(0, 166, 81, 0.65);
}

/* Alert Button Secondary */
.modal-alert-btn.btn-secondary {
    background: white;
    color: var(--text);
    border: 2px solid #e0e0e0;
    box-shadow: var(--shadow-sm);
}

.modal-alert-btn.btn-secondary:hover {
    background: #f8f9fa;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-5px) scale(1.04);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

/* Alert Button Danger */
.modal-alert-btn.btn-danger {
    background: linear-gradient(135deg, var(--error), #dc2626);
    color: white;
    border: 2px solid #fca5a5;
    box-shadow: 0 6px 22px rgba(239, 68, 68, 0.45);
}

.modal-alert-btn.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-5px) scale(1.04);
    box-shadow: 0 12px 40px rgba(239, 68, 68, 0.65);
}

.modal-alert-btn:active {
    transform: translateY(-2px) scale(1);
    box-shadow: var(--shadow-sm);
}

/* Efecto de confeti para success */
.modal-alert.success .modal-alert-content::after {
    content: '🎉 ⚽ 🏆 ⚽ 🎉 ⚽ 🏅 ⚽';
    position: absolute;
    top: -25px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 2.2rem;
    opacity: 0;
    animation: confettiCelebration 1.4s ease-out 0.6s;
    pointer-events: none;
    z-index: 1;
}

@keyframes confettiCelebration {
    0% {
        opacity: 0;
        transform: translateY(-40px) scale(0.4) rotate(-25deg);
    }
    30% {
        opacity: 1;
        transform: translateY(25px) scale(1.4) rotate(12deg);
    }
    60% {
        opacity: 0.9;
        transform: translateY(70px) scale(1.1) rotate(-8deg);
    }
    100% {
        opacity: 0;
        transform: translateY(120px) scale(0.6) rotate(25deg);
    }
}

/* Efecto de brillo para success */
.modal-alert.success .modal-alert-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.45),
        transparent
    );
    animation: shineSuccess 4s ease-in-out infinite;
}

@keyframes shineSuccess {
    0% {
        left: -100%;
    }
    20% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

/* ==================== INFO NOTE ==================== */
.info-note {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-left: 5px solid var(--info);
    border-radius: var(--radius-lg);
    padding: 1.8rem 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    margin-top: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    animation: infoNoteSlide 0.8s ease 0.8s backwards;
}

@keyframes infoNoteSlide {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.info-note i {
    font-size: 2rem;
    color: var(--info);
    flex-shrink: 0;
    animation: infoIconPulse 2.5s ease-in-out infinite;
}

@keyframes infoIconPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.15);
        opacity: 0.8;
    }
}

.info-note p {
    color: #1e40af;
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0;
    font-weight: 500;
}

.info-note strong {
    font-weight: 800;
    color: #1e3a8a;
}

/* ==================== RESPONSIVE TABLET ==================== */
@media (max-width: 1024px) {
    .page-title {
        font-size: 2.4rem;
    }
    
    .table-header {
        padding: 1.8rem 2rem;
    }
    
    .stats {
        gap: 1.5rem;
    }
    
    .reservas-table th,
    .reservas-table td {
        padding: 1rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .modal-content-custom,
    .modal-alert-content {
        max-width: 90%;
    }
}

/* ==================== RESPONSIVE MOBILE ==================== */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 12px;
    }
    
    .title-icon {
        font-size: 2.5rem;
    }
    
    .title-decoration {
        bottom: -12px;
        width: 100px;
    }
    
    .table-header {
        padding: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.2rem;
    }
    
    .table-header h3 {
        font-size: 1.4rem;
    }
    
    .stats {
        width: 100%;
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .stat-item {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
    }
    
    /* Tabla responsive - scroll horizontal */
    .reservas-table {
        min-width: 900px;
    }
    
    .reservas-table th,
    .reservas-table td {
        padding: 0.9rem 0.7rem;
        font-size: 0.85rem;
    }
    
    .badge {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .btn-action {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    /* Modales */
    .modal-content-custom,
    .modal-alert-content {
        max-width: 95%;
        margin: 0 0.8rem;
    }
    
    .modal-header-custom,
    .modal-alert-header {
        padding: 2.5rem 2rem 2rem;
    }
    
    .modal-icon-ball,
    .modal-alert-icon {
        font-size: 4.5rem;
    }
    
    .modal-title-custom,
    .modal-alert-title {
        font-size: 1.6rem;
    }
    
    .modal-body-custom,
    .modal-alert-body {
        padding: 2rem 1.8rem;
        font-size: 1.05rem;
    }
    
    .modal-footer-custom,
    .modal-alert-footer {
        flex-direction: column;
        padding: 1.3rem 1.8rem 2rem;
        gap: 1rem;
    }
    
    .btn-modal-primary,
    .btn-modal-secondary,
    .modal-alert-btn {
        width: 100%;
        padding: 14px;
        font-size: 1rem;
        min-width: auto;
    }
    
    .info-note {
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .info-note i {
        font-size: 1.8rem;
    }
    
    .info-note p {
        font-size: 1rem;
    }
}

/* ==================== RESPONSIVE SMALL MOBILE ==================== */
@media (max-width: 480px) {
    .page-title {
        font-size: 1.7rem;
    }
    
    .title-icon {
        font-size: 2.2rem;
    }
    
    .table-wrapper {
        border-radius: var(--radius-lg);
    }
    
    .table-header {
        padding: 1.2rem 1rem;
    }
    
    .table-header h3 {
        font-size: 1.2rem;
    }
    
    .stat-item {
        font-size: 0.95rem;
        padding: 10px 14px;
    }
    
    .stat-item i {
        font-size: 1.1rem;
    }
    
    /* Tabla aún más compacta */
    .reservas-table {
        min-width: 800px;
    }
    
    .reservas-table th,
    .reservas-table td {
        padding: 0.8rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .reservas-table th i,
    .reservas-table td i {
        font-size: 0.85rem;
    }
    
    .badge {
        padding: 5px 10px;
        font-size: 0.75rem;
        gap: 4px;
    }
    
    .badge i {
        font-size: 0.85rem;
    }
    
    .btn-action {
        padding: 7px 14px;
        font-size: 0.8rem;
        gap: 6px;
    }
    
    /* Modales compactos */
    .modal-content-custom,
    .modal-alert-content {
        border-radius: var(--radius-lg);
    }
    
    .modal-header-custom,
    .modal-alert-header {
        padding: 2rem 1.5rem 1.5rem;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
    
    .modal-icon-ball,
    .modal-alert-icon {
        font-size: 4rem;
        margin-bottom: 0.8rem;
    }
    
    .modal-title-custom,
    .modal-alert-title {
        font-size: 1.4rem;
    }
    
    .modal-close {
        width: 35px;
        height: 35px;
        top: 15px;
        right: 15px;
        font-size: 1.6rem;
    }
    
    .modal-body-custom,
    .modal-alert-body {
        padding: 1.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .modal-body-custom::before,
    .modal-body-custom::after,
    .modal-alert-body::before,
    .modal-alert-body::after {
        font-size: 2.5rem;
    }
    
    .modal-info {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .modal-info strong {
        font-size: 1.1rem;
    }
    
    .form-group label {
        font-size: 1rem;
    }
    
    .file-upload-btn {
        padding: 1.2rem;
        font-size: 1rem;
    }
    
    .file-upload-btn i {
        font-size: 1.8rem;
    }
    
    .form-select {
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
    }
    
    .modal-footer-custom,
    .modal-alert-footer {
        padding: 1rem 1.5rem 1.8rem;
    }
    
    .btn-modal-primary,
    .btn-modal-secondary,
    .modal-alert-btn {
        padding: 13px;
        font-size: 0.95rem;
    }
    
    .info-note {
        padding: 1.2rem;
        gap: 0.8rem;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .info-note i {
        font-size: 1.6rem;
    }
    
    .info-note p {
        font-size: 0.95rem;
    }
    
    /* Loading states más pequeños */
    .ball-bounce {
        font-size: 4rem;
    }
    
    .loading-spinner p {
        font-size: 1.1rem;
    }
    
    .empty-state i {
        font-size: 4rem;
    }
    
    .empty-state p {
        font-size: 1.1rem;
    }
}

/* ==================== ANIMACIONES ADICIONALES ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==================== UTILIDADES ==================== */
.animate-shake {
    animation: errorShake 0.6s ease;
}

.animate-bounce {
    animation: ballLoadingBounce 1s ease;
}

.animate-pulse {
    animation: loadingTextPulse 1.5s ease-in-out infinite;
}

.no-scroll {
    overflow: hidden;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==================== ACCESIBILIDAD ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus visible para navegación por teclado */
*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

/* ==================== PRINT STYLES ==================== */
@media print {
    header,
    .btn-back-header,
    .btn-logout,
    .floating-ball,
    .modal-overlay,
    .modal-alert,
    .btn-action,
    .info-note {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .table-wrapper {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .reservas-table th,
    .reservas-table td {
        border: 1px solid #ddd;
    }
}