:root {
    --bg: #060b16;
    --surface: #0d1626;
    --surface-2: #111d30;
    --ink: #f4f7ff;
    --muted: #8e9bb1;
    --line: #202d42;
    --accent: #3b82f6;
    --accent-dark: #2563eb;
    --accent-soft: rgba(59, 130, 246, .15);
    --warning: #f5a524;
    --danger: #ef6262;
    --shadow: 0 20px 55px rgba(0, 0, 0, .28);
    --photo-placeholder-start: #101b2c;
    --photo-placeholder-highlight: #1a2940;
}

html { color-scheme: dark; }
body {
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 72% 0, rgba(39, 79, 170, .12), transparent 32%),
        linear-gradient(135deg, #050913 0%, #08101e 56%, #050b16 100%);
}

.app-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
    min-height: 100vh;
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    padding: 26px 18px 20px;
    border-right: 1px solid #1c293c;
    background:
        linear-gradient(180deg, rgba(12, 22, 39, .98), rgba(8, 16, 30, .98));
    box-shadow: 18px 0 55px rgba(0, 0, 0, .15);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 13px 28px;
    color: #f8fbff;
    font-size: 18px;
    font-weight: 850;
    letter-spacing: .07em;
    text-decoration: none;
}

.sidebar-brand-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #4f8cff;
    filter: drop-shadow(0 5px 12px rgba(59, 130, 246, .35));
}
.sidebar-brand-icon svg { width: 32px; height: 32px; }

.sidebar-nav {
    display: grid;
    gap: 8px;
}

.sidebar-nav > a {
    min-height: 54px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px 13px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #bdc7d8;
    text-decoration: none;
    transition: color .16s ease, background .16s ease, border-color .16s ease;
}
.sidebar-nav > a svg { width: 21px; height: 21px; }
.sidebar-nav > a:hover {
    color: white;
    border-color: #253550;
    background: rgba(26, 43, 73, .55);
}
.sidebar-nav > a.active {
    color: #6ea2ff;
    border-color: rgba(59, 130, 246, .2);
    background: linear-gradient(110deg, rgba(38, 91, 190, .35), rgba(29, 60, 117, .22));
    box-shadow: inset 0 0 24px rgba(44, 104, 229, .07);
}
.sidebar-nav > a small {
    grid-column: 2;
    margin-top: -8px;
    color: #65738a;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.sidebar-user {
    min-height: 62px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 10px 11px;
    border: 1px solid #243149;
    border-radius: 13px;
    background: rgba(12, 22, 39, .85);
}
.sidebar-user-avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #5d94ff, #2563eb);
}
.sidebar-user-avatar svg { width: 18px; height: 18px; }
.sidebar-user div { min-width: 0; }
.sidebar-user strong,
.sidebar-user small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-user strong { font-size: 12px; }
.sidebar-user small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.sidebar-user > a {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #7f8ba0;
}
.sidebar-user > a:hover { color: white; background: #17243a; }
.sidebar-user > a svg { width: 16px; height: 16px; }

.app-workspace { min-width: 0; }
.workspace-topbar {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 34px;
    border-bottom: 1px solid rgba(31, 45, 67, .78);
    color: #728099;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.workspace-account {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #c8d1df;
    font-size: 12px;
    letter-spacing: 0;
    text-transform: none;
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #45d17a;
    box-shadow: 0 0 12px rgba(69, 209, 122, .55);
}

.shell {
    max-width: 1500px;
    margin: 0 auto;
    padding: 34px 34px 60px;
}
.page-heading { margin-bottom: 24px; }
.page-heading h1,
.book-toolbar h1 {
    color: #f6f8fd;
    text-shadow: 0 6px 24px rgba(0, 0, 0, .22);
}
.page-heading p { color: #9da9bb; }
.eyebrow { color: #4e8cff; }
.page-heading-action { gap: 8px; flex: none; }
.page-heading-action svg { width: 18px; height: 18px; }

.barcode-dialog {
    width: min(520px, calc(100vw - 28px));
    padding: 0;
    border: 1px solid #2b3b54;
    border-radius: 20px;
    color: var(--ink);
    background: #0d1727;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .48);
}
.barcode-dialog::backdrop {
    background: rgba(1, 5, 12, .76);
    backdrop-filter: blur(5px);
}
.barcode-dialog-form { padding: 24px; }
.barcode-dialog-header {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}
.barcode-dialog-header h2 { margin: 0 0 5px; color: var(--ink); font-size: 21px; }
.barcode-dialog-header p { margin: 0; color: var(--muted); font-size: 13px; }
.barcode-dialog-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid #2e65bd;
    border-radius: 14px;
    color: #6ca3ff;
    background: rgba(43, 104, 216, .22);
}
.barcode-dialog-icon svg { width: 24px; height: 24px; }
.barcode-dialog-close {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    color: #8491a5;
    background: transparent;
    cursor: pointer;
}
.barcode-dialog-close:hover { color: white; background: #17243a; }
.barcode-dialog-close svg { width: 19px; height: 19px; }
.barcode-quantity input { min-height: 52px; font-size: 18px; font-weight: 750; }
.barcode-quantity small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 11px;
}
.barcode-format-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 13px;
    border: 1px solid #263750;
    border-radius: 13px;
    background: rgba(31, 65, 121, .14);
}
.barcode-format-card > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #6ca3ff;
    background: rgba(43, 104, 216, .2);
}
.barcode-format-card svg { width: 20px; height: 20px; }
.barcode-format-card small,
.barcode-format-card strong { display: block; }
.barcode-format-card small {
    color: #77869c;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.barcode-format-card strong { margin-top: 2px; color: var(--ink); font-size: 13px; }
.barcode-format-card p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.barcode-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid #243249;
}
.barcode-dialog-footer .button { gap: 8px; }
.barcode-dialog-footer svg { width: 18px; height: 18px; }

