
:root {
  --bg-page: #0d1117;
  --bg-card: #161b22;
  --bg-input: #0d1117;
  --border: #30363d;
  --accent: #58a6ff;
  --accent-dim: #1f6feb33;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --success: #3fb950;
  --danger: #f85149;
  --tab-h: 42px;
}

.aipdf-root {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 0;
  background: var(--bg-page);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 13px;
  overflow: hidden;
}

/* ── Top bar ── */
.aipdf-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  height: 52px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-card);
}

.aipdf-topbar-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .3px;
  flex: 1;
}

.aipdf-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #1a3a2a;
  color: var(--success);
  border: 1px solid #2ea04333;
}

  .aipdf-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
  }

.aipdf-model-label {
  font-size: 11px;
  color: var(--text-muted);
  background: #1a1e25;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
}

.aipdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

  .aipdf-btn:hover {
    background: #21262d;
    border-color: #8b949e;
  }

.aipdf-btn-primary {
  background: #1f6feb;
  border-color: #388bfd;
  color: #fff;
}

  .aipdf-btn-primary:hover {
    background: #388bfd;
    border-color: #58a6ff;
  }

  .aipdf-btn-primary:disabled {
    opacity: .5;
    cursor: default;
  }

.aipdf-btn i {
  font-size: 13px;
}

.aipdf-btn-extract {
  background: #238636;
  border-color: #2ea043;
  color: #fff;
}

  .aipdf-btn-extract:hover {
    background: #2ea043;
    border-color: #3fb950;
  }

.aipdf-btn-sm {
  padding: 2px 8px;
  font-size: 11px;
}

  .docv-ext-cell-hdr .aipdf-btn-sm {
    margin-left: 4px;
  }

.aipdf-spacer {
  flex: 1;
}

.aipdf-file-input {
  display: none;
}

/* ── Tabs ── */
.aipdf-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  flex-shrink: 0;
  background: var(--bg-card);
}

.aipdf-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  height: var(--tab-h);
  padding: 0 16px;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  transition: color .15s, border-color .15s;
}

  .aipdf-tab:hover {
    color: var(--text);
  }

  .aipdf-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
  }

  .aipdf-tab i {
    font-size: 14px;
  }

/* ── Panels ── */
.aipdf-panels {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.aipdf-panel {
  display: none;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 24px;
  box-sizing: border-box;
}

  .aipdf-panel.active {
    display: block;
  }

    .aipdf-panel.active.pdf-viewing {
      display: flex;
      flex-direction: column;
      min-height: 0;
      padding: 0;
      overflow: hidden;
    }

/* ── Dropzone ── */
.aipdf-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 20px 15px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

  .aipdf-dropzone:hover,
  .aipdf-dropzone.drag-over {
    border-color: var(--accent);
    background: var(--accent-dim);
  }

  .aipdf-dropzone i {
    font-size: 32px;
    color: var(--text-muted);
  }

  .aipdf-dropzone h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
  }

  .aipdf-dropzone p {
    margin: 0;
    color: var(--text-muted);
    font-size: 11px;
  }

  .aipdf-dropzone .dz-link {
    color: var(--accent);
    text-decoration: underline;
    cursor: pointer;
  }

  .aipdf-dropzone.hidden {
    display: none;
  }


/* ── Search bar ── */
.aipdf-search-wrap {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 4px;
  transition: border-color .15s;
}

  .aipdf-search-wrap:focus-within {
    border-color: var(--accent);
  }

.aipdf-search-input {
  background: none;
  border: none;
  color: var(--text);
  font-size: 12px;
  width: 130px;
  height: 24px;
  outline: none;
  padding: 0 3px;
}

  .aipdf-search-input::placeholder {
    color: var(--text-muted);
  }

.aipdf-search-icon {
  color: var(--text-muted);
  font-size: 11px;
  padding: 0 2px;
}

.aipdf-search-count {
  color: var(--text-muted);
  font-size: 11px;
  min-width: 36px;
  text-align: right;
  white-space: nowrap;
  padding: 0 2px;
}


/* ── Extraction logic ── */
.aipdf-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.aipdf-textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: 'Cascadia Code', 'Fira Mono', monospace;
  font-size: 12px;
  padding: 10px 12px;
  resize: none;
  flex: 1;
  min-height: unset;
  outline: none;
  transition: border-color .15s;
  line-height: 1.5;
}

  .aipdf-textarea:focus {
    border-color: var(--accent);
  }

