/* Login page — visual language of hfweb.it */

.hf-login {
    --hf-navy: #0B132B;
    --hf-navy-deep: #080D1F;
    --hf-blue: #1B6EF3;
    --hf-cyan: #19D6E8;
    --hf-sky: #38BDF8;
    --hf-text: #f1f5f9;
    --hf-muted: #94a3b8;
    --hf-border: rgba(255, 255, 255, .1);
    --hf-gradient: linear-gradient(to right, var(--hf-blue), var(--hf-cyan));

    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    background: var(--hf-navy);
    color: var(--hf-text);
    font-family: 'DM Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body:has(.hf-login) {
    background: #0B132B;
    gap: 0 !important;
}

/* Background: blurred orbs + masked grid */
.hf-login__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.hf-orb {
    position: absolute;
    border-radius: 9999px;
}

.hf-orb--blue {
    top: -10rem;
    left: 8%;
    width: 560px;
    height: 560px;
    background: rgba(27, 110, 243, .25);
    filter: blur(140px);
}

.hf-orb--cyan {
    top: 20%;
    right: -8%;
    width: 480px;
    height: 480px;
    background: rgba(25, 214, 232, .18);
    filter: blur(130px);
}

.hf-orb--sky {
    bottom: -20%;
    left: 35%;
    width: 420px;
    height: 420px;
    background: rgba(56, 189, 248, .12);
    filter: blur(120px);
}

.hf-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to right, rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000, transparent);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000, transparent);
}

/* Header */
.hf-login__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    max-width: 80rem;
    height: 72px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.hf-logo {
    display: flex;
    align-items: center;
    padding: .375rem .75rem;
    border-radius: .75rem;
    background: #fff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .2);
    transition: transform .3s;
}

.hf-logo:hover {
    transform: scale(1.03);
}

.hf-logo img {
    display: block;
    height: 30px;
}

.hf-locale {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1rem;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 9999px;
    background: rgba(255, 255, 255, .05);
    color: #fff;
    font-size: .875rem;
    font-weight: 600;
    transition: border-color .3s, background-color .3s;
}

.hf-locale:hover,
.hf-locale:focus-visible {
    border-color: rgba(103, 232, 249, .6);
    background: rgba(255, 255, 255, .08);
}

/* Main layout */
.hf-login__main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 3rem;
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 3rem;
}

.hf-login__intro {
    display: none;
}

