.tool-ui {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.drop-zone {
  border: 2px dashed #2A2D3A;
  border-radius: 12px;
  padding: 2.75rem 1.5rem;
  text-align: center;
  cursor: pointer;
  background: #1A1D27;
  transition: border-color 0.2s, background-color 0.2s;
}

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

.file-label {
  color: #4F8EF7;
  cursor: pointer;
  text-decoration: underline;
  font-weight: 500;
}

.doc-info-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: #1A1D27;
  border: 1px solid #2A2D3A;
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

.doc-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.doc-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #F0F2F8;
  word-break: break-all;
}

.doc-details {
  font-size: 0.8rem;
  color: #6B7280;
}

/* Batch Toolbar */
.toolbar-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: #141720;
  border: 1px solid #2A2D3A;
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
}

.toolbar-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Page Grid */
.pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1rem;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.page-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  background: #1A1D27;
  border: 1px solid #2A2D3A;
  border-radius: 10px;
  padding: 1rem 0.75rem;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
}

.page-card:hover {
  border-color: #4F8EF7;
}

.page-card.modified {
  border-color: #4ade80;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: 0.75rem;
}

.page-num {
  font-weight: 600;
  color: #F0F2F8;
  font-family: 'JetBrains Mono', monospace;
}

.rotation-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: #6B7280;
  background: #0F1117;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.page-card.modified .rotation-tag {
  color: #4ade80;
  font-weight: 600;
}

/* Page Sheet Graphic */
.page-sheet-container {
  width: 90px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-sheet {
  width: 75px;
  height: 105px;
  background: #0F1117;
  border: 1px solid #2A2D3A;
  border-radius: 4px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.sheet-icon {
  font-size: 1.5rem;
  color: #4F8EF7;
}

.sheet-lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 60%;
}

.sheet-line {
  height: 3px;
  background: #2A2D3A;
  border-radius: 2px;
}

/* Page Action Buttons */
.page-actions {
  display: flex;
  gap: 0.4rem;
  width: 100%;
}

.btn-rotate {
  flex: 1;
  background: #0F1117;
  border: 1px solid #2A2D3A;
  color: #F0F2F8;
  border-radius: 6px;
  padding: 0.35rem 0.4rem;
  font-size: 0.775rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.btn-rotate:hover {
  border-color: #4F8EF7;
  color: #4F8EF7;
}

/* Global Buttons */
.btn-primary {
  background: #4F8EF7;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: transparent;
  color: #F0F2F8;
  border: 1px solid #2A2D3A;
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-secondary:hover {
  border-color: #4F8EF7;
  color: #FFFFFF;
}
