:root {
    --primary: var(--brand-orange);
    --primary-hover: var(--brand-orange-hover);
    --text: var(--brand-ink);
    --muted: var(--brand-muted);
    --border: var(--brand-border);
}

* {
    box-sizing: border-box;
}

.auth-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    color: #b91c1c;
    padding: 14px 16px;
    font-size: 13px;
    animation: fadeUp .3s ease;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    font-family: system-ui, -apple-system,
    "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--brand-background);
}

.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    position: relative;
    background: radial-gradient(ellipse at top left, rgba(244, 107, 34, .06), transparent 50%),
                radial-gradient(ellipse at bottom right, rgba(132, 62, 150, .04), transparent 50%);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow:
            0 24px 65px rgba(40, 30, 70, .05),
            0 4px 12px rgba(40, 30, 70, .025);
    padding: 44px 40px 28px;
    animation: fadeUp .55s ease both;
}

.brand {
    text-align: center;
    margin-bottom: 34px;
}

.brand-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff0e6;
    border-radius: 50%;
    overflow: hidden;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}



.brand-title {
    font-size: 27px;
    font-weight: 750;
    letter-spacing: -.8px;
    margin-bottom: 10px;
}

.brand-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
    margin: 0;
}

.form-label {
    font-size: 13px;
    font-weight: 650;
    margin-bottom: 9px;
    color: #334155;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: #94a3b8;
    display: flex;
    pointer-events: none;
}

.auth-input {
    height: 52px;
    padding: 12px 46px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfcfe;
    font-size: 16px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.auth-input:hover {
    border-color: #cbd5e1;
}

.auth-input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px
    rgba(244, 107, 34, .14);
}

.auth-input::placeholder {
    color: #a0aec0;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 13px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #94a3b8;
    padding: 7px;
    cursor: pointer;
    border-radius: 8px;
}

.password-toggle:hover {
    color: var(--primary);
    background: #fff0e6;
}

.btn-login {
    height: 52px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(120deg, #ff680f, #ff8943);
    color: white;
    font-size: 15px;
    font-weight: 650;
    transition: .2s ease;
    box-shadow: 0 6px 15px
    rgba(244, 107, 34, .17);
}

.btn-login:hover {
    background: var(--primary-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 9px 20px
    rgba(244, 107, 34, .22);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: .75;
    cursor: wait;
    transform: none;
}

.auth-footer {
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
}

.validation-summary-valid {
    display: none;
}

.validation-summary-errors {
    font-size: 13px;
    border-radius: 12px;
}

.validation-summary-errors ul {
    margin-bottom: 0;
    padding-left: 18px;
}

@keyframes fadeUp {
     from {
         opacity: 0;
         transform: translateY(18px);
     }
     to {
         opacity: 1;
         transform: translateY(0);
     }
 }

/* Планшеты и смартфоны */
@media (max-width: 576px) {
    .auth-page {
        padding: 20px 14px;
    }

    .auth-card {
        padding: 34px 24px 24px;
        border-radius: 18px;
    }

    .brand {
        margin-bottom: 28px;
    }

    .brand-title {
        font-size: 24px;
    }

    .brand-logo {
        width: 68px;
        height: 68px;
        margin-bottom: 18px;
    }
}

/* Маленькие экраны */
@media (max-width: 360px) {
    .auth-card {
        padding: 28px 18px 20px;
    }

    .brand-title {
        font-size: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}
.brand-logo {
    border-radius: 50%;
    background: #fff7f1;
}

.brand-logo img {
    display: block;
}

.auth-card {
    min-width: 0;
    overflow-wrap: anywhere;
}

.password-toggle {
    right: 4px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
}

.password-toggle:focus-visible,
.btn-login:focus-visible {
    outline: 3px solid rgba(244, 107, 34, .45);
    outline-offset: 3px;
}

.btn-login:disabled {
    background: var(--primary);
    color: #fff;
}

.auth-footer {
    border-top-color: var(--border);
    color: var(--muted);
}

@media (max-height: 640px) {
    .auth-page {
        align-items: flex-start;
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .auth-card {
        padding-top: 24px;
        padding-bottom: 20px;
    }

    .brand {
        margin-bottom: 22px;
    }

    .brand-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 14px;
    }

    .auth-footer {
        margin-top: 24px;
        padding-top: 16px;
    }
}