* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
}

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

    background: #202124;
}


/* LOGIN */

.login-page {
    width: 100%;
    min-height: 100vh;

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

    padding: 24px;

    background: #f3f4f6;
}

.login-box {
    width: 100%;
    max-width: 420px;

    padding: 36px;

    border-radius: 10px;

    background: white;

    box-shadow:
        0 5px 30px
        rgba(0, 0, 0, .12);
}

.logo-title {
    font-size: 25px;
    font-weight: 700;
    text-align: center;

    margin-bottom: 7px;
}

.login-subtitle {
    text-align: center;

    color: #666;

    margin-bottom: 30px;
}

.login-box label {
    display: block;

    margin-bottom: 7px;

    font-weight: 600;
}

.login-box input[type="password"] {
    width: 100%;
    height: 48px;

    padding: 0 13px;

    border: 1px solid #bbb;
    border-radius: 6px;

    font-size: 18px;

    margin-bottom: 18px;
}

.login-box button {
    width: 100%;
    height: 48px;

    border: 0;
    border-radius: 6px;

    background: #262626;
    color: white;

    font-size: 17px;

    cursor: pointer;
}

.login-error {
    padding: 10px 13px;

    margin-bottom: 18px;

    border-radius: 5px;

    background: #ffe7e7;
    color: #a00000;
}


/* VIEWER */

#pdf-app {
    width: 100vw;
    height: 100vh;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: #202124;
}


.toolbar {
    flex: 0 0 58px;

    width: 100%;

    display: grid;

    grid-template-columns:
        1fr
        auto
        1fr;

    align-items: center;

    gap: 15px;

    padding:
        7px
        14px;

    background: #303134;

    color: white;

    z-index: 10;
}


.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;

    gap: 7px;
}


.toolbar-right {
    justify-content: flex-end;
}


.toolbar-title {
    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

    font-weight: 600;
}


.toolbar button {
    height: 40px;

    min-width: 42px;

    padding: 0 11px;

    border: 0;
    border-radius: 5px;

    background: white;
    color: #222;

    font-size: 16px;

    cursor: pointer;
}


.toolbar button:disabled {
    opacity: .35;

    cursor: default;
}


.page-control {
    display: flex;
    align-items: center;

    gap: 6px;
}


#page-number {
    width: 58px;
    height: 40px;

    text-align: center;

    border: 0;
    border-radius: 5px;

    font-size: 15px;
}


.logout {
    padding: 10px;

    color: white;

    text-decoration: none;

    font-size: 14px;
}


#pdf-stage {
    position: relative;

    flex: 1 1 auto;

    min-height: 0;

    width: 100%;

    padding: 12px;

    overflow: auto;

    display: flex;

    justify-content: center;

    align-items: flex-start;

    background: #202124;

    overscroll-behavior: contain;

    -webkit-overflow-scrolling: touch;
}


#pdf-canvas {
    display: block;

    max-width: none;

    background: white;

    box-shadow:
        0 2px 18px
        rgba(0, 0, 0, .55);
}


#loading {
    position: absolute;

    top: 80px;

    color: white;

    font-size: 17px;
}


/* FULLSCREEN */

#pdf-app:fullscreen {
    width: 100vw;
    height: 100vh;
}


/* TABLET */

@media (max-width: 900px) {

    .toolbar-title {
        display: none;
    }

    .toolbar {
        grid-template-columns:
            auto
            1fr;
    }
}


/* SMARTPHONE */

@media (max-width: 650px) {

    .toolbar {
        height: auto;

        min-height: 56px;

        display: flex;

        overflow-x: auto;

        padding: 7px;

        scrollbar-width: none;
    }

    .toolbar::-webkit-scrollbar {
        display: none;
    }

    .toolbar-left,
    .toolbar-right {
        flex: 0 0 auto;
    }

    .toolbar button {
        flex: 0 0 auto;

        min-width: 40px;

        height: 40px;
    }

    .logout {
        flex: 0 0 auto;
    }

    #pdf-stage {
        justify-content: flex-start;

        padding: 7px;
    }

}
