/* =====================================================================
   Auth screen
   ===================================================================== */

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #F8F7FF;
}

.auth {
    --auth-ink: #17142A;
    --auth-text: #403B5F;
    --auth-muted: #8A86A8;
    --auth-primary: #9489E2;
    --auth-primary-600: #8174D8;
    --auth-primary-700: #5F54C7;
    --auth-deep: #2F2A5F;
    --auth-soft: #F8F7FF;
    --auth-soft-2: #F1EFFF;
    --auth-line: #E4E0FA;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100svh;
    min-height: 0;
    display: grid;
    overflow: hidden;
    background: var(--auth-soft);
    color: var(--auth-text);
}

.auth__shell {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(430px, .95fr);
    overflow: hidden;
}

.auth__panel {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(36px, 5vw, 64px);
    overflow: hidden;
    background:
        linear-gradient(rgba(201, 195, 242, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201, 195, 242, .07) 1px, transparent 1px),
        var(--auth-deep);
    background-size: 84px 84px, 84px 84px, auto;
    color: #fff;
}

.auth__panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(130deg, rgba(148, 137, 226, .20), transparent 44%);
    pointer-events: none;
}

.auth__card {
    width: min(520px, calc(100% - 64px));
    align-self: center;
    justify-self: center;
    display: flex;
    flex-direction: column;
    padding: 38px 40px 34px;
    border: 1px solid rgba(201, 195, 242, .82);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 24px 70px rgba(47, 42, 95, .13);
}

.auth__brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    margin-bottom: 0;
}

.auth__brand .logo {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 8px;
    background: var(--auth-primary);
    color: #fff;
    box-shadow: 0 14px 30px rgba(23, 20, 42, .18);
}

.auth__brand .logo .icon {
    width: 28px;
    height: 28px;
}

.auth__brand h1 {
    margin: 0;
    color: #fff;
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 34px;
    line-height: .95;
    font-weight: 700;
    letter-spacing: 0;
}

.auth__brand span {
    display: block;
    margin-top: 6px;
    color: #C9C3F2;
    font-size: 12px;
    font-weight: 700;
}

.auth__brand--card {
    display: none;
    margin-bottom: 26px;
}

.auth__brand--card .logo {
    box-shadow: 0 12px 28px rgba(148, 137, 226, .22);
}

.auth__brand--card h1 {
    color: var(--auth-ink);
}

.auth__brand--card span {
    color: var(--auth-muted);
}

.auth__panel-copy {
    position: relative;
    z-index: 1;
    max-width: 620px;
    margin-top: clamp(46px, 9vh, 110px);
}

.auth__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin: 0 0 16px;
    color: #C9C3F2;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.auth__eyebrow::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--auth-primary);
    box-shadow: 0 0 0 5px rgba(148, 137, 226, .18);
}

.auth__card .auth__eyebrow {
    margin-bottom: 12px;
    color: var(--auth-primary-700);
}

.auth__card .auth__eyebrow::before {
    width: 7px;
    height: 7px;
    box-shadow: none;
}

.auth__panel-copy h2,
.auth__title {
    font-family: "Space Grotesk", Inter, sans-serif;
    letter-spacing: 0;
}

.auth__panel-copy h2 {
    max-width: 680px;
    margin: 0;
    color: #fff;
    font-size: clamp(40px, 4.1vw, 60px);
    line-height: 1.02;
    font-weight: 700;
}

.auth__panel-copy p {
    max-width: 460px;
    margin: 28px 0 0;
    color: #E4E0FA;
    font-size: 17px;
    line-height: 1.7;
}

.auth__route {
    position: relative;
    z-index: 1;
    width: min(520px, 80%);
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 34px;
}

.auth__route-line {
    flex: 1 1 auto;
    height: 0;
    border-top: 2px dashed rgba(201, 195, 242, .72);
}

.auth__route-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border: 2px solid #C9C3F2;
    border-radius: 50%;
    background: var(--auth-deep);
}

.auth__route-dot--start {
    width: 13px;
    height: 13px;
    border-color: var(--auth-primary);
    background: var(--auth-primary);
}

