/* ============================================================
   DIGITAL E COMPANIA — APP READER
   app/css/app.css
   ============================================================ */


/* ============================================================
   01. RESET
   ============================================================ */

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


html {
    width: 100%;
    min-height: 100%;
    background: #111111;
    color-scheme: dark;
}


body {
    width: 100%;
    min-width: 320px;
    min-height: 100vh;
    min-height: 100dvh;

    margin: 0;

    background: #111111;
    color: #f5f5f5;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    overflow-x: hidden;
}


button,
input,
textarea,
select {
    font: inherit;
}


button {
    border: 0;
    cursor: pointer;
}


img {
    display: block;
    max-width: 100%;
}


[hidden] {
    display: none !important;
}


/* ============================================================
   02. APP
   ============================================================ */

.app {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;

    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(255, 193, 7, 0.08),
            transparent 35%
        ),
        #111111;
}


.app-shell {
    position: relative;

    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;

    overflow: hidden;
}


/* ============================================================
   03. AUTHENTICATION SCREENS
   ============================================================ */

.login-screen,
.register-screen {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding:
        28px
        20px
        calc(28px + env(safe-area-inset-bottom));

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(244, 196, 48, 0.10),
            transparent 38%
        ),
        radial-gradient(
            circle at 50% 100%,
            rgba(255, 255, 255, 0.025),
            transparent 42%
        ),
        #111111;
}


.login-card,
.register-card {
    width: 100%;
    max-width: 460px;

    padding: 32px;

    background:
        linear-gradient(
            145deg,
            rgba(31, 31, 31, 0.98),
            rgba(19, 19, 19, 0.98)
        );

    border:
        1px solid rgba(255, 255, 255, 0.08);

    border-radius: 22px;

    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.42);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}


/* ============================================================
   03.1 AUTH BRAND
   ============================================================ */

.login-brand,
.register-brand {
    display: flex;
    align-items: baseline;
    justify-content: center;

    gap: 5px;

    margin-bottom: 30px;

    letter-spacing: -0.04em;
}


.login-brand__logo,
.register-brand__logo {
    font-size: 19px;
    font-weight: 900;

    color: #ffffff;
}


.login-brand__pro,
.register-brand__pro {
    font-size: 19px;
    font-weight: 900;

    color: #f4c430;
}


/* ============================================================
   03.2 AUTH HEADERS
   ============================================================ */

.login-header,
.register-header {
    text-align: center;

    margin-bottom: 26px;
}


.login-header__eyebrow,
.register-header__eyebrow {
    display: block;

    margin-bottom: 7px;

    font-size: 9px;
    font-weight: 900;

    letter-spacing: 0.18em;

    color: #f4c430;
}


.login-header__title,
.register-header__title {
    font-size: clamp(26px, 6vw, 34px);
    line-height: 1.05;

    font-weight: 900;

    letter-spacing: -0.045em;

    color: #ffffff;
}


.login-header__description,
.register-header__description {
    max-width: 390px;

    margin:
        10px
        auto
        0;

    font-size: 13px;
    line-height: 1.5;

    color: rgba(255, 255, 255, 0.58);
}


/* ============================================================
   03.3 AUTH FORMS
   ============================================================ */

.login-form,
.register-form {
    display: flex;
    flex-direction: column;

    width: 100%;

    gap: 15px;
}


.login-field,
.register-field {
    display: flex;
    flex-direction: column;

    gap: 7px;
}


.login-field__label,
.register-field__label {
    font-size: 11px;
    font-weight: 800;

    letter-spacing: 0.02em;

    color: rgba(255, 255, 255, 0.82);
}


.login-field__input,
.register-field__input {
    width: 100%;
    min-height: 50px;

    padding:
        0
        14px;

    background: #101010;

    color: #ffffff;

    border:
        1px solid rgba(255, 255, 255, 0.11);

    border-radius: 10px;

    outline: none;

    font-size: 13px;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}


.login-field__input::placeholder,
.register-field__input::placeholder {
    color: rgba(255, 255, 255, 0.30);
}


.login-field__input:hover,
.register-field__input:hover {
    border-color:
        rgba(255, 255, 255, 0.18);
}


