/* css/auth.css */
/* Variables globales */
:root {
    --primary-color: #d97706; /* Amber 600 */
    --primary-hover: #b45309; /* Amber 700 */
    --secondary-color: #fef3c7; /* Amber 100 */
    --text-color: #78350f;    /* Amber 900 */
    --light-bg: #fffbeb;     /* Amber 50 */
    --white: #fff;
    --gray: #6b7280;       /* Cool Gray 500 */
    --border-radius: 0.5rem;
    --card-shadow: 0 10px 40px rgba(0,0,0,0.08);
    --input-focus-shadow: 0 0 0 2px rgba(217, 119, 6, 0.2);
    --button-shadow: 0 4px 12px rgba(217, 119, 6, 0.15);
    --button-hover-shadow: 0 6px 16px rgba(217, 119, 6, 0.25);
}

/* General layout */
body {
    background-color: var(--light-bg); /* Apply light background to the whole page */
    color: var(--text-color);
    font-family: 'Nunito', sans-serif; /* Assuming Nunito is linked in header */
}

.main-content {
    padding: 1rem 0;
    min-height: calc(100vh - 120px); /* Adjust based on header/footer height */
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container { /* Renamed from login-hero-container */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 2rem 1rem; 
}

.auth-card { /* Renamed from login-hero-card */
    background-color: var(--white);
    border-radius: 1.5rem; 
    box-shadow: var(--card-shadow);
    overflow: hidden;
    display: flex;
    max-width: 900px; 
    width: 100%;
    margin: 1rem;
    min-height: 500px; 
}

.auth-card-left {
    flex: 1 1 420px; 
    padding: 2rem 2.5rem; 
    display: flex;
    flex-direction: column;
    justify-content: center; 
}

/* Header inside card */
.auth-header { /* Renamed from login-header */
    text-align: center; 
    margin-bottom: 1.5rem;
}

.auth-header i {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: block; 
    font-size: 2rem; 
}

.auth-header h2 {
    color: var(--primary-color);
    font-size: 1.8rem; 
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Form Styling */
.form-group {
    display: flex;
    align-items: center;
    background: var(--light-bg);
    border-radius: var(--border-radius);
    margin-bottom: 1.2rem;
    padding: 0.4rem 0.8rem;
    border: 1.5px solid var(--secondary-color); /* Thicker border */
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group:focus-within {
   border-color: var(--primary-color);
   box-shadow: var(--input-focus-shadow);
}

.form-group label { /* For icon */
    color: var(--primary-color);
    margin-right: 0.7rem;
    font-size: 1.1rem; 
    margin-bottom: 0;
    min-width: 20px; 
    text-align: center;
}

.form-group input,
.form-group select {
    border: none;
    background: transparent;
    outline: none;
    font-size: 1rem;
    width: 100%;
    padding: 0.7rem 0.2rem;
    color: var(--text-color);
    line-height: 1.5; /* Ensure consistent height */
}

.form-group select {
    height: auto; /* Override potential fixed heights */
    padding: 0.7rem 0.2rem; 
    appearance: none; 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2378350f' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1em;
    padding-right: 2rem; 
    cursor: pointer;
}

.form-group input::placeholder {
    color: var(--gray);
    opacity: 0.8;
}

/* Button */
.btn-auth { /* Renamed from btn-login / btn-registrarse */
    width: 100%;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    padding: 0.9rem;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem; 
    box-shadow: var(--button-shadow);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    text-align: center; 
    display: block; 
}

.btn-auth:hover {
    background: var(--primary-hover);
    box-shadow: var(--button-hover-shadow);
}

/* Error Message */
.auth-error { /* Renamed from login-error / registro-error */
    background: #fefce8; 
    color: #a16207; 
    border-radius: var(--border-radius);
    padding: 0.8rem 1rem; 
    margin-bottom: 1.2rem;
    font-size: 0.95rem; 
    border: 1px solid #facc15; 
    text-align: left; 
    display: flex; 
    align-items: center; 
}
.auth-error i { /* Optional icon */
    margin-right: 0.6rem;
    font-size: 1.1rem;
}


/* Link below form */
.auth-switch-link { /* Renamed from login-register-link / login-link */
    text-align: center;
    margin-top: 1.5rem;
    font-size: 1rem; 
    color: var(--text-color);
}

.auth-switch-link a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none; 
    border-bottom: 1px solid transparent; 
    transition: color 0.2s, border-color 0.2s;
}

.auth-switch-link a:hover {
    color: var(--primary-hover);
    border-bottom-color: var(--primary-hover); 
}

/* Right side / Image container (Desktop only) */
.auth-card-right {
    display: none; /* Hidden by default, shown via media query */
    visibility: hidden;
}

.auth-card-right-img {
     display: none; /* Hidden by default, shown via media query */
     visibility: hidden;
}


/* Responsive Design */
@media (min-width: 900px) {
    .auth-card-right {
        display: flex !important;
        visibility: visible !important;
        flex: 1 1 370px;
        background: linear-gradient(120deg, var(--secondary-color) 60%, var(--light-bg) 100%);
        align-items: center;
        justify-content: center;
        min-width: 350px; 
        min-height: 500px; 
        position: relative;
        border-top-right-radius: 1.5rem; 
        border-bottom-right-radius: 1.5rem; 
        padding: 2rem;
    }

    .auth-card-right-img {
        display: block !important; 
        visibility: visible !important;
        width: 100%; 
        max-width: 380px; 
        border-radius: 1.5rem;
        box-shadow: 0 8px 32px rgba(0,0,0,0.1);
        object-fit: cover;
        border: 4px solid var(--white); 
        margin: 0 auto;
        background-color: var(--secondary-color); /* Placeholder bg */
        aspect-ratio: 1 / 1; /* Make it square */
    }
}

@media (max-width: 900px) {
    .auth-card {
        flex-direction: column;
        min-height: auto; 
        max-width: 450px; 
        margin: 1rem auto; 
    }
    .auth-card-left {
        padding: 2rem 1.5rem; 
        min-width: 0;
        flex-basis: auto; 
    }
    /* Right side is hidden anyway by default */
}

@media (max-width: 600px) {
    body {
        background-color: var(--light-bg); /* Mantener fondo claro en pantallas pequeñas */
    }
    .main-content {
        padding: 1rem 0; /* Restaurar padding vertical */
    }
    .auth-container {
        padding: 0 1rem; /* Añadir padding horizontal */ 
    }
    .auth-card {
        box-shadow: var(--card-shadow); /* Restaurar sombra si se desea */
        border-radius: var(--border-radius); /* Restaurar borde redondeado */ 
        margin: 1rem auto; /* Centrar la tarjeta y añadir margen vertical */
        border: none;
        max-width: 450px; /* Limitar el ancho máximo como en la query de 900px */
        min-height: auto; /* Permitir altura automática */
    }
    .auth-card-left {
        padding: 1.5rem 1.2rem; /* Ajustar padding interno */
        justify-content: flex-start; /* Align top */
    }
     .auth-header h2 {
        font-size: 1.5rem; 
    }
    .form-group {
        margin-bottom: 1rem;
    }
    .btn-auth {
        padding: 0.8rem;
        font-size: 1rem;
        margin-top: 1rem;
    }
    .auth-switch-link {
        font-size: 0.9rem;
        margin-top: 1rem;
    }
}
