:root {
    --fz-navy: #07111f;
    --fz-ink: #0f172a;
    --fz-muted: #64748b;
    --fz-blue: #2563eb;
    --fz-blue-dark: #1d4ed8;
    --fz-cyan: #0ea5e9;
    --fz-indigo: #6366f1;
    --fz-line: #dbe7f4;
    --fz-background: #edf5ff;
    --fz-danger: #b91c1c;
    --fz-success: #047857;
    --auth-shadow: 0 30px 80px rgba(28, 66, 123, .18), 0 2px 8px rgba(15, 23, 42, .05);
    --auth-shadow-small: 0 16px 38px rgba(37, 99, 235, .11), 0 2px 5px rgba(15, 23, 42, .04);
    --auth-transition: 180ms ease;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
}

body.auth-page-body {
    min-width: 320px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    color: var(--fz-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 10% 8%, rgba(37, 99, 235, .18), transparent 28rem),
        radial-gradient(circle at 92% 12%, rgba(14, 165, 233, .18), transparent 26rem),
        radial-gradient(circle at 82% 94%, rgba(99, 102, 241, .12), transparent 25rem),
        linear-gradient(145deg, #f9fcff 0%, #eef6ff 45%, #edf3ff 100%);
}

button,
input {
    font: inherit;
}

button,
a {
    touch-action: manipulation;
}

button {
    letter-spacing: 0;
}

a {
    color: var(--fz-blue-dark);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--fz-blue);
}

[hidden],
.auth-hidden {
    display: none !important;
}

.auth-background {
    position: fixed;
    z-index: -2;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-background::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .28;
    background-image: radial-gradient(rgba(37, 99, 235, .34) .85px, transparent .85px);
    background-size: 24px 24px;
    mask-image: linear-gradient(110deg, #000, transparent 36%, transparent 70%, #000);
}

.auth-background::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    right: -180px;
    bottom: -220px;
    border: 1px dashed rgba(37, 99, 235, .2);
    border-radius: 50%;
    box-shadow: 0 0 0 64px rgba(14, 165, 233, .025), 0 0 0 128px rgba(37, 99, 235, .02);
}

.auth-main {
    position: relative;
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 48px;
    place-items: center;
}

.auth-brand {
    display: grid;
    justify-items: center;
    gap: 4px;
    margin-bottom: 20px;
}

.auth-brand-logo {
    display: block;
    width: 228px;
    height: 54px;
    object-fit: contain;
}

.auth-brand small {
    color: #6b7f9a;
    font-size: 12px;
    font-weight: 600;
}

.auth-language-menu {
    position: relative;
    z-index: 20;
    width: max-content;
    margin: 10px auto 0;
    color: #1a2b45;
}

.auth-language-menu summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 158px;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #d8e2f0;
    border-radius: 12px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 6px 18px rgba(34, 74, 132, .08);
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    list-style: none;
}

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

.auth-language-menu summary svg {
    width: 16px;
    height: 16px;
    margin-left: auto;
    transition: transform .18s ease;
}

.auth-language-menu[open] summary svg {
    transform: rotate(180deg);
}

.auth-language-menu summary:focus-visible {
    border-color: #60a5fa;
    outline: 3px solid rgba(37, 99, 235, .18);
}

.auth-language-options {
    position: absolute;
    top: calc(100% + 7px);
    left: 50%;
    width: 218px;
    padding: 7px;
    border: 1px solid #d8e2f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 36, 69, .18);
    transform: translateX(-50%);
}

.auth-language-options a {
    display: grid;
    grid-template-columns: 25px 1fr auto;
    align-items: center;
    gap: 9px;
    min-height: 39px;
    padding: 7px 9px;
    border-radius: 9px;
    color: #41536c;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.auth-language-options a:hover,
.auth-language-options a:focus-visible {
    background: #f3f7fd;
    color: #1d4ed8;
    outline: none;
}

.auth-language-options a.is-active {
    background: #eaf3ff;
    color: #1d4ed8;
}

.auth-language-options small {
    color: #8492a6;
    font-size: 10px;
    font-weight: 700;
}

.auth-language-flag {
    display: block;
    width: 22px;
    height: 16px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(7, 17, 31, .12);
    object-fit: cover;
}

.login-wrap {
    position: relative;
    width: min(100%, 470px);
}

.auth-card {
    position: relative;
    overflow: hidden;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, .92);
    border-radius: 32px;
    background: rgba(255, 255, 255, .86);
    box-shadow: var(--auth-shadow);
    backdrop-filter: blur(24px) saturate(125%);
}

