/* Единый вход в личный кабинет ОшГУ */

:root {
    --a-red: #A00E07;
    --a-red-dark: #8a0c06;
    --a-red-soft: #fbeceb;
    --a-ink: #1c1c1c;
    --a-text: #3a3a3a;
    --a-muted: #6b6b6b;
    --a-line: #ddd9d4;
    --a-bg: #f2f0ed;
}

*, *::before, *::after { box-sizing: border-box; }

body.auth {
    margin: 0;
    min-height: 100vh;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    color: var(--a-text);
    background: #3d0806;
    -webkit-font-smoothing: antialiased;
}

.auth__wrap {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
}

.auth__card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 900px;
    overflow: hidden;
    background: #fcfbfa;
    border: 1px solid var(--a-line);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(60, 20, 10, 0.12);
}

/* Левая часть */
.auth__brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 2.25rem;
    color: #fff;
    background: linear-gradient(150deg, #b8140b 0%, var(--a-red) 45%, #6f0a05 100%);
}

.auth__logo {
    width: 170px;
    height: auto;
    margin-bottom: 1.75rem;
    filter: brightness(0) invert(1);
}

.auth__brand h2 {
    margin: 0 0 0.5rem;
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 1.45rem;
    font-weight: 700;
}

.auth__brand > p {
    margin: 0 0 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.85);
}

.auth__who {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth__who li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.auth__who-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
}

.auth__who b {
    display: block;
    font-size: 0.9375rem;
}

.auth__who span {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Правая часть */
.auth__panel {
    padding: 2.5rem 2.25rem;
}

.auth__panel h1 {
    margin: 0 0 0.3rem;
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--a-ink);
}

.auth__lead {
    margin: 0 0 1.4rem;
    color: var(--a-muted);
}

.auth__lead b {
    color: var(--a-ink);
}

.auth__error {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-bottom: 1.1rem;
    padding: 0.7rem 0.85rem;
    font-size: 0.875rem;
    color: #8e1b1b;
    background: #fff4f4;
    border: 1px solid #f1cccc;
    border-radius: 8px;
}

.auth__error i {
    margin-top: 0.15rem;
    color: #c62828;
}

.auth__field {
    display: block;
    margin: 0 0 1rem;
}

.auth__field > span {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--a-ink);
}

.auth__input {
    position: relative;
}

.auth__input > i {
    position: absolute;
    top: 50%;
    left: 0.9rem;
    transform: translateY(-50%);
    font-size: 0.85rem;
    color: #a39e98;
    pointer-events: none;
}

.auth__input input {
    width: 100%;
    height: 46px;
    padding: 0 2.75rem 0 2.5rem;
    font-size: 0.9375rem;
    color: var(--a-ink);
    background: #fff;
    border: 1px solid var(--a-line);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth__input input:focus {
    border-color: var(--a-red);
    box-shadow: 0 0 0 3px rgba(160, 14, 7, 0.1);
}

.auth__eye {
    position: absolute;
    top: 50%;
    right: 0.4rem;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    color: var(--a-muted);
    background: none;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.auth__eye:hover {
    color: var(--a-ink);
    background: var(--a-bg);
}

.auth__caps {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: #8a5a00;
}

.auth__agree {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    color: var(--a-text);
    cursor: pointer;
}

.auth__agree input {
    margin-top: 0.2rem;
    accent-color: var(--a-red);
}

.auth__agree a {
    color: var(--a-red);
    text-decoration: underline;
}

.auth__agree.is-invalid {
    color: #8e1b1b;
}

.auth__agree-error {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.75rem;
    color: #c62828;
}

.auth__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    height: 48px;
    margin-top: 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--a-red);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.auth__submit:hover {
    background: var(--a-red-dark);
}

.auth__submit.is-loading {
    cursor: progress;
    opacity: 0.85;
}

.auth__help {
    margin: 1.4rem 0 0;
    padding-top: 1rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--a-muted);
    border-top: 1px solid var(--a-line);
}

.auth__help a {
    color: var(--a-ink);
    white-space: nowrap;
}

/* Мобильная версия */
@media (max-width: 767px) {
    .auth__wrap {
        align-items: flex-start;
        padding: 1rem;
    }

    .auth__card {
        grid-template-columns: 1fr;
    }

    .auth__brand {
        padding: 1.5rem 1.25rem;
    }

    .auth__logo {
        width: 130px;
        margin-bottom: 1rem;
    }

    .auth__brand > p {
        margin-bottom: 1rem;
    }

    .auth__who {
        display: none;
    }

    .auth__panel {
        padding: 1.5rem 1.25rem;
    }
}