.login-field__input:focus,
.register-field__input:focus {
    background: #141414;

    border-color: #f4c430;

    box-shadow:
        0 0 0 3px rgba(244, 196, 48, 0.10);
}


/* ============================================================
   03.4 AUTH ACTIONS
   ============================================================ */

.login-actions {
    display: flex;
    flex-direction: column;

    align-items: stretch;

    gap: 10px;

    margin-top: 2px;
}


.login-submit,
.register-submit {
    width: 100%;

    min-height: 52px;

    margin-top: 0;

    background: #f4c430;

    color: #111111;

    border-radius: 10px;

    box-shadow:
        0 10px 28px rgba(244, 196, 48, 0.14);

    font-size: 13px;
    font-weight: 900;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        opacity 0.2s ease;
}


.login-submit:hover,
.register-submit:hover {
    background: #ffd54f;
}


.login-submit:active,
.register-submit:active {
    transform: scale(0.98);
}


.login-submit:disabled,
.register-submit:disabled {
    opacity: 0.55;

    cursor: wait;

    transform: none;
}


.login-link {
    align-self: center;

    min-height: 32px;

    padding:
        0
        8px;

    background: transparent;

    color: rgba(255, 255, 255, 0.55);

    font-size: 11px;
    font-weight: 700;

    transition:
        color 0.2s ease;
}


.login-link:hover {
    color: #f4c430;
}


/* ============================================================
   03.5 AUTH MESSAGES
   ============================================================ */

.login-message,
.register-message {
    width: 100%;

    padding:
        11px
        12px;

    border-radius: 9px;

    background:
        rgba(255, 255, 255, 0.045);

    border:
        1px solid rgba(255, 255, 255, 0.08);

    color:
        rgba(255, 255, 255, 0.78);

    font-size: 11px;
    line-height: 1.45;

    text-align: center;
}


.login-message.is-error,
.register-message.is-error {
    background:
        rgba(220, 53, 69, 0.10);

    border-color:
        rgba(220, 53, 69, 0.30);

    color:
        #ffb3bb;
}


.login-message.is-success,
.register-message.is-success {
    background:
        rgba(25, 135, 84, 0.10);

    border-color:
        rgba(25, 135, 84, 0.30);

    color:
        #a8e6c5;
}


/* ============================================================
   03.6 CREATE ACCOUNT
   ============================================================ */

.login-register {
    display: flex;
    flex-direction: column;

    align-items: center;

    gap: 7px;

    margin-top: 25px;
    padding-top: 23px;

    border-top:
        1px solid rgba(255, 255, 255, 0.07);
}


.login-register p {
    font-size: 11px;

    color:
        rgba(255, 255, 255, 0.48);
}


.login-register__button {
    min-height: 34px;

    padding:
        0
        6px;

    background: transparent;

    color: #f4c430;

    font-size: 12px;
    font-weight: 900;

    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}


.login-register__button:hover {
    color: #ffd54f;
}


/* ============================================================
   03.7 REGISTER BACK
   ============================================================ */

.register-back {
    display: flex;
    justify-content: center;

    margin-top: 20px;
}


.register-back__button {
    min-height: 34px;

    padding:
        0
        6px;

    background: transparent;

    color:
        rgba(255, 255, 255, 0.58);

    font-size: 11px;
    font-weight: 800;

    transition:
        color 0.2s ease;
}


.register-back__button:hover {
    color: #f4c430;
}


/* ============================================================
   03.8 AUTH FOOTER
   ============================================================ */

.login-footer,
.register-footer {
    margin-top: 24px;

    text-align: center;
}


.login-footer span,
.register-footer span {
    font-size: 9px;

    line-height: 1.4;

    color:
        rgba(255, 255, 255, 0.30);
}


/* ============================================================
   04. HEADER
   ============================================================ */

.app-header {
    position: sticky;
    top: 0;
    z-index: 20;

    width: 100%;

    padding:
        calc(10px + env(safe-area-inset-top))
        20px
        10px;

    background:
        rgba(17, 17, 17, 0.94);

    border-bottom: 1px solid rgba(255, 255, 255, 0.07);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}


.app-header__brand {
    display: flex;
    align-items: baseline;
    justify-content: center;

    gap: 5px;

    letter-spacing: -0.04em;
}


