/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    height: 100vh;
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 50%, #a16207 100%);
    overflow: hidden;
}

.container {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(234, 179, 8, 0.85) 0%, 
        rgba(202, 138, 4, 0.85) 50%, 
        rgba(161, 98, 7, 0.85) 100%);
    z-index: 1;
}

.header {
    position: relative;
    z-index: 2;
    padding: 60px 20px 40px;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.logo-image {
    max-width: 280px;
    max-height: 160px;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.form-container {
    position: relative;
    z-index: 2;
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px 30px 0 0;
    padding: 30px 20px;
    margin-top: auto;
    backdrop-filter: blur(10px);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.2);
}

.tab-container {
    display: flex;
    margin-bottom: 30px;
    background: rgba(234, 179, 8, 0.1);
    border-radius: 25px;
    padding: 5px;
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 16px;
    font-weight: 500;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button.active {
    background: linear-gradient(135deg, #eab308, #ca8a04);
    color: white;
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.3);
}

.form-content {
    display: none;
}

.form-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #eab308;
    font-size: 18px;
    z-index: 1;
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 16px;
    background: white;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: #eab308;
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.1);
}

.input-group input::placeholder {
    color: #9ca3af;
}

/* Estilos para el campo de teléfono con +57 */
.phone-group {
    position: relative;
    display: flex;
    align-items: center;
}

.country-code {
    position: absolute;
    left: 50px;
    color: #374151;
    font-weight: 600;
    font-size: 16px;
    z-index: 2;
    background: white;
    padding: 0 5px;
}

.phone-group input {
    padding-left: 90px !important;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
}

.toggle-password:hover {
    color: #eab308;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    padding-left: 5px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #eab308;
}

.checkbox-group label {
    color: #374151;
    font-size: 14px;
    cursor: pointer;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #eab308, #ca8a04);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #ca8a04, #a16207);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(234, 179, 8, 0.4);
}

.register-link-btn {
    width: 100%;
    padding: 15px;
    background: white;
    color: #eab308;
    border: 2px solid #eab308;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.1);
}

.register-link-btn:hover {
    background: #eab308;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(234, 179, 8, 0.3);
}

.forgot-password {
    text-align: center;
    margin-top: 20px;
}

.forgot-password a {
    color: #eab308;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.forgot-password a:hover {
    text-decoration: underline;
    color: #ca8a04;
}

.download-app {
    text-align: center;
    margin-top: 20px;
}

.download-app a {
    color: #eab308;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.download-app a:hover {
    text-decoration: underline;
    color: #ca8a04;
}

/* Mensajes de alerta */
.message-alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.message-alert.success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.message-alert.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.message-alert i {
    font-size: 18px;
}

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

/* Estados de botones */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

button .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mensaje de referido */
.referral-info {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.1) 0%, rgba(202, 138, 4, 0.1) 100%);
    border: 2px solid #eab308;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #a16207;
    font-weight: 500;
    animation: slideInDown 0.5s ease-out;
}

.referral-info i {
    color: #eab308;
    font-size: 18px;
}

.referral-info strong {
    color: #eab308;
    font-weight: bold;
}

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

/* Responsive */
@media (max-width: 480px) {
    .form-container {
        padding: 20px 15px;
    }
    
    .logo-image {
        max-width: 220px;
        max-height: 130px;
    }
    
    .input-group input {
        padding: 12px 12px 12px 45px;
        font-size: 15px;
    }
    
    .phone-group input {
        padding-left: 80px !important;
    }
    
    .country-code {
        left: 45px;
        font-size: 15px;
    }
    
    .submit-btn, .register-link-btn {
        padding: 12px;
        font-size: 15px;
    }
    
    .referral-info {
        padding: 12px;
        font-size: 14px;
    }
    
    .referral-info i {
        font-size: 16px;
    }
}
