:root {
    --auth-blue: #0c5f86;
    --auth-blue-dark: #064f73;
    --auth-text: #024969;
    --auth-muted: #8194b6;
    --auth-line: #d7e3f1;
    --auth-surface: #ffffff;
    --auth-field: #fbfdff;
}

body.auth-page {
    min-height: 100vh;
    color: var(--auth-text);
    background:
        radial-gradient(circle at 50% 0%, rgba(12, 95, 134, 0.1), rgba(12, 95, 134, 0) 32rem),
        linear-gradient(180deg, #f8fbfe 0%, #eef4fa 100%);
}

.auth-page a {
    color: var(--auth-blue);
}

.auth-shell {
    width: min(100%, 760px);
    margin: 0 auto;
    padding: 26px 18px 22px;
}

.auth-shell--login {
    width: min(100%, 610px);
}

.auth-brand {
    text-align: center;
    margin-bottom: 20px;
}

.auth-logo-mark {
    width: min(360px, 78vw);
    height: 92px;
    margin: 0 auto 12px;
    border-radius: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    overflow: visible;
}

.auth-logo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.auth-brand h1 {
    margin: 0;
    color: var(--auth-blue);
    font-size: 28px;
    line-height: 1.1;
    font-weight: 900;
}

.auth-brand p {
    margin: 8px 0 0;
    color: #97a8c8;
    font-size: 18px;
}

.auth-card {
    background: var(--auth-surface);
    border: 1px solid var(--auth-line);
    border-radius: 22px;
    padding: 30px;
    box-shadow: 0 24px 70px rgba(25, 69, 110, 0.12);
}

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

.auth-card__title h2 {
    color: var(--auth-blue-dark);
    font-size: 24px;
    line-height: 1.2;
    margin: 0 0 6px;
    font-weight: 900;
}

.auth-card__title p {
    color: #65759c;
    font-size: 16px;
    margin: 0;
}

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

.auth-page .form-group {
    margin-bottom: 16px;
}

.auth-grid .form-group {
    margin-bottom: 0;
}

.form-group--full {
    grid-column: 1 / -1;
}

.auth-page .field-label {
    display: block;
    margin-bottom: 8px;
    color: var(--auth-blue-dark);
    font-size: 15px;
    font-weight: 800;
}

.auth-page .input-icon {
    position: relative;
}

.auth-page .input-icon i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #8da1bf;
    z-index: 2;
}

.auth-page .input-icon input,
.auth-page .input-icon select {
    width: 100%;
    min-height: 58px;
    padding: 14px 18px 14px 56px;
    border: 1px solid var(--auth-line);
    border-radius: 14px;
    background: var(--auth-field);
    color: #284567;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-page .input-icon input:focus,
.auth-page .input-icon select:focus {
    border-color: var(--auth-blue);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(12, 95, 134, 0.1);
}

.auth-page .input-icon input::placeholder {
    color: #8da1bf;
    opacity: 1;
}

.auth-page .input-icon select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.auth-page .input-icon select option {
    color: #1d2f45;
}

.auth-page .select-icon::after {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #8da1bf;
    pointer-events: none;
    font-size: 12px;
}

.auth-page .password-field input {
    padding-right: 54px;
}

.password-toggle {
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: #edf4fb;
    color: #8da1bf;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.password-toggle i {
    position: static !important;
    transform: none !important;
    color: inherit !important;
}

.warning-box,
.auth-page .error,
.auth-page .success {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.45;
}

.warning-box {
    background: #fff8e8;
    border: 1px solid #f0c86c;
    color: #805300;
}

.auth-page .error {
    background: #fff0f0;
    border: 1px solid #f3b4b4;
    color: #a32020;
}

.auth-page .success {
    background: #effaf3;
    border: 1px solid #9ed8ad;
    color: #1f7a3b;
}

.warning-box i,
.auth-page .error i,
.auth-page .success i {
    margin-top: 3px;
    flex-shrink: 0;
}

.phone-group {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 8px;
}

.auth-page .phone-prefix,
.auth-page .phone-number {
    min-width: 0;
}

.auth-page .phone-prefix select,
.auth-page .phone-number input {
    height: auto;
}

.consent-group {
    margin-top: 16px;
}

.auth-page .consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #526888;
    font-size: 13px;
    line-height: 1.45;
    cursor: pointer;
}

.consent-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--auth-blue);
    flex-shrink: 0;
}

.auth-page .btn {
    width: 100%;
    min-height: 64px;
    margin-top: 24px;
    border: 0;
    border-radius: 14px;
    background: #166c91;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 18px 38px rgba(22, 108, 145, 0.22);
}

.auth-page .btn:hover {
    background: var(--auth-blue-dark);
    transform: translateY(-1px);
}

.auth-grid > .btn {
    grid-column: 1 / -1;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    color: #7d8fac;
    font-size: 16px;
}

.auth-footer a {
    font-weight: 900;
    text-decoration: none;
}

.auth-credit {
    margin-top: 24px;
    color: #aec0db;
    text-align: center;
    font-size: 16px;
}

@media (max-width: 680px) {
    .auth-shell {
        padding: 20px 12px 18px;
    }

    .auth-logo-mark {
        width: min(300px, 84vw);
        height: 74px;
        margin-bottom: 10px;
    }

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

    .auth-brand h1 {
        font-size: 24px;
    }

    .auth-brand p {
        font-size: 15px;
    }

    .auth-card {
        padding: 20px;
        border-radius: 18px;
    }

    .auth-card__title h2 {
        font-size: 22px;
    }

    .auth-page .input-icon input,
    .auth-page .input-icon select {
        min-height: 54px;
        font-size: 16px;
    }

    .auth-page .btn {
        min-height: 58px;
        font-size: 17px;
    }
}

@media (max-width: 560px) {
    .auth-grid {
        grid-template-columns: 1fr;
    }

    .form-group--full {
        grid-column: auto;
    }
}

@media (max-width: 420px) {
    .auth-brand h1 {
        font-size: 24px;
    }

    .phone-group {
        grid-template-columns: 96px minmax(0, 1fr);
    }
}