.app-header__logo {
    font-size: 18px;
    font-weight: 900;

    color: #ffffff;
}


.app-header__brand-pro {
    font-size: 18px;
    font-weight: 900;

    color: #f4c430;
}



/* ============================================================
   USUÁRIO AUTENTICADO
   ============================================================ */

.app-header__user {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    min-width: 0;

    max-width: 220px;

    padding: 7px 10px;

    border: 1px solid
        rgba(
            255,
            255,
            255,
            0.10
        );

    border-radius: 8px;

    background:
        rgba(
            255,
            255,
            255,
            0.04
        );

    color: #ffffff;

}


.app-header__user-icon {

    width: 25px;

    height: 25px;

    flex: 0 0 25px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    background:
        rgba(
            255,
            255,
            255,
            0.10
        );

    font-size: 13px;

    line-height: 1;

}


.app-header__user-name {

    min-width: 0;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    font-size: 12px;

    font-weight: 600;

    line-height: 1.2;

    color: #ffffff;

}


/* ============================================================
   04.1 LOGOUT
   ============================================================ */

.app-header__logout {
    flex: 0 0 auto;

    min-height: 34px;

    padding:
        0
        14px;

    background:
        rgba(255, 255, 255, 0.05);

    color:
        rgba(255, 255, 255, 0.68);

    border:
        1px solid rgba(255, 255, 255, 0.10);

    border-radius: 8px;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 0.03em;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


.app-header__logout:hover {
    background:
        rgba(244, 196, 48, 0.10);

    border-color:
        rgba(244, 196, 48, 0.35);

    color:
        #f4c430;
}


.app-header__logout:active {
    transform: scale(0.96);
}


.app-header__logout:disabled {
    opacity: 0.45;

    cursor: wait;
}


/* ============================================================
   05. SCREENS
   ============================================================ */

.screen {
    width: 100%;
}


.screen--library {
    width: 100%;
    max-width: 1180px;

    margin: 0 auto;

    padding:
        22px
        20px
        calc(36px + env(safe-area-inset-bottom));
}


/* ============================================================
   06. LIBRARY HEADER
   ============================================================ */

.library-header {
    margin-bottom: 20px;
}


.library-header__eyebrow {
    display: block;

    margin-bottom: 5px;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 0.16em;

    color: #f4c430;
}


.library-header__title {
    font-size: clamp(28px, 7vw, 46px);
    line-height: 1.05;
    font-weight: 900;

    letter-spacing: -0.045em;

    color: #ffffff;
}


/* ============================================================
   07. LIBRARY GRID
   ============================================================ */

.library-books {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}


/* ============================================================
   08. BOOK CARD
   ============================================================ */

.book-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);

    width: 100%;
    min-width: 0;

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            #1c1c1c 0%,
            #151515 100%
        );

    border: 1px solid rgba(255, 255, 255, 0.08);

    border-radius: 20px;

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.28);
}


.book-card + .book-card {
    margin-top: 0;
}


/* ============================================================
   09. BOOK COVER
   ============================================================ */

.book-card__cover {
    position: relative;

    width: 100%;

    background: #090909;

    overflow: hidden;
}


.book-card__cover::after {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.02),
            rgba(0, 0, 0, 0.18)
        );
}


.book-card__cover img {
    aspect-ratio: 1 / 1;

    width: 100%;
    height: 100%;

    object-fit: contain;

    background: #0b0b0b;
}


/* ============================================================
   10. BOOK CONTENT
   ============================================================ */

.book-card__content {
    display: flex;
    flex-direction: column;
    justify-content: center;

    min-width: 0;

    padding: 18px;
}


.book-card__category {
    margin-bottom: 5px;

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 0.15em;

    color: #f4c430;
}


.book-card__title {
    max-width: 620px;

    font-size: 21px;
    line-height: 1.08;
    font-weight: 900;

    letter-spacing: -0.035em;

    color: #ffffff;
}


.book-card__description {
    margin-top: 6px;

    font-size: 12px;
    line-height: 1.4;

    color: rgba(255, 255, 255, 0.62);
}


/* ============================================================
   11. READING PROGRESS
   ============================================================ */

