/* Loading Screen Styles - Compatible con sistema existente */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    background: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.overlay.d-none {
    display: none !important;
}

.overlay__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.loading-content {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
}

.loading-logo {
    margin-bottom: 2rem;
}

.logo-container {
    position: relative;
    width: 96px;
    height: 96px;
    margin: 0 auto 1rem;
}

.nz-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-family: 'Arial Black', Arial, sans-serif;
    font-weight: 900;
    font-size: 2.5rem;
    letter-spacing: -0.1em;
    animation: pulse 2s infinite;
}

.letter-n {
    color: #16a34a;
    text-shadow: 2px 2px 4px rgba(22, 163, 74, 0.3);
    transform: perspective(500px) rotateY(-15deg);
    display: inline-block;
    animation: letterFloat 3s ease-in-out infinite;
}

.letter-z {
    color: #6b7280;
    text-shadow: 2px 2px 4px rgba(107, 114, 128, 0.3);
    transform: perspective(500px) rotateY(15deg);
    display: inline-block;
    animation: letterFloat 3s ease-in-out infinite reverse;
}

.spinner-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 4px solid #dcfce7;
    border-top: 4px solid #16a34a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: #16a34a;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.dot-1 {
    animation-delay: 0ms;
}

.dot-2 {
    animation-delay: 150ms;
}

.dot-3 {
    animation-delay: 300ms;
}

.loading-title {
    font-size: 2rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 0.5rem;
    animation: fadeIn 1s ease-in;
}

.loading-subtitle {
    color: #6b7280;
    font-weight: 500;
    margin: 0;
    animation: slideIn 1s ease-in;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes letterFloat {
    0%, 100% {
        transform: perspective(500px) rotateY(-15deg) translateY(0px);
    }
    50% {
        transform: perspective(500px) rotateY(-15deg) translateY(-10px);
    }
}

.letter-z {
    animation: letterFloatReverse 3s ease-in-out infinite;
}

@keyframes letterFloatReverse {
    0%, 100% {
        transform: perspective(500px) rotateY(15deg) translateY(0px);
    }
    50% {
        transform: perspective(500px) rotateY(15deg) translateY(-10px);
    }
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

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

/* Hide loading screen when content is ready - Compatible */
.overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Ensure main content takes full height when shown */
#main-content {
    min-height: 100vh;
    background-color: white;
}