/* =============================================
   КНИГА ПАМЯТИ — стили для простых страниц
   (в стиле книги)
   ============================================= */

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

body.book-page {
    font-family: 'Georgia', serif;
    background-color: #3a2518;
    background-image:
        radial-gradient(circle, rgba(0,0,0,0) 0%, rgba(0,0,0,0.85) 100%),
        url('/assets/img/wood.png');
    background-repeat: repeat, repeat;
    background-size: auto, auto;
    background-attachment: fixed, fixed;
    color: #eaddc5;
    min-height: 100vh;
}

/* ---------- ШАПКА ---------- */
.topbar {
    background: rgba(26, 16, 8, 0.92);
    border-bottom: 2px solid #6b4733;
    box-shadow: 0 4px 14px rgba(0,0,0,0.6);
    position: sticky; top: 0; z-index: 100;
}
.topbar-inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px; flex-wrap: wrap; gap: 10px;
}
.brand {
    color: #e5c158; font-size: 18px; text-decoration: none;
    font-weight: bold; letter-spacing: 1px;
    padding: 8px 14px; border: 1px solid #6b4733;
    border-radius: 4px; background: rgba(0,0,0,0.4);
    transition: background 0.2s;
}
.brand:hover { background: rgba(107,71,51,0.7); }
.nav { display: flex; flex-wrap: wrap; gap: 8px; }
.nav a {
    color: #e5c158; text-decoration: none;
    padding: 8px 14px; border: 1px solid #6b4733;
    border-radius: 4px; background: rgba(0,0,0,0.4);
    font-size: 14px; white-space: nowrap;
    transition: background 0.2s;
}
.nav a:hover { background: rgba(107,71,51,0.7); }

/* ---------- ОСНОВНОЙ БЛОК ---------- */
.wrap {
    max-width: 1100px; margin: 30px auto 80px;
    padding: 0 20px;
}
.wrap h1 {
    font-size: 28px; text-transform: uppercase;
    text-align: center; color: #e5c158;
    border-bottom: 2px solid #6b4733;
    padding-bottom: 12px; margin-bottom: 24px;
    letter-spacing: 2px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}
