html,
body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    margin: 0;
    overflow: hidden;
    background: #f8f7f4;
}

html[data-hs-theme="dark"],
html[data-hs-theme="dark"] body {
    background: #141210;
}

body,
input,
button {
    font-family: "Inter", sans-serif;
}

* {
    box-sizing: border-box;
    letter-spacing: 0;
}

.hl-page {
    --hl-accent: #0F766E;
    --hl-bg: #f8f7f4;
    --hl-card: #ffffff;
    --hl-text: #25221f;
    --hl-muted: #625b54;
    --hl-line: #dde4e8;
    --hl-soft: #f1f4f5;
    --hl-danger: #b42318;
    --hl-shadow: rgba(15, 20, 25, 0.08);

    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 20px;
    overflow: hidden;
    background: var(--hl-bg);
    color: var(--hl-text);
}

html[data-hs-theme="dark"] .hl-page {
    --hl-bg: #141210;
    --hl-card: #1b1916;
    --hl-text: #eee8df;
    --hl-muted: #b4aca2;
    --hl-line: #393631;
    --hl-soft: #211f1c;
    --hl-danger: #ffb4ab;
    --hl-shadow: rgba(0, 0, 0, 0.24);
}

.hl-layout-login {
    width: min(100%, 1040px);
    height: min(680px, calc(100dvh - 40px));
    display: grid;
    grid-template-columns: 475px minmax(0, 1fr);
    border: 1px solid var(--hl-line);
    border-radius: 28px;
    overflow: hidden;
    background: var(--hl-card);
    box-shadow: 0 26px 70px var(--hl-shadow);
}

.hl-brand-panel {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    align-content: start;
    gap: 34px;
    padding: 36px;
    overflow: hidden;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--hl-soft) 72%, #ffffff) 0%, var(--hl-soft) 100%);
    border-right: 1px solid var(--hl-line);
}

html[data-hs-theme="dark"] .hl-brand-panel {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--hl-soft) 78%, #141210) 0%, var(--hl-soft) 100%);
}

.hl-brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 13px;
    color: var(--hl-text);
    text-decoration: none;
}

.hl-brand-logo {
    display: block;
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    object-fit: contain;
    filter: drop-shadow(0 14px 22px color-mix(in srgb, var(--hl-accent) 18%, transparent));
}

.hl-brand-name {
    color: var(--hl-accent);
    font-size: 1.58rem;
    font-weight: 520;
    line-height: 1;
}

.hl-brand-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
    max-width: 350px;
}

.hl-brand-copy > strong {
    margin: 0;
    color: var(--hl-accent);
    font-size: 1.05rem;
    font-weight: 640;
    line-height: 1.28;
}

.hl-brand-copy p {
    margin: 0;
    color: var(--hl-muted);
    font-size: 0.94rem;
    font-weight: 520;
    line-height: 1.48;
}

.hl-brand-visual {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 4px;
    width: min(100%, 260px);
    align-self: end;
}

.hl-brand-visual span {
    height: 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--hl-accent) 22%, var(--hl-card));
}

.hl-brand-visual span:nth-child(1) {
    width: 78%;
}

.hl-brand-visual span:nth-child(2) {
    width: 56%;
}

.hl-brand-visual span:nth-child(3) {
    width: 38%;
    background: color-mix(in srgb, var(--hl-accent) 58%, var(--hl-card));
}

.hl-brand-year {
    position: relative;
    z-index: 1;
    color: var(--hl-muted);
    font-size: 0.78rem;
    font-weight: 560;
    align-self: end;
}

.hl-login-panel {
    min-width: 0;
    display: grid;
    align-items: start;
    justify-items: center;
    padding: 38px 12px 34px;
    background: var(--hl-card);
}

.hl-login-box {
    width: 100%;
    max-width: 475px;
    display: grid;
    gap: 22px;
}

.hl-language {
    position: relative;
    flex: 0 0 auto;
    direction: ltr;
    unicode-bidi: isolate;
}

.hl-language summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 52px;
    height: 40px;
    padding: 0 7px;
    border: 1px solid var(--hl-line);
    border-radius: 999px;
    background: var(--hl-soft);
    color: var(--hl-muted);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 720;
    list-style: none;
}

.hl-language-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hl-language summary::-webkit-details-marker {
    display: none;
}

.hl-language[open] summary,
.hl-language summary:hover {
    color: var(--hl-accent);
    border-color: color-mix(in srgb, var(--hl-accent) 42%, var(--hl-line));
}

.hl-language-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 176px;
    max-height: min(290px, calc(100dvh - 120px));
    overflow-y: auto;
    padding: 7px;
    border: 1px solid var(--hl-line);
    border-radius: 14px;
    background: var(--hl-card);
    box-shadow: 0 16px 34px var(--hl-shadow);
}