.book-card__progress {
    margin-top: 12px;
}


.book-card__progress-track {
    width: 100%;
    height: 4px;

    overflow: hidden;

    background: rgba(255, 255, 255, 0.10);

    border-radius: 999px;
}


.book-card__progress-value {
    width: 0;
    height: 100%;

    background: #f4c430;

    border-radius: inherit;

    transition: width 0.3s ease;
}


.book-card__progress-text {
    display: block;

    margin-top: 6px;

    font-size: 11px;
    font-weight: 700;

    color: rgba(255, 255, 255, 0.48);
}


/* ============================================================
   12. BUTTON
   ============================================================ */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 50px;

    padding: 0 22px;

    border-radius: 10px;

    font-size: 13px;
    font-weight: 900;

    letter-spacing: 0.01em;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease,
        background 0.2s ease;
}


/* ============================================================
   12. BUTTON
   ============================================================ */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 50px;

    padding: 0 22px;

    border-radius: 10px;

    font-size: 13px;
    font-weight: 900;

    letter-spacing: 0.01em;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}


.button--primary {
    width: 100%;

    margin-top: 10px;

    background: #f4c430;
    color: #111111;

    box-shadow:
        0 8px 25px rgba(244, 196, 48, 0.16);
}


/* ============================================================
   12.1 LIVRO COMPRADO
   ============================================================ */

.button--primary[data-access="purchased"] {
    background: #198754;

    color: #ffffff;

    box-shadow:
        0 8px 25px rgba(25, 135, 84, 0.18);
}


.button--primary[data-access="purchased"]:hover {
    background: #22a866;

    box-shadow:
        0 10px 28px rgba(25, 135, 84, 0.24);
}


/* ============================================================
   12.2 LIVRO DE AMOSTRA
   ============================================================ */

.button--primary[data-access="sample"] {
    background: #1976d2;

    color: #ffffff;

    box-shadow:
        0 8px 25px rgba(25, 118, 210, 0.18);
}


.button--primary[data-access="sample"]:hover {
    background: #2585df;

    box-shadow:
        0 10px 28px rgba(25, 118, 210, 0.24);
}


/* ============================================================
   12.3 LIVRO NÃO COMPRADO
   ============================================================ */

.button--primary[data-access="locked"] {
    background: #f4c430;

    color: #111111;

    box-shadow:
        0 8px 25px rgba(244, 196, 48, 0.16);
}


.button--primary[data-access="locked"]:hover {
    background: #ffd54f;

    box-shadow:
        0 10px 28px rgba(244, 196, 48, 0.23);
}


/* ============================================================
   12.4 CLIQUE
   ============================================================ */

.button--primary:active {
    transform: scale(0.98);
}


/* ============================================================
   13. READER SCREEN
   ============================================================ */

.screen--reader {
    position: fixed;
    inset: 0;
    z-index: 100;

    display: flex;
    flex-direction: column;

    width: 100%;
    height: 100vh;
    height: 100dvh;

    background: #f7f5ef;

    color: #171717;
}


/* ============================================================
   14. READER HEADER
   ============================================================ */

.reader-header {
    flex: 0 0 auto;

    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: center;

    width: 100%;

    padding:
        calc(8px + env(safe-area-inset-top))
        10px
        8px;

    background: #111111;

    color: #ffffff;

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}


.reader-header__button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    background: transparent;

    color: #ffffff;

    border-radius: 50%;

    font-size: 23px;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}


.reader-header__button:hover {
    background: rgba(255, 255, 255, 0.08);
}


.reader-header__button:active {
    transform: scale(0.92);
}


.reader-header__title {
    min-width: 0;

    padding: 0 8px;

    overflow: hidden;

    text-align: center;

    font-size: 13px;
    font-weight: 800;

    white-space: nowrap;
    text-overflow: ellipsis;
}


/* ============================================================
   15. READER CONTAINER
   ============================================================ */

.reader-container {
    position: relative;

    flex: 1 1 auto;

    width: 100%;
    min-width: 0;
    min-height: 0;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #eae7df;
}


.epub-viewer {
    position: relative;

    width: 100%;
    height: 100%;

    min-width: 0;
    min-height: 0;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #eae7df;
}