.aipdf-cm-host {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

  .aipdf-cm-host .CodeMirror {
    flex: 1;
    height: 100%;
    font-family: 'Cascadia Code', 'Fira Mono', monospace;
    font-size: 12px;
    line-height: 1.55;
  }

  .aipdf-cm-host .CodeMirror-scroll {
    min-height: 100%;
  }

  .aipdf-cm-host .cm-keyword,
  .aipdf-cm-host .cm-meta,
  .aipdf-cm-host .cm-variable-2,
  .aipdf-cm-host .cm-attribute {
    color: #79c0ff !important;
  }

  .aipdf-cm-host .cm-string {
    color: #56d364 !important;
  }

  .aipdf-cm-host .cm-builtin {
    color: #d2a8ff !important;
  }

/* ── Ext cell body modifiers ── */
.aipdf-ext-md-body {
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.aipdf-ext-prompt-body {
  display: flex;
  flex-direction: column;
}

.aipdf-ext-res-body {
  padding: 0;
  display: flex;
  flex-direction: column;
}

.aipdf-ext-dl-pdf {
  margin-left: 8px;
}


.aipdf-rules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.aipdf-rule-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aipdf-rule-card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
}

  .aipdf-rule-card-title i {
    color: var(--accent);
  }

.aipdf-rule-card-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.aipdf-results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

  .aipdf-results-table th {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: .4px;
    text-transform: uppercase;
    background: var(--bg-card);
  }

  .aipdf-results-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #21262d;
    vertical-align: middle;
  }

  .aipdf-results-table tr:hover td {
    background: #21262d;
  }

.aipdf-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
}

.aipdf-tag-blue {
  background: #1f3a5c;
  color: #79c0ff;
}

.aipdf-tag-green {
  background: #1a3a2a;
  color: #56d364;
}

.aipdf-tag-yellow {
  background: #3a2a0a;
  color: #e3b341;
}

/* ── HIL button ── */
.aipdf-hil-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1f6feb, #388bfd);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  box-shadow: 0 4px 20px rgba(31,111,235,.5);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  z-index: 100;
}

  .aipdf-hil-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(31,111,235,.7);
  }

  .aipdf-hil-btn i {
    font-size: 16px;
  }

/* ── Spinner ── */
@keyframes aipdf-spin {
  to {
    transform: rotate(360deg);
  }
}

.aipdf-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff40;
  border-top-color: #fff;
  border-radius: 50%;
  animation: aipdf-spin .7s linear infinite;
  display: inline-block;
}

/* ── Dialog-scoped busy overlay (blocks input during long-running ops) ── */
.dd-busy-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 9000;
  cursor: progress;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 12px;
  pointer-events: auto;
  animation: dd-busy-fade-in .15s ease;
}

.dd-busy-spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

  .dd-busy-spinner .aipdf-spinner {
    width: 22px;
    height: 22px;
    border-width: 3px;
    border-color: #94a3b8;
    border-top-color: #2563eb;
  }

@keyframes dd-busy-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Parse progress ── */
.aipdf-parse-bar {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
}

  .aipdf-parse-bar.visible {
    display: flex;
  }

  .aipdf-parse-bar.success {
    border-color: #2ea04333;
  }

  .aipdf-parse-bar.error {
    border-color: #f8514933;
  }

.aipdf-parse-bar-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.aipdf-parse-bar.success .aipdf-parse-bar-label {
  color: var(--success);
}

.aipdf-parse-bar.error .aipdf-parse-bar-label {
  color: var(--danger);
}

.aipdf-parse-bar-msg {
  flex: 1;
}

.aipdf-progress-pct {
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  min-width: 34px;
  text-align: right;
}

.aipdf-parse-bar.success .aipdf-progress-pct {
  color: var(--success);
}

.aipdf-parse-bar.error .aipdf-progress-pct {
  color: var(--danger);
}

.aipdf-extract-bar.success .aipdf-progress-pct {
  color: var(--success);
}

.aipdf-extract-bar.error .aipdf-progress-pct {
  color: var(--danger);
}

.aipdf-progress-track {
  height: 5px;
  background: #21262d;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.aipdf-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  position: absolute;
  left: 0;
  top: 0;
  width: 0%;
  transition: width .25s ease, background .3s ease;
}

  .aipdf-progress-fill.done {
    transition: width .4s ease, background .3s ease;
  }

    .aipdf-progress-fill.done.success {
      background: var(--success);
    }

    .aipdf-progress-fill.done.error {
      background: var(--danger);
    }

