.book-admin-shell,
.book-list-shell,
.book-public-shell,
.book-reader-shell,
.book-edit-shell {
    margin-top: 18px;
}

.book-form-grid {
    align-items: start;
}

.book-form-actions {
    justify-content: flex-start;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #e6ecd5;
}

.book-form-actions .btn {
    min-width: 132px;
    border-radius: 10px;
    padding: 9px 16px;
    font-weight: 700;
}

.book-save-btn {
    background: linear-gradient(135deg, #0f6f7d 0%, #0b5d69 100%);
    border: 1px solid #0d5762;
    color: #fff !important;
}

.book-save-btn:hover,
.book-save-btn:focus {
    background: linear-gradient(135deg, #0d6572 0%, #0a4f59 100%);
    color: #fff !important;
}

.book-cancel-btn {
    background: #fff;
    border: 1px solid #d1ddae;
    color: #56663d !important;
}

.book-edit-current-files {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding-top: 4px;
}

.book-edit-current-files > div {
    display: grid;
    gap: 8px;
}

.book-edit-current-files strong {
    color: #31411f;
    font-size: 14px;
}

.book-edit-cover {
    width: 86px;
    height: 116px;
    overflow: hidden;
    border: 1px solid #d7e2c8;
    border-radius: 10px;
    background: #f8fbf4;
}

.book-edit-cover img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.book-current-file-link {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
}

@media (max-width: 767px) {
    .book-edit-current-files {
        flex-direction: column;
    }
}

.book-list-head,
.book-public-head {
    margin-bottom: 18px;
}

.book-search-shell {
    margin: 0 0 20px;
    padding: 18px 20px;
    border: 1px solid #dbe5cf;
    border-radius: 18px;
    background:
        radial-gradient(circle at top left, rgba(139, 170, 38, 0.12), transparent 32%),
        linear-gradient(135deg, #ffffff 0%, #f7fbf1 100%);
    box-shadow: 0 12px 28px rgba(31, 42, 55, 0.06);
}

.book-search-shell-public {
    background:
        radial-gradient(circle at top left, rgba(15, 110, 168, 0.1), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.book-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
    gap: 18px;
    align-items: end;
}

.book-search-copy h4 {
    margin: 0 0 6px;
    font-size: 20px;
    color: #233342;
}

.book-search-copy p {
    margin: 0;
    color: #627285;
    line-height: 1.8;
}

.book-search-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.book-search-input {
    height: 48px;
    border-radius: 14px;
    border: 1px solid #d0dcc1;
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(26, 36, 48, 0.04);
}

.book-search-input:focus {
    border-color: #82a62c;
    box-shadow: 0 0 0 3px rgba(130, 166, 44, 0.12);
}

.book-search-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.book-search-btn,
.book-search-reset {
    min-width: 120px;
    height: 48px;
    border-radius: 14px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.book-search-btn {
    background: linear-gradient(135deg, #0f6ea8 0%, #145881 100%);
    border: 1px solid #145372;
    color: #fff !important;
}

.book-search-btn:hover,
.book-search-btn:focus {
    background: linear-gradient(135deg, #115f8d 0%, #124a6d 100%);
    color: #fff !important;
}

.book-search-reset {
    background: #fff;
    border: 1px solid #d4dfc6;
    color: #566972 !important;
}

.book-search-meta {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e1ead5;
    color: #5a6b5f;
    font-size: 13px;
    line-height: 1.8;
}

.book-search-meta strong {
    color: #294255;
}

.book-list-head h3,
.book-public-head h3 {
    margin: 0 0 6px;
    font-size: 22px;
    color: #25323d;
}

.book-list-head p,
.book-public-head p {
    margin: 0;
    color: #687586;
    line-height: 1.8;
}

.book-admin-table th,
.book-admin-table td {
    vertical-align: middle !important;
}

.book-cover-cell {
    width: 96px;
}

.book-cover-thumb {
    width: 68px;
    height: 92px;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #d7e2c8;
    background: #f8fbf4;
}

.book-cover-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.book-action-cell {
    white-space: nowrap;
}

.book-action-cell .btn {
    margin-bottom: 6px;
}

.book-delete-form {
    display: inline-block;
    margin-right: 4px;
}

.book-pagination,
.book-public-pagination {
    margin-top: 8px;
}

.book-public-grid {
    margin-bottom: 12px;
}

.book-public-card {
    height: 100%;
    border: 1px solid #d8e2cf;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbf4 100%);
    box-shadow: 0 10px 24px rgba(31, 42, 55, 0.08);
    margin-bottom: 20px;
}

.book-public-cover-link {
    display: block;
    text-decoration: none;
}

.book-public-cover {
    height: 280px;
    background: linear-gradient(180deg, #eef5e0 0%, #dfe8ca 100%);
    overflow: hidden;
}

.book-public-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.book-public-body {
    padding: 20px;
}

.book-public-badge {
    background: #e8f0cf;
    color: #516e1a;
}

.book-public-title {
    margin: 0 0 12px;
    font-size: 20px;
    line-height: 1.6;
}

.book-public-title a {
    color: #22313f;
    text-decoration: none;
}

.book-public-title a:hover,
.book-public-title a:focus {
    color: #0f6ea8;
}

.book-public-meta {
    display: grid;
    gap: 8px;
    color: #556677;
    font-size: 13px;
    line-height: 1.8;
}

.book-public-meta strong {
    color: #253342;
}

.book-public-actions,
.book-reader-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.book-public-actions .btn,
.book-reader-actions .btn {
    min-width: 130px;
    border-radius: 10px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 700;
}

.book-read-btn {
    background: linear-gradient(135deg, #0f6ea8 0%, #135c8a 100%);
    border: 1px solid #11587f;
    color: #ffffff !important;
}

.book-read-btn:hover,
.book-read-btn:focus {
    background: linear-gradient(135deg, #115f8d 0%, #104d73 100%);
    color: #ffffff !important;
}

.book-download-btn {
    background: linear-gradient(135deg, #6f8f18 0%, #59740f 100%);
    border: 1px solid #516b10;
    color: #ffffff !important;
}

.book-download-btn:hover,
.book-download-btn:focus {
    background: linear-gradient(135deg, #627f14 0%, #4e670d 100%);
    color: #ffffff !important;
}

.book-reader-top {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
    margin-bottom: 20px;
    align-items: start;
}

.book-reader-cover {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #d7e2c8;
    background: #f8fbf4;
    box-shadow: 0 10px 24px rgba(31, 42, 55, 0.08);
}

.book-reader-cover img {
    width: 100%;
    height: auto;
    display: block;
}

.book-reader-copy h3 {
    margin: 0 0 14px;
    font-size: 28px;
    line-height: 1.6;
    color: #203140;
}

.book-reader-meta {
    display: grid;
    gap: 10px;
    font-size: 14px;
    line-height: 1.8;
    color: #58697b;
}

.book-reader-meta strong {
    color: #243342;
}

.book-reader-frame-wrap {
    border: 1px solid #dbe5cd;
    border-radius: 18px;
    overflow: hidden;
    background: #eef3e5;
    min-height: 720px;
}

.book-reader-frame {
    width: 100%;
    min-height: 720px;
    border: 0;
    display: block;
    background: #fff;
}

.book-reader-help {
    margin-top: 12px;
}

@media (max-width: 991px) {
    .book-search-form {
        grid-template-columns: 1fr;
    }

    .book-search-controls {
        grid-template-columns: 1fr;
    }

    .book-reader-top {
        grid-template-columns: 1fr;
    }

    .book-reader-cover {
        max-width: 260px;
        margin: 0 auto;
    }
}

@media (max-width: 767px) {
    .book-form-actions,
    .book-public-actions,
    .book-reader-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .book-form-actions .btn,
    .book-public-actions .btn,
    .book-reader-actions .btn {
        width: 100%;
        min-width: 0;
        text-align: center;
    }

    .book-search-shell {
        padding: 16px;
        border-radius: 16px;
    }

    .book-search-actions {
        flex-direction: column;
    }

    .book-search-btn,
    .book-search-reset {
        width: 100%;
    }

    .book-action-cell {
        white-space: normal;
    }

    .book-public-cover {
        height: 240px;
    }

    .book-reader-copy h3 {
        font-size: 24px;
    }

    .book-reader-frame-wrap,
    .book-reader-frame {
        min-height: 520px;
    }
}
