 :root {
    --login-brand: #1363e5;
    --login-brand-soft: #eaf2ff;
    --login-ink: #1f2937;
    --login-muted: #5b6474;
    --login-card: rgba(255, 255, 255, 0.9);
    --login-border: #dbe5f1;
}

.fons {
    background-image:
        radial-gradient(circle at 12% 10%, rgba(81, 165, 255, 0.24) 0%, rgba(81, 165, 255, 0) 38%),
        linear-gradient(128deg, rgba(8, 32, 69, 0.64) 0%, rgba(14, 46, 94, 0.48) 38%, rgba(33, 92, 169, 0.36) 100%),
        url("../Content/images/fons.jpeg");
    min-height: 100vh;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
}

.fons::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(5, 21, 51, 0.18) 0%, rgba(6, 18, 45, 0.38) 100%);
}

.login-box {
    width: min(460px, 100%);
    margin: 0;
    z-index: 1;
    animation: loginCardIn .45s ease-out;
}

.login-box.preload-hidden {
    visibility: hidden;
    opacity: 0;
}

@keyframes loginCardIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo {
    margin-bottom: 0.85rem;
    text-align: center;
}

.titol-enllac {
    font-size: clamp(2rem, 6vw, 3.35rem);
    font-weight: 700;
    letter-spacing: .6px;
    text-decoration: none;
    color: #d5deec !important;
    text-shadow: 0 1px 3px rgba(7, 24, 55, 0.38), 0 4px 10px rgba(7, 24, 55, 0.24);
    -webkit-text-stroke: 0;
    transition: transform 0.3s ease, text-shadow 0.3s ease, color 0.3s ease;
}

.titol-enllac:hover {
    transform: translateY(-2px);
    color: #e0e8f5 !important;
    text-shadow: 0 1px 4px rgba(7, 24, 55, 0.42), 0 5px 12px rgba(7, 24, 55, 0.28);
}

.login-box .card {
    background: var(--login-card);
    backdrop-filter: blur(7px);
    border: 1px solid rgba(255, 255, 255, 0.62);
    box-shadow: 0 22px 46px rgba(8, 27, 59, 0.34);
    border-radius: 24px;
    overflow: hidden;
}

.login-card-body {
    border-radius: 24px;
    background: transparent;
    padding: 1.65rem 1.5rem 1.2rem 1.5rem;
}

.login-box-msg {
    margin-bottom: 1.3rem;
}

.loginLogo {
    opacity: 0.95;
    width: 108px;
    height: 108px;
    border: 4px solid rgba(255, 255, 255, 0.88);
    box-shadow: 0 14px 28px rgba(15, 49, 98, 0.24);
}

.input-group .form-control {
    height: calc(2.7rem + 2px);
    border: 1px solid var(--login-border);
    border-radius: 12px 0 0 12px;
    color: var(--login-ink);
    font-size: 1.06rem;
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.input-group .form-control:focus {
    border-color: #7daeff;
    box-shadow: 0 0 0 0.22rem rgba(19, 99, 229, 0.15);
    background-color: #fbfdff;
}

.input-group .input-group-text {
    border: 1px solid var(--login-border);
    border-left: 0;
    background-color: #f0f6ff;
    color: #5e6a7e;
}

.input-group .input-group-append:last-child .input-group-text:last-child {
    border-radius: 0 12px 12px 0;
}

.login-submit-btn {
    border: 0;
    border-radius: 11px;
    min-height: 46px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg, #1f8bff 0%, #1363e5 100%);
    box-shadow: 0 10px 22px rgba(19, 99, 229, 0.28);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.login-submit-btn:hover,
.login-submit-btn:focus {
    filter: brightness(0.98);
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(19, 99, 229, 0.32);
}

.login-actions-row,
.login-register-row {
    margin-top: .25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .8rem;
    flex-wrap: wrap;
}

.login-link-secondary {
    color: var(--login-brand);
    font-weight: 600;
}

.login-link-secondary:hover {
    color: #0e55c5;
    text-decoration: none;
}

.login-register-main,
.login-register-alt {
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
}

.login-register-main {
    color: var(--login-brand);
}

.login-register-main:hover {
    color: #0d56be;
    text-decoration: none;
}

.login-register-alt {
    color: #4b5563;
}

.login-register-alt:hover {
    color: #1f2937;
    text-decoration: none;
}

@media (max-width: 576px) {
    .fons {
        align-items: flex-start;
        padding: .6rem;
    }

    .login-card-body {
        padding: 1.2rem .95rem 1rem .95rem;
    }

    .titol-enllac {
        font-size: clamp(1.9rem, 11vw, 2.6rem);
    }

    .login-submit-btn {
        min-height: 42px;
        font-size: 1.08rem;
    }
}
