@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
    --blue: #0145f2;
    --cyan: #4debff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #dbe3ee;
    --surface: #ffffff;
    --background: #edf1f5;
    --danger: #b91c1c;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--ink);
    font-family: "Inter", sans-serif;
}

button,
input {
    font: inherit;
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    grid-template-columns: minmax(0, 1fr) minmax(460px, 1fr);
}

.auth-brand {
    position: relative;
    display: flex;
    min-height: 100%;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 64px;
    background:
        radial-gradient(circle at 18% 18%, rgba(77, 235, 255, 0.55), transparent 32%),
        linear-gradient(145deg, #012fbb 0%, #0145f2 52%, #20c5f2 100%);
    color: #ffffff;
}

.auth-brand::before,
.auth-brand::after {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    content: "";
}

.auth-brand::before {
    width: 430px;
    height: 430px;
    right: -180px;
    top: -150px;
}

.auth-brand::after {
    width: 270px;
    height: 270px;
    bottom: -120px;
    left: -95px;
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    width: min(100%, 510px);
}

.auth-register-page .auth-brand {
    align-items: flex-start;
}

.auth-register-page .auth-brand-content {
    position: sticky;
    top: clamp(110px, 42dvh, 330px);
    transform: translateY(-50%);
}

.auth-logo {
    display: block;
    width: 112px;
    height: 112px;
    margin-bottom: 30px;
    border: 0;
    border-radius: 0;
    object-fit: contain;
    box-shadow: none;
}

.login-hubs-logo {
    border-radius: 50%;
    background: #ffffff;
    object-fit: cover;
}

.auth-kicker {
    display: inline-flex;
    margin-bottom: 16px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.10);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-brand h1 {
    max-width: 490px;
    margin: 0 0 16px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.auth-brand h1 span {
    color: #b9f7ff;
}

.auth-brand p {
    max-width: 470px;
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.7;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px 24px;
}

.auth-card {
    width: min(100%, 430px);
    padding: 34px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.10);
}

.auth-card-wide {
    width: min(100%, 470px);
}

.auth-back-link {
    display: inline-flex;
    width: max-content;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: -8px 0 18px;
    padding: 0 10px;
    border: 1px solid #dbe3ee;
    border-radius: 9px;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.auth-back-link:hover,
.auth-back-link:focus-visible {
    outline: none;
    border-color: rgba(1, 69, 242, 0.24);
    background: #eff6ff;
    color: var(--blue);
    transform: translateX(-1px);
}

.auth-card-header {
    margin-bottom: 25px;
}

.auth-card-header h2 {
    margin: 0 0 9px;
    font-size: 27px;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.auth-card-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.auth-badge {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 6px 9px;
    border: 1px solid rgba(1, 69, 242, 0.16);
    border-radius: 7px;
    background: #eff4ff;
    color: var(--blue);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

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

.field {
    display: grid;
    gap: 7px;
}

.field label {
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.field small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.field input {
    width: 100%;
    min-height: 45px;
    padding: 11px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
    background: #ffffff;
    color: var(--ink);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus-visible {
    border-color: rgba(1, 69, 242, 0.72);
    box-shadow: 0 0 0 4px rgba(1, 69, 242, 0.10);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 47px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle[aria-pressed="true"] {
    background: #edf3ff;
    color: var(--blue);
}

.password-toggle svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.auth-submit,
.auth-secondary {
    min-height: 44px;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.auth-submit {
    border: 0;
    background: linear-gradient(100deg, var(--blue), #1595f5 64%, var(--cyan));
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(1, 69, 242, 0.20);
}

.auth-submit:hover {
    filter: brightness(1.03);
    transform: translateY(-1px);
}

.auth-submit:disabled,
.auth-secondary:disabled {
    cursor: wait;
    opacity: 0.62;
    transform: none;
}

.auth-secondary {
    width: 100%;
    margin-top: 12px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
}

.auth-links,
.auth-footer {
    font-size: 12px;
}

.auth-links {
    display: flex;
    justify-content: flex-end;
    margin-top: -4px;
}

.auth-links a,
.auth-footer a,
.legal-option a {
    color: var(--blue);
    font-weight: 650;
    text-decoration: none;
}

.auth-links a:hover,
.auth-footer a:hover,
.legal-option a:hover {
    text-decoration: underline;
}

.auth-footer {
    margin: 22px 0 0;
    color: var(--muted);
    text-align: center;
}

.form-feedback {
    display: none;
    padding: 11px 12px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fff1f2;
    color: var(--danger);
    font-size: 12px;
    line-height: 1.5;
}

.form-feedback.is-visible {
    display: block;
}

.form-feedback[data-type="success"] {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #047857;
}

.legal-group {
    display: grid;
    gap: 9px;
    padding-top: 2px;
}

.legal-option {
    display: grid;
    grid-template-columns: 17px 1fr;
    gap: 9px;
    align-items: start;
    color: #475569;
    font-size: 11px;
    line-height: 1.5;
}

.legal-option input {
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
    accent-color: var(--blue);
}

.verification-code {
    font-size: 22px;
    font-weight: 750;
    letter-spacing: 0.28em;
    text-align: center;
}

.verification-error {
    animation: shake 360ms ease;
    border-color: #fca5a5;
}

@keyframes shake {
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-3px); }
}

@media (max-width: 880px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        min-height: auto;
        padding: 34px 22px;
    }

    .auth-brand-content {
        position: relative;
        top: auto;
        transform: none;
        display: grid;
        grid-template-columns: 72px 1fr;
        gap: 8px 18px;
        align-items: center;
    }

    .auth-logo {
        grid-row: 1 / 4;
        width: 72px;
        height: 72px;
        margin: 0;
    }

    .auth-kicker {
        width: max-content;
        margin: 0;
    }

    .auth-brand h1 {
        margin: 0;
        font-size: 29px;
    }

    .auth-brand p {
        display: none;
    }

    .auth-panel {
        align-items: start;
        padding: 26px 14px 40px;
    }
}

@media (max-width: 480px) {
    .auth-brand {
        padding: 25px 16px;
    }

    .auth-brand-content {
        grid-template-columns: 58px 1fr;
        gap: 6px 13px;
    }

    .auth-logo {
        width: 58px;
        height: 58px;
    }

    .auth-kicker {
        padding: 5px 7px;
        font-size: 9px;
    }

    .auth-brand h1 {
        font-size: 23px;
    }

    .auth-card {
        padding: 25px 18px;
        border-radius: 15px;
    }

    .auth-card-header h2 {
        font-size: 24px;
    }
}
