/* =========================================
   ESTILOS PARA PÁGINAS DE AUTENTICACIÓN
   ========================================= */

/* --- Body de Página de Autenticación --- */
.auth-page {
    background-image: url('https://upload.wikimedia.org/wikipedia/commons/1/12/Finca.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Poppins', sans-serif;
}

/* --- Header Simple --- */
.auth-header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section .logo_img {
    height: 50px;
    width: auto;
}

.back-link {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-link:hover {
    background: #f0f8f0;
    color: #45a049;
}

/* --- Main Content --- */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-container {
    width: 100%;
    max-width: 480px;
}

.register-container {
    max-width: 680px;
}

/* --- Auth Card --- */
.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-bottom: 30px;
}

.auth-card-header {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 40px 30px 30px;
    text-align: center;
}

.auth-card-header h1 {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 700;
}

.auth-card-header p {
    margin: 0;
    opacity: 0.95;
    font-size: 15px;
}

/* --- Form Styles --- */
.auth-form {
    padding: 35px 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-group label i {
    color: #4CAF50;
    margin-right: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #666;
    font-size: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* --- Checkbox Custom --- */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: #555;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #ddd;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #4CAF50;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* --- Buttons --- */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.4);
}

.btn-secondary {
    background: #e1e5e9;
    color: #333;
}

.btn-secondary:hover {
    background: #cbd1d7;
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(56, 239, 125, 0.4);
}

.btn-full {
    width: 100%;
}

.btn-loading {
    display: none;
}

.btn-loading .loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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


/* --- Steps Indicator (Para Registro) --- */
.steps-indicator {
    display: flex;
    justify-content: space-between;
    padding: 30px 30px 0;
    margin-bottom: 20px;
}

.step-item {
    flex: 1;
    text-align: center;
    position: relative;
}

.step-item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 18px;
    left: 60%;
    width: 80%;
    height: 2px;
    background: #e1e5e9;
    z-index: 0;
}

.step-item.active:not(:last-child)::after {
    background: #4CAF50;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e1e5e9;
    color: #999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.step-item.active .step-number {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    transform: scale(1.1);
}

.step-item.completed .step-number {
    background: #4caf50;
    color: white;
}

.step-label {
    font-size: 12px;
    color: #999;
    font-weight: 500;
}

.step-item.active .step-label {
    color: #4CAF50;
    font-weight: 700;
}

/* --- Step Content --- */
.step {
    display: none;
}

.step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.step h3 {
    margin: 0 0 25px;
    color: #333;
    font-size: 18px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f2ff;
}

.step h3 i {
    color: #4CAF50;
    margin-right: 8px;
}

.step-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.step-actions .btn {
    flex: 1;
}

/* --- Auth Footer --- */
.auth-footer {
    text-align: center;
    padding: 20px 30px;
    border-top: 1px solid #e1e5e9;
}

.auth-footer p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.auth-footer a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}


/* --- Footer de Página --- */
footer {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    border-radius: 1.5em;
    margin: 15px 0;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    text-align: center;
    color: #333;
}

#footer_left, #footer_right {
    text-align: center;
}

/* --- Mensajes de Error de Campo --- */
.field-error {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e74c3c;
    font-size: 13px;
    margin-top: 6px;
    padding: 8px 12px;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: 6px;
    animation: slideInError 0.3s ease;
}

.field-error i {
    font-size: 14px;
    flex-shrink: 0;
}

.field-error span {
    flex: 1;
}

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

/* --- Campos con Error --- */
.form-group input.error,
.form-group select.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-group input.error:focus,
.form-group select.error:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

/* --- Notificaciones --- */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

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

.notification.success {
    border-left: 4px solid #4caf50;
}

.notification.error {
    border-left: 4px solid #f44336;
}

.notification.info {
    border-left: 4px solid #2196f3;
}

.notification i {
    font-size: 24px;
}

.notification.success i {
    color: #4caf50;
}

.notification.error i {
    color: #f44336;
}

.notification.info i {
    color: #2196f3;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 700;
    margin-bottom: 4px;
    color: #333;
}

.notification-message {
    font-size: 14px;
    color: #666;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .auth-main {
        padding: 20px 15px;
    }
    
    .auth-card-header {
        padding: 30px 20px 20px;
    }
    
    .auth-card-header h1 {
        font-size: 24px;
    }
    
    .auth-form {
        padding: 25px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .steps-indicator {
        padding: 20px 15px 0;
    }
    
    .step-label {
        display: none;
    }
    
    
    footer {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .step-item:not(:last-child)::after {
        display: none;
    }
    
    .step-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