.epub-viewer iframe {
    display: block;

    width: 100% !important;
    height: 100% !important;

    min-width: 0;
    min-height: 0;

    margin: 0;
    padding: 0;

    border: 0;

    background: #f7f5ef;
}


/* ============================================================
   16. READER LOADING
   ============================================================ */

.reader-loading {
    position: absolute;
    inset: 0;
    z-index: 5;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 16px;

    background: #f7f5ef;

    color: #333333;
}


.reader-loading p {
    font-size: 13px;
    font-weight: 700;

    color: rgba(0, 0, 0, 0.58);
}


.reader-loading__spinner {
    width: 32px;
    height: 32px;

    border: 3px solid rgba(0, 0, 0, 0.10);
    border-top-color: #f4c430;

    border-radius: 50%;

    animation:
        reader-spinner 0.8s linear infinite;
}


@keyframes reader-spinner {

    to {
        transform: rotate(360deg);
    }

}


/* ============================================================
   17. READER FOOTER
   ============================================================ */

.reader-footer {
    flex: 0 0 auto;

    display: grid;
    grid-template-columns: 50px 1fr 50px;
    align-items: center;

    gap: 8px;

    width: 100%;

    padding:
        8px
        10px
        calc(8px + env(safe-area-inset-bottom));

    background: #111111;

    color: #ffffff;

    border-top: 1px solid rgba(255, 255, 255, 0.08);
}


.reader-footer__button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    background: transparent;

    color: #ffffff;

    border-radius: 50%;

    font-size: 20px;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        opacity 0.2s ease;
}


.reader-footer__button:hover {
    background: rgba(255, 255, 255, 0.08);
}


.reader-footer__button:active {
    transform: scale(0.92);
}


.reader-footer__button:disabled {
    opacity: 0.28;

    cursor: default;

    background: transparent;
}


.reader-footer__button.is-busy {
    opacity: 0.45;
}


/* ============================================================
   17.1 READER PROGRESS AREA
   ============================================================ */

.reader-footer__progress {
    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    width: 100%;
    min-width: 0;

    gap: 4px;
}


/* ============================================================
   17.2 PAGE INDICATOR
   ============================================================ */

.reader-footer__page-text {
    display: block;

    min-height: 13px;

    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;

    letter-spacing: 0.01em;

    color: rgba(255, 255, 255, 0.78);

    white-space: nowrap;

    text-align: center;

    font-variant-numeric:
        tabular-nums;

    -webkit-font-smoothing: antialiased;
}


/* ============================================================
   17.3 PROGRESS TRACK
   ============================================================ */

.reader-footer__progress-track {
    width: 100%;
    max-width: 280px;
    height: 3px;

    overflow: hidden;

    background: rgba(255, 255, 255, 0.14);

    border-radius: 999px;
}


/* ============================================================
   17.4 PROGRESS VALUE
   ============================================================ */

.reader-footer__progress-value {
    width: 0;
    height: 100%;

    background: #f4c430;

    border-radius: inherit;

    transition:
        width 0.25s ease;
}


/* ============================================================
   17.5 PERCENTUAL
   ============================================================ */

#reader-progress-text {
    display: block;

    min-height: 12px;

    font-size: 9px;
    line-height: 1.2;
    font-weight: 700;

    color: rgba(255, 255, 255, 0.45);

    font-variant-numeric:
        tabular-nums;

    text-align: center;
}


/* ============================================================
   18. READER SETTINGS
   ============================================================ */

.reader-settings {
    position: fixed;
    inset: auto 0 0;

    z-index: 150;

    width: 100%;

    padding:
        20px
        20px
        calc(20px + env(safe-area-inset-bottom));

    background: #1b1b1b;

    color: #ffffff;

    border-top:
        1px solid rgba(255, 255, 255, 0.08);

    border-radius:
        20px
        20px
        0
        0;

    box-shadow:
        0 -20px 50px rgba(0, 0, 0, 0.35);
}


.reader-settings__header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 24px;
}


.reader-settings__header h2 {
    font-size: 18px;
    font-weight: 900;
}


.reader-settings__header button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    background: rgba(255, 255, 255, 0.07);

    color: #ffffff;

    border-radius: 50%;

    font-size: 22px;
}


