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

:root {
    --lf-dark: #0a014f;
    --lf-white: #ffffff;
    --lf-card: rgba(255, 255, 255, 0.2);
    --lf-field: rgba(216, 216, 216, 0.2);
    --lf-field-focus: rgba(255, 255, 255, 0.24);
    --lf-blue: #1a8fe3;
    --lf-blue-soft: #5ab8f2;
    --lf-error: #ffffff;
    --lf-radius: 10px;
    --lf-font-body: "Poppins", "Noto Sans", Arial, sans-serif;
    --lf-font-title: "Raleway", "Poppins", Arial, sans-serif;
    --lf-font-ui: "Roboto", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

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

body.auth-page {
    background: var(--lf-dark);
    color: var(--lf-white);
    font-family: var(--lf-font-body);
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
}

button,
input {
    font: inherit;
}

.auth-shell {
    min-height: 100vh;
    background: var(--lf-dark);
}

.auth-main {
    position: relative;
    min-height: calc(100vh - 194px);
    overflow: hidden;
    padding: clamp(108px, 17.6vh, 180px) 40px 84px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background:
        radial-gradient(ellipse 82% 98% at 88% 15%, rgba(234, 248, 255, 0.98) 0%, rgba(183, 229, 250, 0.88) 30%, rgba(86, 194, 246, 0.62) 52%, rgba(10, 1, 79, 0) 72%),
        radial-gradient(ellipse 76% 42% at 1% 101%, rgba(50, 158, 231, 0.28) 0%, rgba(27, 117, 204, 0.18) 45%, rgba(10, 1, 79, 0) 72%),
        radial-gradient(ellipse 58% 43% at 37% -11%, rgba(38, 141, 218, 0.26) 0%, rgba(10, 1, 79, 0) 72%),
        linear-gradient(90deg, #071d67 0%, #0952a4 48%, #31a9ea 100%);
}

.auth-main::before,
.auth-main::after {
    content: "";
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(1px);
}

.auth-main::before {
    width: 1052px;
    height: 503px;
    left: -374px;
    bottom: -160px;
    background: rgba(92, 191, 245, 0.16);
    transform: rotate(0deg);
}

.auth-main::after {
    width: 1090px;
    height: 1108px;
    right: -640px;
    bottom: -610px;
    background: rgba(233, 246, 255, 0.28);
    transform: rotate(46deg);
}

.leadfin-logo {
    display: inline-flex;
    align-items: center;
    width: 128px;
    height: 60px;
    overflow: hidden;
    background: url("/media/figma/common/leadfin-logo-desktop.png") center / contain no-repeat;
    color: transparent;
    font-size: 0;
    line-height: 0;
    text-decoration: none;
}

.leadfin-logo_top {
    position: absolute;
    z-index: 2;
    top: 20px;
    left: 40px;
}

.leadfin-logo__mark,
.leadfin-logo__text {
    display: none;
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 445px;
    min-height: 504px;
    padding: 60px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--lf-radius);
    background: var(--lf-card);
    backdrop-filter: blur(8px);
    box-shadow: 0 22px 80px rgba(10, 1, 79, 0.12);
}

.auth-card_compact,
.auth-card_recover {
    min-height: 421px;
}

.auth-card_register {
    min-height: 560px;
}

.auth-card_code {
    min-height: 436px;
}

.auth-card_reset,
.auth-card_dashboard {
    min-height: 486px;
}

.auth-card__title {
    margin: 0 0 32px;
    color: var(--lf-white);
    font-family: var(--lf-font-title);
    font-size: 32px;
    font-weight: 700;
    line-height: 20px;
    letter-spacing: 0;
}

.auth-card__title_wrap {
    max-width: 325px;
    line-height: 32px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.auth-form__fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    width: 100%;
}

.auth-field__label {
    color: var(--lf-white);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    letter-spacing: 0;
}

.auth-field__muted {
    margin-left: 16px;
}

.auth-input {
    width: 100%;
    height: 48px;
    padding: 14px 16px;
    border: 0;
    border-radius: var(--lf-radius);
    outline: 0;
    background: var(--lf-field);
    color: var(--lf-white);
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: 0;
    transition: background 160ms ease, box-shadow 160ms ease;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.auth-input:focus {
    background: var(--lf-field-focus);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.auth-password {
    position: relative;
    display: block;
}

.auth-input_password {
    padding-right: 52px;
}

.auth-password__toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 28px;
    height: 28px;
    padding: 2px;
    border: 0;
    background: transparent;
    color: var(--lf-white);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%);
    transition: opacity 160ms ease;
}

.auth-password_has-value .auth-password__toggle {
    opacity: 1;
    pointer-events: auto;
}

.auth-password__toggle svg {
    display: block;
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.auth-link,
.auth-switch a,
.auth-footer a {
    color: var(--lf-white);
    text-decoration-color: rgba(255, 255, 255, 0.8);
    text-underline-offset: 2px;
}

.auth-link {
    align-self: flex-start;
    font-size: 16px;
    line-height: 24px;
    text-decoration: none;
}

.auth-link:hover,
.auth-switch a:hover,
.auth-footer a:hover {
    text-decoration-thickness: 2px;
}

.auth-form__error,
.auth-form__success,
.auth-note {
    margin: 0;
    color: var(--lf-error);
    font-size: 16px;
    line-height: 24px;
}

.auth-form__error {
    color: #ffb6b6;
}

.auth-form__error p {
    margin: 0;
}

.auth-form__success {
    color: var(--lf-white);
}

.auth-note {
    color: rgba(255, 255, 255, 0.78);
}

.auth-kicker {
    margin: 0 0 14px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    line-height: 20px;
}

.auth-strength {
    align-self: flex-start;
    margin-top: -4px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #e8f8d3;
    color: #2e6e11;
    font-size: 13px;
    line-height: 18px;
}

.auth-strength_weak {
    background: #ffd8d8;
    color: #8f1f1f;
}

.auth-strength_medium {
    background: #fff1ba;
    color: #7a5b00;
}

.auth-code-copy {
    margin: 0;
    color: var(--lf-white);
    font-size: 16px;
    line-height: 24px;
}

.auth-code {
    display: grid;
    grid-template-columns: repeat(4, 50px);
    justify-content: center;
    gap: 30px;
    margin: 8px 0;
}

.auth-code__digit {
    width: 50px;
    height: 48px;
    border: 0;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.86);
    border-radius: 0;
    outline: 0;
    background: transparent;
    color: var(--lf-white);
    text-align: center;
    font-family: var(--lf-font-body);
    font-size: 32px;
    font-weight: 500;
    line-height: 48px;
}

.auth-code__digit:focus {
    border-bottom-color: var(--lf-white);
    box-shadow: 0 6px 12px rgba(255, 255, 255, 0.14);
}

.auth-form__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.auth-button {
    min-width: 97px;
    height: 50px;
    padding: 16px 24px;
    border: 0;
    border-radius: var(--lf-radius);
    background: rgba(255, 255, 255, 0.72);
    color: var(--lf-dark);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    line-height: 18px;
    letter-spacing: 0;
    transition: background 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.auth-form > .auth-button {
    align-self: flex-start;
}

.auth-button:hover,
.auth-button:focus-visible {
    background: var(--lf-white);
}

.auth-button:active {
    transform: translateY(1px);
}

.auth-button_full {
    width: 100%;
}

.auth-button_link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    color: var(--lf-dark);
    text-decoration: none;
}

.auth-link-button {
    display: inline-flex;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--lf-white);
    cursor: pointer;
    font: inherit;
    line-height: 24px;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-resend {
    margin-top: 18px;
}

.auth-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0;
}