.auth-card::before,
.register-form-panel::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--fz-blue), var(--fz-cyan), var(--fz-indigo));
}

.auth-card-header {
    margin-bottom: 22px;
    text-align: center;
}

.auth-card-header h1,
.register-form-header h1,
.register-info-panel h2 {
    letter-spacing: 0;
}

.auth-card-header h1 {
    margin: 0 0 7px;
    font-size: clamp(27px, 3vw, 34px);
    line-height: 1.15;
}

.auth-card-header p,
.register-form-header p {
    margin: 0;
    color: var(--fz-muted);
    font-size: 15px;
    line-height: 1.55;
}

.auth-segmented-control {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 5px;
    margin-bottom: 22px;
    border: 1px solid #dce9f9;
    border-radius: 15px;
    background: #edf5ff;
}

.auth-segmented-control.two-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-segment {
    min-height: 44px;
    padding: 0 10px;
    border: 0;
    border-radius: 11px;
    color: #5b6b80;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 650;
    transition: color var(--auth-transition), background var(--auth-transition), box-shadow var(--auth-transition), transform var(--auth-transition);
}

.auth-segment:hover {
    color: var(--fz-blue);
}

.auth-segment[aria-selected="true"],
.auth-segment.is-active {
    color: var(--fz-blue-dark);
    background: #fff;
    box-shadow: 0 5px 14px rgba(37, 99, 235, .11);
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.auth-field label,
.auth-field-label,
.package-fieldset legend {
    color: #26364b;
    font-size: 13px;
    font-weight: 650;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    width: 19px;
    height: 19px;
    transform: translateY(-50%);
    color: #7690af;
    pointer-events: none;
}

.auth-input-wrap input {
    width: 100%;
    min-height: 50px;
    padding: 0 44px;
    border: 1px solid #d8e5f2;
    border-radius: 14px;
    outline: none;
    color: var(--fz-ink);
    background: rgba(248, 251, 255, .94);
    transition: border-color var(--auth-transition), box-shadow var(--auth-transition), background var(--auth-transition);
}

.auth-input-wrap input.no-trailing-action {
    padding-right: 14px;
}

.auth-input-wrap input::placeholder {
    color: #9aaabd;
}

.auth-input-wrap input:focus {
    border-color: #75a5fb;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.auth-input-wrap input[readonly] {
    color: var(--fz-blue-dark);
    border-color: #bfdbfe;
    background: #eff6ff;
    font-weight: 650;
}

.auth-icon-button {
    position: absolute;
    top: 3px;
    right: 4px;
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 11px;
    color: #6b7f99;
    background: transparent;
    cursor: pointer;
}

.auth-icon-button svg {
    width: 19px;
    height: 19px;
}

.auth-icon-button:hover {
    color: var(--fz-blue);
    background: #edf5ff;
}

.auth-primary-button,
.auth-secondary-button {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 20px;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 700;
    transition: transform var(--auth-transition), box-shadow var(--auth-transition), opacity var(--auth-transition), border-color var(--auth-transition), background var(--auth-transition);
}

.auth-primary-button {
    width: 100%;
    border: 0;
    color: #fff;
    background: linear-gradient(105deg, var(--fz-blue-dark), var(--fz-blue) 56%, var(--fz-cyan));
    box-shadow: 0 13px 25px rgba(37, 99, 235, .25);
}

.auth-primary-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 17px 30px rgba(37, 99, 235, .3);
}

.auth-primary-button:disabled,
.auth-secondary-button:disabled {
    cursor: not-allowed;
    opacity: .55;
    box-shadow: none;
}

.auth-secondary-button {
    border: 1px solid #cfe0f3;
    color: var(--fz-blue-dark);
    background: #fff;
}

.auth-secondary-button:hover:not(:disabled) {
    border-color: #9dbef1;
    background: #f6faff;
}

.auth-link-row {
    display: flex;
    min-height: 24px;
    align-items: center;
    justify-content: flex-end;
}

.auth-link-row a,
.auth-bottom-copy a,
.register-bottom a {
    font-size: 13px;
    font-weight: 650;
}

.auth-info-box,
.auth-alert,
.license-result {
    display: flex;
    gap: 11px;
    padding: 13px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.45;
}

.auth-info-box {
    color: #315273;
    border: 1px solid #d5e7fa;
    background: #eff7ff;
}

.auth-info-box svg,
.auth-alert svg,
.license-result > svg {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    margin-top: 1px;
}

.auth-info-box strong,
.auth-alert strong,
.license-result-title {
    display: block;
    margin-bottom: 2px;
    color: var(--fz-ink);
    font-weight: 700;
}

