:root {
    --page-bg: #fff8fa;
    --card-bg: #ffffff;
    --pink: #e76589;
    --pink-deep: #dc557e;
    --pink-soft: #f48aa6;
    --text: #3f3940;
    --muted: #91878e;
    --muted-light: #a99ea5;
    --line: #edd4dc;
}

* {
    box-sizing: border-box;
}

html {
    height: 100%;
    min-height: 100%;
    background: var(--page-bg);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-height: 100%;
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 50% 22%, rgba(231, 101, 137, .08), transparent 28rem),
        linear-gradient(180deg, #fffafb 0%, #fff6f8 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "SF Pro Text", "Inter", Arial, sans-serif;
    font-weight: 400;
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

button,
input {
    font: inherit;
}

input,
button {
    -webkit-appearance: none;
    appearance: none;
}

button {
    -webkit-tap-highlight-color: transparent;
}

.auth-page {
    width: min(100%, 100vw);
    max-width: 946px;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0 auto;
    padding: clamp(132px, 17vh, 190px) clamp(24px, 5.4vw, 52px) 54px;
    padding: clamp(132px, 17svh, 190px) clamp(24px, 5.4vw, 52px) max(54px, env(safe-area-inset-bottom));
}

.brand-block {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.brand-logo {
    display: block;
    width: min(74vw, 520px);
    max-height: clamp(108px, 20vw, 178px);
    object-fit: contain;
}

.login-card {
    width: min(100%, calc(100vw - clamp(48px, 10.8vw, 104px)));
    max-width: 842px;
    margin-inline: auto;
    margin-top: clamp(42px, 6vw, 62px);
    padding: clamp(38px, 7.6vw, 74px) clamp(28px, 6vw, 58px) clamp(38px, 7.1vw, 68px);
    border-radius: clamp(24px, 4.1vw, 40px);
    background: rgba(255, 255, 255, .98);
    box-shadow:
        0 36px 88px rgba(73, 48, 59, .08),
        0 12px 34px rgba(231, 101, 137, .05);
}

.login-card h2 {
    margin: 0;
    color: var(--pink);
    text-align: center;
    font-size: clamp(2rem, 6.1vw, 3.62rem);
    line-height: 1.08;
    font-weight: 590;
    letter-spacing: .055em;
}

.login-copy {
    max-width: 720px;
    margin: clamp(28px, 4.8vw, 46px) auto clamp(36px, 6.1vw, 58px);
    color: var(--muted);
    text-align: center;
    font-size: clamp(1.16rem, 3.42vw, 2rem);
    line-height: 1.48;
    font-weight: 400;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: clamp(22px, 4.8vw, 46px);
}

.phone-field {
    min-height: clamp(66px, 12.2vw, 118px);
    display: flex;
    align-items: center;
    gap: clamp(18px, 3.4vw, 32px);
    padding: 0 clamp(22px, 4vw, 38px);
    border: 1.5px solid var(--line);
    border-radius: clamp(17px, 3.4vw, 34px);
    background: rgba(255, 250, 252, .72);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.phone-field:focus-within {
    border-color: rgba(231, 101, 137, .58);
    background: #fff;
    box-shadow: 0 0 0 5px rgba(231, 101, 137, .08);
}

.field-icon {
    display: inline-flex;
    flex: 0 0 auto;
    color: #b99da8;
}

.field-icon svg {
    width: clamp(24px, 4.2vw, 40px);
    height: clamp(24px, 4.2vw, 40px);
    fill: none;
    stroke: currentColor;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.phone-field input {
    min-width: 0;
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font-size: clamp(1.06rem, 2.95vw, 1.68rem);
    line-height: 1;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
}

.phone-field input::placeholder {
    color: var(--muted);
    font-size: clamp(.96rem, 2.65vw, 1.42rem);
    opacity: .62;
}

.login-button {
    width: 100%;
    min-height: clamp(68px, 12.2vw, 118px);
    border: 0;
    border-radius: clamp(18px, 3.4vw, 34px);
    color: #fff;
    background: linear-gradient(135deg, #f37d9d 0%, var(--pink-deep) 100%);
    box-shadow:
        0 28px 48px rgba(231, 101, 137, .28),
        0 12px 26px rgba(231, 101, 137, .18);
    cursor: pointer;
    font-size: clamp(1.45rem, 4.1vw, 2.42rem);
    line-height: 1;
    font-weight: 590;
    letter-spacing: .035em;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.login-button:hover {
    filter: saturate(1.04);
}

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

.validation-summary,
.field-error {
    color: #c83c61;
    font-size: clamp(.94rem, 2.6vw, 1.12rem);
    line-height: 1.4;
}

.validation-summary ul {
    margin: 0;
    padding-left: 20px;
}

.validation-summary:empty,
.field-error:empty {
    display: none;
}

.security-note {
    margin: clamp(52px, 8vw, 78px) 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(7px, 1.8vw, 12px);
    color: var(--muted-light);
    text-align: center;
    font-size: clamp(.82rem, 2.35vw, 1.05rem);
    line-height: 1.25;
    font-weight: 400;
    white-space: nowrap;
}

.security-note span {
    display: inline-flex;
    flex: 0 0 auto;
    color: #a99da4;
}

.security-note svg {
    width: clamp(16px, 3.2vw, 22px);
    height: clamp(16px, 3.2vw, 22px);
    fill: currentColor;
}

@media (min-width: 768px) {
    .auth-page {
        max-width: 500px;
        padding: 34px 0 48px;
    }

    .brand-logo {
        width: 300px;
        max-height: 102px;
    }

    .login-card {
        width: 100%;
        max-width: 500px;
        margin-top: 28px;
        padding: 30px 28px 34px;
        border-radius: 6px;
        box-shadow:
            0 18px 46px rgba(73, 48, 59, .08),
            0 8px 24px rgba(231, 101, 137, .05);
    }

    .login-card h2 {
        font-size: 1.7rem;
        line-height: 1.15;
    }

    .login-copy {
        max-width: 390px;
        margin: 18px auto 26px;
        font-size: .98rem;
        line-height: 1.55;
    }

    .login-form {
        gap: 16px;
    }

    .phone-field {
        min-height: 52px;
        gap: 13px;
        padding: 0 16px;
        border-radius: 8px;
    }

    .field-icon svg {
        width: 21px;
        height: 21px;
    }

    .phone-field input {
        font-size: 1rem;
    }

    .phone-field input::placeholder {
        font-size: .94rem;
    }

    .login-button {
        min-height: 52px;
        border-radius: 8px;
        font-size: 1.08rem;
        box-shadow:
            0 18px 34px rgba(231, 101, 137, .24),
            0 8px 18px rgba(231, 101, 137, .16);
    }

    .validation-summary,
    .field-error {
        font-size: .88rem;
    }

    .security-note {
        margin-top: 28px;
        gap: 9px;
        font-size: .9rem;
    }

    .security-note svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 420px) {
    .auth-page {
        padding-top: clamp(96px, 12.5vh, 118px);
        padding-top: clamp(96px, 12.5svh, 118px);
        padding-inline: 22px;
    }

    .brand-logo {
        width: min(76vw, 320px);
        max-height: 116px;
    }

    .login-card {
        padding-top: 34px;
        padding-bottom: 34px;
    }

    .login-copy {
        margin-top: 24px;
        margin-bottom: 30px;
    }

    .login-form {
        gap: 18px;
    }

    .security-note {
        margin-top: 36px;
        font-size: clamp(.72rem, 3.3vw, .86rem);
    }
}

@media (max-height: 740px) {
    .auth-page {
        padding-top: 64px;
    }

    .login-card {
        margin-top: 30px;
    }

    .security-note {
        margin-top: 34px;
    }
}