.auth-dashboard {
    display: grid;
    gap: 12px;
}

.auth-dashboard__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 58px;
    padding: 12px 14px;
    border-radius: var(--lf-radius);
    background: rgba(255, 255, 255, 0.14);
}

.auth-dashboard__item span {
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
}

.auth-dashboard__item strong {
    color: var(--lf-white);
    font-size: 16px;
    font-weight: 600;
    text-align: right;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--lf-white);
    cursor: pointer;
    font-family: var(--lf-font-ui);
    font-size: 14px;
    line-height: 16px;
    white-space: nowrap;
}

.auth-check input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    opacity: 0;
    overflow: hidden;
}

.auth-check__box {
    position: relative;
    display: block;
    flex: 0 0 20px;
    width: 20px;
    min-width: 20px;
    height: 20px;
    min-height: 20px;
    border: 1.5px solid var(--lf-white);
    border-radius: 1px;
}

.auth-check input:checked + .auth-check__box::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 0;
    width: 8px;
    height: 14px;
    border: solid var(--lf-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auth-check input:focus-visible + .auth-check__box {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.28);
}

.auth-switch {
    margin: -12px 0 0;
    color: var(--lf-white);
    font-size: 16px;
    line-height: 24px;
}

.auth-footer {
    min-height: 194px;
    background: var(--lf-dark);
}