.hl-language-dropdown a {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--hl-muted);
    font-size: 0.8rem;
    font-weight: 560;
    text-decoration: none;
}

.hl-language-dropdown a:hover,
.hl-language-dropdown a.is-active {
    background: var(--hl-soft);
    color: var(--hl-accent);
}

.hl-heading {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.hl-heading > strong {
    margin: 0;
    color: var(--hl-accent);
    font-size: 1.42rem;
    font-weight: 640;
    line-height: 1.2;
}

.hl-register-prompt {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
    color: var(--hl-muted);
    font-size: 0.86rem;
    font-weight: 520;
}

.hl-register-prompt a {
    color: var(--hl-accent);
    font-weight: 720;
    text-decoration: none;
}

.hl-register-prompt a:hover,
.hl-row a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hl-auth-note {
    margin: 0;
    color: var(--hl-muted);
    font-size: 0.88rem;
    font-weight: 520;
    line-height: 1.5;
}

.hl-status {
    display: grid;
    justify-items: start;
    gap: 13px;
    padding: 3px 0 5px;
}

.hl-status-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--hl-accent) 30%, var(--hl-line));
    border-radius: 50%;
    background: color-mix(in srgb, var(--hl-accent) 10%, var(--hl-card));
    color: var(--hl-accent);
}

.hl-status-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hl-status.is-success .hl-status-icon {
    border-color: color-mix(in srgb, #16835f 34%, var(--hl-line));
    background: color-mix(in srgb, #16835f 11%, var(--hl-card));
    color: #16835f;
}

.hl-status.is-danger .hl-status-icon {
    border-color: color-mix(in srgb, var(--hl-danger) 34%, var(--hl-line));
    background: color-mix(in srgb, var(--hl-danger) 9%, var(--hl-card));
    color: var(--hl-danger);
}

.hl-status p {
    max-width: 410px;
    margin: 0;
    color: var(--hl-muted);
    font-size: 0.9rem;
    font-weight: 520;
    line-height: 1.58;
}

.hl-secondary-action {
    width: fit-content;
    justify-self: center;
    color: var(--hl-accent);
    font-size: 0.84rem;
    font-weight: 680;
    text-decoration: none;
}

.hl-secondary-action:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hl-logout-frame {
    position: absolute;
    width: 0;
    height: 0;
    border: 0;
    visibility: hidden;
}

.hl-back-link {
    width: fit-content;
    color: var(--hl-accent);
    font-size: 0.84rem;
    font-weight: 650;
    text-decoration: none;
}

.hl-back-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hl-form,
.hl-local-form,
.hl-social-form {
    display: grid;
    gap: 15px;
}

.hl-social-grid {
    display: grid;
    gap: 9px;
}

.hl-social-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: 48px;
    gap: 10px;
    padding: 0 7px;
    border: 1px solid var(--hl-line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--hl-card) 82%, var(--hl-soft));
    color: var(--hl-text);
    cursor: pointer;
    font-size: 0.94rem;
    font-weight: 700;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--hl-shadow) 50%, transparent);
}

.hl-social-button:hover {
    background: var(--hl-soft);
    border-color: color-mix(in srgb, var(--hl-accent) 34%, var(--hl-line));
}

.hl-social-button > .hl-provider-icon {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border: 1px solid color-mix(in srgb, var(--hl-line) 72%, transparent);
    border-radius: 9px;
    background: color-mix(in srgb, #ffffff 92%, var(--hl-soft));
    color: var(--hl-text);
    font-size: 0.8rem;
    font-weight: 800;
    box-shadow: 0 2px 6px color-mix(in srgb, var(--hl-shadow) 28%, transparent);
}

.hl-provider-logo {
    display: block;
    width: 19px;
    height: 19px;
}

.hl-provider-logo.is-font-icon {
    font-size: 1.18rem;
    line-height: 1;
}

.hl-provider-fallback {
    display: inline-grid;
    place-items: center;
    width: 100%;
    height: 100%;
}

.hl-social-button strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hl-social-button.is-generic > .hl-provider-icon {
    border-color: transparent;
    background: var(--hl-accent);
    color: #ffffff;
}

.hl-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--hl-muted);
    font-size: 0.76rem;
    font-weight: 620;
}

.hl-divider::before,
.hl-divider::after {
    content: "";
    height: 1px;
    flex: 1 1 auto;
    background: var(--hl-line);
}

.hl-field {
    position: relative;
    display: grid;
    gap: 5px;
}

.hl-field > span {
    position: absolute;
    top: 50%;
    left: 14px;
    z-index: 1;
    max-width: calc(100% - 28px);
    overflow: hidden;
    color: color-mix(in srgb, var(--hl-muted) 82%, var(--hl-card));
    font-size: 0.92rem;
    font-weight: 520;
    line-height: 1;
    pointer-events: none;
    text-overflow: ellipsis;
    transform: translateY(-50%);
    transition: top 150ms ease, font-size 150ms ease, color 150ms ease, transform 150ms ease;
    white-space: nowrap;
}

