:root {
    --bg: #f5f6f2;
    --surface: #ffffff;
    --ink: #18211b;
    --muted: #6d776f;
    --line: #dde2dc;
    --accent: #356d4b;
    --accent-dark: #28583b;
    --accent-soft: #e7f0e9;
    --warning: #a46a18;
    --danger: #a83b3b;
    --shadow: 0 18px 45px rgba(26, 43, 32, .08);
    --photo-placeholder-start: #e8ece7;
    --photo-placeholder-highlight: #f7f9f6;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}
a { color: inherit; }
.topbar {
    height: 68px;
    padding: 0 max(24px, calc((100vw - 1380px) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #15241a;
    color: white;
}
.brand, .login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 750;
}
.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #d9e7cf;
    color: #234b34;
    font-family: Georgia, serif;
    font-weight: 800;
}
.brand-mark.large { width: 48px; height: 48px; border-radius: 14px; font-size: 23px; }
.operator { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.operator a { margin-left: 14px; color: #c6d2c8; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #79c28e; }
.shell { max-width: 1380px; margin: 0 auto; padding: 36px 24px 60px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 26px; }
.page-heading.compact { align-items: center; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(28px, 3vw, 42px); letter-spacing: -.04em; }
h2 { letter-spacing: -.02em; }
.page-heading p { margin-bottom: 0; color: var(--muted); }
.eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { padding: 20px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.stat span { display: block; color: var(--muted); font-size: 13px; }
.stat strong { display: block; margin-top: 8px; font-size: 30px; letter-spacing: -.04em; }
.stat small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.stat.accent { background: var(--accent); color: white; border-color: var(--accent); }
.stat.accent span { color: #d7e7dc; }
.stat.remaining { background: #fff8eb; border-color: #ead8b6; }
.mode-switch {
    width: fit-content;
    display: flex;
    gap: 4px;
    margin: 0 0 18px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #e9ece7;
}
.mode-switch a {
    padding: 9px 16px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
}
.mode-switch a.active {
    background: white;
    color: var(--ink);
    box-shadow: 0 3px 10px rgba(24, 33, 27, .08);
}
.mode-description {
    margin: -8px 0 18px;
    color: var(--muted);
    font-size: 13px;
}
.filters-mode {
    margin-left: auto;
    align-self: center;
}
.filters-mode .mode-switch { margin: 0; }
.filters-mode .mode-description {
    margin: 6px 4px 0;
    text-align: right;
    font-size: 11px;
}
.filters {
    display: flex;
    align-items: end;
    gap: 12px;
    margin: 18px 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #eef1ec;
}
label span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
input, select, textarea {
    width: 100%;
    border: 1px solid #ccd3cd;
    border-radius: 10px;
    background: white;
    padding: 11px 12px;
    color: var(--ink);
    font: inherit;
    outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(53,109,75,.12); }
select { min-width: 180px; }
select:disabled { opacity: 1; background: #f7f8f5; color: var(--muted); cursor: not-allowed; }
.button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0 16px;
    font: inherit;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}
.button.primary { background: var(--accent); color: white; }
.button.primary:hover { background: var(--accent-dark); }
.button.secondary { background: #273b2e; color: white; }
.button.ghost { border-color: var(--line); background: white; color: var(--ink); }
.button svg { width: 16px; height: 16px; }
.panel { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 14px 18px; background: #f0f2ee; color: var(--muted); text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
td { padding: 16px 18px; border-top: 1px solid #ecefeb; }
td small { display: block; margin-top: 4px; color: var(--muted); }
.right { text-align: right; }
.row-link, .edit-link { color: var(--accent); font-weight: 750; text-decoration: none; }
.count-pill { display: inline-grid; min-width: 34px; height: 28px; place-items: center; border-radius: 20px; background: #eef1ed; font-weight: 750; }
.count-pill.verified { background: var(--accent-soft); color: var(--accent-dark); }
.count-pill.remaining { background: #fff1d8; color: #875a18; }
.badge { display: inline-flex; padding: 6px 10px; border-radius: 20px; font-size: 12px; font-weight: 800; }
.badge.open { background: var(--accent-soft); color: var(--accent-dark); }
.badge.closed { background: #ececeb; color: #666; }
.badge.archived { background: #eee8f5; color: #665078; }
.badge.large { padding: 9px 14px; }
.archived-row { background: #faf9fb; }
.breadcrumbs { display: flex; gap: 9px; margin-bottom: 24px; color: var(--muted); font-size: 13px; }
.breadcrumbs a { color: var(--accent); }
.batch-page-heading { margin-bottom: 14px; }
.batch-title-line { display: flex; align-items: center; gap: 12px; }
.batch-title-line h1 { margin: 0; }
.batch-title-line .badge { flex: none; }
.batch-control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}
.batch-actions { display: flex; flex: none; align-items: center; gap: 8px; }
.batch-status-form { display: flex; align-items: center; }
.batch-archive-form { display: flex; align-items: center; }
.batch-actions .button { min-height: 38px; gap: 7px; padding-inline: 14px; font-size: 12px; }
.batch-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.batch-progress-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, transform .12s ease;
}
.batch-progress-filter:hover { border-color: #aebdaf; transform: translateY(-1px); }
.batch-progress-filter.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(53,109,75,.13); }
.batch-progress span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.batch-progress strong { font-size: 17px; line-height: 1; }
.batch-progress .verified { border-color: #cde0d2; background: var(--accent-soft); }
.batch-progress .remaining { border-color: #ead8b6; background: #fff8eb; }
.batch-list-toolbar {
    min-height: 48px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    margin: 0 0 14px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}
.batch-selection-controls {
    order: 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.batch-select-all {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 9px;
    border-radius: 8px;
    cursor: pointer;
}
.batch-select-all:hover { background: #f0f3ef; }
.batch-select-all input {
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    accent-color: var(--accent);
    cursor: pointer;
}
.batch-select-all span {
    margin: 0;
    color: var(--ink);
    font-size: 12px;
    font-weight: 750;
}
.batch-bulk-menu-wrap { position: relative; }
.batch-bulk-toggle {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: white;
    color: var(--ink);
    cursor: pointer;
}
.batch-bulk-toggle:hover { border-color: #aebdaf; background: #f2f4f1; }
.batch-bulk-toggle svg { width: 19px; height: 19px; }
.batch-bulk-menu {
    width: 190px;
    position: absolute;
    left: 0;
    top: calc(100% + 7px);
    z-index: 20;
    display: grid;
    gap: 4px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: white;
    box-shadow: 0 16px 42px rgba(23, 38, 28, .18);
}
.batch-bulk-menu[hidden],
.batch-bulk-toggle[hidden] { display: none; }
.batch-bulk-menu > strong {
    padding: 7px 9px;
    color: var(--muted);
    font-size: 11px;
}
.batch-bulk-menu button {
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 8px;
    padding: 0 9px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}
.batch-bulk-menu button:hover { background: #f0f3ef; }
.batch-bulk-menu button.reject { color: var(--danger); }
.batch-bulk-menu button.approve { color: var(--accent-dark); }
.batch-bulk-menu button:disabled { opacity: .55; cursor: wait; }
.batch-bulk-menu svg { width: 16px; height: 16px; }
.batch-pagination.top {
    order: 1;
    width: fit-content;
    min-width: 0;
    display: inline-flex;
    grid-template-columns: none;
    align-items: center;
    gap: 3px;
    margin: 0;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 5px 16px rgba(26, 43, 32, .06);
}
.batch-pagination.top a {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 9px;
    border-radius: 7px;
    color: var(--ink);
    font-size: 11px;
    font-weight: 750;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}
.batch-pagination.top a:hover {
    background: var(--accent-soft);
    color: var(--accent-dark);
}
.batch-pagination.top a svg {
    width: 13px;
    height: 13px;
    stroke-width: 2;
}
.batch-pagination.top strong {
    min-width: 45px;
    padding: 0 5px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}
.batch-book-list { display: grid; gap: 16px; }
.batch-book-card {
    min-width: 0;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 10px;
    padding: 10px;
    border: 1px solid #dfe4de;
    border-radius: 20px;
    overflow: hidden;
    background: #f9faf7;
    box-shadow: 0 9px 30px rgba(23,38,28,.06);
    transition: border-color .16s ease, box-shadow .16s ease;
}
.batch-book-card:hover { border-color: #cbd4cb; box-shadow: 0 14px 38px rgba(23,38,28,.1); }
.batch-book-card.without-photos { grid-template-columns: 1fr; }
.batch-book-photos {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
}
.batch-photo-cell {
    min-width: 0;
    min-height: 210px;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #e2e6e0;
    border-radius: 13px;
    background: #eef1ed;
}
.batch-photo-cell small {
    max-width: calc(100% - 14px);
    position: absolute;
    left: 7px;
    bottom: 7px;
    overflow: hidden;
    padding: 5px 7px;
    border-radius: 7px;
    background: rgba(20, 31, 23, .82);
    color: white;
    font-size: 10px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.batch-photo-zoom {
    width: 100%;
    height: 100%;
    position: relative;
    display: block;
    overflow: hidden;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: zoom-in;
}
.batch-photo-zoom::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        var(--photo-placeholder-start) 25%,
        var(--photo-placeholder-highlight) 42%,
        var(--photo-placeholder-start) 60%
    );
    background-size: 220% 100%;
    animation: batch-photo-loading 1.15s ease-in-out infinite;
    transition: opacity .18s ease;
}
.batch-photo-zoom.is-loaded::before {
    opacity: 0;
    animation: none;
    pointer-events: none;
}
.batch-photo-zoom img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    opacity: 0;
    transition: opacity .18s ease, transform .18s ease;
}
.batch-photo-zoom img.is-loaded { opacity: 1; }
.batch-photo-zoom:hover img { transform: scale(1.025); }
@keyframes batch-photo-loading {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
    .batch-photo-zoom::before { animation: none; }
}
.batch-photo-action {
    position: absolute;
    top: 8px;
    z-index: 3;
}
.batch-photo-action.rotate { left: 8px; }
.batch-photo-action.delete { right: 8px; }
.batch-photo-action button {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 9px;
    background: rgba(19, 29, 22, .84);
    color: white;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(15,25,18,.18);
}
.batch-photo-action button img {
    width: 17px;
    height: 17px;
    display: block;
    filter: brightness(0) invert(1);
    pointer-events: none;
}
.batch-photo-action button:hover { background: var(--accent-dark); }
.batch-photo-action.delete button:hover { background: var(--danger); }
.batch-photo-action button:disabled { opacity: .55; cursor: wait; }
.batch-book-data {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto auto auto auto 1fr auto;
    column-gap: 16px;
    padding: 8px 10px 8px 12px;
    text-decoration: none;
}
.batch-book-data-head {
    grid-column: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}
.batch-book-number {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}
.batch-book-data .review-mark.inline {
    padding: 4px 7px;
    font-size: 9px;
}
.batch-book-title {
    grid-column: 1 / -1;
    margin: 12px 0 8px;
    overflow: hidden;
    font-size: 17px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.batch-book-field {
    grid-column: 1;
    display: grid;
    gap: 3px;
    padding: 7px 0;
    border-top: 1px solid #e5e9e3;
}
.batch-book-field span { color: var(--muted); font-size: 11px; }
.batch-book-field strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
}
.batch-book-data-reserved {
    grid-column: 2;
    grid-row: 3 / 8;
    position: relative;
    top: -6px;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    gap: 10px;
    padding: 10px;
    border: 1px solid #e0e6df;
    border-radius: 14px;
    background: #f2f5f0;
}
.batch-book-select {
    width: 32px;
    min-height: 32px;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #d8dfd7;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease;
}
.batch-book-select:hover { border-color: #b7c5b9; background: #fbfcfa; }
.batch-book-select input {
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    accent-color: var(--accent);
    cursor: pointer;
}
.batch-review-actions {
    display: grid;
    gap: 8px;
    padding-top: 0;
}
.review-action {
    min-height: 41px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, color .16s ease, transform .12s ease;
}
.review-action:not(:disabled):active { transform: translateY(1px); }
.review-action.export { border-color: #cbd5cc; background: #fff; color: var(--ink); }
.review-action.export:hover { border-color: #aebdaf; background: #e9eee8; }
.review-action.block { border-color: #d9cfae; background: #fffcf3; color: #7b6526; }
.review-action.block:hover { border-color: #c7b778; background: #f7f0da; }
.review-action.reject { border-color: #e7c4c4; background: #fffafa; color: var(--danger); }
.review-action.reject:hover { border-color: #d99999; background: #f9eaea; }
.review-action.approve { border-color: var(--accent); background: var(--accent); color: white; }
.review-action.approve:hover { background: var(--accent-dark); }
.review-action:disabled { opacity: 1; cursor: default; }
.review-action.block:disabled { border-color: #e3dfd2; background: #f1eee4; color: #9b9278; }
.review-action.reject:disabled { border-color: #eadada; background: #f3e8e8; color: #b98989; }
.review-action.approve:disabled { border-color: #a9c4b4; background: #a9c4b4; color: white; }
.batch-book-data .edit-link {
    grid-column: 1;
    align-self: flex-start;
    justify-self: start;
    padding: 7px 10px;
    border-radius: 9px;
    background: var(--accent-soft);
}
.batch-book-data .edit-link b { margin-left: 4px; font-size: 14px; }
.book-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: white;
    text-decoration: none;
    box-shadow: 0 8px 26px rgba(23,38,28,.05);
    transition: transform .15s ease, box-shadow .15s ease;
}
.book-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.book-cover { min-height: 185px; position: relative; display: grid; place-items: center; background: #e8ebe6; color: var(--muted); font-size: 12px; overflow: hidden; }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover em { position: absolute; left: 8px; bottom: 8px; padding: 5px 7px; border-radius: 7px; background: rgba(16,29,20,.82); color: white; font-size: 10px; font-style: normal; font-weight: 750; }
.review-mark {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 5px 7px;
    border-radius: 7px;
    background: rgba(118, 86, 31, .9);
    color: white;
    font-size: 10px;
    font-weight: 800;
}
.review-mark.verified { background: rgba(38, 102, 61, .92); }
.review-mark.rejected { background: rgba(168, 59, 59, .92); }
.review-mark.blocked { background: rgba(123, 101, 38, .92); }
.review-mark.inline { position: static; align-self: flex-start; }
.book-meta { min-width: 0; padding: 16px; }
.book-meta h2 { min-height: 42px; margin-bottom: 14px; overflow: hidden; font-size: 16px; line-height: 1.3; }
.book-meta dl { margin: 0 0 16px; }
.book-meta dl div { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; font-size: 12px; }
.book-meta dt { color: var(--muted); }
.book-meta dd { margin: 0; overflow: hidden; text-overflow: ellipsis; }
.edit-link { font-size: 12px; }
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-top: 24px; }
.pagination a:last-child { justify-self: end; }
.book-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.book-toolbar h1 { max-width: 850px; font-size: 30px; }
.book-navigation { display: flex; gap: 9px; }
.review-status-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 18px 20px;
    border: 1px solid #ead8b6;
    border-radius: 16px;
    background: #fff8eb;
}
.review-status-panel.verified { border-color: #c9decf; background: var(--accent-soft); }
.review-status-panel.rejected { border-color: #e5c4c4; background: #f9eaea; }
.review-status-panel.blocked { border-color: #ded2aa; background: #faf6e8; }
.review-status-panel h2 { margin: 0 0 4px; font-size: 19px; }
.review-status-panel p { margin: 0; color: var(--muted); font-size: 13px; }
.review-layout { display: grid; grid-template-columns: minmax(420px, .8fr) minmax(560px, 1.2fr); gap: 18px; align-items: start; }
.form-panel { padding: 22px; overflow: visible; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.panel-heading h2 { margin: 0; font-size: 20px; }
.edit-form { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.edit-form .wide { grid-column: 1 / -1; }
.edit-form.single-column { grid-template-columns: 1fr; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.photo-section { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #ecefe9; }
.photo-strip-section { margin-bottom: 18px; }
.photo-strip-wrap { overflow-x: auto; padding-bottom: 7px; }
.photo-strip {
    min-width: 1120px;
    display: grid;
    grid-template-columns: repeat(8, minmax(130px, 1fr));
    gap: 10px;
}
.photo-card { min-width: 0; position: relative; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.photo-frame { height: 170px; position: relative; display: grid; place-items: center; border-radius: 8px; overflow: hidden; background: #e8eae6; color: var(--muted); font-size: 11px; }
.photo-frame img { width: 100%; height: 100%; }
.photo-frame img { display: block; object-fit: contain; }
.photo-card > strong { display: block; overflow: hidden; padding: 8px 3px 1px; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.photo-zoom {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: zoom-in;
}
.photo-delete-form { position: absolute; top: 6px; right: 6px; z-index: 2; }
.photo-delete-form button {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(27, 34, 29, .86);
    color: white;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.photo-delete-form button:hover { background: var(--danger); }
.book-data-panel { width: min(520px, 100%); }
.photo-dialog {
    width: min(1000px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    border: 0;
    border-radius: 18px;
    padding: 18px;
    background: white;
    box-shadow: 0 30px 90px rgba(10, 18, 13, .35);
}
.photo-dialog::backdrop { background: rgba(10, 18, 13, .74); }
.photo-dialog img { width: 100%; max-height: calc(100vh - 130px); display: block; object-fit: contain; }
.photo-dialog strong { display: block; padding-top: 10px; text-align: center; }
.photo-dialog-close {
    width: 36px;
    height: 36px;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    border: 0;
    border-radius: 50%;
    background: rgba(23, 31, 25, .88);
    color: white;
    font-size: 24px;
    cursor: pointer;
}
.alert { margin: 14px 0; padding: 12px 14px; border-radius: 10px; font-weight: 650; }
.alert.error { background: #f8e4e4; color: var(--danger); }
.alert.success { background: var(--accent-soft); color: var(--accent-dark); }
.muted, .empty { color: var(--muted); }
.empty { padding: 40px; text-align: center; }
.empty-card, .empty-state { grid-column: 1 / -1; padding: 60px 24px; text-align: center; color: var(--muted); }
.empty-state h1 { margin: 18px 0 24px; color: var(--ink); }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top, #e7eee6, #f5f6f2 55%); }
.login-card { width: min(420px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: var(--shadow); }
.login-brand { margin-bottom: 28px; }
.login-brand h1 { margin: 0 0 3px; font-size: 25px; }
.login-brand p { margin: 0; color: var(--muted); }
.stack { display: grid; gap: 16px; }

@media (max-width: 1100px) {
    .batch-book-card { min-width: 1160px; }
    .batch-book-list { overflow-x: auto; padding-bottom: 8px; }
    .review-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .shell { padding: 24px 14px 40px; }
    .topbar { padding: 0 16px; }
    .operator > span:not(.status-dot) { display: none; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .mode-switch { width: 100%; }
    .mode-switch a { flex: 1; padding-inline: 8px; text-align: center; }
    .filters { align-items: stretch; flex-direction: column; }
    .filters-mode { width: 100%; margin-left: 0; }
    .filters-mode .mode-description { text-align: left; }
    select { min-width: 0; }
    .book-toolbar { align-items: stretch; flex-direction: column; }
    .batch-control-row { overflow-x: auto; padding-bottom: 6px; }
    .batch-actions, .batch-status-form, .batch-progress { flex: none; }
    .batch-list-toolbar { align-items: stretch; flex-direction: column; }
    .batch-selection-controls { align-self: center; }
    .batch-pagination.top { width: fit-content; min-width: 0; align-self: center; }
    .review-status-panel { align-items: stretch; flex-direction: column; }
    .book-navigation { flex-wrap: wrap; }
    .edit-form { grid-template-columns: 1fr; }
    .edit-form .wide { grid-column: auto; }
    .photo-section { padding: 14px; }
    .photo-strip { min-width: 1040px; }
}
