.tool-ui {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.drop-zone {
  border: 2px dashed var(--color-border, #2A2D3A);
  border-radius: 1rem;
  padding: 3rem 2rem;
  text-align: center;
  background: var(--color-surface, #1A1D27);
  cursor: pointer;
  transition: all 0.2s ease;
}

.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--color-accent, #4F8EF7);
  background: rgba(79, 142, 247, 0.05);
}

.file-label {
  color: var(--color-accent, #4F8EF7);
  text-decoration: underline;
  cursor: pointer;
}

.editor-workspace {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.panel-card {
  background: var(--color-surface, #1A1D27);
  border: 1px solid var(--color-border, #2A2D3A);
  border-radius: 1rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.panel-title {
  font-family: var(--font-display, 'DM Sans', sans-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-snow, #F0F2F8);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-canvas-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--color-border, #2A2D3A);
  border-radius: 0.5rem;
  background: #2b2b2b;
  box-sizing: border-box;
}

#pdf-render-canvas {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

.text-item-overlay {
  position: absolute;
  background: rgba(79, 142, 247, 0.15);
  border: 1px dashed var(--color-accent, #4F8EF7);
  color: transparent;
  cursor: pointer;
  font-size: 10px;
  display: flex;
  align-items: center;
  padding: 0 2px;
  overflow: hidden;
  white-space: nowrap;
  transition: background 0.2s;
}

.text-item-overlay:hover, .text-item-overlay.edited {
  background: rgba(79, 142, 247, 0.4);
  color: var(--color-snow, #F0F2F8);
  border-style: solid;
}

.inline-text-input {
  position: absolute;
  background: var(--color-surface, #1A1D27);
  border: 2px solid var(--color-accent, #4F8EF7);
  color: var(--color-snow, #F0F2F8);
  font-size: 11px;
  padding: 0 4px;
  outline: none;
  z-index: 10;
  border-radius: 3px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 0.9rem;
  color: var(--color-snow, #F0F2F8);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border, #2A2D3A);
  color: var(--color-snow, #F0F2F8);
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-accent, #4F8EF7);
}

.btn-primary {
  background: var(--color-accent, #4F8EF7);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  width: 100%;
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.9;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