.hl-field input::placeholder {
    color: transparent;
    opacity: 0;
}

.hl-field:focus-within > span,
.hl-field.hl-has-value > span,
.hl-field:has(input:not(:placeholder-shown)) > span,
.hl-field:has(input:-webkit-autofill) > span {
    top: 9px;
    color: var(--hl-accent);
    font-size: 0.68rem;
    transform: translateY(0);
}

.hl-switch {
    color: var(--hl-muted);
    font-size: 0.82rem;
    font-weight: 520;
}

.hl-field input {
    width: 100%;
    height: 50px;
    padding: 16px 14px 3px;
    border: 1px solid var(--hl-line);
    border-radius: 12px;
    outline: none;
    background: var(--hl-soft);
    color: var(--hl-text);
    font-size: 0.98rem;
    font-weight: 500;
}

.hl-field input:focus {
    border-color: var(--hl-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hl-accent) 18%, transparent);
}

.hl-field small,
.hl-validation {
    color: var(--hl-danger);
    font-size: 0.78rem;
    font-weight: 560;
}

.hl-validation ul {
    margin: 0;
    padding-left: 18px;
}

.hl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.hl-switch {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    user-select: none;
}

.hl-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hl-switch > span:first-of-type {
    position: relative;
    width: 34px;
    height: 20px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--hl-line);
    transition: background-color 160ms ease;
}

.hl-switch > span:first-of-type::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--hl-card);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    transition: transform 160ms ease;
}

.hl-switch input:checked + span {
    background: var(--hl-accent);
}

.hl-switch input:checked + span::after {
    transform: translateX(14px);
}

.hl-switch input:focus-visible + span {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hl-accent) 18%, transparent);
}

.hl-row a {
    color: var(--hl-accent);
    font-size: 0.82rem;
    font-weight: 650;
    text-decoration: none;
}

.hl-submit {
    width: 100%;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 999px;
    background: var(--hl-accent);
    color: #ffffff;
    cursor: pointer;
    font-size: 0.96rem;
    font-weight: 760;
}

.hl-submit-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hl-submit:hover {
    filter: brightness(0.94);
}

@media (max-width: 840px) {
    .hl-layout-login {
        width: min(100%, 440px);
        grid-template-columns: 1fr;
        grid-template-rows: 60px minmax(0, 1fr);
        align-content: start;
    }

    .hl-brand-panel {
        height: 60px;
        min-height: 0;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        padding: 8px 16px;
        border-right: 0;
        border-bottom: 1px solid var(--hl-line);
    }

    .hl-brand {
        gap: 10px;
        line-height: 1;
    }

    .hl-brand-logo {
        width: 36px;
        height: 36px;
    }

    .hl-brand-name {
        font-size: 1.18rem;
    }

    .hl-brand-visual {
        display: none;
    }

    .hl-brand-copy,
    .hl-brand-year {
        display: none;
    }

    .hl-login-panel {
        padding: 22px 12px;
    }

    .hl-login-box {
        max-width: none;
        gap: 16px;
    }
}

@media (max-width: 520px) {
    .hl-page {
        padding: 14px;
    }

    .hl-layout-login {
        height: calc(100dvh - 28px);
        grid-template-rows: 56px minmax(0, 1fr);
        border-radius: 22px;
    }

    .hl-brand-panel {
        height: 56px;
        min-height: 0;
        padding: 7px 12px;
    }

    .hl-login-panel {
        padding: 18px 10px;
    }

    .hl-local-form,
    .hl-social-form,
    .hl-form {
        padding-inline: 8px;
    }

    .hl-heading {
        padding-inline: 8px;
    }

    .hl-heading > strong {
        font-size: 1.3rem;
    }
}

@media (max-height: 660px) {
    .hl-page {
        padding: 12px;
    }

    .hl-layout-login {
        height: calc(100dvh - 24px);
    }

    .hl-brand-panel {
        padding: 18px;
    }

    .hl-login-panel {
        padding: 14px 10px 18px;
    }

    .hl-login-box {
        gap: 12px;
    }

    .hl-form,
    .hl-local-form,
    .hl-social-form {
        gap: 9px;
    }

    .hl-field input,
    .hl-social-button,
    .hl-submit {
        height: 44px;
    }

    .hl-heading > strong {
        font-size: 1.18rem;
    }

    .hl-register-prompt,
    .hl-field > span,
    .hl-switch,
    .hl-row a {
        font-size: 0.78rem;
    }
}

@media (max-width: 840px) and (max-height: 660px) {
    .hl-layout-login {
        grid-template-rows: 56px minmax(0, 1fr);
    }

    .hl-brand-panel {
        height: 56px;
        min-height: 0;
        padding: 7px 12px;
    }
}