.auth-footer__inner {
    display: grid;
    grid-template-columns: 292px 408px 300px 1fr;
    gap: 56px;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 29px 40px 28px;
}

.leadfin-logo_footer {
    align-self: start;
    margin-top: -2px;
}

.auth-footer__links,
.auth-footer__legal,
.auth-footer__contacts {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    color: var(--lf-white);
    font-size: 14px;
    line-height: 21px;
}

.auth-footer__links a,
.auth-footer__contacts a {
    text-decoration: none;
}

.auth-socials {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: -1px;
}

.auth-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: var(--lf-radius);
    background: var(--lf-white);
    color: var(--lf-dark);
}

.auth-socials svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.admin-card {
    width: min(1180px, calc(100vw - 80px));
    min-height: 680px;
    padding: 0;
    overflow: hidden;
}

.admin-shell {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    min-height: 680px;
}

.admin-aside {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 28px 22px;
    border-right: 1px solid rgba(255,255,255,.18);
    background: rgba(10,1,79,.22);
}

.admin-nav {
    display: grid;
    gap: 8px;
}

.admin-nav a,
.admin-header a,
.admin-link-card,
.admin-table__actions a {
    color: var(--lf-white);
    text-decoration: none;
}

.admin-nav a {
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(255,255,255,.78);
    font-size: 14px;
}

.admin-nav a.is-active,
.admin-nav a:hover {
    background: rgba(255,255,255,.18);
    color: #fff;
}

.admin-logout {
    margin-top: auto;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    text-align: left;
    text-decoration: underline;
}

.admin-content {
    display: grid;
    align-content: start;
    gap: 22px;
    padding: 32px;
    overflow: hidden;
}

.admin-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.admin-header h1 {
    margin: 0 0 8px;
    font-family: var(--lf-font-title);
    font-size: 36px;
    line-height: 1.05;
}

.admin-header p {
    max-width: 680px;
    margin: 0;
    color: rgba(255,255,255,.78);
}

.admin-message {
    margin: 0;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(216, 239, 255, .2);
    color: #fff;
}

.admin-metrics,
.admin-card-grid,
.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.admin-card-grid,
.admin-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-metric,
.admin-link-card,
.admin-detail,
.admin-form,
.admin-table-wrap {
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 10px;
    background: rgba(255,255,255,.14);
    backdrop-filter: blur(8px);
}

.admin-metric {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.admin-metric span,
.admin-link-card span,
.admin-detail p span,
.admin-form label span,
.admin-notes span {
    color: rgba(255,255,255,.72);
    font-size: 13px;
}

.admin-metric strong {
    font-size: 26px;
}

.admin-link-card {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.admin-link-card strong {
    font-size: 18px;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: rgba(255,255,255,.72);
    font-size: 13px;
    font-weight: 500;
}

.admin-table td {
    color: #fff;
}

.admin-table__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-table__actions form {
    margin: 0;
}

.admin-table__actions button,
.admin-form button {
    min-height: 36px;
    border: 0;
    border-radius: 8px;
    background: var(--lf-blue);
    color: #fff;
    cursor: pointer;
}

.admin-table__actions button {
    padding: 0 10px;
    font-size: 13px;
}

.admin-detail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 18px;
}

.admin-detail p,
.admin-notes {
    display: grid;
    gap: 4px;
    margin: 0;
}

.admin-detail strong {
    font-weight: 500;
}

.admin-notes {
    grid-column: 1 / -1;
}

.admin-notes em {
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,.1);
    font-style: normal;
}

