﻿*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Open Sans', sans-serif;
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Fondo con hojas decorativas */
.login-fondo {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../Imagenes/fondoLogin.svg') center center / cover no-repeat;
    z-index: 0;
}

.hoja-deco {
    position: absolute;
    pointer-events: none;
}

.h1 {
    width: 280px;
    height: 280px;
    top: -80px;
    right: -40px;
    transform: rotate(20deg);
}

.h2 {
    width: 200px;
    height: 200px;
    top: -50px;
    right: 180px;
    transform: rotate(-15deg);
}

.h3 {
    width: 160px;
    height: 160px;
    top: -30px;
    left: 60px;
    transform: rotate(40deg);
}

.h4 {
    width: 120px;
    height: 120px;
    top: 20px;
    left: -20px;
    transform: rotate(-5deg);
}

/* Contenedor principal */
.login-wrap {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    padding-top: 80px;
}

/* Card */
.login-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 32px rgba(26,58,42,0.12);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
}

/* Logo */
.logo-area {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-img {
    width: 180px;
    max-width: 100%;
}

/* Alerta */
.alerta {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 1rem;
}

.alerta-error {
    background: #fdecea;
    color: #a32d2d;
    border: 1px solid #f0c0c0;
}

.alerta-ok {
    background: #eaf4ea;
    color: #1a5a1a;
    border: 1px solid #b0d8b0;
}

/* Campos */
.campo-grupo {
    margin-bottom: 1.1rem;
}

.campo-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #1a3a2a;
    margin-bottom: 5px;
    letter-spacing: 0.3px;
}

    .campo-label .material-symbols-outlined {
        font-size: 16px;
        color: #2d5a40;
    }

.campo-input {
    width: 100%;
    border: 1.5px solid #c8d8c8;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: 'Open Sans', sans-serif;
    color: #1a3a2a;
    background: #f8faf8;
    outline: none;
    transition: border-color 0.2s;
}

    .campo-input:focus {
        border-color: #2d5a40;
        background: #fff;
    }

/* Ojo password */
.input-ojo {
    position: relative;
}

    .input-ojo .campo-input {
        padding-right: 42px;
    }

.btn-ojo {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: #6a8a6a;
    display: flex;
    align-items: center;
    padding: 0;
}

    .btn-ojo .material-symbols-outlined {
        font-size: 18px;
    }

/* Botón entrar */
.btn-entrar {
    width: 100%;
    padding: 11px;
    background: #1a3a2a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Open Sans', sans-serif;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background 0.2s;
    margin-top: 0.5rem;
}

    .btn-entrar:hover {
        background: #2d5a40;
    }

/* Links */
.login-links {
    display: flex;
    justify-content: space-between;
    margin-top: 1.2rem;
    gap: 8px;
    flex-wrap: wrap;
}

    .login-links a {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 12px;
        color: #2d5a40;
        text-decoration: none;
        transition: color 0.2s;
    }

        .login-links a:hover {
            color: #1a3a2a;
        }

        .login-links a .material-symbols-outlined {
            font-size: 14px;
        }

.btn-link-verde {
    background: transparent;
    border: none;
    color: #2d5a40;
    font-size: 12px;
    font-family: 'Open Sans', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
}

    .btn-link-verde:hover {
        color: #1a3a2a;
    }

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.2rem;
    }

    .login-fondo {
        height: 160px;
    }
}

/* Registro */
.registro-subtitulo {
    font-size: 12px;
    color: #6a8a6a;
    text-align: center;
    margin-bottom: 1.2rem;
    margin-top: -1rem;
}

.password-indicadores {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ind {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #a32d2d;
}

    .ind .material-symbols-outlined {
        font-size: 13px;
    }

.ind-ok {
    color: #1a5a1a;
}

/* Animaciones fade */
.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.fade-out {
    animation: fadeOut 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

.login-card {
    animation: fadeIn 0.5s ease forwards;
}