.auth__input input:focus,
.auth__submit:focus {
    outline: none;
}

.auth__submit:focus-visible {
    box-shadow: 0 0 0 3px rgba(160, 14, 7, 0.25);
}

.auth__agree input:focus-visible {
    outline: 2px solid var(--a-red);
    outline-offset: 2px;
}

/* ── Метка над заголовком ── */
.auth__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.6rem;
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #23692a;
    background: #e8f5ea;
    border-radius: 999px;
}

/* ── Согласие: крупный чекбокс и плашка ── */
.auth__agree {
    position: relative;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.4rem;
    padding: 0.7rem 0.8rem;
    background: #f7f5f2;
    border: 1px solid var(--a-line);
    border-radius: 8px;
    transition: border-color 0.15s, background 0.15s;
}

.auth__agree:hover {
    border-color: #cdc7c1;
}

.auth__check {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0 !important;
}

.auth__check-box {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: transparent;
    background: #fff;
    border: 2px solid #b9b2ab;
    border-radius: 6px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.auth__check-box i {
    font-size: 0.8rem;
}

.auth__check:checked + .auth__check-box {
    color: #fff;
    background: var(--a-red);
    border-color: var(--a-red);
}

.auth__check:focus-visible + .auth__check-box {
    box-shadow: 0 0 0 3px rgba(160, 14, 7, 0.2);
}

.auth__agree:has(.auth__check:checked) {
    background: var(--a-red-soft);
    border-color: #e8c9c5;
}

.auth__agree-text {
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--a-text);
}

.auth__agree-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.15rem;
    font-weight: 600;
    color: var(--a-red) !important;
    text-decoration: none !important;
}

.auth__agree-link:hover {
    text-decoration: underline !important;
}

.auth__agree.is-invalid {
    background: #fff4f4;
    border-color: #e9b4b4;
}

.auth__agree.is-invalid .auth__check-box {
    border-color: #c62828;
}

/* ── Окно условий в стиле страницы входа ── */
.auth-modal .modal-content {
    overflow: hidden;
    font-family: 'Roboto', sans-serif;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(40, 10, 5, 0.3);
}

.auth-modal .modal-dialog {
    max-width: 560px;
}

.auth-modal__head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.1rem 1.25rem;
    color: #fff;
    background: linear-gradient(150deg, #b8140b 0%, var(--a-red) 50%, #6f0a05 100%);
}

.auth-modal__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.auth-modal__eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.8;
}

.auth-modal__title {
    margin: 0.1rem 0 0;
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
}

.auth-modal__close {
    margin-left: auto;
    align-self: flex-start;
    width: 32px;
    height: 32px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.auth-modal__close:hover {
    background: rgba(255, 255, 255, 0.24);
}

.auth-modal__body {
    padding: 1.2rem 1.35rem 0.5rem;
    overflow-y: auto;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--a-text);
    background: #fcfbfa;
}

.auth-modal__intro {
    margin: 0 0 0.75rem;
    font-weight: 600;
    color: var(--a-ink);
}

.auth-modal__list {
    counter-reset: agree;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-modal__list li {
    position: relative;
    counter-increment: agree;
    margin-bottom: 0.75rem;
    padding: 0.7rem 0.85rem 0.7rem 2.9rem;
    background: #fff;
    border: 1px solid var(--a-line);
    border-radius: 8px;
}

.auth-modal__list li::before {
    content: counter(agree);
    position: absolute;
    top: 0.7rem;
    left: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--a-red);
    background: var(--a-red-soft);
    border-radius: 50%;
}

.auth-modal__foot {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.85rem 1.35rem 1.1rem;
    background: #fcfbfa;
    border-top: 1px solid var(--a-line);
}

.auth-modal__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 42px;
    padding: 0 1.2rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
}

.auth-modal__btn--ghost {
    color: var(--a-text);
    background: #fff;
    border: 1px solid var(--a-line);
}

.auth-modal__btn--ghost:hover {
    background: #f4f1ee;
}

.auth-modal__btn--primary {
    color: #fff;
    background: var(--a-red);
    border: 1px solid var(--a-red);
}

.auth-modal__btn--primary:hover {
    background: var(--a-red-dark);
}

.auth-modal__btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(160, 14, 7, 0.18);
}

@media (max-width: 576px) {
    .auth-modal__foot {
        flex-direction: column-reverse;
    }

    .auth-modal__btn {
        justify-content: center;
        width: 100%;
    }
}
