:root {
    --pink: #e8197a;
    --pink-light: #ff4fa0;
    --green: #7dc242;
    --green-dark: #5a9e2a;
    --text: #2d2d2d;
    --text-muted: #888;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    font-family: "Nunito", sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    background: #fff url("../img/fondo_login.a1d2ad9dbf1d.png") center/cover no-repeat;
}

main.container {
    max-width: 100% !important;
    padding: 0;
}

.login-shell {
    position: relative;
    isolation: auto;
    overflow: hidden;
    flex: 1 0 auto;
    min-height: 100vh;
}

.bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 246, 251, 0.82) 50%, rgba(246, 255, 241, 0.82) 100%);
    z-index: 0;
}

.blob,
.dot {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.blob {
    border-radius: 50% 40% 60% 50% / 50% 60% 40% 50%;
    animation: blobFloat 8s ease-in-out infinite;
}

.blob-1 {
    width: 360px;
    height: 300px;
    left: -80px;
    top: -70px;
    background: linear-gradient(135deg, rgba(232, 25, 122, 0.15), rgba(255, 79, 160, 0.22));
}

.blob-2 {
    width: 300px;
    height: 250px;
    right: -80px;
    bottom: -60px;
    background: linear-gradient(135deg, rgba(125, 194, 66, 0.18), rgba(181, 224, 122, 0.2));
    animation-delay: -3s;
}

.blob-3 {
    width: 180px;
    height: 160px;
    right: 10%;
    top: 35%;
    background: linear-gradient(135deg, rgba(255, 79, 160, 0.12), rgba(125, 194, 66, 0.12));
    animation-delay: -5s;
}

.blob-4 {
    width: 140px;
    height: 120px;
    left: 8%;
    top: 22%;
    background: linear-gradient(135deg, rgba(125, 194, 66, 0.16), rgba(232, 25, 122, 0.12));
    animation-delay: -2s;
}

.dot {
    border-radius: 50%;
    animation: dotFloat 6s ease-in-out infinite;
}

.dot-1 {
    width: 8px;
    height: 8px;
    background: var(--pink);
    top: 28%;
    left: 22%;
}

.dot-2 {
    width: 7px;
    height: 7px;
    background: var(--green);
    top: 56%;
    right: 26%;
    animation-delay: -2s;
}

.dot-3 {
    width: 10px;
    height: 10px;
    background: var(--pink-light);
    top: 20%;
    right: 18%;
    animation-delay: -1s;
}

.dot-4 {
    width: 9px;
    height: 9px;
    background: #b5e07a;
    bottom: 20%;
    left: 26%;
    animation-delay: -3s;
}

.stars {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
    opacity: 0;
}

.star::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 56px;
    height: 1.5px;
    transform: translateX(-56px) rotate(-25deg);
    transform-origin: right center;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
}

.star-1 {
    top: 12%;
    left: 8%;
    animation: shootingStar 6s linear infinite;
}

.star-2 {
    top: 20%;
    left: 65%;
    animation: shootingStar 7.2s linear infinite 1.3s;
}

.star-3 {
    top: 38%;
    left: 22%;
    animation: shootingStar 5.8s linear infinite 2.1s;
}

.star-4 {
    top: 62%;
    left: 72%;
    animation: shootingStar 8s linear infinite 0.8s;
}

.star-5 {
    top: 78%;
    left: 35%;
    animation: shootingStar 6.6s linear infinite 2.9s;
}

.page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 12px;
}

.card {
    width: 100%;
    max-width: 420px;
    border-radius: 30px;
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.74);
    backdrop-filter: blur(24px) saturate(170%);
    -webkit-backdrop-filter: blur(24px) saturate(170%);
    box-shadow: 0 8px 40px rgba(232, 25, 122, 0.12), 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 34px 30px 28px;
    animation: cardIn 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.pwa-install-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 12px;
    border-radius: 12px;
    border: 0 solid rgba(232, 25, 122, 0.22);
    background: rgba(232, 25, 122, 0.08);
    margin-bottom: 0;
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px);
    overflow: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease, max-height 0.35s ease, margin 0.35s ease, padding 0.35s ease, border-width 0.35s ease;
}

.pwa-install-banner.is-visible {
    padding: 10px 12px;
    border-width: 1px;
    margin-bottom: 16px;
    max-height: 100px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.pwa-install-text {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8d1f59;
    font-size: 13px;
    font-weight: 800;
}

.pwa-install-btn {
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--pink-light), var(--pink));
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 7px 12px;
    white-space: nowrap;
}

.pwa-install-btn:hover {
    color: #fff;
    filter: brightness(1.03);
}

.logo-area {
    text-align: center;
    margin-bottom: 24px;
}

.logo-icon {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--pink-light), var(--pink));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #fff;
    box-shadow: 0 10px 24px rgba(232, 25, 122, 0.28);
    margin-bottom: 10px;
}