/* ── Extraction progress ── */
.aipdf-extract-bar {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin: 8px 8px 0;
  flex-shrink: 0;
}

  .aipdf-extract-bar.visible {
    display: flex;
  }

  .aipdf-extract-bar.success {
    border-color: #2ea04333;
  }

  .aipdf-extract-bar.error {
    border-color: #f8514933;
  }

  .aipdf-extract-bar .aipdf-parse-bar-label {
    color: var(--text-muted);
  }

  .aipdf-extract-bar.success .aipdf-parse-bar-label {
    color: var(--success);
  }

  .aipdf-extract-bar.error .aipdf-parse-bar-label {
    color: var(--danger);
  }


/* ── Extraction panel ── */
.aipdf-panel.aipdf-ext-panel {
  padding: 0;
  display: none;
  overflow: hidden;
  background: #0d1117;
}

  .aipdf-panel.aipdf-ext-panel.active {
    display: flex;
    flex-direction: column;
  }

.aipdf-ext-bottom-row {
  flex: 1;
  display: flex;
  min-height: 0;
}

  .aipdf-ext-bottom-row > .docv-ext-cell {
    flex: 1;
    min-width: 80px;
  }

/* ── Splitters ── */
.aipdf-splitter {
  flex-shrink: 0;
  background: #1c2128;
  position: relative;
  z-index: 2;
  transition: background .15s;
}

  .aipdf-splitter:hover,
  .aipdf-splitter.dragging {
    background: var(--accent);
  }

.aipdf-splitter-v {
  width: 5px;
  cursor: col-resize;
}

.aipdf-splitter-h {
  height: 5px;
  cursor: row-resize;
}

.aipdf-splitter::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 3px;
  background: #6e7681;
  opacity: 0;
  transition: opacity .15s;
}

.aipdf-splitter-v::after {
  width: 3px;
  height: 28px;
}

.aipdf-splitter-h::after {
  width: 28px;
  height: 3px;
}

.aipdf-splitter:hover::after,
.aipdf-splitter.dragging::after {
  opacity: 1;
}

/* ── Utility & Refactored Classes ── */
.aipdf-hidden {
  display: none;
}

.aipdf-splitter-flex-none {
  flex: none;
}

.aipdf-empty-state-container {
  padding: 12px 16px;
  font-style: italic;
  font-size: 12px;
  color: #3d444d;
}

/* ── Zoom controls ── */
.aipdf-zoom-ctrl {
  display: flex;
  align-items: center;
  gap: 0;
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
  flex-shrink: 0;
}

.aipdf-zoom-btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  font-weight: 300;
  transition: background .12s, color .12s;
  flex-shrink: 0;
}

  .aipdf-zoom-btn:hover {
    background: #21262d;
    color: var(--text);
  }

  .aipdf-zoom-btn:disabled {
    opacity: .35;
    cursor: default;
  }

.aipdf-zoom-level {
  font-size: 11px;
  color: var(--text-muted);
  min-width: 38px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 0 2px;
  line-height: 26px;
  user-select: none;
  cursor: pointer;
}

/* ── Bottom edge resizer ── */
.aipdf-bottom-resizer {
  flex-shrink: 0;
  height: 6px;
  cursor: ns-resize;
  background: #1c2128;
  transition: background .15s;
  position: relative;
}

  .aipdf-bottom-resizer:hover,
  .aipdf-bottom-resizer.dragging {
    background: var(--accent);
  }

  .aipdf-bottom-resizer::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 3px;
    border-radius: 3px;
    background: #6e7681;
    opacity: 0;
    transition: opacity .15s;
  }

  .aipdf-bottom-resizer:hover::after,
  .aipdf-bottom-resizer.dragging::after {
    opacity: 1;
  }

.docv-ext-cell {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  min-height: 0;
}

.docv-ext-cell-hdr {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 7px;
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: #0d1117;
  flex-shrink: 0;
}

  .docv-ext-cell-hdr i {
    font-size: 11px;
  }

  .docv-ext-cell-hdr .docv-viewer-pagecount {
    margin-right: 6px;
  }

  .docv-ext-cell-hdr .aipdf-search-wrap {
    margin-right: 4px;
  }

  .docv-ext-cell-hdr .aipdf-search-input {
    width: 160px;
  }