.admin-form {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.admin-form h2 {
    margin: 0;
    font-family: var(--lf-font-title);
    font-size: 18px;
}

.admin-form label {
    display: grid;
    gap: 7px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 10px;
    background: rgba(216,216,216,.2);
    color: #fff;
    padding: 12px 14px;
    outline: 0;
}

.admin-form textarea {
    min-height: 98px;
    resize: vertical;
}

.admin-form input::placeholder,
.admin-form textarea::placeholder {
    color: rgba(255,255,255,.6);
}

@media (max-width: 1400px) {
    .auth-footer__inner {
        grid-template-columns: 220px 310px 260px 1fr;
        gap: 32px;
    }
}

@media (max-width: 1200px) {
    .auth-footer__inner {
        grid-template-columns: 180px minmax(0, 1fr);
        gap: 24px 36px;
    }

    .auth-footer__links {
        grid-column: 1 / -1;
    }

    .auth-footer__legal,
    .auth-footer__contacts {
        min-width: 0;
    }
}

@media (max-width: 760px) {
    .auth-main {
        min-height: 767px;
        padding: 207px 20px 82px;
        justify-content: flex-start;
        background:
            radial-gradient(ellipse 160% 96% at 70% -4%, rgba(234, 248, 255, 0.94) 0%, rgba(94, 195, 246, 0.7) 34%, rgba(20, 140, 220, 0.52) 58%, rgba(10, 1, 79, 0) 76%),
            radial-gradient(ellipse 128% 60% at -13% 11%, rgba(56, 167, 236, 0.38) 0%, rgba(10, 1, 79, 0) 72%),
            radial-gradient(ellipse 135% 44% at 19% 99%, rgba(17, 96, 196, 0.34) 0%, rgba(10, 1, 79, 0) 72%),
            linear-gradient(90deg, #071d67 0%, #0a55ad 48%, #2fa6e5 100%);
    }

    .auth-main::before {
        width: 574px;
        height: 274px;
        left: -241px;
        bottom: -177px;
    }

    .auth-main::after {
        width: 547px;
        height: 556px;
        right: -430px;
        bottom: -97px;
    }

    .leadfin-logo_top {
        top: 69px;
        left: 20px;
        width: 110px;
        height: 52px;
        background-image: url("/media/figma/common/leadfin-logo-mobile.png");
    }

    .auth-card {
        width: min(362px, 100%);
        min-height: 460px;
        padding: 32px;
    }

    .admin-card {
        width: min(100%, 362px);
        padding: 0;
    }

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-aside {
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,.18);
    }

    .admin-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-content {
        padding: 22px;
    }

    .admin-header {
        flex-direction: column;
    }

    .admin-header h1 {
        font-size: 28px;
    }

    .admin-metrics,
    .admin-card-grid,
    .admin-form-grid,
    .admin-detail {
        grid-template-columns: 1fr;
    }

    .auth-card__title {
        margin-bottom: 20px;
    }

    .auth-form {
        gap: 20px;
    }

    .auth-form__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .auth-check_multiline {
        align-items: flex-start;
        white-space: normal;
    }

    .auth-button {
        width: 100%;
        background: var(--lf-white);
    }

    .auth-form > .auth-button {
        align-self: stretch;
    }

    .auth-code {
        grid-template-columns: repeat(4, 46px);
        gap: 25px;
    }

    .auth-code__digit {
        width: 46px;
    }

    .auth-switch {
        margin-top: 0;
        white-space: normal;
    }

    .auth-footer {
        min-height: 312px;
    }

    .auth-footer__inner {
        grid-template-columns: 1fr 1fr;
        gap: 18px 34px;
        padding: 28px 20px 24px;
    }

    .leadfin-logo_footer {
        width: 110px;
        height: 52px;
        margin-top: -2px;
        background-image: url("/media/figma/common/leadfin-logo-mobile.png");
    }

    .auth-footer__links {
        grid-column: 1 / -1;
        grid-row: 3;
        gap: 12px;
    }

    .auth-footer__legal {
        grid-column: 1;
        grid-row: 2;
    }

    .auth-footer__contacts {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .auth-socials {
        order: -1;
        margin: 1px 0 7px;
    }

    .auth-footer__links,
    .auth-footer__legal,
    .auth-footer__contacts {
        gap: 12px;
    }
}

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