.reader-settings__content {
    display: flex;
    flex-direction: column;

    gap: 22px;
}


.reader-setting {
    display: flex;
    flex-direction: column;

    gap: 10px;

    font-size: 13px;
    font-weight: 700;
}


.reader-setting__controls {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;
}


.reader-setting__controls button {
    min-height: 40px;

    padding: 0 14px;

    background: #292929;

    color: #ffffff;

    border:
        1px solid rgba(255, 255, 255, 0.08);

    border-radius: 8px;

    font-size: 12px;
    font-weight: 800;
}


.reader-setting__controls button:hover {
    background: #343434;
}


.reader-setting__controls button:active {
    transform: scale(0.97);
}


/* ============================================================
   19. FOCUS
   ============================================================ */

button:focus-visible {
    outline: 2px solid #f4c430;
    outline-offset: 3px;
}


/* ============================================================
   20. TABLET
   ============================================================ */

@media (min-width: 600px) {

    .screen--library {
        padding:
            32px
            32px
            50px;
    }


    .library-books {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }


    .book-card {
        grid-template-columns: 150px minmax(0, 1fr);

        max-width: none;

        margin: 0;

        border-radius: 18px;
    }


    .book-card__cover {
        position: relative;

        width: 100%;
        height: 100%;

        min-width: 0;
        min-height: 0;

        display: flex;
        align-items: center;
        justify-content: center;

        background: #090909;

        overflow: hidden;
    }


    .book-card__cover img {
        display: block;

        width: auto;
        height: 100%;

        max-width: 100%;
        max-height: 100%;

        object-fit: contain;

        object-position: center;

        background: #0b0b0b;
    }


    .book-card__content {
        justify-content: center;

        padding: 18px;
    }


    .book-card__title {
        font-size: 22px;
    }


    .button--primary {
        width: 100%;

        min-width: 0;
        min-height: 44px;

        margin-top: 10px;
    }


    .reader-footer__page-text {
        font-size: 10px;
    }


    .reader-footer__progress-track {
        max-width: 340px;
    }


    .login-screen,
    .register-screen {
        padding:
            40px
            28px
            calc(40px + env(safe-area-inset-bottom));
    }


    .login-card,
    .register-card {
        padding: 38px;
    }

}


/* ============================================================
   21. DESKTOP
   ============================================================ */

@media (min-width: 1024px) {

    .app-header {
        padding:
            14px
            40px;
    }


    .app-header__brand {
    justify-content: flex-start;

    width: 1180px;
    max-width: calc(100% - 80px);

    margin: 0 auto;

    padding-left: 40px;
	}


    .app-header__logout {
        margin-left: auto;
    }


    .screen--library {
        padding:
            52px
            40px
            70px;
    }


    .library-header {
        margin-bottom: 30px;
    }


    .library-books {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 20px;
    }


    .book-card {
        grid-template-columns: 180px minmax(0, 1fr);

        max-width: none;

        border-radius: 20px;
    }


    .book-card__content {
        padding: 20px;
    }


    .book-card__title {
        font-size: 24px;
    }


    .book-card__description {
        max-width: none;

        font-size: 12px;
        line-height: 1.4;
    }


    .button--primary {
        width: 100%;

        min-width: 0;
        min-height: 44px;

        margin-top: 10px;
    }


    /* ========================================================
       LEITOR DESKTOP
       ======================================================== */

    .screen--reader {
        background: #eae7df;
    }


    .reader-container {
        display: flex;

        align-items: center;
        justify-content: center;

        width: 100%;
        height: 100%;

        background: #eae7df;
    }


    .epub-viewer {
        width: 100%;
        height: 100%;

        min-width: 0;
        min-height: 0;

        background: #eae7df;

        box-shadow: none;
    }


    .reader-footer {
        grid-template-columns:
            56px
            minmax(260px, 1fr)
            56px;

        padding:
            8px
            20px
            calc(8px + env(safe-area-inset-bottom));
    }


    .reader-footer__progress {
        gap: 4px;
    }


    .reader-footer__page-text {
        font-size: 11px;
    }


    .reader-footer__progress-track {
        max-width: 420px;
    }


    #reader-progress-text {
        font-size: 9px;
    }


    /* ========================================================
       AUTH DESKTOP
       ======================================================== */

    .login-card,
    .register-card {
        max-width: 470px;

        padding: 42px;
    }


    .login-brand,
    .register-brand {
        margin-bottom: 34px;
    }


    .login-header,
    .register-header {
        margin-bottom: 30px;
    }


    .login-header__description,
    .register-header__description {
        font-size: 13px;
    }

}


