﻿/* ===== Colores de marca ===== */
:root {
    --lm-green: #33C635;
    --lm-purple: #9A41DE;
    --lm-orange: #FFAD66;
    --lm-green2: #00AC11;
    --lm-orange2: #FF914D;
    --lm-pink: #FF66C4;
    --lm-cyan: #00E1ED;
    --lm-blue: #1376FF;
    --card: #1f2226;
    --input: #2a2e33;
    --input-border: #3a3f45;
    --text-1: #e9edf3;
    --text-2: #b7bec8;
    --text-3: #8a93a0;
    --glow: rgba(0,225,237,.35);
    --alert-danger-bg: #f8d7da; /* rojo claro (fondo) */
    --alert-danger-text: #842029; /* rojo oscuro (texto) */
    --alert-danger-border: #dc3545; /* rojo fuerte (borde) */
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text-1);
    /* Degradado diagonal: #262626 → #3A3A3A */
    background: linear-gradient(135deg, #262626 0%, #3A3A3A 100%);
}

/* ===== Layout general ===== */
.login-wrapper {
    min-height: 100%;
    display: grid;
    place-items: center;
    position: relative;
    padding: 32px;
}

/* ===== Tarjeta de login ===== */
.login-card {
    width: 440px;
    max-width: 92vw;
    background: var(--card);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.03), 0 0 0 2px rgba(0,0,0,.08) inset;
    padding: 36px 40px 28px;
}

.brand-logo {
    display: block;
    width: 156px;
    height: auto;
    margin: 2px auto 10px;
    filter: drop-shadow(0 6px 18px rgba(0,225,237,.14));
}

/* ===== Formulario ===== */
.login-form {
    margin-top: 8px;
}

.field {
    display: block;
    margin: 18px 0 16px;
}

.field-label {
    display: block;
    font-size: 0.96rem;
    color: #87a7ff;
    margin-bottom: 8px;
    font-weight: 500;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

    .input-wrap .ico {
        position: absolute;
        left: 12px;
        font-size: 20px;
        color: var(--text-3);
        opacity: .9;
        line-height: 1;
    }

    .input-wrap input {
        -webkit-appearance: none;
        appearance: none;
        width: 100%;
        border: 1px solid var(--input-border);
        background: var(--input);
        color: var(--text-1);
        font-size: 0.98rem;
        border-radius: 12px;
        padding: 12px 16px 12px 44px; /* espacio para icono izquierdo */
        outline: none;
        transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
    }

        .input-wrap input::placeholder {
            color: var(--text-3);
        }

        .input-wrap input:focus {
            border-color: var(--lm-cyan);
            box-shadow: 0 0 0 3px var(--glow);
            background: #30343a;
        }

/* ===== Botón ===== */
.btn-primary {
    width: 100%;
    margin-top: 16px;
    padding: 13px 16px;
    background: var(--lm-cyan);
    color: #01383d;
    border: 0;
    border-radius: 12px;
    font-weight: 800;
    letter-spacing: .6px;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex; /* funciona igual en <a> y <button> */
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none; /* quita subrayado en <a> */
    box-shadow: 0 10px 24px rgba(0,0,0,.735), 0 2px 0 rgba(0,0,0,.18) inset;
    transition: background-color .3s ease, color .3s ease, box-shadow .3s ease, transform .2s ease;
}

/* asegura el color también en enlaces visitados */
a.btn-primary:link,
a.btn-primary:visited {
    color: #01383d;
}

.btn-primary:active {
    transform: translateY(1px);
}

/* ícono dentro del botón/enlace */
.btn-ico {
    font-size: 18px;
    color: #01383d;
}

/* estados de foco accesibles */
.btn-primary:focus-visible {
    outline: 3px solid rgba(0,225,237,.5);
    outline-offset: 2px;
}

/* “deshabilitado” para enlaces o botones */
.btn-primary[disabled],
.btn-primary[aria-disabled="true"],
.btn-primary.is-disabled {
    opacity: .6;
    pointer-events: none;
}

a.btn-primary:link,
a.btn-primary:visited {
    color: #01383d;
    text-decoration: none;
}

/* Hover / Focus: fondo azul, texto negro, icono blanco */
.btn-primary:hover,
.btn-primary:focus-visible {
    background: #1376FF; /* azul marca */
    color: #000; /* texto negro */
    box-shadow: 0 12px 26px rgba(19,0,0,.35), 0 2px 0 rgba(0,0,0,.18) inset;
}

    .btn-primary:hover .btn-ico,
    .btn-primary:focus-visible .btn-ico {
        color: #fff; /* icono blanco */
    }

/* Para <a> específicamente, asegura el color del texto en hover/focus */
a.btn-primary:hover,
a.btn-primary:focus-visible {
    color: #000;
}

/* No aplicar hover cuando esté “deshabilitado” */
.btn-primary[disabled],
.btn-primary[aria-disabled="true"],
.btn-primary.is-disabled {
    opacity: .6;
    pointer-events: none;
}

/* ===== Sub-enlaces ===== */
.sub-links {
    margin: 12px 0 0;
    text-align: center;
    color: var(--text-2);
    font-size: .72rem;
}

    .sub-links a {
        color: var(--text-2);
        text-decoration: none;
        border-bottom: 1px dotted transparent;
        transition: color .2s ease, border-color .2s ease;
    }

        .sub-links a:hover {
            color: var(--lm-cyan);
            border-color: var(--lm-cyan);
        }

    .sub-links .sep {
        opacity: .3;
        margin: 0 .5ch;
    }

/* ===== Mascota (camaleón) ===== */
.mascot {
    position: fixed;
    left: 16px;
    bottom: 0;
    width: 140px;
    max-width: 28vw;
    height: auto;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 10px 24px rgba(0,0,0,.55));
}

/* ===== Menú de perfiles (abajo-derecha) ===== */
.roles {
    position: fixed;
    right: 28px;
    bottom: 22px;
    display: flex;
    gap: 20px;
    font-size: .85rem;
}

    .roles a {
        color: rgba(255,255,255,.88);
        text-decoration: none;
        transition: color .2s ease, opacity .2s ease;
        opacity: .9;
    }

        .roles a:hover {
            color: var(--lm-cyan);
            opacity: 1;
        }

/* ===== Responsivo ===== */
@media (max-width: 680px) {
    .login-card {
        padding: 28px 22px 24px;
        border-radius: 16px;
    }

    .brand-logo {
        width: 138px;
        margin-bottom: 6px;
    }

    .btn-primary {
        font-size: 0.95rem;
        padding: 12px;
    }

    .mascot {
        width: 104px;
        left: 8px;
    }

    .roles {
        position: static;
        justify-content: center;
        gap: 16px;
        margin-top: 18px;
        flex-wrap: wrap;
        opacity: .95;
    }

    .login-wrapper {
        padding-bottom: 18px;
    }
}

/* Accesibilidad: menos animación */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

.alert {
    margin-top: 14px; /* queda justo debajo de .sub-links */
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 0.75rem;
    line-height: 1.35;
    background-clip: padding-box; /* borde nítido */
}

.alert-danger {
    background: var(--alert-danger-bg);
    color: var(--alert-danger-text);
    border-color: var(--alert-danger-border);
    box-shadow: 0 6px 16px rgba(220,53,69,.18); /* sutil, opcional */
}

    .alert-danger a {
        color: inherit;
        text-decoration: underline dotted;
        text-underline-offset: 2px;
    }

.alert strong {
    font-weight: 700;
}