.auth-alert {
    margin-bottom: 16px;
}

.alert-danger,
.alert-error {
    color: #7f1d1d;
    border: 1px solid #fecaca;
    background: #fff1f2;
}

.alert-warning {
    color: #78350f;
    border: 1px solid #fed7aa;
    background: #fff7ed;
}

.alert-success {
    color: #065f46;
    border: 1px solid #a7f3d0;
    background: #ecfdf5;
}

.alert-info {
    color: #1e40af;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
}

.auth-rate-limit {
    margin-bottom: 18px;
}

.auth-countdown {
    margin-top: 5px;
    color: #9a3412;
    font-variant-numeric: tabular-nums;
    font-weight: 750;
}

.auth-bottom-copy {
    margin: 18px 0 0;
    color: var(--fz-muted);
    text-align: center;
    font-size: 13px;
}

.auth-secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 17px;
    color: #66809c;
    font-size: 12px;
    font-weight: 600;
}

.auth-secure-note svg {
    width: 15px;
    height: 15px;
}

.auth-feature-float {
    position: fixed;
    z-index: -1;
    display: flex;
    width: 224px;
    align-items: center;
    gap: 11px;
    padding: 13px 15px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 18px;
    color: #28415d;
    background: rgba(255, 255, 255, .72);
    box-shadow: var(--auth-shadow-small);
    backdrop-filter: blur(18px);
    font-size: 13px;
    font-weight: 650;
    pointer-events: none;
}

.auth-feature-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 12px;
    color: var(--fz-blue);
    background: linear-gradient(145deg, #e7f0ff, #e1f8ff);
}

.auth-feature-icon svg {
    width: 20px;
    height: 20px;
}

.float-screen-time { top: 18%; left: 4%; transform: rotate(-2deg); }
.float-guardian { top: 27%; right: 4%; transform: rotate(2deg); }
.float-pause { bottom: 20%; left: 7%; transform: rotate(1.5deg); }
.float-location { right: 6%; bottom: 15%; transform: rotate(-1.5deg); }

.register-main {
    padding-top: 34px;
    padding-bottom: 34px;
}

.register-wrap {
    width: min(100%, 1180px);
}

.register-layout {
    display: grid;
    overflow: hidden;
    grid-template-columns: minmax(0, .88fr) minmax(560px, 1.2fr);
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 34px;
    background: rgba(255, 255, 255, .8);
    box-shadow: var(--auth-shadow);
    backdrop-filter: blur(24px) saturate(120%);
}

.register-info-panel {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 44px 38px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 15% 0%, rgba(255, 255, 255, .18), transparent 21rem),
        linear-gradient(155deg, #0f3ea8 0%, #2563eb 50%, #0ea5e9 100%);
}

.register-info-panel::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -120px;
    bottom: -100px;
    border: 1px dashed rgba(255, 255, 255, .3);
    border-radius: 50%;
    box-shadow: 0 0 0 45px rgba(255, 255, 255, .035);
    pointer-events: none;
}

.register-trial-badge {
    align-self: flex-start;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 999px;
    background: rgba(255, 255, 255, .13);
    font-size: 12px;
    font-weight: 700;
}

.register-info-panel h2 {
    max-width: 390px;
    margin: 24px 0 13px;
    font-size: clamp(30px, 3.7vw, 43px);
    line-height: 1.08;
}

.register-lead {
    margin: 0 0 28px;
    color: rgba(255, 255, 255, .84);
    font-size: 15px;
    line-height: 1.65;
}

.register-steps {
    display: grid;
    gap: 10px;
}

.register-step {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 16px;
    background: rgba(4, 24, 72, .15);
}

.register-step-number {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    color: #0b49b5;
    background: #fff;
    font-size: 13px;
    font-weight: 800;
}

.register-step strong {
    display: block;
    margin: 1px 0 3px;
    font-size: 14px;
}

.register-step p {
    margin: 0;
    color: rgba(255, 255, 255, .75);
    font-size: 12px;
    line-height: 1.45;
}

.register-trial-note {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding-top: 28px;
    color: rgba(255, 255, 255, .78);
    font-size: 12px;
    line-height: 1.5;
}

.register-trial-note strong {
    display: block;
    margin-bottom: 3px;
    color: #fff;
    font-size: 13px;
}

.register-form-panel {
    position: relative;
    min-width: 0;
    padding: 38px 40px 34px;
    background: rgba(255, 255, 255, .92);
}

.register-form-header {
    margin-bottom: 20px;
}

.register-form-header h1 {
    margin: 0 0 6px;
    font-size: 27px;
}

.register-form {
    display: grid;
    gap: 17px;
}