.wrap h2, .wrap h3 { color: #e5c158; margin-bottom: 14px; }

/* ---------- КАРТОЧКА (как страница книги) ---------- */
.form-card {
    background-color: #dcb881;
    color: #1a110b;
    border: 3px solid #8a6d3b;
    border-radius: 4px;
    padding: 36px 34px;
    max-width: 720px;
    margin: 0 auto;
    box-shadow:
        inset 0 0 60px rgba(139,90,43,0.25),
        0 20px 40px rgba(0,0,0,0.7);
    background-image:
        linear-gradient(90deg,
            rgba(40,15,0,0.5) 0%,
            rgba(80,40,10,0.15) 5%,
            rgba(255,255,255,0.15) 20%,
            rgba(255,255,255,0) 50%,
            rgba(139,90,43,0.08) 85%,
            rgba(90,50,15,0.3) 100%);
}

/* Заголовки внутри карточки — тёмные (для читаемости на кремовом фоне) */
.form-card h1,
.form-card h2,
.form-card h3 {
    color: #2b1d16;
}

.form-card p {
    font-size: 16px; line-height: 1.7;
    text-align: justify; text-indent: 30px;
    margin-bottom: 12px;
}
.form-card p + p { margin-top: 12px; }
.form-card ol, .form-card ul { margin-left: 24px; line-height: 1.8; }
.form-card li { margin-bottom: 6px; }
.form-card label {
    display: block; margin: 14px 0 6px;
    font-weight: bold; font-size: 14px;
    color: #2b1d16;
}
.form-card input[type=text],
.form-card input[type=email],
.form-card input[type=password],
.form-card input[type=tel],
.form-card input[type=date],
.form-card input[type=number],
.form-card select,
.form-card textarea,
.form-card input[type=file] {
    width: 100%; padding: 10px 12px;
    border: 1px solid #8a6d3b; border-radius: 4px;
    font-size: 15px; font-family: inherit;
    background: #f4e8cf; color: #2b1d16;
}
.form-card textarea { min-height: 140px; resize: vertical; }
.form-card .hint {
    font-size: 12px; color: #7a6a52; margin-top: 4px;
}

/* ---------- КНОПКИ (улучшенная читаемость) ---------- */
.btn {
    display: inline-block;
    background: linear-gradient(to bottom, #a85528, #6b2f14);
    color: #ffffff;
    border: 1px solid #3a1c0c;
    padding: 11px 22px;
    border-radius: 5px;
    font-size: 15px;
    font-family: inherit;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 3px 8px rgba(0,0,0,0.5);
    text-shadow: 0 1px 3px rgba(0,0,0,0.7);
    transition: filter 0.2s;
}
.btn:hover { filter: brightness(1.15); }
.btn-secondary {
    background: linear-gradient(to bottom, #8a7554, #52432c);
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}
.btn-danger {
    background: linear-gradient(to bottom, #b83030, #7a1818);
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ---------- ССЫЛКИ ---------- */
.wrap a { color: #8a1c1c; text-decoration: none; }
.wrap a:hover { text-decoration: underline; }

/* ---------- СООБЩЕНИЯ ---------- */
.flash {
    padding: 12px 16px; border-radius: 6px;
    margin-bottom: 16px; font-size: 15px;
    border: 1px solid;
}
.flash-error { background: #5a1c1c; color: #f8d7da; border-color: #8a1c1c; }
.flash-success { background: #1c4a1c; color: #d4edda; border-color: #2e6b2e; }

/* ---------- ТАБЛИЦЫ ---------- */
table.list {
    width: 100%; border-collapse: collapse;
    background: #dcb881; color: #1a110b;
    border: 2px solid #8a6d3b; border-radius: 4px;
    overflow: hidden;
}
table.list th, table.list td {
    border: 1px solid #a67c52;
    padding: 10px 12px; text-align: left;
    font-size: 14px; vertical-align: top;
}
table.list th {
    background: #2b1d16; color: #e5c158;
    text-transform: uppercase; font-size: 13px;
    letter-spacing: 1px;
}

/* ---------- БЕЙДЖИ ---------- */
.badge {
    display: inline-block; padding: 3px 10px;
    border-radius: 10px; font-size: 12px;
    background: #e8dcc3; color: #2b1d16;
}
.badge.published { background: #cfe6cf; color: #155724; }
.badge.moderation, .badge.revision { background: #fff3cd; color: #856404; }
.badge.rejected { background: #f8d7da; color: #721c24; }
.badge.draft { background: #e2e3e5; color: #41464b; }
.badge.unpublished { background: #f0e0cc; color: #6b4f1d; }
.muted { color: #b89b7a; font-size: 13px; }
.row-actions a { margin-right: 10px; font-size: 14px; }
.row-actions form { display: inline-block; margin-right: 6px; }
.row-actions .btn { margin-bottom: 4px; }

/* ---------- ПОДВАЛ ---------- */
.foot {
    background: rgba(26, 16, 8, 0.92);
    border-top: 2px solid #6b4733;
    color: #b89b7a; text-align: center;
    padding: 16px; font-size: 13px;
    letter-spacing: 1px;
}

/* ---------- АДАПТИВ ---------- */
@media (max-width: 700px) {
    .wrap h1 { font-size: 22px; }
    .form-card { padding: 24px 20px; }
    .topbar-inner { padding: 10px 14px; }
    .brand { font-size: 15px; padding: 6px 10px; }
    .nav a { padding: 6px 10px; font-size: 13px; }
    table.list th, table.list td { font-size: 12px; padding: 6px 8px; }
    .btn { padding: 8px 14px; font-size: 13px; }
    .btn-sm { padding: 5px 10px; font-size: 12px; }
}