/* PDF Tools — tool-specific styles */
body.page-pdf-tools { height: auto; min-height: 100vh; overflow: auto; }

.pt-wrap {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Tabs */
.pt-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 4px;
  gap: 2px;
}
.pt-tab {
  flex: 1;
  padding: 9px 12px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.pt-tab.active { background: #fff; color: #1e293b; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* Panel */
.pt-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pt-desc {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

/* Dropzone */
.pt-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: #f8fafc;
}
.pt-dropzone:hover, .pt-dropzone.drag-over {
  border-color: #2563eb;
  background: #eff6ff;
}
.pt-dz-icon { font-size: 32px; margin-bottom: 8px; }
.pt-dz-text { font-size: 13px; color: #64748b; }
.pt-link { color: #2563eb; cursor: pointer; text-decoration: underline; }

/* File list (merge) */
.pt-file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}
.pt-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  color: #475569;
  cursor: grab;
  user-select: none;
}
.pt-file-item.dragging { opacity: 0.4; }
.pt-file-item.drag-target { border-color: #2563eb; background: #eff6ff; }
.pt-file-drag-handle { color: #cbd5e1; font-size: 16px; cursor: grab; flex-shrink: 0; }
.pt-file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-file-size { color: #94a3b8; font-size: 12px; flex-shrink: 0; }
.pt-file-remove { color: #94a3b8; cursor: pointer; flex-shrink: 0; font-size: 16px; line-height: 1; }
.pt-file-remove:hover { color: #dc2626; }

/* File chip (single file) */
.pt-file-chip-wrap { display: flex; }
.pt-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: 13px;
  color: #1e40af;
  font-weight: 500;
  max-width: 100%;
}
.pt-chip-icon { flex-shrink: 0; }
.pt-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-chip-size { color: #60a5fa; flex-shrink: 0; font-size: 12px; }

/* Split info */
.pt-split-info { display: flex; flex-direction: column; gap: 10px; }
.pt-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pt-field { display: flex; flex-direction: column; gap: 5px; }
.pt-label { font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; }
.pt-input {
  height: 38px; padding: 0 12px;
  border: 1px solid #e2e8f0; border-radius: 7px;
  font-size: 13px; color: #1e293b; background: #fff; outline: none;
}
.pt-input:focus { border-color: #2563eb; }
.pt-select {
  height: 38px; padding: 0 10px;
  border: 1px solid #e2e8f0; border-radius: 7px;
  font-size: 13px; color: #1e293b; background: #fff; outline: none; cursor: pointer;
}
.pt-select:focus { border-color: #2563eb; }
.pt-hint { font-size: 11px; color: #94a3b8; min-height: 16px; }

/* Actions */
.pt-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pt-btn-primary {
  padding: 9px 20px;
  background: #2563eb; color: #fff;
  border: none; border-radius: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: opacity 0.15s;
}
.pt-btn-primary:hover:not(:disabled) { opacity: 0.88; }
.pt-btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.pt-btn-ghost {
  padding: 9px 16px;
  background: transparent; color: #64748b;
  border: 1px solid #e2e8f0; border-radius: 8px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background 0.1s;
}
.pt-btn-ghost:hover { background: #f1f5f9; }

/* Status */
.pt-status { font-size: 13px; min-height: 20px; }
.pt-status.ok  { color: #16a34a; }
.pt-status.err { color: #dc2626; }
.pt-status.loading { color: #2563eb; }

/* Progress bar */
.pt-progress {
  height: 4px; background: #e2e8f0; border-radius: 2px; overflow: hidden;
}
.pt-progress-bar {
  height: 100%; background: #2563eb; width: 0%;
  transition: width 0.2s ease;
}

/* Text output */
.pt-text-output {
  border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden;
  max-height: 480px; overflow-y: auto;
}
.pt-text-page {
  border-bottom: 1px solid #f1f5f9;
}
.pt-text-page:last-child { border-bottom: none; }
.pt-page-label {
  padding: 6px 14px;
  background: #f8fafc;
  font-size: 10px; font-weight: 700; color: #94a3b8;
  text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid #f1f5f9;
}
.pt-page-text {
  padding: 12px 14px;
  font-size: 12px; color: #475569;
  white-space: pre-wrap; word-break: break-word;
  font-family: inherit; line-height: 1.6;
}

@media (max-width: 560px) {
  .pt-field-row { grid-template-columns: 1fr; }
  .pt-tabs .pt-tab { font-size: 11px; padding: 8px 6px; }
}
