/* login.css - Estilo Boutique Orgánica */

:root {
    /* --- PALETA DE MARCA --- */
    --brand-cream: #fbf6ed;      /* Fondo Principal */
    --brand-card: #ffffff;       /* Fondo Tarjeta */
    --brand-mist: #eef4ea;       /* Verde Niebla (Fondo Inputs) */

    --brand-olive-900: #1f3a2a;  /* Títulos Oscuros */
    --brand-olive-700: #2f5b3a;  /* Iconos y Acentos */
    --brand-olive-500: #4f8a3d;  /* Bordes Focus */

    --brand-sun-500: #f08b3a;    /* Naranja Zanahoria (Botón) */
    --brand-sun-hover: #d6762a;  /* Hover del botón */

    --text-grey: #5c645a;        /* Texto secundario */

    /* Tipografía */
    --font-display: 'Fraunces', serif;
    --font-body: 'Nunito Sans', sans-serif;
}

body {
    font-family: var(--font-body);
    background-color: var(--brand-cream); /* Fondo Crema */
    margin: 0;
    height: 100vh;
    color: var(--brand-olive-900);
    overflow: hidden;
}

/* --- Layout Principal --- */
.login-wrapper {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    /* Degradado sutil cálido */
    background: radial-gradient(circle at top right, #ffffff 0%, var(--brand-cream) 100%);
}

/* --- Decoración de Fondo (Verdes Orgánicos) --- */
.circle-deco {
    position: absolute;
    border-radius: 50%;
    /* Círculos verdes muy suaves */
    background: radial-gradient(circle, rgba(79, 138, 61, 0.08) 0%, rgba(79, 138, 61, 0) 70%);
    z-index: 0;
}
.circle-1 { width: 500px; height: 500px; top: -100px; right: -100px; }
.circle-2 { width: 300px; height: 300px; bottom: -50px; left: -50px; }

/* --- Tarjeta Central --- */
.login-card {
    position: relative;
    z-index: 1;
    background: var(--brand-card);
    width: 100%;
    max-width: 420px;
    padding: 3rem 2.5rem;
    border-radius: 32px; /* Bordes más redondeados y suaves */
    /* Sombra elegante y difusa */
    box-shadow: 0 20px 60px rgba(31, 58, 42, 0.08);
    text-align: center;
    border: 1px solid rgba(255,255,255,0.5);
    animation: fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* --- Encabezado --- */
.logo-container {
    width: 90px;
    height: 90px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    /* Sutil sombra al logo para que flote */
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1));
}

.app-name {
    font-family: var(--font-display); /* Fuente Serif con estilo */
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--brand-olive-900);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.welcome-text {
    font-family: var(--font-body);
    color: var(--text-grey);
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

/* --- Inputs Personalizados (Estilo Chip Orgánico) --- */
.input-group-custom {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--brand-mist); /* Fondo Verde Niebla */
    border: 1px solid transparent;
    border-radius: 16px;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

/* Efecto al seleccionar el input */
.input-group-custom:focus-within {
    background: white;
    border-color: var(--brand-olive-500);
    box-shadow: 0 4px 20px rgba(79, 138, 61, 0.1);
}

.input-icon {
    padding-left: 1.2rem;
    color: var(--brand-olive-700); /* Icono Verde */
    font-size: 1.2rem;
    transition: color 0.3s;
}

.floating-input {
    position: relative;
    flex-grow: 1;
    height: 60px;
}

.floating-input .form-control {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    padding: 1.6rem 1rem 0.4rem;
    font-size: 1rem;
    color: var(--brand-olive-900);
    font-weight: 600;
    font-family: var(--font-body);
    outline: none;
    box-shadow: none;
}

/* Label Flotante */
.floating-input label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-grey);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-body);
}

/* Animación del Label */
.floating-input .form-control:focus ~ label,
.floating-input .form-control:not(:placeholder-shown) ~ label {
    top: 14px;
    font-size: 0.75rem;
    color: var(--brand-olive-700);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Botón Ojo Password */
.toggle-pass {
    background: none;
    border: none;
    padding: 0 1rem;
    color: var(--brand-olive-700);
    cursor: pointer;
    font-size: 1.1rem;
}

/* --- Botón Login (Naranja Zanahoria) --- */
.btn-login {
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    border: none;
    border-radius: 16px;

    /* El degradado sutil naranja */
    background: linear-gradient(135deg, var(--brand-sun-500) 0%, #e67e22 100%);
    color: white;

    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(240, 139, 58, 0.25);
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(240, 139, 58, 0.35);
    filter: brightness(1.05);
}

.btn-login:active {
    transform: scale(0.98);
}

/* --- Alerta de Error --- */
.alert-custom {
    background-color: #fdf2f2;
    color: #c0392b;
    border: 1px solid #fadbd8;
    padding: 0.8rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* --- Footer Links --- */
.link-help {
    color: var(--text-grey);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s;
    border-bottom: 1px dotted transparent;
}

.link-help:hover {
    color: var(--brand-sun-500);
    border-bottom-color: var(--brand-sun-500);
}

/* --- Animación --- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Mobile Fixes --- */
@media (max-width: 480px) {
    .login-wrapper { padding: 1rem; background: var(--brand-cream); }
    .login-card {
        padding: 2rem 1.5rem;
        box-shadow: none; /* En móvil quitamos sombra para que se sienta plano/nativo */
        border: none;
        background: transparent;
    }
    .app-name { font-size: 1.6rem; }
    .circle-deco { display: none; } /* Quitamos círculos en móvil para rendimiento */
}