:root {
    --dred-green: #73af55;
    --dred-green-dark: #539532;
    --dred-green-deep: #2f6f25;
    --cream-card: rgba(251, 246, 237, 0.95);
    --text-title: #415065;
    --text-body: #596352;
    --text-soft: #6b7068;
    --border: rgba(88, 115, 70, 0.18);
    --danger-bg: #fff0ed;
    --danger-border: #efbeb5;
    --danger-text: #943d32;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text-body);
    background:
        linear-gradient(90deg, rgba(47, 111, 37, 0.46) 0%, rgba(83, 149, 50, 0.38) 32%, rgba(115, 175, 85, 0.28) 54%, rgba(179, 201, 149, 0.16) 76%, rgba(233, 237, 220, 0.08) 100%),
        url('../img/login-bg.jpg') center center / cover no-repeat fixed;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 42% 50%, rgba(255,255,255,0.10), transparent 18%),
        radial-gradient(circle at 76% 24%, rgba(255,255,255,0.07), transparent 14%),
        linear-gradient(180deg, rgba(20, 28, 18, 0.12) 0%, rgba(20, 28, 18, 0.04) 100%);
    pointer-events: none;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px 20px;
}

.login-card {
    width: min(100%, 540px);
    position: relative;
    transform: translateX(-70px);
    border-radius: 28px;
    padding: 1px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(115, 175, 85, 0.20));
    box-shadow:
        0 40px 110px rgba(19, 28, 17, 0.36),
        0 14px 34px rgba(47, 111, 37, 0.18);
}

.login-card::before {
    content: "";
    position: absolute;
    inset: -28px;
    border-radius: 48px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 46%, transparent 72%);
    z-index: -1;
}

.login-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 42px;
    right: 42px;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(115, 175, 85, 0.96), transparent);
    border-radius: 999px;
}

.login-card-inner {
    background: var(--cream-card);
    border-radius: 27px;
    padding: 46px 46px 38px;
    backdrop-filter: blur(8px);
}

.login-card h1 {
    margin: 0;
    color: var(--text-title);
    font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    font-size: 40px;
    line-height: 1.05;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.045em;
}

.login-card h1::after {
    content: "";
    display: block;
    width: 70px;
    height: 1px;
    margin: 20px auto 0;
    background: rgba(115, 175, 85, 0.72);
}

.login_texto_bienvenida {
    margin-top: 18px;
    color: #4f6f42;
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
}

.login_texto_bienvenida strong {
    color: var(--dred-green-deep);
    font-weight: 800;
}

.login-alert {
    margin: 22px 0 0;
    padding: 13px 15px;
    color: var(--danger-text);
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.45;
}

.login-form {
    padding-top: 28px;
}

.input-row {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dred-green-dark);
    background: rgba(115, 175, 85, 0.13);
    border-radius: 12px;
    pointer-events: none;
}

.input-row input {
    width: 100%;
    height: 60px;
    padding: 0 18px 0 66px;
    color: #26322a;
    background: rgba(255, 250, 241, 0.96);
    border: 1px solid var(--border);
    border-radius: 17px;
    outline: none;
    font-size: 16px;
    font-weight: 500;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.input-row input:focus {
    border-color: rgba(83, 149, 50, 0.76);
    box-shadow: 0 0 0 5px rgba(115, 175, 85, 0.16);
    background: #fffdf8;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: #26322a;
    -webkit-box-shadow: 0 0 0 1000px #fffaf1 inset;
    box-shadow: 0 0 0 1000px #fffaf1 inset;
    transition: background-color 9999s ease-in-out 0s;
}

.login-button {
    width: 100%;
    height: 60px;
    margin-top: 9px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--dred-green-dark) 0%, var(--dred-green) 100%);
    border: 0;
    border-radius: 17px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 18px 34px rgba(83, 149, 50, 0.28);
    transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 40px rgba(83, 149, 50, 0.34);
    filter: brightness(1.02);
}

.login-button:active {
    transform: translateY(0);
    box-shadow: 0 12px 24px rgba(83, 149, 50, 0.24);
}

.login-help {
    margin-top: 28px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

.login-help a {
    color: #2f6921;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.login-help a:hover {
    text-decoration: underline;
}

@media (max-width: 980px) {
    .login-card {
        transform: translateX(-35px);
    }
}

@media (max-width: 700px) {
    body {
        background:
            linear-gradient(180deg, rgba(47, 111, 37, 0.48) 0%, rgba(83, 149, 50, 0.38) 42%, rgba(115, 175, 85, 0.28) 72%, rgba(179, 201, 149, 0.16) 100%),
            url('../img/login-bg.jpg') center center / cover no-repeat;
    }

    .login-card {
        transform: none;
        width: min(100%, 500px);
    }
}

@media (max-width: 520px) {
    .login-page {
        align-items: flex-start;
        padding: 28px 16px;
    }

    .login-card {
        border-radius: 23px;
    }

    .login-card-inner {
        border-radius: 22px;
        padding: 34px 24px 28px;
    }

    .login-card h1 {
        font-size: 31px;
        letter-spacing: 0.035em;
    }

    .login_texto_bienvenida {
        font-size: 15px;
    }

    .input-row input,
    .login-button {
        height: 56px;
        font-size: 15px;
    }

    .login-help {
        font-size: 13px;
    }
}


/* Recuperación de contraseña v21 */
.login-links {
    margin-top: 18px;
    text-align: center;
}

.login-links a,
.login-back-link {
    color: #315f27;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.login-links a:hover,
.login-back-link:hover {
    text-decoration: underline;
}

.login-alert-success {
    background: #edf7e9 !important;
    border-color: #c7e4bb !important;
    color: #315f27 !important;
}

.login-card .login-reset-text {
    margin-top: 17px;
    color: #527044;
    font-size: 15px;
    line-height: 1.6;
    text-align: center;
}

.login-card .login-reset-text strong {
    color: var(--dred-green-deep, #2f6f25);
}

.login-actions-secondary {
    margin-top: 18px;
    text-align: center;
}