/* ============================================================
   21.5 MOBILE
   ============================================================ */

@media (max-width: 599px) {

    /*
     * ========================================================
     * AUTENTICAÇÃO MOBILE
     * ========================================================
     */

    .login-screen,
    .register-screen {
        align-items: flex-start;

        padding:
            calc(28px + env(safe-area-inset-top))
            14px
            calc(24px + env(safe-area-inset-bottom));

        overflow-y: auto;
    }


    .login-card,
    .register-card {
        width: 100%;

        max-width: 430px;

        margin: auto;

        padding:
            26px
            18px;

        border-radius: 18px;
    }


    .login-brand,
    .register-brand {
        margin-bottom: 25px;
    }


    .login-brand__logo,
    .register-brand__logo,
    .login-brand__pro,
    .register-brand__pro {
        font-size: 17px;
    }


    .login-header,
    .register-header {
        margin-bottom: 22px;
    }


    .login-header__eyebrow,
    .register-header__eyebrow {
        margin-bottom: 6px;

        font-size: 8px;
    }


    .login-header__title,
    .register-header__title {
        font-size: 27px;

        line-height: 1.04;
    }


    .login-header__description,
    .register-header__description {
        margin-top: 9px;

        font-size: 12px;
        line-height: 1.45;
    }


    .login-form,
    .register-form {
        gap: 13px;
    }


    .login-field,
    .register-field {
        gap: 6px;
    }


    .login-field__label,
    .register-field__label {
        font-size: 10px;
    }


    .login-field__input,
    .register-field__input {
        min-height: 48px;

        padding:
            0
            13px;

        border-radius: 9px;

        font-size: 13px;
    }


    .login-submit,
    .register-submit {
        min-height: 50px;

        border-radius: 9px;

        font-size: 12px;
    }


    .login-link {
        font-size: 10px;
    }


    .login-register {
        margin-top: 22px;
        padding-top: 20px;
    }


    .login-register p {
        font-size: 10px;
    }


    .login-register__button,
    .register-back__button {
        font-size: 11px;
    }


    .login-footer,
    .register-footer {
        margin-top: 20px;
    }


    .login-footer span,
    .register-footer span {
        font-size: 8px;
    }


    /*
     * ========================================================
     * BIBLIOTECA MOBILE
     * ========================================================
     */

    .library-books {
        grid-template-columns: 1fr;

        gap: 16px;
    }


    .book-card {
        display: flex;
        flex-direction: column;

        margin: 0;
    }


    .app-header {
        padding:
            calc(7px + env(safe-area-inset-top))
            12px
            7px;

        gap: 10px;
    }


    .app-header__brand {
        gap: 4px;
    }
	
	
	.app-header__user {

    max-width: 150px;

    padding:
        6px 8px;

    gap: 6px;

}


.app-header__user-icon {

    width: 23px;

    height: 23px;

    flex-basis: 23px;

    font-size: 12px;

}


.app-header__user-name {

    max-width: 95px;

    font-size: 11px;

}


    .app-header__logo,
    .app-header__brand-pro {
        font-size: 16px;
    }


    .app-header__logout {
        min-height: 32px;

        padding:
            0
            11px;

        border-radius: 7px;

        font-size: 9px;
    }


    .screen--library {
        padding:
            18px
            14px
            calc(24px + env(safe-area-inset-bottom));
    }


    .library-header {
        margin-bottom: 16px;
    }


    .library-header__eyebrow {
        margin-bottom: 3px;

        font-size: 9px;

        letter-spacing: 0.14em;
    }


    .library-header__title {
        font-size: 28px;

        line-height: 1;
    }


    .book-card {
        border-radius: 17px;
    }


    .book-card__cover img {
        width: 100%;
        height: auto;

        aspect-ratio: 1 / 1;

        object-fit: contain;

        background: #0b0b0b;
    }


    .book-card__content {
        padding:
            13px
            14px
            14px;
    }


    .book-card__category {
        margin-bottom: 4px;

        font-size: 8px;

        letter-spacing: 0.13em;
    }


    .book-card__title {
        font-size: 20px;

        line-height: 1.06;
    }


    .book-card__description {
        margin-top: 5px;

        font-size: 12px;

        line-height: 1.3;
    }


    .book-card__progress {
        margin-top: 10px;
    }


    .book-card__progress-track {
        height: 3px;
    }


    .book-card__progress-text {
        margin-top: 4px;

        font-size: 9px;
    }


    .button--primary {
        min-height: 44px;

        margin-top: 9px;

        border-radius: 9px;

        font-size: 12px;
    }


    /* ========================================================
       LEITOR MOBILE
       ======================================================== */

    .screen--reader {
        width: 100%;
        height: 100dvh;
    }


    .reader-container {
        width: 100%;
        height: 100%;

        background: #eae7df;
    }


    .epub-viewer {
        width: 100%;
        height: 100%;

        background: #f7f5ef;
    }


    .epub-viewer iframe {
        width: 100% !important;
        height: 100% !important;
    }


    /* ========================================================
       RODAPÉ MOBILE
       ======================================================== */

    .reader-footer {
        grid-template-columns:
            46px
            minmax(0, 1fr)
            46px;

        gap: 4px;

        padding:
            6px
            6px
            calc(6px + env(safe-area-inset-bottom));
    }


    .reader-footer__button {
        width: 40px;
        height: 40px;

        font-size: 19px;
    }


    .reader-footer__progress {
        gap: 3px;
    }


    .reader-footer__page-text {
        font-size: 9px;

        min-height: 11px;
    }


    .reader-footer__progress-track {
        width: 100%;
        max-width: 240px;

        height: 3px;
    }


    #reader-progress-text {
        font-size: 8px;

        min-height: 10px;
    }

}