.docv-ext-cell-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  padding: 10px;
  box-sizing: border-box;
}

  .docv-ext-cell-body::-webkit-scrollbar {
    width: 4px;
  }

  .docv-ext-cell-body::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 4px;
  }


.aipdf-view-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.aipdf-view-toggle-btn {
  padding: 5px 13px;
  font-size: 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background .15s, color .15s;
}

  .aipdf-view-toggle-btn + .aipdf-view-toggle-btn {
    border-left: 1px solid var(--border);
  }

  .aipdf-view-toggle-btn.active {
    background: var(--accent-dim);
    color: var(--accent);
  }

  .aipdf-view-toggle-btn:hover:not(.active) {
    background: #21262d;
    color: var(--text);
  }


/* ── Top cell ── */
.aipdf-ext-top-cell {
  flex: none;
  min-height: 60px;
}

.aipdf-ext-bottom-row {
  min-height: 200px;
}

.aipdf-ext-inner-tabs {
  display: flex;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
}

.aipdf-ext-inner-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  background: transparent;
  border: none;
  border-left: 1px solid var(--border);
  transition: color .15s, background .15s;
}

  .aipdf-ext-inner-tab:first-child {
    border-left: none;
  }

  .aipdf-ext-inner-tab:hover {
    color: var(--text);
    background: #21262d;
  }

  .aipdf-ext-inner-tab.active {
    color: var(--accent);
    background: var(--accent-dim);
  }

.aipdf-ext-view {
  display: none;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

  .aipdf-ext-view.active {
    display: flex;
    flex-direction: column;
  }

.aipdf-ext-md-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-bottom: 1px solid var(--border);
  background: #0d1117;
  flex-shrink: 0;
}

/* ── jqTree nav ── */
.docv-nav-list ul.jqtree-tree {
  margin: 0;
  padding: 4px 0;
  list-style: none;
}

  .docv-nav-list ul.jqtree-tree ul {
    list-style: none;
    padding: 0;
  }

.docv-nav-list .jqtree_common {
  color: var(--text-muted);
  font-size: 12px;
}

.docv-nav-list div.jqtree-element {
  display: flex;
  align-items: center;
  padding: 5px 8px 5px 10px;
  gap: 4px;
  cursor: pointer;
  line-height: 1.4;
  transition: background .12s, color .12s;
}

  .docv-nav-list div.jqtree-element:hover {
    background: #21262d;
    color: var(--text);
  }

.docv-nav-list li.jqtree-selected > div.jqtree-element {
  background: var(--accent-dim) !important;
  color: var(--accent) !important;
}

.docv-nav-list span.jqtree-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: inherit;
}

.docv-nav-list a.jqtree-toggler {
  color: var(--text-muted) !important;
  font-size: 10px;
  width: 14px;
  flex-shrink: 0;
  text-decoration: none;
}

.docv-nav-list li.jqtree-folder > div.jqtree-element {
  font-weight: 600;
  color: var(--text);
}


/* ── Search highlights ── */
mark.aipdf-search-highlight {
  background: #b58900;
  color: #fff;
  border-radius: 2px;
  padding: 0 1px;
}

mark.aipdf-search-highlight.aipdf-search-active {
  background: #d4a017;
  outline: 2px solid #fff;
  outline-offset: 1px;
}

/* ── Collapse button ── */
.aipdf-collapse-btn {
  padding: 2px 7px !important;
  font-size: 11px !important;
  border-color: transparent !important;
  color: var(--text-muted) !important;
  background: transparent !important;
  flex-shrink: 0;
}

  .aipdf-collapse-btn:hover {
    background: #21262d !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }

.aipdf-ext-top-cell.aipdf-ext-top-collapsed {
  overflow: hidden;
  transition: height .2s ease;
}

  .aipdf-ext-top-cell.aipdf-ext-top-collapsed .aipdf-ext-view,
  .aipdf-ext-top-cell.aipdf-ext-top-collapsed .aipdf-ext-md-bar {
    display: none !important;
  }

/* ── Splitter collapse button ── */
.aipdf-splitter-collapse-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  z-index: 10;
  transition: background .15s, color .15s, border-color .15s;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
}

  .aipdf-splitter-collapse-btn:hover {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: var(--accent);
  }