.auth__route-dot--end {
    width: 13px;
    height: 13px;
    border-color: #21A67A;
    background: #21A67A;
}

.auth__title {
    margin: 0 0 8px;
    color: var(--auth-ink);
    font-size: 34px;
    line-height: 1.08;
    font-weight: 700;
}

.auth__intro {
    margin: 0 0 30px;
    color: var(--auth-text);
    font-size: 15px;
    line-height: 1.55;
}

.auth .alert {
    margin-bottom: 18px;
    border-radius: 8px;
}

.auth .form-group {
    margin-bottom: 22px;
}

.auth .form-label {
    margin-bottom: 8px;
    color: var(--auth-ink);
    font-size: 14px;
    font-weight: 700;
}

.auth .form-control {
    height: 46px;
    padding: 0 14px;
    border: 1px solid #C9C3F2;
    border-radius: 6px;
    background: #fff;
    color: var(--auth-ink);
    font-size: 14px;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.auth .form-control::placeholder {
    color: var(--auth-muted);
}

.auth .form-control:hover {
    border-color: var(--auth-muted);
}

.auth .form-control:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(148, 137, 226, .18);
}

.auth__password {
    position: relative;
}

.auth__password .form-control {
    padding-right: 48px;
}

.auth__password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--auth-muted);
    cursor: pointer;
    transition: background .16s ease, color .16s ease;
}

.auth__password-toggle:hover,
.auth__password-toggle:focus-visible {
    background: var(--auth-soft-2);
    color: var(--auth-primary-700);
}

.auth__password-toggle .icon {
    width: 18px;
    height: 18px;
}

.auth__submit {
    height: 48px;
    margin-top: 4px;
    border-radius: 6px;
    background: var(--auth-primary);
    box-shadow: 0 14px 28px rgba(148, 137, 226, .24);
    font-size: 15px;
    font-weight: 800;
    transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.auth__submit:hover {
    background: var(--auth-primary-600);
    box-shadow: 0 16px 32px rgba(129, 116, 216, .27);
}

.auth__submit:active {
    transform: translateY(1px);
}

.auth__dev-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding: 12px 14px;
    border: 1px solid var(--auth-line);
    border-radius: 6px;
    background: var(--auth-soft);
    color: var(--auth-text);
    font-size: 13px;
    line-height: 1.45;
}

.auth__dev-hint .icon {
    width: 17px;
    height: 17px;
    color: var(--auth-primary-700);
}

.auth__dev-hint strong {
    color: var(--auth-ink);
}

.auth__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.auth__meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid var(--auth-line);
    border-radius: 999px;
    background: #fff;
    color: var(--auth-text);
    font-size: 12px;
    font-weight: 700;
}

.auth__meta .icon {
    width: 15px;
    height: 15px;
    color: var(--auth-primary-700);
}

@media (max-width: 980px) {
    html,
    body {
        overflow: auto;
    }

    .auth {
        position: static;
        height: auto;
        min-height: 100svh;
        overflow: auto;
    }

    .auth__shell {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100svh;
        padding: 24px;
    }

    .auth__panel {
        min-height: auto;
        padding: 28px;
        border-radius: 8px 8px 0 0;
    }

    .auth__panel-copy {
        margin-top: 52px;
    }

    .auth__panel-copy h2 {
        max-width: 680px;
        font-size: clamp(34px, 7vw, 52px);
    }

    .auth__route {
        width: 100%;
    }

    .auth__card {
        width: 100%;
        max-width: none;
        justify-self: stretch;
        border-top: 0;
        border-radius: 0 0 8px 8px;
        box-shadow: none;
    }
}

@media (max-width: 620px) {
    .auth__shell {
        padding: 0;
    }

    .auth__panel {
        display: none;
    }

    .auth__card {
        min-height: 100vh;
        justify-content: center;
        padding: 28px 20px;
        border: 0;
        border-radius: 0;
    }

    .auth__brand--card {
        display: flex;
    }

    .auth__brand .logo {
        width: 50px;
        height: 50px;
    }

    .auth__brand h1 {
        font-size: 30px;
    }

    .auth__title {
        font-size: 28px;
    }

    .auth__intro {
        margin-bottom: 24px;
    }
}