.register-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.license-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
}

.license-input-row .auth-secondary-button {
    min-width: 166px;
}

.license-result {
    display: none;
    margin-top: 10px;
}

.license-result.ok,
.license-result.bad,
.license-result.loading {
    display: flex;
}

.license-result.ok {
    color: #065f46;
    border: 1px solid #a7f3d0;
    background: #ecfdf5;
}

.license-result.bad {
    color: #7f1d1d;
    border: 1px solid #fecaca;
    background: #fff1f2;
}

.license-result.loading {
    color: #1e40af;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
}

.license-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.license-fact {
    padding: 9px 10px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 10px;
    background: rgba(255, 255, 255, .72);
}

.license-fact span {
    display: block;
    margin-bottom: 3px;
    opacity: .72;
    font-size: 11px;
}

.license-fact strong {
    color: inherit;
    font-size: 12px;
}

.package-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.package-fieldset legend {
    margin-bottom: 9px;
}

.package-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.package-card {
    position: relative;
    display: grid;
    min-height: 150px;
    align-content: start;
    padding: 15px;
    border: 1px solid #d9e5f2;
    border-radius: 16px;
    background: #f9fbfe;
    cursor: pointer;
    transition: transform var(--auth-transition), border-color var(--auth-transition), box-shadow var(--auth-transition), background var(--auth-transition);
}

.package-card:hover {
    transform: translateY(-1px);
    border-color: #a7c4f4;
}

.package-card.is-active {
    border-color: var(--fz-blue);
    background: #f2f7ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.package-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.package-card-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.package-card strong {
    font-size: 14px;
}

.package-radio-mark {
    display: grid;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid #b7c9df;
    border-radius: 50%;
    background: #fff;
}

.package-card.is-active .package-radio-mark {
    border: 6px solid var(--fz-blue);
}

.package-meta {
    margin-top: 12px;
    color: var(--fz-muted);
    font-size: 11px;
    line-height: 1.55;
}

.package-price {
    align-self: end;
    margin-top: 12px;
    color: var(--fz-navy);
    font-size: 14px;
    font-weight: 700;
}

.locked-note,
.auth-helper {
    margin: 6px 0 0;
    color: #60758e;
    font-size: 12px;
    line-height: 1.45;
}

.locked-note {
    color: var(--fz-blue-dark);
    font-weight: 650;
}

.auth-check-row {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 10px;
    align-items: start;
    color: #52647a;
    font-size: 12px;
    line-height: 1.55;
}

.auth-check-row input {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--fz-blue);
}

.register-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
}

.register-bottom p {
    margin: 0;
    color: var(--fz-muted);
    font-size: 13px;
}

:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .34);
    outline-offset: 3px;
}

@media (max-width: 1100px) {
    .auth-feature-float {
        width: 190px;
        font-size: 12px;
    }

    .float-screen-time,
    .float-pause {
        left: 1%;
    }

    .float-guardian,
    .float-location {
        right: 1%;
    }
}

@media (max-width: 1000px) {
    .register-layout {
        grid-template-columns: 1fr;
    }

    .register-info-panel {
        padding: 34px;
    }

    .register-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .register-step {
        grid-template-columns: 1fr;
    }

    .register-trial-note {
        display: none;
    }
}

@media (max-width: 920px) {
    .auth-main {
        padding-right: 24px;
        padding-left: 24px;
    }

    .auth-feature-float {
        display: none;
    }
}

@media (max-width: 680px) {
    .auth-main {
        padding: 24px 16px;
    }

    .register-info-panel,
    .register-form-panel {
        padding: 26px 20px;
    }

    .register-layout {
        border-radius: 26px;
    }

    .register-steps,
    .package-grid,
    .register-two-column,
    .license-input-row {
        grid-template-columns: 1fr;
    }

    .register-step {
        grid-template-columns: 38px 1fr;
    }

    .license-input-row .auth-secondary-button {
        width: 100%;
    }

    .register-bottom {
        align-items: stretch;
        flex-direction: column;
        text-align: center;
    }

    .register-bottom .auth-secure-note {
        margin-top: 0;
    }
}

@media (max-width: 560px) {
    .auth-brand-logo {
        width: 190px;
        height: 46px;
    }

    .auth-card {
        padding: 24px 20px;
        border-radius: 26px;
    }

    .auth-card-header h1 {
        font-size: 27px;
    }

    .auth-segmented-control {
        gap: 2px;
    }

    .auth-segment {
        padding: 0 6px;
        font-size: 12px;
    }

    .register-info-panel h2 {
        font-size: 31px;
    }

    .license-facts {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}
