* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.safra-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 35px 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 480px;
    width: 100%;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo {
    max-width: 260px;
    height: auto;
    margin-bottom: 15px;
    border-radius: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.safra-title {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.safra-subtitle {
    color: #666;
    font-size: 1rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

#preload-indicator {
    margin: 15px 0;
}

.loading-text {
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.progress-container {
    background: #e9ecef;
    border-radius: 25px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

#loading-progress {
    background: linear-gradient(45deg, #007bff, #0056b3);
    height: 100%;
    width: 0%;
    border-radius: 25px;
    transition: width 0.3s ease;
    position: relative;
}

#loading-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

#loading-stats {
    color: #666;
    font-size: 0.85rem;
    font-weight: 500;
}

#safra-buttons {
    display: none;
}

.safra-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 5px;
}

.btn-custom {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 16px 25px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-custom:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
    background: linear-gradient(45deg, #0056b3, #003d82);
}

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

.btn-custom.disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-safra-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.safra-info {
    text-align: left;
}

.safra-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.safra-period {
    font-size: 0.85rem;
    opacity: 0.8;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.loading {
    background: rgba(255, 193, 7, 0.2);
    color: #856404;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.status-badge.ready {
    background: rgba(40, 167, 69, 0.8);
    color: #155724;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.status-badge.error {
    background: rgba(220, 53, 69, 0.2);
    color: #721c24;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.system-info {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
    color: #666;
    font-size: 0.85rem;
}

    .login-container {
        background-color: #fff;
        padding: 20px;
        border-radius: 5px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    }
    .login-container h1 {
        text-align: center;
        margin-bottom: 20px;
    }
    .form-group {
        margin-bottom: 15px;
    }
    .form-group label {
        display: block;
        margin-bottom: 5px;
    }
    .form-group input {
        width: 100%;
        padding: 8px;
        box-sizing: border-box;
        border: 1px solid #ddd;
        border-radius: 4px;
    }
    .btn-login {
        width: 100%;
        padding: 10px;
        background-color: #007bff;
        color: white;
        border: none;
        border-radius: 4px;
        cursor: pointer;
    }
    .btn-login:hover {
        background-color: #0056b3;
    }

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.safra-container {
    animation: fadeIn 0.6s ease-out;
}

/* Responsividade */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .safra-container {
        padding: 25px 20px;
    }
    
    .safra-title {
        font-size: 1.6rem;
    }
    
    .safra-subtitle {
        font-size: 0.9rem;
    }
    
    .btn-custom {
        padding: 14px 18px;
        font-size: 0.9rem;
    }
    
    .logo {
        max-width: 220px;
    }
}
