/* Academic Filament theme. Shared by every admin resource and modal. */
.fi-body { --academic-border: #e2e0f0; --academic-tint: #f4f2ff; --academic-accent: #6155c5; }
.fi-body .fi-section { border-radius: 8px; box-shadow: 0 1px 3px rgb(25 22 55 / 4%); }
.fi-body .fi-fo-builder-item { border: 1px solid #c9c3f6; border-radius: 8px; box-shadow: none; overflow: hidden; }
.fi-body .fi-fo-builder-item-header { background: var(--academic-tint); border-bottom: 1px solid var(--academic-border); padding: 12px 16px; }
.fi-body .fi-fo-builder-item-header-label { color: var(--academic-accent); font-size: 13px; }
.fi-body .fi-fo-builder-item-header-icon { color: var(--academic-accent); }
.fi-body .fi-fo-builder-item-content { padding: 20px; }
.fi-body .fi-fo-repeater-item { border: 1px solid var(--academic-border); border-radius: 6px; box-shadow: none; }
.fi-body .fi-fo-repeater-item-header { padding: 9px 12px; background: #fafafd; }
.fi-body .fi-fo-repeater-item-header-label { font-size: 12px; }
.fi-body .fi-fo-repeater-items { gap: 8px; }
.fi-body .fi-fo-builder-actions, .fi-body .fi-fo-repeater-actions { justify-content: center; }
.fi-body .fi-fo-field-wrp-label { font-size: 12px; }
.fi-body .fi-section-header-heading { font-size: 14px; }
.fi-body .fi-input-wrp { border-radius: 5px; }
.fi-body .fi-section .fi-section { box-shadow: none; border: 1px solid var(--academic-border); }
.academic-editor-sidebar { align-self: start; }
.academic-editor-sidebar .fi-sc-text { font-size: 12px; line-height: 1.65; }
@media (min-width: 1024px) { .academic-editor-sidebar { position: sticky; top: 5.5rem; } }
@media (max-width: 640px) { .fi-body .fi-fo-builder-item-content { padding: 14px; } }
.dark .fi-body { --academic-border: #39364c; --academic-tint: #29253c; --academic-accent: #bcb3ff; }
.dark .fi-body .fi-fo-builder-item { border-color: #514873; }
.dark .fi-body .fi-fo-repeater-item-header { background: #24232d; }

.academic-editor { align-items: start; }

.fi-body input[dir="auto"], .fi-body textarea[dir="auto"] { text-align: start; }

/* Native Filament navigation: compact sections and a distinct active destination. */
.fi-body .fi-sidebar { background: #faf9fd; border-inline-end: 1px solid var(--academic-border); }
.fi-body .fi-sidebar-nav { padding-block: 18px; }
.fi-body .fi-sidebar-nav-groups { gap: 18px; }
.fi-body .fi-sidebar-group-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #767185; }
.fi-body .fi-sidebar-item-btn { min-height: 38px; border-radius: 6px; }
.fi-body .fi-sidebar-item-label { font-size: 13px; }
.fi-body .fi-sidebar-item.fi-active > .fi-sidebar-item-btn { background: #ede9fc; box-shadow: inset 3px 0 #6155c5; }
.fi-body .fi-sidebar-item.fi-active > .fi-sidebar-item-btn > :is(.fi-icon, .fi-sidebar-item-label) { color: #5144b0; }
.dark .fi-body .fi-sidebar { background: #1b1a23; }
.dark .fi-body .fi-sidebar-group-label { color: #aaa5bc; }
.dark .fi-body .fi-sidebar-item.fi-active > .fi-sidebar-item-btn { background: #302b48; box-shadow: inset 3px 0 #aa9bf3; }
.dark .fi-body .fi-sidebar-item.fi-active > .fi-sidebar-item-btn > :is(.fi-icon, .fi-sidebar-item-label) { color: #d1c8ff; }
[dir="rtl"] .fi-sidebar-item.fi-active > .fi-sidebar-item-btn { box-shadow: inset -3px 0 var(--academic-accent); }

/* Full-screen book workspace. Form fields keep native Filament styling. */
.book-areas { --area-panel: #f5f5f8; --area-paper: #fff; --area-line: #e2e1e9; --area-muted: #737181; --area-ink: #24222f; }
.dark .book-areas { --area-panel: #24232c; --area-paper: #1c1b23; --area-line: #403d51; --area-muted: #b8b5c8; --area-ink: #eeecf5; }
.book-areas [x-cloak] { display: none !important; }
.book-areas svg { width: 20px; height: 20px; flex-shrink: 0; }
.book-areas button { cursor: pointer; }
.book-areas button:disabled, .book-areas select:disabled { opacity: .45; cursor: not-allowed; }
.book-areas button:focus-visible, .book-areas select:focus-visible, .book-areas input:focus-visible { outline: 3px solid #998de5; outline-offset: 2px; }
.book-areas-launcher { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.book-areas-launcher strong { font-size: 14px; }
.book-areas-hint { color: var(--area-muted); font-size: 12px; line-height: 1.6; margin: 8px 0; }
.book-areas-open, .book-areas-header-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--area-line); border-radius: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.book-areas-open, .book-areas-header-actions .book-areas-save { background: #6155c5; border-color: #6155c5; color: white; }
.book-areas-workspace { position: fixed; inset: 0; z-index: 39; height: 100dvh; display: grid; grid-template-rows: 60px 52px minmax(0, 1fr) 34px; margin: 0; padding: 0; border: 0; min-width: 0; background: var(--area-paper); color: var(--area-ink); text-align: start; }
.book-areas-header { display: flex; align-items: center; gap: 16px; padding: 0 20px; border-bottom: 1px solid var(--area-line); }
.book-areas-back { padding: 8px; border-radius: 6px; }
.book-areas-back:hover { background: var(--area-panel); }
.book-areas-document { display: flex; align-items: baseline; gap: 16px; min-width: 0; flex: 1; }
.book-areas-document strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-areas-document span { color: var(--area-muted); font-size: 12px; white-space: nowrap; }
.book-areas-header-actions { display: flex; gap: 8px; }
.book-areas-toolbar, .book-areas-controls { display: flex; align-items: center; gap: 8px; }
.book-areas-toolbar { justify-content: space-between; padding: 8px 20px; border-bottom: 1px solid var(--area-line); background: var(--area-panel); }
.book-areas-controls label { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.book-areas-controls button, .book-areas-controls select, .book-areas-controls input, .book-areas-error button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--area-line); background: var(--area-paper); border-radius: 5px; padding: 6px 9px; font: inherit; font-size: 12px; }
.book-areas-controls input { width: 62px; }
.book-areas-controls > span { font-size: 12px; color: var(--area-muted); white-space: nowrap; }
.book-areas-controls button[aria-pressed="true"] { border-color: #998de5; color: #6155c5; }
.book-areas-layout { display: grid; grid-template-columns: 88px minmax(0, 1fr); min-height: 0; position: relative; }
.book-areas-tools { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 12px 4px; overflow-y: auto; border-right: 1px solid var(--area-line); background: var(--area-paper); }
.book-areas-tools button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 76px; min-height: 64px; position: relative; border-radius: 6px; font-size: 10px; }
.book-areas-tools button[aria-pressed="true"] { background: #6155c5; color: white; }
.book-areas-tools button:hover:not([aria-pressed="true"]) { background: var(--area-panel); }
.book-areas-preview { position: relative; min-width: 0; min-height: 0; background: #35353d; }
.book-areas-scroll { height: 100%; overflow: auto; scrollbar-gutter: stable; padding: 24px; }
.book-areas-page { position: relative; margin-inline: auto; background: #fff; box-shadow: 0 6px 24px #0005; }
.book-areas-page canvas { width: 100%; height: 100%; display: block; }
.book-areas-overlay { position: absolute; inset: 0; touch-action: none; }
.book-areas-overlay.is-drawing, .book-areas-overlay.is-drawing * { cursor: crosshair; }
.book-area { position: absolute; border: 2px solid var(--area-color, #7c5cce); background: color-mix(in srgb, var(--area-color, #7c5cce) 12%, transparent); text-align: left; padding: 0; cursor: move; }
.book-area[data-type="audio"] { --area-color: #167ca6; }
.book-area[data-type="word"] { --area-color: #bd7310; }
.book-area.is-selected { z-index: 2; border-width: 3px; box-shadow: 0 0 0 2px #fff; }
.book-area-label { position: absolute; top: 0; left: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; background: var(--area-color, #7c5cce); padding: 2px 5px; font-size: 10px; pointer-events: none; }
.book-area-handle { position: absolute; right: -6px; bottom: -6px; width: 14px; height: 14px; background: var(--area-color, #7c5cce); border: 2px solid #fff; cursor: nwse-resize; }
.book-area-draft { pointer-events: none; border-style: dashed; z-index: 3; }
.book-areas-layers { border-bottom: 1px solid var(--area-line); margin: -16px -16px 16px; }
.book-areas-layers summary { padding: 14px 16px; font-size: 12px; font-weight: 600; cursor: pointer; }
.book-areas-layers summary span { color: var(--area-muted); margin-left: 6px; }
.book-areas-layer-list { padding: 0 8px 8px; max-height: 220px; overflow-y: auto; }
.book-areas-layer-list button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 8px; text-align: start; font-size: 12px; border-radius: 4px; }
.book-areas-layer-list button[aria-pressed="true"] { background: var(--area-panel); box-shadow: inset 3px 0 #6155c5; }
.book-areas-layer-list button > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.book-areas-layer-list small { color: var(--area-muted); white-space: nowrap; }
.book-areas-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; font-size: 12px; }
.book-areas-pagination button { border: 1px solid currentColor; border-radius: 5px; padding: 4px 8px; }
.book-areas-pagination button:disabled { opacity: .4; cursor: default; }
.book-area-type { min-width: 36px; color: #7c5cce; font-size: 10px; font-weight: 600; }
.book-area-type[data-type="audio"] { color: #167ca6; }
.book-area-type[data-type="word"] { color: #bd7310; }
.book-areas-properties-title { font-size: 12px; color: var(--area-muted); margin-bottom: 16px; }
.book-areas-inspector-heading { display: flex; align-items: center; justify-content: space-between; font-size: 13px; margin-bottom: 16px; }
.book-areas-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 0 20px; font-size: 11px; color: var(--area-muted); border-top: 1px solid var(--area-line); background: var(--area-panel); }
.book-areas-messages { position: absolute; left: 16px; right: 16px; bottom: 12px; z-index: 4; pointer-events: none; }
.book-areas-messages .book-areas-hint, .book-areas-error { padding: 10px 14px; background: var(--area-paper); border: 1px solid var(--area-line); border-radius: 6px; box-shadow: 0 2px 10px #0002; }
.book-areas-error { font-size: 12px; pointer-events: auto; max-height: 180px; overflow-y: auto; }
.book-areas-status { position: absolute; top: 12px; left: 16px; z-index: 4; padding: 10px 16px; font-size: 12px; color: var(--area-muted); border-radius: 6px; background: var(--area-paper); box-shadow: 0 1px 4px #0002; pointer-events: none; }
.book-areas-download { right: 16px; }
.book-areas-download-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.book-areas-progress { display: block; width: 100%; height: 8px; accent-color: #6155c5; }
/* The document workspace stays neutral and dark, independent of the dashboard theme. */
.book-areas-workspace { --area-panel: #303030; --area-paper: #282828; --area-line: #454545; --area-muted: #b5b5b5; --area-ink: #e3e3e3; color-scheme: dark; grid-template-rows: 48px 44px minmax(0, 1fr) 30px; }
.book-areas-workspace button:focus-visible, .book-areas-workspace select:focus-visible, .book-areas-workspace input:focus-visible { outline-color: #75b6ff; }
.book-areas-workspace .book-areas-header-actions button, .book-areas-workspace .book-areas-controls :is(button, select, input), .book-areas-tools button { border-radius: 3px; }
.book-areas-header-actions .book-areas-save { background: #246fc0; border-color: #3987d9; }
.book-areas-workspace .book-areas-header-actions button { padding: 6px 12px; }
.book-areas-controls button[aria-pressed="true"] { border-color: #75b6ff; color: #b5d8ff; }
.book-areas-tools button[aria-pressed="true"] { background: #484848; box-shadow: inset 0 0 0 1px #686868; }
.book-areas-preview { background: #1e1e1e; }
.book-areas-scroll { overscroll-behavior: contain; scrollbar-color: #606060 #242424; }
.book-areas-layer-list button[aria-pressed="true"] { background: #414141; box-shadow: inset 3px 0 #3987d9; }
.book-areas-workspace .book-area-type { color: #b7a1ef; }
.book-areas-workspace .book-area-type[data-type="audio"] { color: #76c6e8; }
.book-areas-workspace .book-area-type[data-type="word"] { color: #eabc71; }
.book-areas-progress { accent-color: #3987d9; }
.book-areas-workspace .fi-input-wrp { background: #202020; border-radius: 3px; --tw-ring-color: #4b4b4b; }
.book-areas-workspace :is(.fi-input, .fi-textarea, .fi-select-input, .fi-fo-field-wrp-label, .fi-section-header-heading) { color: var(--area-ink); }
.book-areas-workspace :is(.fi-section, .fi-fo-repeater-item, .fi-fo-repeater-item-header) { background: var(--area-panel); border-color: var(--area-line); border-radius: 3px; }
@media (max-width: 800px) {
    .book-areas-workspace { grid-template-rows: 56px auto minmax(0, 1fr) auto; }
    .book-areas-header { padding: 0 10px; gap: 8px; }
    .book-areas-document { display: block; }
    .book-areas-document strong { display: block; max-width: 38vw; font-size: 12px; }
    .book-areas-document span { display: none; }
    .book-areas-header-actions button { padding: 7px 10px; font-size: 12px; }
    .book-areas-toolbar { padding: 8px; flex-wrap: wrap; gap: 8px; }
    .book-areas-controls { flex-wrap: wrap; }
    .book-areas-layout { grid-template-columns: 56px minmax(0, 1fr); }
    .book-areas-tools button { width: 46px; }
    .book-areas-footer { padding: 8px 12px; gap: 12px; font-size: 10px; }
    .book-areas-launcher { align-items: start; flex-direction: column; }
}

.book-areas-fields { min-width: 0; border: 0; padding: 0; }
.book-areas-fields label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; font-size: 12px; }
.book-areas-fields :is(input, textarea, select), .book-areas-ai :is(input, textarea, select) { width: 100%; min-width: 0; padding: 8px; background: #202020; color: var(--area-ink); border: 1px solid var(--area-line); border-radius: 3px; font: inherit; }
.book-areas-fields small { color: var(--area-muted); font-size: 11px; }
.book-areas-fields details { border-top: 1px solid var(--area-line); padding: 12px 0; }
.book-areas-fields summary { cursor: pointer; margin-bottom: 12px; font-size: 12px; }
.book-areas-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.book-areas-fields button { border: 1px solid var(--area-line); padding: 5px 8px; border-radius: 3px; font-size: 12px; }
.book-areas-transcript { border-bottom: 1px solid var(--area-line); padding: 12px 0; margin-bottom: 12px; }

.book-areas-filter { display: grid; gap: 10px; padding: 0 16px 12px; font-size: 12px; }
.book-areas-filter input[type="search"] { width: 100%; padding: 7px 9px; border: 1px solid var(--area-line); border-radius: 3px; background: #202020; color: var(--area-ink); }
.book-areas-filter label { display: flex; align-items: center; gap: 8px; color: var(--area-muted); }
.book-areas-filter input[type="checkbox"] { accent-color: #3987d9; }

.book-areas-tool-group { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
.book-areas-tool-heading { color: var(--area-muted); text-transform: uppercase; letter-spacing: .08em; font-size: 9px; padding: 2px 0; }
.book-areas-tools kbd { position: absolute; top: 4px; right: 5px; font: inherit; font-size: 9px; color: var(--area-muted); }
.book-areas-tools button[aria-pressed="true"] { box-shadow: inset 2px 0 #75b6ff, inset 0 0 0 1px #686868; }
.book-areas-view-tools { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--area-line); }
@media (max-width: 800px) { .book-areas-tools kbd { display: none; } .book-areas-tools button { min-height: 52px; } }

/* Approved catalog direction: pale surfaces, pill navigation and compact rows. */
.fi-body { background: #f3f2f8; }
.fi-body .fi-main { padding-block: 24px; }
.fi-body .fi-topbar { box-shadow: none; border-bottom: 1px solid #e9e7f2; }
.fi-body .fi-section, .fi-body .fi-ta-ctn { border-radius: 20px; box-shadow: none; }
.fi-body .fi-ta-header { padding: 20px 24px; }
.fi-body .fi-ta-header-heading { font-size: 18px; }
.fi-body .fi-ta-header-cell { background: #f8f7fc; color: #66617d; }
.fi-body .fi-ta-cell { padding-block: 14px; }
.fi-body .fi-btn { border-radius: 12px; }
.fi-body .fi-tabs { border-radius: 999px; }
.fi-body .fi-tabs-item { border-radius: 999px; }
.fi-body .fi-sidebar-item.fi-active > .fi-sidebar-item-btn { background: #22212c; box-shadow: none; border-radius: 999px; }
.fi-body .fi-sidebar-item.fi-active > .fi-sidebar-item-btn > :is(.fi-icon, .fi-sidebar-item-label) { color: #fff; }
.academic-catalog { align-items: start; }
.academic-catalog-sidebar { display: grid; gap: 14px; align-content: start; }
.academic-catalog-sidebar section { padding: 20px; border-radius: 20px; background: #fff; }
.academic-catalog-sidebar h2 { font-size: 15px; font-weight: 650; line-height: 20px; }
.academic-catalog-sidebar p { margin: 8px 0 16px; color: #79738d; font-size: 13px; line-height: 1.6; }
.academic-catalog-sidebar svg { width: 22px; height: 22px; flex-shrink: 0; }
.academic-catalog-sidebar .academic-catalog-upload { border: 1px dashed #d8d2ed; text-align: center; }
.academic-catalog-icon { margin: 0 auto 16px; color: #6155c5; }
.academic-catalog-sidebar .academic-catalog-checklist { background: #24232c; color: #fff; }
.academic-catalog-checklist h2 { display: flex; align-items: center; gap: 10px; }
.academic-catalog-checklist h2 svg { color: #b4a6ff; }
.academic-catalog-checklist ol { padding-inline-start: 20px; margin-top: 20px; list-style: decimal; }
.academic-catalog-checklist li { padding: 12px 0; border-bottom: 1px solid #ffffff18; font-size: 13px; }
.academic-catalog-checklist li:last-child { border: 0; padding-bottom: 0; }
.academic-catalog-checklist p { color: #bbb7c8; margin-bottom: 0; }
.academic-catalog-links a { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid #eeeaf5; font-size: 13px; line-height: 18px; }
.academic-catalog-links a:last-child { border: 0; padding-bottom: 0; }
.academic-catalog-links a span { flex: 1; }
.academic-catalog-links a svg { color: #6155c5; }
.academic-catalog-links a:focus-visible { outline: 2px solid #6155c5; outline-offset: 4px; }
.academic-catalog-links a:hover { color: #6155c5; }
.academic-catalog-links h2 { display: flex; gap: 10px; align-items: center; }
.academic-catalog-sidebar .academic-catalog-links { padding: 16px; }
.academic-catalog-links a { padding-block: 7px; }
.academic-catalog-links h2 svg { color: #6155c5; }
.academic-catalog-links small { display: block; font-size: 11px; color: #8c849f; margin-top: 3px; line-height: 1.5; }
.dark .fi-body { background: #16151e; }
.dark .fi-body .fi-topbar { border-color: #39364c; }
.dark .fi-body .fi-ta-header-cell { background: #292633; color: #c2bcd4; }
.dark .academic-catalog-sidebar section { background: #24222f; }
.dark .academic-catalog-sidebar p { color: #b8b2ca; }
.dark .academic-catalog-sidebar .academic-catalog-upload { border-color: #514873; }
.dark .academic-catalog-links a { border-color: #39364c; }
.dark .academic-catalog-links a svg { color: #bcb3ff; }
@media (max-width: 1279px) { .academic-catalog-sidebar { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
@media (max-width: 640px) { .academic-catalog-sidebar { grid-template-columns: 1fr; } .academic-catalog-sidebar section { padding: 20px; } }

/* Match the approved Academic workspace while keeping native Filament navigation. */
.academic-brand { display: inline-flex; align-items: center; gap: 12px; font-size: 25px; font-weight: 700; letter-spacing: -.6px; }
.academic-brand svg { width: 36px; height: 36px; color: #6155c5; }
.academic-profile-email { display: block; padding-inline-start: 44px; color: #8c849f; font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.academic-theme-control { display: flex; align-items: center; gap: 12px; margin: 0 20px; padding: 18px 0; border-top: 1px solid #e9e5f3; order: 1; font-size: 13px; color: #76708a; }
.academic-theme-control > svg { width: 22px; height: 22px; }
.academic-theme-control > span { flex: 1; }
.academic-theme-control button { width: 38px; height: 22px; padding: 3px; border-radius: 999px; background: #6155c5; }
.academic-theme-control button span { display: block; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.academic-theme-control button[aria-checked="true"] span { transform: translateX(16px); }
.fi-body .fi-sidebar-footer { order: 2; padding: 0 14px 14px; margin: 0; row-gap: 0; }
.fi-body .fi-sidebar-footer .fi-user-menu-trigger { padding: 6px; }
.academic-profile-email { margin-top: -8px; pointer-events: none; }
.academic-topbar-context { order: 1; display: flex; align-items: center; gap: 12px; color: #77708d; font-size: 12px; }
.fi-body .fi-topbar-end { order: 2; }
.academic-topbar-context > span { background: #eee9ff; color: #6155c5; padding: 6px 12px; border-radius: 8px; font-weight: 600; }
.academic-catalog-header h1 { font-size: 32px; font-weight: 700; letter-spacing: -.8px; line-height: 1.25; margin: 12px 0 4px; }
.academic-catalog-header > p { color: #77718c; font-size: 16px; }
.academic-catalog-breadcrumb { font-size: 13px; color: #716a87; }
.academic-catalog-breadcrumb span { margin: 0 14px; color: #bbb4cb; }
.academic-catalog-sections { display: flex; gap: 24px; margin-top: 12px; border-bottom: 1px solid #e7e3f1; }
.academic-catalog-sections a { padding: 0 12px 12px; font-size: 14px; color: #77718c; }
.academic-catalog-sections a[aria-current="page"] { border-bottom: 3px solid #6155c5; font-weight: 650; color: #211c34; }
.academic-catalog-top-actions { display: flex; align-items: center; justify-content: end; gap: 16px; }
.academic-catalog-top-actions .fi-btn { padding-inline: 20px; }
.academic-catalog-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 10px 16px; border-radius: 22px; background: #fff; }
.academic-catalog-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.academic-catalog-tabs button { display: flex; align-items: center; gap: 12px; padding: 9px 16px; border-radius: 999px; font-size: 13px; color: #5f5777; }
.academic-catalog-tabs button span { padding: 2px 8px; border-radius: 999px; background: #f1eef9; }
.academic-catalog-tabs button[aria-pressed="true"] { background: #6155c5; color: #fff; }
.academic-catalog-tabs button[aria-pressed="true"] span { background: #ffffffb8; color: #5144b0; }
.academic-catalog-filters { display: flex; flex-wrap: wrap; gap: 12px; margin-inline-start: auto; }
.academic-catalog-filters label { display: flex; align-items: center; gap: 12px; border: 1px solid #e9e4f2; border-radius: 18px; padding: 10px 16px; color: #716a87; }
.academic-catalog-filters svg { width: 20px; height: 20px; }
.academic-catalog-filters input, .academic-catalog-filters select { border: 0; padding: 0; background: transparent; color: inherit; font-size: 13px; outline-offset: 4px; }
.academic-catalog-filters select { padding-inline-end: 24px; }
.academic-catalog-search input { width: 210px; }
.fi-resource-books .fi-ta-ctn { position: relative; overflow: hidden; border: 0; outline: 0; }
.fi-resource-books .fi-ta-header-toolbar { position: absolute; inset-inline-end: 16px; top: 16px; padding: 0; border: 0; width: auto; }
.fi-resource-books .fi-ta-header-toolbar .fi-ta-search-field, .fi-resource-books .fi-ta-filters-trigger-action-ctn { display: none; }
.fi-resource-books .fi-ta-header { min-height: 68px; padding: 22px; }
.fi-resource-books .fi-ta-header-heading { font-size: 20px; font-weight: 650; }
.fi-resource-books .fi-ta-table { border-collapse: separate; border-spacing: 0; }
.fi-resource-books .fi-ta-header-cell { padding-block: 12px; font-size: 12px; font-weight: 600; }
.fi-resource-books .fi-ta-cell { padding-block: 9px; font-size: 13px; border-bottom: 1px solid #eeebf4; }
.fi-resource-books .fi-ta-cell :is(.fi-ta-image, .fi-ta-text) { padding-block: 0; }
.fi-resource-books .fi-ta-cell:first-child { width: 70px; padding-inline-end: 4px; }
.fi-resource-books .fi-ta-image img { border-radius: 3px; object-fit: cover; }
.fi-resource-books .fi-ta-text-item { font-size: 13px; line-height: 20px; }
.fi-resource-books .fi-ta-text-description { font-size: 12px; color: #8c849f; margin-top: 4px; }
.fi-resource-books .fi-ta-content-ctn { margin-inline: 20px; }
.fi-resource-books .fi-page-header-main-ctn { padding-block: 0; row-gap: 8px; }
.fi-resource-books .fi-ta-filters-dropdown { display: none; }
.fi-resource-books .fi-pagination-overview { display: inline; font-size: 12px; color: #817893; }
.fi-resource-books .fi-pagination-items { display: flex; box-shadow: none; background: transparent; gap: 6px; }
.fi-resource-books .fi-pagination-items .fi-active .fi-pagination-item-btn { background: #6155c5; border-radius: 10px; }
.fi-resource-books .fi-pagination-items .fi-active .fi-pagination-item-label { color: white; }
.fi-resource-books .fi-pagination-records-per-page-select-ctn { display: none; }
.fi-resource-books .fi-pagination { grid-template-columns: 1fr auto; }
.fi-resource-books .fi-ta-text .fi-badge { border-radius: 999px; padding: 4px 9px; box-shadow: none; }
.fi-body .fi-btn.fi-color-primary { background: #6155c5; color: white; }
.fi-body .fi-btn.fi-color-primary:hover { background: #5144b0; }
.fi-body .fi-btn.fi-color-primary .fi-icon { color: inherit; }
.fi-resource-books .fi-page-content > .fi-sc { gap: 16px; }
.academic-catalog-checklist ol { counter-reset: checklist; padding: 0; list-style: none; margin-top: 14px; }
.academic-catalog-checklist li { position: relative; padding: 10px 0 10px 44px; min-height: 0; line-height: 19px; }
.academic-catalog-checklist li p { line-height: 18px; margin-top: 5px; font-size: 12px; }
.academic-catalog-checklist li::before { counter-increment: checklist; content: counter(checklist); position: absolute; inset-inline-start: 0; top: 14px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #ffffff15; color: #fff; }
.academic-catalog-sidebar .academic-catalog-upload { min-height: 196px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.academic-catalog-upload .academic-catalog-icon { padding: 12px; width: 48px; height: 48px; background: #f4f1fa; border-radius: 50%; }
.dark .academic-catalog-toolbar { background: #24222f; }
.dark .academic-catalog-filters label, .dark .academic-catalog-sections, .dark .academic-theme-control { border-color: #39364c; }
.dark .academic-catalog-tabs button { color: #c7bfd9; }
.dark .academic-catalog-tabs button span { background: #393346; }
.dark .academic-catalog-tabs button[aria-pressed="true"] span { background: #ddd4fa; color: #5144b0; }
.dark .academic-catalog-sections a[aria-current="page"] { color: #eee8ff; }
.dark :is(.academic-catalog-header > p, .academic-catalog-breadcrumb, .academic-catalog-sections a, .academic-catalog-filters label, .academic-theme-control, .academic-topbar-context, .academic-profile-email, .academic-catalog-links small) { color: #b8b2ca; }
.dark .fi-resource-books .fi-ta-cell { border-color: #373442; }
@media (min-width: 1024px) {
    .fi-body { padding: 14px; }
    .fi-body .fi-topbar-ctn { margin-inline-start: calc(var(--sidebar-width) + 10px); border-radius: 22px 22px 0 0; top: 14px; }
    .fi-body .fi-topbar { border-radius: inherit; min-height: 52px; background: #fbfaff; padding-inline: 18px; border: 0; box-shadow: none; }
    .fi-body .fi-topbar-start { margin-inline-end: 0; }
    .fi-body .fi-topbar-start > a, .fi-body .fi-topbar-start > .fi-logo { display: none; }
    .fi-body .fi-topbar-collapse-sidebar-btn-ctn { width: 40px; }
    .fi-body .fi-sidebar { top: 14px; height: calc(100dvh - 28px); margin-top: -52px; background: #fff; border: 0; border-radius: 22px; }
    .fi-body .fi-sidebar-header { display: flex; padding: 20px; height: 64px; background: transparent; box-shadow: none; border: 0; }
    .fi-body .fi-sidebar-nav { padding: 0 14px 14px; row-gap: 8px; scrollbar-gutter: auto; }
    .fi-body .fi-sidebar-nav-groups { gap: 16px; margin-inline: 0; }
    .fi-body .fi-sidebar-group { gap: 2px; }
    .fi-body .fi-sidebar-group-items { gap: 0; }
    .fi-body .fi-sidebar-group-btn { padding: 4px 10px; height: 26px; }
    .fi-body .fi-sidebar-group-label { font-size: 10px; letter-spacing: .04em; }
    .fi-body .fi-sidebar-item-label { font-size: 13px; font-weight: 400; }
    .fi-body .fi-sidebar-item-btn { min-height: 36px; padding: 6px 10px; }
    .fi-body .fi-sidebar-item-btn > .fi-icon { width: 19px; height: 19px; }
    .fi-body .fi-main-ctn { margin-inline-start: 10px; background: #fbfaff; border-radius: 0 0 22px 22px; }
    .fi-body.fi-body-has-sidebar-collapsible-on-desktop .fi-main-ctn { min-height: calc(100dvh - 80px); }
    .fi-body .fi-main { padding: 10px 20px 5px; }
    .academic-catalog-top-actions { position: fixed; inset-inline-end: 32px; top: 22px; z-index: 35; }
    .fi-body:has(.fi-sidebar:not(.fi-sidebar-open)) .fi-topbar-ctn { margin-inline-start: calc(var(--collapsed-sidebar-width) + 10px); }
    .dark .fi-body .fi-topbar, .dark .fi-body .fi-main-ctn { background: #1c1a25; }
    .dark .fi-body .fi-sidebar { background: #24222f; }
}
@media (min-width: 1280px) {
    .academic-catalog, .academic-catalog-toolbar { margin-inline: -16px; }
    .academic-catalog > .fi-sc { grid-template-columns: minmax(0, 1fr) 332px !important; gap: 16px; }
    .academic-catalog > .fi-sc > * { grid-column: auto !important; min-width: 0; }
    .academic-catalog > .fi-sc > :first-child { align-self: stretch; }
    .academic-catalog .fi-ta { height: 100%; }
    .academic-catalog .fi-ta-ctn { min-height: 100%; }
    .academic-catalog .fi-ta-main { display: flex; flex-direction: column; }
    .academic-catalog .fi-ta-main > .fi-pagination { margin-top: auto; }
}
@media (max-width: 1023px) { .academic-topbar-context p { display: none; } .academic-catalog-top-actions { margin-bottom: 16px; } }
@media (max-width: 640px) {
    .academic-catalog-tabs { gap: 0; flex-wrap: nowrap; }
    .academic-catalog-tabs button { padding: 8px 10px; font-size: 12px; gap: 6px; }
    .fi-resource-books .fi-ta-table { min-width: 720px; }
    .academic-catalog-filters { margin: 0; width: 100%; }
    .academic-catalog-filters label { width: 100%; }
    .academic-catalog-filters input, .academic-catalog-filters select { flex: 1; min-width: 0; }
    .academic-catalog-header h1 { font-size: 28px; }
}

.book-areas-ai { border-bottom: 1px solid var(--area-line); padding-bottom: 1rem; margin-bottom: 1rem; }
.book-areas-ai label { display: grid; gap: .35rem; margin-top: .65rem; }
.book-areas-ai label.book-areas-keep-existing { display: flex; align-items: center; gap: .5rem; }
.book-areas-ai .book-areas-keep-existing input { width: 16px; height: 16px; padding: 0; accent-color: #3987d9; }
.book-areas-ai textarea { text-align: start; width: 100%; }
.book-areas-ai-window { position: fixed; z-index: 6; width: min(420px, calc(100vw - 16px)); min-width: min(300px, calc(100vw - 16px)); max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); margin: 0; padding: 12px; overflow: auto; resize: both; box-shadow: 0 12px 40px #0008; color: var(--area-ink); background: var(--area-paper); border: 1px solid var(--area-line); border-radius: 3px; color-scheme: dark; }
.book-areas-ai-window .book-areas-ai { border: 0; padding: 0; margin: 0; }
.book-areas-ai-header { position: sticky; top: -12px; z-index: 2; margin: -12px -12px 10px; padding: 5px 8px; border-bottom: 1px solid var(--area-line); background: var(--area-panel); cursor: move; touch-action: none; user-select: none; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.book-areas-ai-header h2 { font-size: 12px; font-weight: 600; }
.book-areas-ai-window button { font-size: 12px; padding: 5px 8px; border: 1px solid var(--area-line); border-radius: 4px; background: var(--area-panel); }
.book-areas-ai-window-controls { display: flex; align-items: center; gap: 2px; }
.book-areas-ai-window-controls button[aria-pressed="true"] { border-color: #75b6ff; color: #b5d8ff; }
.book-areas-ai-window.is-docked .book-areas-ai-header { cursor: default; }
@media (min-width: 901px) {
    .book-areas-layout.has-docked-windows { grid-template-columns: 88px var(--dock-left-first) var(--dock-left-second) var(--dock-left-third) minmax(0, 1fr) var(--dock-right-first) var(--dock-right-second) var(--dock-right-third); grid-template-rows: minmax(0, 1fr); }
    .has-docked-windows > .book-areas-tools { grid-column: 1; grid-row: 1; }
    .has-docked-windows > .book-areas-preview { grid-column: 5; grid-row: 1; }
    .book-areas-ai-window.is-docked { grid-column: var(--dock-column); grid-row: 1; position: relative; z-index: 1; min-height: 0; width: auto; min-width: 0; max-width: none; max-height: 100%; resize: none; box-shadow: none; border-radius: 0; }
}
@media (max-width: 900px) {
    .book-areas-ai-window.is-docked { position: absolute; top: 0; height: 100%; width: var(--dock-width); min-width: 0; max-height: 100%; resize: none; border-radius: 0; }
    .book-areas-ai-window[data-dock="left"] { left: var(--dock-offset); }
    .book-areas-ai-window[data-dock="right"] { right: var(--dock-offset); }
}

.book-areas-ai-window-controls button, .book-areas-ai-window .book-areas-ai-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 4px; border-color: transparent; background: transparent; flex-shrink: 0; }
.book-areas-ai-window-controls button:hover, .book-areas-ai-icon:hover { background: #ffffff12; }
.book-areas-ai-window-controls svg, .book-areas-ai-icon svg { width: 14px; height: 14px; }
.book-areas-ai-model { display: flex; align-items: center; gap: 4px; }
.book-areas-ai-model select { flex: 1; min-width: 0; }
.book-areas-ai-window label { font-size: 12px; }
.book-areas-ai-window :is(input, textarea, select) { padding: 6px 8px; font-size: 12px; }
.book-areas-ai-window .book-areas-ai-current-page { padding: 4px 0; margin-top: 4px; border: 0; background: transparent; color: var(--area-muted); text-decoration: underline; text-underline-offset: 3px; }
.book-areas-ai-actions { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.book-areas-ai-window .book-areas-ai-generate { background: #246fc0; border-color: #3987d9; color: white; }
.book-areas-image-window { z-index: 7; }
.book-areas-image-reference { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12px; overflow-wrap: anywhere; }
.book-areas-image-reference img { width: 64px; height: 64px; object-fit: contain; background: white; border-radius: 3px; }
.book-areas-image-results { display: grid; gap: 4px; margin-top: 8px; }
.book-areas-image-results button { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: start; }
.book-areas-image-results button[aria-pressed="true"] { border-color: #75b6ff; }
.book-areas-image-results small { white-space: nowrap; color: var(--area-muted); }
.book-area-image-match { cursor: move; border: 2px solid #f5c542; background: #f5c54222; }
.book-area-image-match.is-selected { border-width: 3px; background: #f5c54244; }
.book-areas-visibility { display: flex; gap: 6px; align-items: center; }
.book-areas-visibility button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--area-line); border-radius: 4px; background: var(--area-panel); color: var(--area-muted); font-size: 12px; white-space: nowrap; }
.book-areas-visibility svg { width: 15px; height: 15px; }
.book-areas-visibility button[aria-pressed="true"] { border-color: #75b6ff; outline: 1px solid #75b6ff; outline-offset: -1px; background: #75b6ff12; color: #c4dfff; }
.book-areas-visibility button:focus-visible { outline: 2px solid white; outline-offset: 2px; }
@media (max-width: 700px) {
    .book-areas-workspace { grid-template-rows: auto auto minmax(0, 1fr) auto; }
    .book-areas-header { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
    .book-areas-visibility { order: 1; width: 100%; }
    .book-areas-visibility button { flex: 1; padding: 6px; }
}


.book-areas-image-result { position: relative; min-width: 0; border: 1px solid var(--area-line); border-radius: 5px; background: var(--area-panel); }
.book-areas-image-result[data-selected="true"] { border-color: #75b6ff; background: #75b6ff12; }
.book-areas-image-result > button:first-child { width: 100%; min-width: 0; padding: 5px 84px 5px 8px; border: 0; background: transparent; }
.book-areas-image-result > button:first-child span { display: block; min-width: 0; width: 100%; }
.book-areas-image-result strong, .book-areas-image-result small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 16px; }
.book-areas-match-actions { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); display: flex; }
.book-areas-image-audio { grid-column: 1 / -1; width: 100%; min-width: 0; }
.book-areas-search-settings h3 { font-size: 12px; font-weight: 600; padding-bottom: 8px; }
.book-areas-matcher-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; font-size: 12px; }
.book-areas-matcher-heading span { color: var(--area-muted); font-size: 11px; }
.book-areas-image-results, .book-areas-track-list { max-height: 260px; overflow: auto; scrollbar-gutter: stable; }
.book-areas-image-result small { font-size: 11px; margin-top: 0; }
.book-areas-track-list { display: grid; gap: 4px; margin: 8px 0 0; list-style: none; padding: 0; scrollbar-gutter: auto; }
.book-areas-track-list li { position: relative; display: flex; align-items: center; gap: 2px; min-width: 0; }
.book-areas-image-result > .book-areas-match-undo { position: absolute; right: 84px; top: 50%; transform: translateY(-50%); z-index: 1; opacity: 0; pointer-events: none; color: #b5d8ff; }
.book-areas-image-result:hover .book-areas-match-undo, .book-areas-image-result:focus-within .book-areas-match-undo { opacity: 1; pointer-events: auto; }
.book-areas-track-menu { position: relative; flex-shrink: 0; }
.book-areas-track-menu summary { display: flex; padding: 6px; cursor: pointer; list-style: none; border-radius: 3px; }
.book-areas-track-menu summary::-webkit-details-marker { display: none; }
.book-areas-track-menu summary svg { width: 16px; height: 16px; }
.book-areas-track-menu > button { position: absolute; right: 0; top: 100%; z-index: 2; white-space: nowrap; box-shadow: 0 4px 12px #0008; }
.book-areas-track-name { position: relative; display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; text-align: start; }
.book-areas-track-switch { position: absolute; left: 26px; right: 0; opacity: 0; padding: 2px 4px; background: var(--area-panel); color: #b5d8ff; font-size: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; pointer-events: none; }
.book-areas-track-name:hover .book-areas-track-switch, .book-areas-track-name:focus-visible .book-areas-track-switch { opacity: 1; }
.book-areas-track-name span { flex-shrink: 0; color: var(--area-muted); }
.book-areas-track-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.book-areas-track-name[aria-pressed="true"] { border-color: #75b6ff; }
.book-areas-count { padding: 2px 7px; border-radius: 12px; background: #ffffff0a; }
.book-areas-track-list li { padding: 3px; border: 1px solid var(--area-line); border-radius: 5px; background: var(--area-panel); }
.book-areas-track-list .book-areas-track-name { border-color: transparent; background: transparent; padding: 7px 5px; }
.book-areas-track-list .book-areas-track-name[aria-pressed="true"] { color: #b5d8ff; background: #75b6ff12; }
.book-areas-track-player { display: grid; gap: 6px; margin-top: 12px; padding: 10px; border: 1px solid var(--area-line); border-radius: 6px; background: var(--area-panel); }
.book-areas-track-player > span, .book-areas-order-action small { color: var(--area-muted); font-size: 11px; }
.book-areas-track-player strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.book-areas-track-player audio { width: 100%; min-width: 0; height: 36px; }
.book-areas-order-action { display: grid; gap: 6px; margin-top: 12px; }
.book-areas-image-window { container-type: inline-size; }
.book-areas-image-window:not(.is-minimized) { display: flex; flex-direction: column; }
.book-areas-image-window > .book-areas-ai { display: flex; flex-direction: column; flex: 1; }
.book-areas-image-window .book-areas-ai-header { flex-shrink: 0; }
.book-areas-image-window:not(.is-docked):not(.is-minimized) { width: min(1020px, calc(100vw - 16px)); min-width: min(640px, calc(100vw - 16px)); }
.book-areas-image-body { display: grid; gap: 16px; flex: 1; }
.book-areas-audio-sidebar, .book-areas-matches-sidebar, .book-areas-image-content { min-width: 0; }
.book-areas-audio-sidebar h3, .book-areas-matches-sidebar h3 { font-size: 12px; font-weight: 600; }
.book-areas-audio-sidebar .book-areas-track-list { max-height: min(560px, 65dvh); }
.book-areas-matches-sidebar .book-areas-image-results { max-height: min(650px, 75dvh); }
@container (min-width: 580px) {
    .book-areas-image-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .book-areas-audio-sidebar { position: relative; }
    .book-areas-audio-sidebar::after { content: ""; position: absolute; top: 0; bottom: -12px; right: -8px; width: 1px; background: var(--area-line); pointer-events: none; }
    .book-areas-image-content { grid-column: 1 / -1; }
}
@container (min-width: 800px) {
    .book-areas-image-body { grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(0, 1.2fr); }
    .book-areas-matches-sidebar { border-right: 1px solid var(--area-line); padding-right: 14px; }
    .book-areas-image-content { grid-column: auto; }
}

.academic-book-files { border: 1px solid var(--academic-border); border-radius: 12px; overflow: hidden; }
.academic-book-files [x-cloak] { display: none !important; }
.academic-book-files svg { flex-shrink: 0; }
.academic-book-files-toolbar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--academic-border); }
.academic-book-files-location { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.academic-book-files-location svg { width: 20px; height: 20px; color: var(--academic-accent); }
.academic-book-files-location small { font-size: 11px; font-weight: 500; opacity: .6; }
.academic-book-files-toolbar label { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; width: min(100%, 230px); min-width: 0; border: 1px solid var(--academic-border); border-radius: 8px; padding: 7px 10px; }
.academic-book-files-toolbar label svg { width: 16px; height: 16px; opacity: .5; }
.academic-book-files-toolbar input { width: 100%; min-width: 0; padding: 0; border: 0; outline: none; box-shadow: none; background: transparent; font-size: 12px; }
.academic-book-files-toolbar label:focus-within { border-color: var(--academic-accent); }
.academic-book-files-views { display: flex; gap: 2px; padding: 3px; border-radius: 8px; background: var(--academic-tint); }
.academic-book-files-views button { display: grid; place-items: center; width: 30px; height: 28px; padding: 0; flex-shrink: 0; border-radius: 5px; opacity: .55; cursor: pointer; }
.academic-book-files-views button[aria-pressed="true"] { background: var(--academic-accent); color: white; opacity: 1; }
.academic-book-files-views svg { width: 16px; height: 16px; }
.academic-book-files-filters { display: flex; gap: 6px; padding: 12px 16px 0; overflow-x: auto; }
.academic-book-files-filters button { display: flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 20px; font-size: 12px; white-space: nowrap; cursor: pointer; }
.academic-book-files-filters button span { opacity: .55; font-size: 10px; }
.academic-book-files-filters button[aria-pressed="true"] { background: var(--academic-tint); color: var(--academic-accent); font-weight: 600; }
.academic-book-files-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 16px; }
.academic-book-file { min-width: 0; padding: 10px; border: 1px solid var(--academic-border); border-radius: 10px; transition: border-color .15s; }
.academic-book-file:hover, .academic-book-file:focus-within { border-color: var(--academic-accent); }
.academic-book-file-preview { position: relative; height: 108px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--academic-tint); overflow: hidden; }
.academic-book-file-preview img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.academic-book-file-preview svg { width: 38px; height: 38px; color: var(--academic-accent); stroke-width: 1.2; }
.academic-book-file-type { position: absolute; bottom: 6px; inset-inline-start: 7px; max-width: calc(100% - 14px); overflow: hidden; text-overflow: ellipsis; padding: 2px 5px; border-radius: 4px; background: var(--academic-accent); color: white; font-size: 9px; font-weight: 600; }
.academic-book-file-details { min-width: 0; font-size: 11px; margin-top: 10px; }
.academic-book-file-details strong, .academic-book-file-details p { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.academic-book-file-details strong { font-size: 12px; font-weight: 600; line-height: 1.6; }
.academic-book-file-details p { opacity: .6; margin-top: 2px; }
.academic-book-file-details small { display: block; opacity: .5; margin-top: 5px; font-size: 10px; }
.academic-book-file-actions { display: flex; justify-content: flex-end; gap: 4px; margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--academic-border); color: var(--academic-accent); }
.academic-book-file-actions a { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; flex-shrink: 0; border-radius: 5px; }
.academic-book-file-actions a:hover { background: var(--academic-tint); }
.academic-book-file-actions svg { width: 15px; height: 15px; }
.academic-book-file-details details { margin-top: 6px; min-width: 0; }
.academic-book-file-details summary { cursor: pointer; color: var(--academic-accent); }
.academic-book-file-details audio { width: 100%; height: 32px; margin-top: 8px; }
.academic-book-files-empty { grid-column: 1 / -1; text-align: center; font-size: 12px; opacity: .6; padding: 24px 12px; }
.academic-book-files :is(button, a):focus-visible { outline: 2px solid var(--academic-accent); outline-offset: 2px; }
.academic-book-files[data-view="list"] .academic-book-files-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
.academic-book-files[data-view="list"] .academic-book-file { display: flex; align-items: flex-start; gap: 12px; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--academic-border); border-radius: 0; }
.academic-book-files[data-view="list"] .academic-book-file:last-of-type { border-bottom: 0; }
.academic-book-files[data-view="list"] .academic-book-file-preview { width: 44px; height: 48px; flex-shrink: 0; }
.academic-book-files[data-view="list"] .academic-book-file-preview svg { width: 24px; height: 24px; }
.academic-book-files[data-view="list"] .academic-book-file-type { display: none; }
.academic-book-files[data-view="list"] .academic-book-file-details { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; margin-top: 0; }
.academic-book-files[data-view="list"] .academic-book-file-details :is(strong, p, small) { grid-column: 1; }
.academic-book-files[data-view="list"] .academic-book-file-actions { grid-column: 2; grid-row: 1 / 4; align-self: center; border: 0; margin: 0; padding: 0; }
.academic-book-files[data-view="list"] .academic-book-file-details details { grid-column: 1 / -1; }
@media (max-width: 640px) {
    .academic-book-files-toolbar { flex-wrap: wrap; padding: 12px; gap: 10px; }
    .academic-book-files-toolbar label { order: 3; width: 100%; }
    .academic-book-files-views { margin-inline-start: auto; }
    .academic-book-files-grid { padding: 12px; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .academic-book-files-filters { padding-inline: 12px; }
}

/* Minimized AI windows keep a vertical title strip in their current position. */
.book-areas-ai-window.is-minimized { width: 36px !important; min-width: 36px; max-width: 36px; height: 180px !important; padding: 0; overflow: hidden; resize: none; }
.book-areas-ai-window.is-minimized.is-docked { height: 100% !important; }
.book-areas-ai-window .book-areas-ai-restore { display: flex; align-items: center; justify-content: flex-start; gap: 8px; width: 100%; height: 100%; padding: 14px 8px; border: 0; border-radius: 0; background: var(--area-panel); writing-mode: vertical-rl; white-space: nowrap; font-size: 12px; font-weight: 600; cursor: pointer; }
.book-areas-ai-window .book-areas-ai-restore:hover { background: var(--area-line); }

.book-areas-window-manager { position: relative; font-size: 12px; }
.book-areas-window-manager summary { cursor: pointer; padding: 6px 10px; border: 1px solid var(--area-line); border-radius: 3px; }
.book-areas-window-manager > div { position: absolute; top: 100%; right: 0; z-index: 20; width: 280px; padding: 8px; border: 1px solid var(--area-line); border-radius: 4px; background: var(--area-panel); box-shadow: 0 8px 20px #0008; }
.book-areas-window-row { display: flex; align-items: center; gap: 5px; padding: 6px; }
.book-areas-window-row > span { flex: 1; }
.book-areas-window-row small { display: block; color: var(--area-muted); font-size: 10px; }

/* Shared dashboard operations, content previews and reporting. */
.academic-readiness-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr)); gap:16px; }
.academic-readiness-item,.academic-preview-exercise { border:1px solid var(--gray-200,#e5e7eb); border-radius:16px; padding:16px; display:grid; gap:10px; min-width:0; }
.academic-readiness-item h3,.academic-preview-exercise h3 { font-weight:600; }
.academic-readiness-item p { font-size:14px; opacity:.8; }
.academic-history-tabs { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.academic-history-tabs input,.academic-preview-item input,.academic-preview-item select { padding:8px 12px; border:1px solid #b8b2d4; border-radius:8px; max-width:100%; background:transparent; color:inherit; }
.academic-table-scroll { overflow-x:auto; max-width:100%; }
.academic-data-table { width:100%; border-collapse:collapse; text-align:start; font-size:14px; }
.academic-data-table td,.academic-data-table th { text-align:start; padding:10px 12px; border-bottom:1px solid #d8d5e0; white-space:pre-wrap; overflow-wrap:anywhere; max-width:480px; min-width:100px; }
.academic-lesson-preview { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(360px,100%),360px)); gap:24px; margin:16px 0; }
.academic-preview-exercise { background:#f5f0e6; color:#1f2430; }
.academic-preview-item { padding:12px; border-radius:12px; background:white; display:grid; gap:8px; }
.dark .academic-readiness-item { border-color:#43404e; }
