/* =========================================
   W. J. REYES & ASOCIADOS / PROMOSALUD
   GLASSMORPHISM CORPORATIVO
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 30px 18px;

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,0.10),
            rgba(42,53,70,0.10)
        ),
        url('../Imagen/fondo_web.png');

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    overflow-y: auto;
    position: relative;
}

/* Capa elegante encima del fondo */
body::before {
    content: "";
    position: fixed;
    inset: 0;

    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(93,128,54,0.12),
            transparent 28%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(42,53,70,0.14),
            transparent 30%
        );

    pointer-events: none;
    z-index: 0;
}

/* =========================================
   CONTENEDOR PRINCIPAL TRANSPARENTE
========================================= */

.container {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 560px;

    padding: 42px 38px 36px;

    background: rgba(255, 255, 255, 0.58);

    border: 1px solid rgba(255, 255, 255, 0.72);

    border-radius: 26px;

    box-shadow:
        0 25px 65px rgba(22, 33, 48, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);

    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);

    text-align: center;

    animation: entradaTarjeta 0.7s ease-out;
}

/* brillo superior */
.container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;

    width: 80%;
    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.95),
        transparent
    );
}

/* detalle decorativo inferior */
.container::after {
    content: "";
    position: absolute;

    bottom: -55px;
    right: -55px;

    width: 150px;
    height: 150px;

    border-radius: 50%;

    background: rgba(93,128,54,0.08);

    filter: blur(5px);

    pointer-events: none;
}

/* =========================================
   ANIMACIÓN DE ENTRADA
========================================= */

@keyframes entradaTarjeta {
    from {
        opacity: 0;
        transform: translateY(25px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================================
   LOGO
========================================= */

.logo {
    display: block;

    width: 100%;
    max-width: 390px;

    height: auto;

    margin: 0 auto 20px;

    filter: drop-shadow(
        0 6px 12px rgba(42,53,70,0.08)
    );

    animation: aparecerLogo 0.9s ease-out;
}

@keyframes aparecerLogo {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   TÍTULOS
========================================= */

.titulo-sistema {
    font-size: 28px;
    font-weight: 700;

    color: #2a3546;

    margin-bottom: 8px;

    letter-spacing: -0.5px;
}

h2 {
    font-size: 16px;
    font-weight: 400;

    color: #5f6975;

    margin-top: 4px;
    margin-bottom: 28px;
}

/* =========================================
   INPUT USUARIO
========================================= */

input[type="text"] {
    width: 100%;

    padding: 15px 16px;

    margin: 11px 0;

    background: rgba(255,255,255,0.54);

    border: 1px solid rgba(255,255,255,0.85);

    border-radius: 13px;

    box-shadow:
        inset 0 1px 2px rgba(0,0,0,0.03),
        0 4px 12px rgba(42,53,70,0.04);

    color: #2a3546;

    font-size: 15px;

    outline: none;

    transition: all 0.25s ease;
}

input[type="text"]:focus {
    background: rgba(255,255,255,0.82);

    border-color: rgba(93,128,54,0.75);

    box-shadow:
        0 0 0 4px rgba(93,128,54,0.10),
        0 8px 18px rgba(42,53,70,0.07);

    transform: translateY(-1px);
}

/* =========================================
   CONTRASEÑA
========================================= */

.input-password-container {
    position: relative;

    width: 100%;

    margin: 11px 0;
}

#contrasena {
    width: 100%;

    padding: 15px 48px 15px 16px;

    background: rgba(255,255,255,0.54);

    border: 1px solid rgba(255,255,255,0.85);

    border-radius: 13px;

    box-shadow:
        inset 0 1px 2px rgba(0,0,0,0.03),
        0 4px 12px rgba(42,53,70,0.04);

    color: #2a3546;

    font-size: 15px;

    outline: none;

    transition: all 0.25s ease;
}

#contrasena:focus {
    background: rgba(255,255,255,0.82);

    border-color: rgba(93,128,54,0.75);

    box-shadow:
        0 0 0 4px rgba(93,128,54,0.10),
        0 8px 18px rgba(42,53,70,0.07);

    transform: translateY(-1px);
}

/* =========================================
   OJO CONTRASEÑA
========================================= */

.toggle-password {
    position: absolute;

    top: 50%;
    right: 15px;

    transform: translateY(-50%);

    cursor: pointer;

    color: #75808d;

    font-size: 18px;

    user-select: none;

    transition: all 0.2s ease;
}

.toggle-password:hover {
    color: #2a3546;
    transform: translateY(-50%) scale(1.08);
}

/* =========================================
   BOTONES
========================================= */

button {
    border: none;

    cursor: pointer;

    border-radius: 13px;

    font-size: 15px;
    font-weight: 600;

    transition: all 0.25s ease;
}

/* LOGIN */

.btn-login {
    width: 100%;

    padding: 15px 20px;

    margin-top: 18px;

    color: white;

    background:
        linear-gradient(
            135deg,
            rgba(93,128,54,0.96),
            rgba(72,103,40,0.96)
        );

    box-shadow:
        0 12px 28px rgba(93,128,54,0.25);

    position: relative;
    overflow: hidden;
}

/* brillo animado */
.btn-login::before {
    content: "";

    position: absolute;

    top: 0;
    left: -120%;

    width: 60%;
    height: 100%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.25),
        transparent
    );

    transform: skewX(-20deg);

    transition: left 0.6s ease;
}

.btn-login:hover::before {
    left: 140%;
}

.btn-login:hover {
    transform: translateY(-2px);

    box-shadow:
        0 16px 32px rgba(93,128,54,0.30);
}

.btn-login:active {
    transform: translateY(0);
}

/* =========================================
   MENÚ
========================================= */

.menu-container {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 15px;

    margin-top: 26px;
}

.btn-menu {
    width: 100%;

    min-height: 54px;

    padding: 14px 18px;

    color: white;

    background: rgba(93,128,54,0.92);

    border: 1px solid rgba(255,255,255,0.18);

    box-shadow:
        0 8px 20px rgba(93,128,54,0.18);
}

.btn-menu:hover {
    background: rgba(75,105,40,0.96);

    transform: translateY(-2px);

    box-shadow:
        0 12px 24px rgba(93,128,54,0.24);
}

/* =========================================
   OTROS BOTONES
========================================= */

.btn-logout {
    background: rgba(76,84,84,0.92);
    color: white;
}

.btn-save {
    background: rgba(42,53,70,0.95);
    color: white;
}

.btn-back {
    background: rgba(140,148,164,0.92);
    color: white;
}

/* =========================================
   PLACEHOLDER
========================================= */

input::placeholder {
    color: #8e98a2;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 768px) {

    body {
        padding: 22px 14px;
        background-attachment: scroll;
    }

    .container {
        padding: 34px 26px 30px;

        border-radius: 22px;

        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    .logo {
        max-width: 330px;
    }

    .titulo-sistema {
        font-size: 25px;
    }
}

@media (max-width: 480px) {

    .container {
        padding: 28px 18px 24px;

        border-radius: 18px;
    }

    .logo {
        max-width: 275px;
    }

    .titulo-sistema {
        font-size: 22px;
    }

    .menu-container {
        grid-template-columns: 1fr;
    }
}