@media (min-width: 992px) {
    .hf-login__header,
    .hf-login__main {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .hf-login__main {
        grid-template-columns: 1.15fr .85fr;
        gap: 4rem;
    }

    .hf-login__intro {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.75rem;
    }
}

.hf-badge {
    display: inline-flex;
    align-items: center;
    gap: .625rem;
    padding: .5rem 1rem;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 9999px;
    background: rgba(255, 255, 255, .05);
    backdrop-filter: blur(8px);
    color: #cbd5e1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.hf-badge__dot {
    position: relative;
    display: inline-flex;
    width: .5rem;
    height: .5rem;
}

.hf-badge__dot::before,
.hf-badge__dot span {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
}

.hf-badge__dot::before {
    content: '';
    background: #22d3ee;
    opacity: .6;
    animation: hf-ping 1.5s cubic-bezier(0, 0, .2, 1) infinite;
}

.hf-badge__dot span {
    background: #67e8f9;
}

@keyframes hf-ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

.hf-login__headline {
    margin: 0;
    max-width: 34rem;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.25rem, 3.6vw, 2.9rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.025em;
}

.hf-gradient-text {
    display: block;
    background: var(--hf-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hf-login__lead {
    margin: 0;
    max-width: 32rem;
    color: var(--hf-muted);
    font-size: 1.125rem;
    line-height: 1.7;
}

/* Glass card */
.hf-card {
    position: relative;
    width: 100%;
    max-width: 28rem;
    margin: 0 auto;
    padding: 1.75rem;
    overflow: hidden;
    border: 1px solid var(--hf-border);
    border-radius: 1.5rem;
    background: rgba(15, 23, 42, .6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .4);
}

@media (min-width: 576px) {
    .hf-card {
        padding: 2.25rem;
    }
}

@media (min-width: 992px) {
    .hf-card {
        margin-right: 0;
    }
}

.hf-card__glow {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle at 80% 0%, rgba(25, 214, 232, .15), transparent 55%);
}

.hf-card__head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.hf-card__icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .875rem;
    background: linear-gradient(to bottom right, var(--hf-blue), var(--hf-cyan));
    color: #fff;
    font-size: 1.35rem;
    box-shadow: 0 10px 15px -3px rgba(27, 110, 243, .3);
}

.hf-card__title {
    margin: 0;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.hf-card__subtitle {
    margin: .2rem 0 0;
    color: var(--hf-muted);
    font-size: .875rem;
}

/* Alerts */
.hf-card .alert,
.hf-notice,
.hf-error {
    display: flex;
    gap: .625rem;
    margin-bottom: 1.25rem;
    padding: .875rem 1rem;
    border: 1px solid var(--hf-border);
    border-radius: 1rem;
    background: rgba(0, 0, 0, .2);
    color: #cbd5e1;
    font-size: .875rem;
    box-shadow: none;
}

.hf-card .alert-success {
    border-color: rgba(52, 211, 153, .25);
    background: rgba(52, 211, 153, .1);
    color: #6ee7b7;
}

.hf-error,
.hf-card .alert-danger {
    border-color: rgba(251, 113, 133, .3);
    background: rgba(220, 40, 40, .12);
    color: #fca5a5;
}

.hf-error i {
    margin-top: .1rem;
    font-size: 1.1rem;
}

.hf-card .alert .btn-close {
    filter: invert(1);
}

.hf-notice a,
.hf-link {
    color: #67e8f9;
    font-weight: 500;
    text-decoration: none;
}

.hf-notice a:hover,
.hf-link:hover {
    color: #a5f3fc;
    text-decoration: underline;
}

/* Form */
.hf-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.hf-field__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.hf-field__row .hf-link {
    font-size: .8125rem;
}

.hf-label {
    display: block;
    margin-bottom: .5rem;
    color: #e2e8f0;
    font-size: .875rem;
    font-weight: 500;
}

.hf-input {
    position: relative;
}

.hf-input > i {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1.15rem;
    pointer-events: none;
    transition: color .2s;
}

.hf-input:focus-within > i {
    color: #67e8f9;
}

.hf-input__control {
    display: block;
    width: 100%;
    padding: .85rem 1rem .85rem 2.85rem;
    border: 1px solid var(--hf-border);
    border-radius: .875rem;
    background: rgba(0, 0, 0, .25);
    color: #fff;
    font: inherit;
    font-size: .9375rem;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}

.hf-input__control::placeholder {
    color: #475569;
}

.hf-input__control:focus {
    border-color: rgba(103, 232, 249, .55);
    background: rgba(0, 0, 0, .35);
    box-shadow: 0 0 0 4px rgba(25, 214, 232, .12);
}

.hf-input__control:-webkit-autofill {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0 1000px #111a33 inset;
    caret-color: #fff;
}

/* Checkbox */
.hf-check {
    display: inline-flex;
    align-items: center;
    gap: .625rem;
    color: #cbd5e1;
    font-size: .875rem;
    cursor: pointer;
    user-select: none;
}

.hf-check__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hf-check__box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: .35rem;
    background: rgba(0, 0, 0, .25);
    color: transparent;
    font-size: .8rem;
    transition: all .2s;
}

.hf-check__input:checked + .hf-check__box {
    border-color: transparent;
    background: var(--hf-gradient);
    color: #fff;
}

.hf-check__input:focus-visible + .hf-check__box {
    box-shadow: 0 0 0 3px rgba(25, 214, 232, .35);
}

/* Button */
.hf-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .625rem;
    width: 100%;
    margin-top: .5rem;
    padding: 1rem 1.75rem;
    border: 0;
    border-radius: 9999px;
    background: var(--hf-gradient);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 20px 25px -5px rgba(59, 130, 246, .3);
    cursor: pointer;
    transition: box-shadow .3s, transform .3s;
}

.hf-button:hover {
    box-shadow: 0 20px 25px -5px rgba(34, 211, 238, .4);
    transform: scale(1.015);
}

.hf-button:focus-visible {
    outline: 2px solid #67e8f9;
    outline-offset: 3px;
}

.hf-button i {
    font-size: 1.15rem;
    transition: transform .3s;
}

.hf-button:hover i {
    transform: translateX(4px);
}

/* Footer */
.hf-login__footer {
    padding: 1.5rem 1.25rem;
    border-top: 1px solid var(--hf-border);
    color: #64748b;
    font-size: .8125rem;
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {
    .hf-login *,
    .hf-login *::before {
        animation: none !important;
        transition: none !important;
    }
}