/* ============================================================
   22. REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }

}

/* ============================================================
   AMOSTRA — FINAL DA LEITURA
   ============================================================ */

.sample-limit-overlay {
    position: fixed;

    inset: 0;

    z-index: 99999;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 24px;

    background:
        rgba(0, 0, 0, 0.68);

    backdrop-filter:
        blur(6px);

    animation:
        sampleLimitFadeIn
        0.25s ease;
}


.sample-limit-card {
    width: min(440px, 100%);

    padding: 34px 28px;

    border-radius: 18px;

    background:
        #ffffff;

    box-shadow:
        0 25px 80px
        rgba(0, 0, 0, 0.28);

    text-align: center;

    animation:
        sampleLimitCardIn
        0.3s ease;
}


.sample-limit-card h2 {
    margin:
        0 0 14px;

    color:
        #111111;

    font-size:
        24px;

    line-height:
        1.25;
}


.sample-limit-card p {
    margin:
        0 0 10px;

    color:
        rgba(0, 0, 0, 0.65);

    font-size:
        15px;

    line-height:
        1.6;
}


.sample-limit-card
.sample-limit-question {
    margin-top:
        18px;

    margin-bottom:
        22px;

    color:
        #222222;

    font-weight:
        700;
}


.sample-limit-actions {
    display:
        flex;

    flex-direction:
        column;

    gap:
        10px;
}


.sample-limit-purchase {
    margin-top:
        0;

    background:
        #f4c430;

    color:
        #111111;
}


.sample-limit-purchase:hover {
    background:
        #ffd54f;
}


.sample-limit-library {
    width:
        100%;

    min-height:
        50px;

    border:
        1px solid
        #dddddd;

    background:
        #ffffff;

    color:
        #333333;

    cursor:
        pointer;
}


.sample-limit-library:hover {
    background:
        #f5f5f5;
}


@keyframes sampleLimitFadeIn {

    from {

        opacity:
            0;

    }

    to {

        opacity:
            1;

    }

}


@keyframes sampleLimitCardIn {

    from {

        opacity:
            0;

        transform:
            translateY(12px)
            scale(0.98);

    }

    to {

        opacity:
            1;

        transform:
            translateY(0)
            scale(1);

    }

}