:root {
    --purple: #9d3fe7;
    --purple-dark: #6a17ab;
    --purple-hover: #ae60eb;
    --ink: #1a141f;
    --ink-soft: #6b6072;
    --border: #e7e1ec;
    --error: #d51a52;
    --error-bg: #fdeef2;
    --white: #ffffff;
    --radius: 20px;
    --shadow: 0 24px 60px -20px rgba(86, 24, 130, 0.35);
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-x: hidden;
    font-family: 'Montserrat', sans-serif;
    color: var(--ink);
    background: linear-gradient(160deg, #f7f3fb 0%, #efe6f9 45%, #e6d9f7 100%);
    position: relative;
}

.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    z-index: 0;
    pointer-events: none;
}

.blob--one {
    width: 420px;
    height: 420px;
    top: -120px;
    left: -120px;
    background: var(--purple);
}

.blob--two {
    width: 380px;
    height: 380px;
    bottom: -140px;
    right: -100px;
    background: #6020a0;
}

.page {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo {
    width: 180px;
    height: auto;
    margin-bottom: 36px;
}

.card {
    width: 100%;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px 36px;
    text-align: center;
    animation: rise 0.5s ease both;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card__title {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.3;
}

.card__subtitle {
    margin: 0 0 28px;
    font-size: 15px;
    font-weight: 400;
    color: var(--ink-soft);
    line-height: 1.5;
}

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

.field {
    position: relative;
    display: block;
}

.field__icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-soft);
    pointer-events: none;
}

.field__input {
    width: 100%;
    padding: 15px 16px 15px 44px;
    border-radius: 14px;
    border: 1.5px solid var(--border);
    outline: none;
    font: 400 15px/1.4 'Montserrat', sans-serif;
    color: var(--ink);
    background: #fbfafc;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.field__input::placeholder {
    color: #b4abbd;
}

.field__input:focus {
    border-color: var(--purple);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(157, 63, 231, 0.12);
}

.field__input.field__input--error {
    border-color: var(--error);
}

.button {
    position: relative;
    border: none;
    outline: none;
    cursor: pointer;
    border-radius: 14px;
    padding: 15px 20px;
    font: 600 15px/1 'Montserrat', sans-serif;
    color: var(--white);
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    box-shadow: 0 10px 24px -8px rgba(157, 63, 231, 0.6);
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -8px rgba(157, 63, 231, 0.7);
}

.button:active {
    transform: translateY(0);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.75;
    transform: none;
}

.button__spinner {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2.5px solid rgba(255, 255, 255, 0.4);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.button--loading .button__label {
    opacity: 0;
}

.button--loading .button__spinner {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


.toast {
    position: fixed;
    left: 50%;
    top: 24px;
    transform: translate(-50%, -120%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100% - 32px);
    background: var(--error-bg);
    border: 1px solid #f6c4d4;
    color: var(--error);
    font: 500 14px/1.4 'Montserrat', sans-serif;
    padding: 14px 18px;
    border-radius: 14px;
    box-shadow: 0 14px 30px -10px rgba(213, 26, 82, 0.35);
    transition: transform 0.25s ease, opacity 0.25s ease;
    opacity: 0;
}

.toast svg {
    flex: none;
}

.toast--visible {
    transform: translate(-50%, 0);
    opacity: 1;
}

@media (max-width: 480px) {
    .logo {
        width: 140px;
        margin-bottom: 28px;
    }

    .card {
        padding: 32px 22px;
    }

    .card__title {
        font-size: 22px;
    }

    .card__subtitle {
        font-size: 14px;
    }

    .field__input,
    .button {
        padding-top: 13px;
        padding-bottom: 13px;
    }
}

@media (max-width: 360px) {
    .card {
        padding: 26px 16px;
    }
}
