/**
 * Estilos para páginas de autenticación
 * Login, Registro, Recuperar contraseña, etc.
 * Agricultura Verde
 */

/* ============================================
   VARIABLES
   ============================================ */
:root {
    --primary-color: #27ae60;
    --primary-dark: #1e8449;
    --primary-light: #58d68d;
    --text-color: #343a40;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
    --white: #ffffff;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --border-radius: 8px;
}

/* ============================================
   AUTH PAGE LAYOUT
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8f5e9 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    min-height: 100vh;
}

/* ============================================
   AUTH CARD (Formulario)
   ============================================ */
.auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 4rem;
    background: var(--white);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-decoration: none;
}

.auth-logo img {
    height: 60px;
    width: auto;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
}

.auth-header p {
    color: var(--text-light);
    margin: 0;
    font-size: 1rem;
}

/* ============================================
   AUTH FORM
   ============================================ */
.auth-form {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon>i:first-child {
    position: absolute !important;
    left: 1.1rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: var(--text-light) !important;
    font-size: 1.1rem !important;
    z-index: 10 !important;
    pointer-events: none;
}

.input-icon input {
    width: 100% !important;
    padding: 0.875rem 2.5rem 0.875rem 4rem !important;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: var(--white);
    position: relative;
    z-index: 1;
}

.input-icon input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(39, 174, 96, 0.1);
}

.input-icon input::placeholder {
    color: #adb5bd;
    opacity: 0.8;
}

.toggle-password {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.75rem;
    transition: color 0.3s;
    z-index: 10;
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* ============================================
   FORM OPTIONS
   ============================================ */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-color);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 1rem 1.5rem;
    font-size: 1.05rem;
}

/* ============================================
   AUTH FOOTER
   ============================================ */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-light);
    margin: 0;
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

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

/* ============================================
   AUTH SIDE (Panel lateral)
   ============================================ */
.auth-side {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.auth-side-content {
    position: relative;
    z-index: 1;
    color: white;
    text-align: left;
    max-width: 400px;
}

.auth-side-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.3;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list li i {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.alert-error {
    background: #fdf2f2;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.alert-success {
    background: #f0fff4;
    color: #276749;
    border: 1px solid #9ae6b4;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.alert-info {
    background: #ebf8ff;
    color: #2b6cb0;
    border: 1px solid #90cdf4;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .auth-container {
        grid-template-columns: 1fr;
    }

    .auth-side {
        display: none;
    }

    .auth-card {
        padding: 2rem;
    }
}

@media (max-width: 576px) {
    .auth-card {
        padding: 1.5rem;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}