/* Auth pages (login) — aligned with home/reader */

.auth-page .reader-navbar--auth .reader-navbar-brand-icon {
    margin-left: 0;
    font-size: 1.05rem;
}

.auth-page .reader-navbar--auth .reader-navbar-end > a.search-return-link,
.auth-page .reader-navbar--auth .reader-navbar-end .dropdown > button.search-return-link {
    min-height: 2.5rem;
    align-items: center;
    line-height: 1.25;
    box-sizing: border-box;
}

.auth-page .reader-navbar--auth .reader-navbar-end .search-return-link__label {
    display: none;
}

@media (min-width: 992px) {
    .auth-page .reader-navbar--auth .reader-navbar-end .search-return-link__label {
        display: inline;
    }
}

@media (max-width: 991.98px) {
    .auth-page .reader-navbar--auth .reader-navbar-end > a.search-return-link,
    .auth-page .reader-navbar--auth .reader-navbar-end .dropdown > button.search-return-link {
        max-width: none;
        width: var(--reader-icon-btn-size);
        height: var(--reader-icon-btn-size);
        padding: 0;
        border-radius: 50%;
        justify-content: center;
        gap: 0;
    }

    .auth-page .reader-navbar--auth .reader-navbar-end > a.search-return-link .bi,
    .auth-page .reader-navbar--auth .reader-navbar-end .dropdown > button.search-return-link .bi {
        font-size: var(--reader-icon-btn-glyph);
        line-height: 1;
        opacity: 0.9;
    }
}

@media (max-width: 767.98px) {
    .auth-page .reader-container--auth {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .reader-navbar--auth > .container {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }
}

.reader-container--auth {
    padding-top: 1rem;
}

.reader-container--profile {
    padding-top: 1.5rem;
}

.reader-container--auth .book-chapter-header,
.reader-container--profile .book-chapter-header {
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 992px) {
    .reader-container--auth .book-chapter-header,
    .reader-container--profile .book-chapter-header {
        max-width: none;
        text-align: center;
    }

    .reader-container--auth .book-chapter-header .boxes-page-title,
    .reader-container--profile .book-chapter-header .boxes-page-title {
        text-align: center;
    }
}

.reader-container--auth .auth-subtitle {
    margin: 0.35rem 0 0;
    font-family: var(--reader-font-sans);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.45;
    color: var(--reader-text-muted, #6b6560);
}

@media (min-width: 992px) {
    .reader-container--auth .auth-subtitle {
        text-align: center;
    }
}

body.dark-mode .reader-container--auth .auth-subtitle {
    color: var(--reader-text-muted-dark, #a39a8f);
}

.auth-form {
    max-width: 28rem;
    margin: 0 auto;
    font-family: var(--reader-font-sans);
}

.auth-form__field + .auth-form__field {
    margin-top: 1rem;
}

.auth-form__field ul,
.auth-form > ul {
    margin: 0.35rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #842029;
}

body.dark-mode .auth-form__field ul,
body.dark-mode .auth-form > ul {
    color: #fecaca;
}

.auth-form__label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--reader-text-muted, #6c655c);
}

body.dark-mode .auth-form__label {
    color: var(--reader-text-muted-dark, #a39a8f);
}

.auth-form__input {
    display: block;
    width: 100%;
    border: none;
    border-radius: 1em;
    padding: 12px 20px;
    font-size: 1rem;
    line-height: 1.4;
    background: #fff;
    color: inherit;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.auth-form__input:focus {
    outline: none;
    box-shadow: 0 2px 14px rgba(184, 92, 0, 0.22);
}

body.dark-mode .auth-form__input {
    background-color: #555;
    color: var(--reader-text-dark);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

body.dark-mode .auth-form__input:focus {
    box-shadow: 0 2px 14px rgba(230, 161, 119, 0.25);
}

body.dark-mode .auth-form__input:-webkit-autofill,
body.dark-mode .auth-form__input:-webkit-autofill:hover,
body.dark-mode .auth-form__input:-webkit-autofill:focus,
body.dark-mode .auth-form__input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #555 inset, 0 2px 10px rgba(0, 0, 0, 0.35) !important;
    box-shadow: 0 0 0 1000px #555 inset, 0 2px 10px rgba(0, 0, 0, 0.35) !important;
    -webkit-text-fill-color: var(--reader-text-dark) !important;
    caret-color: var(--reader-text-dark);
}

.auth-form__alert {
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    background: rgba(220, 53, 69, 0.1);
    color: #842029;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

body.dark-mode .auth-form__alert {
    background: rgba(248, 113, 113, 0.12);
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.25);
}

.auth-form__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 3.25rem;
}

.auth-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-family: var(--reader-font-sans);
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    background: #b85c00;
    transition: transform 0.2s ease, background 0.2s ease;
}

.auth-form__submit:hover {
    background: #9a4d00;
    color: #fff;
    transform: scale(1.01);
}

.auth-form__submit:focus-visible {
    outline: 2px solid #b85c00;
    outline-offset: 2px;
}

body.dark-mode .auth-form__submit {
    background: #c96f1a;
}

body.dark-mode .auth-form__submit:hover {
    background: #e6a177;
    color: #1a1816;
}

.auth-form__secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    padding: 10px 20px;
    border-radius: 50px;
    font-family: var(--reader-font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--reader-border-light, #e8e4df);
    background: transparent;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.auth-form__secondary:hover {
    color: #b85c00;
    border-color: #b85c00;
    background: rgba(184, 92, 0, 0.06);
}

body.dark-mode .auth-form__secondary {
    border-color: var(--reader-border-dark, #44403c);
}

body.dark-mode .auth-form__secondary:hover {
    color: #e6a177;
    border-color: #e6a177;
    background: rgba(230, 161, 119, 0.08);
}