.logo-name {
    font-family: "Pacifico", cursive;
    font-size: 26px;
    line-height: 1;
    margin-bottom: 3px;
    background: linear-gradient(90deg, var(--pink), var(--green-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-sub {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--green);
}

#login-form img {
    width: min(220px, 72%);
    height: auto;
}

.field {
    margin-bottom: 14px;
}

.field label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 7px;
}

.input-wrap {
    position: relative;
}

.input-wrap .icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #949494;
    font-size: 16px;
}

.form-control {
    width: 100%;
    height: 50px;
    border-radius: 14px;
    border: 2px solid rgba(232, 25, 122, 0.12);
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    padding: 12px 42px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.24s ease;
}

.form-control::placeholder {
    color: #bababa;
    font-weight: 600;
}

.form-control:focus {
    border-color: var(--pink);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(232, 25, 122, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.eye-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--text-muted);
    padding: 4px;
}

.eye-btn:hover {
    color: var(--pink);
}

.captcha-area {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    width: max-content;
    max-width: 100%;
    margin: 0 auto 16px;
    box-shadow: none;
    overflow: visible;
}

.g-recaptcha {
    display: inline-block;
    max-width: 100%;
    transform-origin: center top;
}

@media (min-width: 768px) {
    .page {
        padding: 30px 22px 20px;
    }

    .card {
        max-width: 440px;
        padding: 34px 30px 28px;
    }
}

@media (max-width: 520px) {
    .pwa-install-banner {
        flex-direction: column;
        align-items: stretch;
    }

    .pwa-install-btn {
        width: 100%;
    }
}

@media (min-width: 1200px) {
    .card {
        max-width: 460px;
    }
}

.btn-login {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--pink-light) 0%, var(--pink) 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 24px rgba(232, 25, 122, 0.35);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover,
.btn-login:focus {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(232, 25, 122, 0.45);
}

.links {
    text-align: center;
}

.links-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.txt-color {
    color: var(--pink);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.txt-color:hover {
    color: #c21766;
}

.sep {
    color: #d8d8d8;
    font-weight: 900;
}

.forgot-link {
    color: var(--text-muted);
}

.forgot-link:hover {
    color: var(--pink);
}

.dev-copy {
    font-size: 9px;
    font-weight: 600;
    color: #8a8a8a;
    letter-spacing: 0.2px;
    margin-top: 6px !important;
    line-height: 1.2;
}

.dev-copy strong {
    font-weight: 800;
    color: #5f5f5f;
}

/* Modal de recuperación: siempre al frente y legible */
.modal-backdrop {
    z-index: 4990 !important;
    background-color: #000 !important;
}

.modal-backdrop.show {
    opacity: 0.58 !important;
}

#resetPassModal .modal-content {
    background: #fff !important;
    color: #1f2937;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

#resetPassModal,
#videoTutorialModal {
    z-index: 5000 !important;
}

#resetPassModal .modal-dialog,
#videoTutorialModal .modal-dialog {
    position: relative;
    z-index: 5001;
}

#resetPassModal .modal-header {
    border-bottom: 1px solid #e8e8e8;
}

#resetPassModal .modal-body p {
    margin-bottom: 8px;
}

footer,
body > footer,
body > footer .text-center.p-3 {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    background: transparent !important;
}

body > footer {
    display: none;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes blobFloat {
    0%,
    100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }

    33% {
        transform: translateY(-18px) rotate(5deg) scale(1.03);
    }

    66% {
        transform: translateY(11px) rotate(-3deg) scale(0.97);
    }
}

@keyframes dotFloat {
    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-14px) scale(1.1);
        opacity: 1;
    }
}

@keyframes shootingStar {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) scale(0.7);
    }
    8% {
        opacity: 1;
    }
    30% {
        opacity: 0;
        transform: translate3d(180px, 90px, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate3d(180px, 90px, 0) scale(1);
    }
}

@media (max-width: 576px) {
    .card {
        padding: 26px 16px 22px;
        border-radius: 24px;
    }

    .logo-name,
    .logo-sub {
        display: none;
    }

    .blob-3,
    .blob-4,
    .dot-3,
    .dot-4,
    .star-4,
    .star-5 {
        display: none;
    }

    .g-recaptcha {
        transform: scale(0.92);
    }

    .captcha-area {
        width: 100%;
        padding: 0;
    }
}

@media (max-width: 430px) {
    .page {
        padding-left: 10px;
        padding-right: 10px;
    }

    .card {
        padding: 20px 12px 18px;
        border-radius: 18px;
    }

    .field label {
        font-size: 11px;
    }

    .form-control {
        height: 46px;
        font-size: 14px;
    }

    .g-recaptcha {
        transform: scale(0.84);
    }
}

@media (max-width: 380px) {
    .card {
        padding: 18px 10px 16px;
    }

    .g-recaptcha {
        transform: scale(0.76);
    }
}

@media (max-height: 760px) {
    .page {
        align-items: flex-start;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .card {
        margin-top: 0;
    }
}
