* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(150deg, #d6f5f2 0%, #e8fbff 45%, #dbfff2 100%);
    color: #0e3b47;
}

.page-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    background: linear-gradient(120deg, #117f8b 0%, #1899a7 50%, #20b398 100%);
    color: #f2ffff;
    padding: 18px 0;
    border-bottom: 2px solid #0f7480;
}

.header-inner,
.content,
.footer-inner {
    width: 50vw;
    min-width: 320px;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 22px;
    padding-right: 22px;
}

.brand-line {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 8px;
    gap: 10px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-header h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.3;
}

.content {
    flex: 1;
    margin-top: 24px;
    margin-bottom: 24px;
    padding-top: 20px;
    padding-bottom: 28px;
    background: #ffffff;
    border: 1px solid #87d8d3;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(16, 91, 103, 0.12);
}

.section-title {
    margin: 14px 0 10px;
    color: #0b6070;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.btn,
.dev-btn,
button {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #1b99a6;
    background: #e8feff;
    color: #086573;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn:hover,
.dev-btn:hover,
button:hover {
    background: #cdf6f9;
    transform: translateY(-1px);
}

.dev-btn {
    background: #0f5f6d;
    color: #ebffff;
    border-color: #6ad8dc;
}

.main-btn {
    background: #e6fdff;
    color: #0f5f6d;
    border-color: #8de3e7;
}

.book-list {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.book-item {
    border: 1px solid #b7ebed;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    background: #f8ffff;
}

.book-title {
    margin: 0 0 8px;
}

.hint {
    color: #2c7b84;
}

.message {
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
}

.message.success {
    background: #dcfff0;
    color: #0f6745;
    border: 1px solid #84d8b1;
}

.message.error {
    background: #ffe8ec;
    color: #7b1a2f;
    border: 1px solid #f2a8b6;
}

form {
    display: grid;
    gap: 10px;
}

label {
    display: grid;
    gap: 6px;
    color: #0c5d6a;
    font-weight: 600;
}

input[type="text"],
input[type="number"],
input[type="file"],
select {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #95d9dc;
    border-radius: 8px;
    font-size: 14px;
    color: #0b4d58;
}

.pdf-frame {
    width: 100%;
    height: 70vh;
    border: 1px solid #8dd6d8;
    border-radius: 10px;
}

.site-footer {
    margin-top: auto;
    border-top: 1px solid #c4eced;
    background: #f5fefe;
    color: #0f5962;
    padding: 16px 0 20px;
    border-top: 2px solid #9fdde0;
}

.site-footer h3 {
    margin: 0 0 10px;
}

.site-footer p {
    margin: 5px 0;
}

.site-footer a {
    color: #0a6c76;
}

.book-item-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.book-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.inline-form {
    display: inline;
}

.btn-small {
    padding: 7px 10px;
    font-size: 13px;
}

.btn-danger {
    background: #ffe8ec;
    border-color: #f2a8b6;
    color: #7b1a2f;
}

.btn-danger:hover {
    background: #ffdbe1;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}