.stats-grid { gap: 16px; margin-bottom: 20px; }
.stat {
    min-height: 146px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
    border: 1px solid #28549b;
    background: linear-gradient(135deg, rgba(24, 57, 116, .5), rgba(11, 23, 43, .92));
    box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}
.stat.books {
    border-color: #63339a;
    background: linear-gradient(135deg, rgba(69, 26, 111, .48), rgba(18, 15, 39, .92));
}
.stat.accent {
    border-color: #1f694a;
    background: linear-gradient(135deg, rgba(18, 85, 58, .48), rgba(9, 34, 31, .94));
}
.stat.remaining {
    border-color: #895318;
    background: linear-gradient(135deg, rgba(109, 62, 14, .46), rgba(34, 24, 17, .94));
}
.stat-icon {
    width: 58px;
    height: 58px;
    flex: none;
    display: grid;
    place-items: center;
    border: 1px solid #286ad1;
    border-radius: 14px;
    color: #64a0ff;
    background: rgba(36, 98, 216, .3);
}
.stat.books .stat-icon { border-color: #8e40cf; color: #c167ff; background: rgba(132, 49, 190, .3); }
.stat.accent .stat-icon { border-color: #26985d; color: #56e28e; background: rgba(28, 139, 77, .28); }
.stat.remaining .stat-icon { border-color: #ba6d12; color: #ffad32; background: rgba(174, 95, 10, .3); }
.stat-icon svg { width: 29px; height: 29px; }
.stat > div { min-width: 0; }
.stat span { color: #bac5d5; }
.stat strong { color: white; font-size: 34px; }
.stat small { color: #5795ff; }
.stat.accent span,
.stat.remaining span { color: #c4ccda; }

.filters,
.photo-section,
.batch-book-card,
.review-status-panel,
.development-card {
    border-color: var(--line);
    background: linear-gradient(145deg, rgba(15, 26, 45, .98), rgba(9, 17, 31, .98));
    box-shadow: var(--shadow);
}
.filters { margin: 18px 0 20px; padding: 18px 20px; }
label span { color: #8f9bb0; }
input,
select,
textarea {
    border-color: #2a3952;
    background: #0a1220;
    color: #edf2fb;
}
input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .14);
}
select:disabled { background: #0c1422; color: #667289; }

.mode-switch {
    border-color: #1f2c42;
    background: #0a1220;
}
.mode-switch a { color: #8591a6; }
.mode-switch a.active {
    color: white;
    background: linear-gradient(135deg, #3177ee, #2361d2);
    box-shadow: 0 7px 18px rgba(37, 99, 235, .28);
}
.mode-description { color: #78869d; }

.panel {
    border-color: var(--line);
    background: rgba(11, 20, 35, .92);
    box-shadow: var(--shadow);
}
table { color: #e9eef8; }
th {
    border-bottom: 1px solid #26354d;
    background: #0f1a2c;
    color: #91a0b8;
}
td { border-top-color: #1c293d; }
tbody tr { transition: background .14s ease; }
tbody tr:hover { background: rgba(39, 72, 126, .12); }
td small { color: #718099; }
.row-link,
.edit-link,
.table-sub-link {
    color: #5792ff;
    text-decoration: none;
}
.row-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.row-link svg { width: 16px; height: 16px; }
.count-pill { background: #172641; color: #8db6ff; }
.count-pill.verified { background: rgba(29, 112, 73, .28); color: #58dd8d; }
.count-pill.remaining { background: rgba(151, 91, 19, .28); color: #ffc05d; }
.badge.open { border: 1px solid rgba(52, 196, 108, .3); background: rgba(23, 105, 64, .22); color: #53df89; }
.badge.closed { border: 1px solid #39465b; background: #182234; color: #a3aec0; }
.badge.archived { border: 1px solid #574167; background: rgba(83, 54, 103, .28); color: #c8a8df; }
.archived-row { background: rgba(76, 49, 94, .08); }

.button.primary { background: linear-gradient(135deg, #3d83f6, #2563eb); color: white; }
.button.primary:hover { background: linear-gradient(135deg, #4b90ff, #2d6df0); }
.button.secondary { border-color: #2b65c5; background: #15366f; color: #dce9ff; }
.button.ghost { border-color: #2b3950; background: #0c1525; color: #dce3ef; }
.button.ghost:hover { border-color: #3d5274; background: #121e31; }

.breadcrumbs { color: #708099; }
.breadcrumbs a { color: #5792ff; }
.batch-progress-filter {
    border-color: #26354c;
    background: #0d1728;
    color: #eaf0fa;
}
.batch-progress-filter:hover { border-color: #4772b6; }
.batch-progress-filter.active { border-color: #4383f5; box-shadow: 0 0 0 2px rgba(59, 130, 246, .13); }
.batch-progress .verified { border-color: #235a43; background: rgba(22, 83, 57, .32); }
.batch-progress .remaining { border-color: #654417; background: rgba(100, 62, 15, .32); }
.batch-list-toolbar {
    border-color: #26354c;
    background: #0d1728;
}
.batch-select-all:hover { background: #142238; }
.batch-select-all span { color: #e9eef7; }
.batch-bulk-toggle {
    border-color: #2b3a51;
    background: #0b1422;
    color: #e9eef7;
}
.batch-bulk-toggle:hover { border-color: #41618d; background: #101d30; }
.batch-bulk-menu {
    border-color: #2b3a51;
    background: #0d1728;
    box-shadow: 0 18px 46px rgba(0, 0, 0, .42);
}
.batch-bulk-menu button { color: #e9eef7; }
.batch-bulk-menu button:hover { background: #17263c; }
.batch-bulk-menu button.reject { color: #ff8585; }
.batch-bulk-menu button.approve { color: #66dc94; }

.batch-book-card {
    border-color: #223047;
    background: #0b1423;
}
.batch-book-card:hover { border-color: #34517c; box-shadow: 0 18px 44px rgba(0, 0, 0, .32); }
.batch-photo-cell,
.book-cover,
.photo-frame {
    border-color: #24344c;
    background: #09111e;
}
.batch-book-data { color: #edf2fa; }
.batch-book-field { border-top-color: #233149; }
.batch-book-field span,
.batch-book-number { color: #8290a6; }
.batch-book-data-reserved {
    border-color: #27364d;
    background: #101b2c;
}
.batch-book-select {
    border-color: #2b3a51;
    background: #0b1422;
}
.batch-book-select:hover { border-color: #41618d; background: #101d30; }
.batch-book-select span { color: #e9eef7; }
.batch-review-actions { border-top-color: #27364d; }
.review-action.export { border-color: #33445f; background: #0b1422; color: #e4eaf3; }
.review-action.export:hover { border-color: #496589; background: #132138; }
.review-action.block { border-color: #65592f; background: rgba(76, 64, 24, .28); color: #e7ca6a; }
.review-action.block:hover { border-color: #88773a; background: rgba(95, 80, 28, .42); }
.review-action.block:disabled { border-color: #494328; background: rgba(56, 50, 29, .38); color: #95875a; }
.review-action.reject { border-color: #6c333b; background: rgba(83, 25, 34, .28); color: #ff8585; }
.review-action.reject:hover { border-color: #a44955; background: rgba(113, 35, 44, .4); }
.review-action.reject:disabled { border-color: #4a3037; background: rgba(63, 32, 38, .38); color: #9b6b72; }
.review-action.approve { border-color: #24794e; background: #24794e; }
.review-action.approve:hover { background: #2b925d; }
.review-action.approve:disabled { border-color: #315e49; background: #315e49; color: #9ecbb3; }
.batch-book-data .edit-link { background: rgba(43, 112, 218, .17); }

.review-mark { background: rgba(150, 94, 23, .92); }
.review-mark.verified { background: rgba(32, 133, 75, .92); }
.review-mark.rejected { background: rgba(182, 57, 68, .92); }
.review-mark.blocked { background: rgba(153, 123, 37, .92); }
.book-card { border-color: #233149; background: #0d1727; }
.review-status-panel { border-color: #6b4b1d; background: rgba(73, 46, 13, .3); }
.review-status-panel.verified { border-color: #235f43; background: rgba(22, 83, 57, .3); }
.review-status-panel.rejected { border-color: #71323a; background: rgba(93, 27, 37, .3); }
.review-status-panel.blocked { border-color: #67582b; background: rgba(83, 67, 20, .3); }
.photo-card { border-color: #24344b; background: #0d1727; }
.form-panel { background: #0d1727; }
.photo-dialog { background: #0b1423; color: white; }
.photo-dialog::backdrop { background: rgba(1, 5, 12, .86); }
.alert.success { background: rgba(25, 114, 69, .3); color: #72e5a1; }
.alert.error { background: rgba(126, 38, 48, .32); color: #ff9191; }
.pagination { color: #aab5c7; }
.pagination a { color: #67a0ff; }
.empty,
.empty-card,
.empty-state,
.muted { color: #7d8ba1; }

.development-card {
    min-height: 430px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 60px 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    text-align: center;
}
.development-icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    margin-bottom: 22px;
    border: 1px solid #2e65bd;
    border-radius: 19px;
    color: #6ca3ff;
    background: rgba(43, 104, 216, .22);
}
.development-icon svg { width: 34px; height: 34px; }
.development-card h1 { margin-bottom: 10px; }
.development-card p { margin-bottom: 25px; color: var(--muted); }

.settings-heading { max-width: 720px; }
.settings-card {
    max-width: 900px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(15, 26, 45, .98), rgba(9, 17, 31, .98));
    box-shadow: var(--shadow);
}
.settings-card-heading {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 24px;
}
.settings-card-heading h2 { margin: 0 0 5px; color: var(--ink); font-size: 20px; }
.settings-card-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.settings-card-icon {
    width: 46px;
    height: 46px;
    flex: none;
    display: grid;
    place-items: center;
    border: 1px solid #2e65bd;
    border-radius: 13px;
    color: #6ca3ff;
    background: rgba(43, 104, 216, .22);
}
.settings-card-icon svg { width: 23px; height: 23px; }
.theme-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.theme-option {
    padding: 10px;
    border: 1px solid #2a3952;
    border-radius: 16px;
    color: var(--ink);
    background: #0a1220;
    text-align: left;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.theme-option:hover { border-color: #4772b6; transform: translateY(-1px); }
.theme-option.selected {
    border-color: #4383f5;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .15);
}
.theme-preview {
    height: 130px;
    display: grid;
    grid-template-columns: 30% 1fr;
    overflow: hidden;
    border: 1px solid #293850;
    border-radius: 11px;
}
.theme-preview-sidebar { border-right: 1px solid rgba(127, 145, 171, .18); }
.theme-preview-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-content: start;
    gap: 8px;
    padding: 20px 12px;
}
.theme-preview-content i {
    height: 35px;
    border-radius: 7px;
}
.theme-preview-content i:first-child { grid-column: 1 / -1; height: 9px; }
.light-preview { background: #f4f7fb; }
.light-preview .theme-preview-sidebar { background: #fff; }
.light-preview .theme-preview-content i { background: #dfe8f4; }
.light-preview .theme-preview-content i:first-child { background: #a7b7ca; }
.dark-preview { background: #07101e; }
.dark-preview .theme-preview-sidebar { background: #0d192b; }
.dark-preview .theme-preview-content i { background: #172a46; }
.dark-preview .theme-preview-content i:first-child { background: #476caa; }
.theme-option-label {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) 22px;
    align-items: center;
    gap: 10px;
    padding: 13px 5px 4px;
}
.theme-option-label > svg { width: 20px; height: 20px; color: #7f8da3; }
.theme-option-label strong,
.theme-option-label small { display: block; }
.theme-option-label small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.theme-check { opacity: 0; color: var(--accent) !important; transition: opacity .16s ease; }
.theme-option.selected .theme-check { opacity: 1; }

.login-shell {
    background:
        radial-gradient(circle at 50% 0, rgba(42, 94, 194, .18), transparent 38%),
        #050b16;
}
.login-card {
    border-color: #25344c;
    background: rgba(12, 22, 38, .97);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .42);
}
.login-brand p { color: var(--muted); }
.brand-mark {
    background: linear-gradient(145deg, #4f8fff, #285fd1);
    color: white;
}

html[data-theme="light"] {
    color-scheme: light;
    --bg: #f4f5f7;
    --surface: #ffffff;
    --surface-2: #f7f8f9;
    --ink: #20252d;
    --muted: #737b87;
    --line: #e0e3e7;
    --accent: #536171;
    --accent-dark: #3f4b59;
    --accent-soft: #eef0f2;
    --shadow: 0 9px 28px rgba(39, 45, 55, .07);
    --photo-placeholder-start: #e5e8ec;
    --photo-placeholder-highlight: #f6f7f8;
}
html[data-theme="light"] body {
    color: var(--ink);
    background: #f4f5f7;
}
html[data-theme="light"] .sidebar {
    border-color: #e1e3e6;
    background: #fbfbfc;
    box-shadow: 12px 0 36px rgba(39, 45, 55, .045);
}
html[data-theme="light"] .sidebar-brand { color: #20252d; }
html[data-theme="light"] .sidebar-nav > a { color: #646c77; }
html[data-theme="light"] .sidebar-nav > a:hover {
    color: #252b33;
    border-color: #e0e3e7;
    background: #f2f3f5;
}
html[data-theme="light"] .sidebar-nav > a.active {
    color: #29313a;
    border-color: #daddE2;
    background: #eceef1;
    box-shadow: none;
}
html[data-theme="light"] .sidebar-user {
    border-color: #e0e3e7;
    background: #f5f6f7;
}
html[data-theme="light"] .sidebar-user > a:hover { color: #20252d; background: #e9ebee; }
html[data-theme="light"] .workspace-topbar { border-color: #e0e3e7; color: #7c838d; }
html[data-theme="light"] .workspace-account { color: #4c535d; }
html[data-theme="light"] .page-heading h1,
html[data-theme="light"] .book-toolbar h1 {
    color: #20252d;
    text-shadow: none;
}
html[data-theme="light"] .page-heading p { color: #737b87; }
html[data-theme="light"] .eyebrow { color: #747c86; }
html[data-theme="light"] .barcode-dialog {
    border-color: #dedfe3;
    background: #fff;
    box-shadow: 0 24px 70px rgba(35, 40, 48, .18);
}
html[data-theme="light"] .barcode-dialog::backdrop { background: rgba(39, 51, 70, .38); }
html[data-theme="light"] .barcode-dialog-close:hover { color: #252b33; background: #f0f1f3; }
html[data-theme="light"] .barcode-dialog-icon,
html[data-theme="light"] .barcode-format-card > span,
html[data-theme="light"] .settings-card-icon,
html[data-theme="light"] .development-icon {
    border-color: #d9dde2;
    color: #697482;
    background: #f0f2f4;
}
html[data-theme="light"] .barcode-format-card { border-color: #e0e3e7; background: #f7f8f9; }
html[data-theme="light"] .barcode-dialog-footer { border-color: #e2e4e7; }
html[data-theme="light"] .filters,
html[data-theme="light"] .photo-section,
html[data-theme="light"] .batch-book-card,
html[data-theme="light"] .review-status-panel,
html[data-theme="light"] .development-card,
html[data-theme="light"] .settings-card {
    border-color: #e0e3e7;
    background: #fff;
    box-shadow: var(--shadow);
}
html[data-theme="light"] label span { color: #737b87; }
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
    border-color: #d5d9de;
    background: #fff;
    color: #252b33;
}
html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus {
    border-color: #8e97a2;
    box-shadow: 0 0 0 3px rgba(82, 92, 105, .09);
}
html[data-theme="light"] select:disabled { background: #f1f2f4; color: #858c96; }
html[data-theme="light"] .mode-switch { border-color: #dfe2e6; background: #eeeff1; }
html[data-theme="light"] .mode-switch a { color: #717985; }
html[data-theme="light"] .mode-switch a.active {
    color: #303740;
    background: #fff;
    box-shadow: 0 2px 7px rgba(39, 45, 55, .08);
}
html[data-theme="light"] .panel {
    border-color: #e0e3e7;
    background: #fff;
    box-shadow: var(--shadow);
}
html[data-theme="light"] table { color: #30363f; }
html[data-theme="light"] th { border-color: #e1e4e7; background: #f5f6f7; color: #747c87; }
html[data-theme="light"] td { border-top-color: #e7e9ec; }
html[data-theme="light"] tbody tr:hover { background: #f8f8f9; }
html[data-theme="light"] td small { color: #858c96; }
html[data-theme="light"] .count-pill { background: #eff0f2; color: #505863; }
html[data-theme="light"] .count-pill.verified { background: #edf4ef; color: #47715a; }
html[data-theme="light"] .count-pill.remaining { background: #f6f1e8; color: #7d6847; }
html[data-theme="light"] .badge.open {
    border-color: #d4e2d9;
    background: #edf4ef;
    color: #50745e;
}
html[data-theme="light"] .badge.closed { border-color: #dfe2e5; background: #f0f1f2; color: #747b84; }
html[data-theme="light"] .badge.archived { border-color: #e0d9e5; background: #f4f0f6; color: #74647d; }
html[data-theme="light"] .archived-row { background: #fbfafc; }
html[data-theme="light"] .button {
    min-height: 38px;
    border-radius: 9px;
    font-weight: 700;
    box-shadow: none;
}
html[data-theme="light"] .button.primary {
    border-color: #4d5865;
    background: #4d5865;
    color: #fff;
}
html[data-theme="light"] .button.primary:hover { border-color: #3e4854; background: #3e4854; }
html[data-theme="light"] .button.secondary,
html[data-theme="light"] .button.ghost {
    border-color: #d3d7dc;
    background: #fff;
    color: #3d444d;
}
html[data-theme="light"] .button.secondary:hover,
html[data-theme="light"] .button.ghost:hover {
    border-color: #bfc4ca;
    background: #f5f6f7;
}
html[data-theme="light"] .batch-progress-filter {
    border-color: #daddE1;
    background: #fff;
    color: #3c434c;
}
html[data-theme="light"] .batch-progress-filter:hover { border-color: #bfc4ca; }
html[data-theme="light"] .batch-progress-filter.active {
    border-color: #9da4ad;
    box-shadow: 0 0 0 2px rgba(82, 92, 105, .07);
}
html[data-theme="light"] .batch-progress .verified { border-color: #d8e4dc; background: #f1f6f2; }
html[data-theme="light"] .batch-progress .remaining { border-color: #e6dfd2; background: #f8f5ef; }
html[data-theme="light"] .batch-list-toolbar {
    border-color: #e0e3e7;
    background: #fff;
}
html[data-theme="light"] .batch-select-all:hover { background: #f2f3f5; }
html[data-theme="light"] .batch-select-all span { color: #3d444d; }
html[data-theme="light"] .batch-bulk-toggle {
    border-color: #d5d9de;
    background: #fff;
    color: #3d444d;
}
html[data-theme="light"] .batch-bulk-toggle:hover { border-color: #bfc4ca; background: #f5f6f7; }
html[data-theme="light"] .batch-bulk-menu {
    border-color: #dfe2e5;
    background: #fff;
    box-shadow: 0 15px 36px rgba(39, 45, 55, .14);
}
html[data-theme="light"] .batch-bulk-menu button { color: #3d444d; }
html[data-theme="light"] .batch-bulk-menu button:hover { background: #f2f3f5; }
html[data-theme="light"] .batch-bulk-menu button.reject { color: #9b5d5d; }
html[data-theme="light"] .batch-bulk-menu button.approve { color: #587262; }
html[data-theme="light"] .batch-book-card { background: #fff; }
html[data-theme="light"] .batch-book-card:hover { border-color: #d5d9de; box-shadow: 0 12px 32px rgba(39, 45, 55, .08); }
html[data-theme="light"] .batch-book-data { color: #242a31; }
html[data-theme="light"] .batch-book-field { border-top-color: #e5e7ea; }
html[data-theme="light"] .batch-book-data-reserved,
html[data-theme="light"] .batch-book-select,
html[data-theme="light"] .book-card,
html[data-theme="light"] .photo-card,
html[data-theme="light"] .form-panel {
    border-color: #e1e4e7;
    background: #f7f8f9;
}
html[data-theme="light"] .batch-book-select:hover { border-color: #c9cdd2; background: #f1f2f4; }
html[data-theme="light"] .batch-book-select span { color: #3d444d; }
html[data-theme="light"] .batch-photo-cell,
html[data-theme="light"] .book-cover,
html[data-theme="light"] .photo-frame { border-color: #dde0e4; background: #f0f1f2; }
html[data-theme="light"] .batch-review-actions { border-top-color: #e2e4e7; }
html[data-theme="light"] .review-action {
    min-height: 38px;
    border-radius: 9px;
    font-weight: 700;
}
html[data-theme="light"] .review-action.export {
    border-color: #d4d8dd;
    background: #fff;
    color: #444b54;
}
html[data-theme="light"] .review-action.export:hover { border-color: #bec3c9; background: #f5f6f7; }
html[data-theme="light"] .review-action.block {
    border-color: #ddd7c5;
    background: #fff;
    color: #786c4d;
}
html[data-theme="light"] .review-action.block:hover { border-color: #cbc09e; background: #faf8f1; }
html[data-theme="light"] .review-action.block:disabled {
    border-color: #e3e1da;
    background: #f1f0ec;
    color: #a09b8d;
}
html[data-theme="light"] .review-action.reject {
    border-color: #e5d7d7;
    background: #fff;
    color: #9b5d5d;
}
html[data-theme="light"] .review-action.reject:hover { border-color: #d7bcbc; background: #fbf7f7; }
html[data-theme="light"] .review-action.reject:disabled {
    border-color: #e5e2e2;
    background: #f2f1f1;
    color: #aaa1a1;
}
html[data-theme="light"] .review-action.approve {
    border-color: #587262;
    background: #587262;
    color: #fff;
}
html[data-theme="light"] .review-action.approve:hover { border-color: #496052; background: #496052; }
html[data-theme="light"] .review-action.approve:disabled {
    border-color: #dce2de;
    background: #e8ece9;
    color: #839087;
}
html[data-theme="light"] .batch-book-data .edit-link {
    background: #f0f1f2;
    color: #53606d;
}
html[data-theme="light"] .review-mark { background: #f3eee5; color: #79694f; }
html[data-theme="light"] .review-mark.verified { background: #eaf2ec; color: #4b735a; }
html[data-theme="light"] .review-mark.rejected { background: #f5eaea; color: #925b5b; }
html[data-theme="light"] .review-mark.blocked { background: #f4f0e4; color: #796b43; }
html[data-theme="light"] .photo-dialog { background: #fff; color: #20252d; }
html[data-theme="light"] .settings-card-heading h2 { color: #20252d; }
html[data-theme="light"] .theme-option { border-color: #dfe2e5; background: #fafafa; color: #20252d; }
html[data-theme="light"] .theme-option:hover { border-color: #bfc4ca; }
html[data-theme="light"] .theme-option.selected {
    border-color: #959da6;
    box-shadow: 0 0 0 3px rgba(82, 92, 105, .08);
}
html[data-theme="light"] .theme-check { color: #626c78 !important; }
html[data-theme="light"] .stat,
html[data-theme="light"] .stat.books,
html[data-theme="light"] .stat.accent,
html[data-theme="light"] .stat.remaining {
    border-color: #e0e3e7;
    background: #fff;
    box-shadow: var(--shadow);
}
html[data-theme="light"] .stat span,
html[data-theme="light"] .stat.accent span,
html[data-theme="light"] .stat.remaining span { color: #737b87; }
html[data-theme="light"] .stat strong { color: #252b33; }
html[data-theme="light"] .stat small { color: #7c838d; }
html[data-theme="light"] .stat-icon,
html[data-theme="light"] .stat.books .stat-icon {
    border-color: #dde1e5;
    color: #687380;
    background: #f1f2f4;
}
html[data-theme="light"] .stat.accent .stat-icon {
    border-color: #d8e5dc;
    color: #5e7968;
    background: #eef4f0;
}
html[data-theme="light"] .stat.remaining .stat-icon {
    border-color: #e7e0d5;
    color: #806f55;
    background: #f7f3ed;
}
html[data-theme="light"] .row-link,
html[data-theme="light"] .table-sub-link,
html[data-theme="light"] .breadcrumbs a,
html[data-theme="light"] .pagination a { color: #596675; }
html[data-theme="light"] .login-shell {
    background: #f2f3f5;
}
html[data-theme="light"] .login-card {
    border-color: #dfe2e6;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 24px 70px rgba(39, 45, 55, .13);
}

@media (max-width: 1120px) {
    .app-layout { grid-template-columns: 210px minmax(0, 1fr); }
    .sidebar { padding-inline: 12px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
    .app-layout { display: block; }
    .sidebar {
        min-height: auto;
        position: static;
        padding: 14px;
        border-right: 0;
        border-bottom: 1px solid #1c293c;
    }
    .sidebar-brand { padding: 2px 8px 14px; }
    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        padding-bottom: 5px;
    }
    .sidebar-nav > a { min-width: 150px; }
    .sidebar-user { display: none; }
    .workspace-topbar { height: 58px; padding: 0 16px; }
    .shell { padding: 24px 14px 40px; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat { min-height: 118px; }
    .page-heading { align-items: stretch; flex-direction: column; gap: 16px; }
    .page-heading-action { width: 100%; }
    .page-heading .mode-switch { width: 100%; }
    .page-heading .mode-switch a { flex: 1; text-align: center; }
    .theme-options { grid-template-columns: 1fr; }
}
