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

:root {
    --auth-bg-start: #5b2bd6;
    --auth-bg-end: #334de8;
    --auth-card: #ffffff;
    --auth-text: #111c34;
    --auth-muted: #7d8594;
    --auth-border: #dde2ea;
    --auth-soft: #f8faff;
    --auth-primary-start: #2f67e8;
    --auth-primary-end: #4389f0;
    --auth-primary-shadow: rgba(47, 103, 232, 0.28);
    --auth-success: #26b26b;
    --auth-shadow: 0 24px 60px rgba(17, 24, 39, 0.18);
}

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

body.auth-page {
    margin: 0;
    min-height: 100vh;
    overflow: hidden;
    font-family: "Manrope", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 50% 42%, rgba(114, 89, 255, 0.34), transparent 28%),
        radial-gradient(circle at 15% 70%, rgba(103, 77, 255, 0.18), transparent 22%),
        linear-gradient(135deg, var(--auth-bg-start) 0%, var(--auth-bg-end) 100%);
    color: var(--auth-text);
}

body.auth-page::before,
body.auth-page::after {
    content: "";
    position: fixed;
    inset: auto;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(48px);
    opacity: 0.5;
    z-index: 0;
}

body.auth-page::before {
    width: 360px;
    height: 360px;
    left: -110px;
    top: 18%;
    background: rgba(150, 96, 255, 0.38);
}

body.auth-page::after {
    width: 280px;
    height: 280px;
    right: -70px;
    bottom: 10%;
    background: rgba(44, 102, 255, 0.22);
}

.auth-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 24px 24px;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 30px;
    text-decoration: none;
}

.auth-brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.12);
    flex: 0 0 auto;
}

.auth-brand-mark i {
    font-size: 33px;
    color: #2f67e8;
    line-height: 1;
}

.auth-brand-text {
    color: #ffffff;
    font-family: "Montserrat", "Manrope", sans-serif;
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.045em;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.auth-card {
    width: min(100%, 448px);
    background: var(--auth-card);
    border-radius: 18px;
    box-shadow: var(--auth-shadow);
    padding: 40px 30px 24px;
}

.auth-card--register {
    width: min(100%, 1008px);
    padding: 42px 30px 30px;
}

.auth-copy {
    margin-bottom: 28px;
}

.auth-title {
    margin: 0 0 10px;
    color: var(--auth-text);
    font-family: "Montserrat", "Manrope", sans-serif;
    font-size: 2rem;
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.045em;
}

.auth-title--register {
    font-size: 1.95rem;
}

.auth-subtitle {
    margin: 0;
    color: var(--auth-muted);
    font-size: 1rem;
    line-height: 1.45;
}

.auth-form {
    display: block;
}

.auth-field {
    margin-bottom: 22px;
}

.auth-label {
    display: block;
    margin: 0 0 10px;
    color: #202738;
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.2;
}

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

.auth-input {
    width: 100%;
    height: 52px;
    border: 1px solid var(--auth-border);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, var(--auth-soft) 100%);
    padding: 0 18px 0 48px;
    color: #0f172a;
    font-size: 0.98rem;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.auth-input::placeholder {
    color: #a1a9b6;
}

.auth-input:focus {
    border-color: rgba(59, 130, 246, 0.45);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.08);
}

.auth-input-wrap--password .auth-input {
    padding-right: 50px;
}

.auth-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #a3adbb;
    font-size: 19px;
    pointer-events: none;
}

.auth-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    color: #a3adbb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

.auth-password-toggle i {
    font-size: 20px;
    line-height: 1;
}

.auth-password-toggle:hover {
    color: #768093;
}

.auth-error {
    display: block;
    margin-top: 8px;
    color: #dc3545;
    font-size: 0.81rem;
    line-height: 1.35;
}

.auth-forgot {
    display: flex;
    justify-content: flex-end;
    margin: 2px 0 22px;
}

.auth-forgot a,
.auth-footer-link a,
.auth-terms a {
    color: #2f6adf;
    text-decoration: none;
}

.auth-forgot a {
    font-size: 0.94rem;
    font-weight: 600;
}

.auth-forgot a:hover,
.auth-footer-link a:hover,
.auth-terms a:hover {
    text-decoration: underline;
}

.auth-primary-btn {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(90deg, var(--auth-primary-start) 0%, var(--auth-primary-end) 100%);
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    box-shadow: 0 12px 24px var(--auth-primary-shadow);
    transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease;
}

.auth-primary-btn:hover {
    filter: brightness(1.02);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(47, 103, 232, 0.31);
}

.auth-button-icon {
    font-size: 18px;
    line-height: 1;
    flex: 0 0 auto;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 24px 0 20px;
    color: #8f96a3;
    font-size: 0.94rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #e8edf3;
}

.auth-divider span {
    flex: 0 0 auto;
}

.auth-google-btn {
    width: 100%;
    height: 56px;
    border: 1px solid #d9dee6;
    border-radius: 15px;
    background: #ffffff;
    color: #1f2937;
    font-size: 0.98rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 1px 1px rgba(17, 24, 39, 0.03);
}

.auth-google-btn:focus {
    outline: none;
}

.google-mark {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
}

.auth-footer-link {
    margin-top: 22px;
    color: #7d8594;
    text-align: center;
    font-size: 0.95rem;
}

.auth-footer-link--register {
    margin-top: 24px;
}

.auth-footer-link a {
    font-weight: 700;
}

.auth-trust {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid #e8edf3;
    color: #7d8594;
    font-size: 0.88rem;
}

.auth-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.auth-trust-icon {
    width: 16px;
    height: 16px;
    color: var(--auth-success);
    flex: 0 0 auto;
    font-size: 16px;
}

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

.auth-register-grid .full {
    grid-column: 1 / -1;
}

.auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 22px;
    color: #6f7786;
    font-size: 0.9rem;
    line-height: 1.5;
    cursor: pointer;
}

.auth-terms input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex: 0 0 auto;
    accent-color: #3f3f46;
}

.auth-terms span {
    display: block;
}

.auth-register-btn {
    margin-top: 2px;
}

@media (max-width: 991.98px) {
    .auth-shell {
        padding-inline: 18px;
    }

    .auth-card,
    .auth-card--register {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    body.auth-page {
        overflow-y: auto;
    }

    .auth-shell {
        padding-top: 18px;
        padding-bottom: 28px;
    }

    .auth-brand {
        margin-bottom: 22px;
    }

    .auth-brand-mark {
        width: 50px;
        height: 50px;
    }

    .auth-brand-mark i {
        font-size: 30px;
    }

    .auth-card,
    .auth-card--register {
        padding: 32px 20px 22px;
        border-radius: 16px;
    }

    .auth-title {
        font-size: 1.7rem;
    }

    .auth-title--register {
        font-size: 1.6rem;
    }

    .auth-subtitle {
        font-size: 0.96rem;
    }

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

    .auth-trust {
        gap: 18px;
        flex-wrap: wrap;
        text-align: center;
    }

    .auth-trust-item {
        justify-content: center;
    }
}

@media (max-width: 420px) {
    .auth-primary-btn,
    .auth-google-btn,
    .auth-input {
        height: 50px;
    }

    .auth-google-btn {
        font-size: 0.95rem;
    }

    .auth-footer-link {
        font-size: 0.92rem;
    }
}
