.pdf-page {
  --pdf-red: #e65757;
  --pdf-red-soft: rgba(230, 87, 87, .11);
}

.pdf-editor {
  display: grid;
  grid-template-columns: minmax(270px, 350px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.pdf-upload-card,
.pdf-queue-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--shadow);
}

.pdf-upload-card { padding: 20px; }
.pdf-queue-card { padding: 20px; min-height: 430px; }

.pdf-heading-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.pdf-heading-row h2 { margin: 1px 0 4px; font-size: 1.18rem; letter-spacing: -.025em; }
.pdf-heading-row p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.pdf-step {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--pdf-red-soft);
  color: var(--pdf-red);
  font-size: 12px;
  font-weight: 850;
}

.pdf-dropzone {
  min-height: 225px;
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 18px;
  border: 2px dashed var(--line-strong);
  border-radius: 20px;
  background: #fafbfe;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.pdf-dropzone:hover,
.pdf-dropzone.is-dragging {
  border-color: var(--pdf-red);
  background: #fff8f8;
}

.pdf-dropzone:focus-visible { outline-color: rgba(230, 87, 87, .35); }
.pdf-dropzone svg { width: 58px; height: 58px; color: var(--pdf-red); }
.pdf-dropzone strong { color: var(--text); font-size: 16px; }
.pdf-dropzone span { max-width: 230px; font-size: 13px; line-height: 1.45; }

.pdf-privacy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 14px;
  padding: 12px 13px;
  border-radius: 14px;
  background: #f5f8ff;
}

.pdf-privacy strong { font-size: 13px; }
.pdf-privacy span { color: var(--muted); font-size: 12px; line-height: 1.4; }

.pdf-queue-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.pdf-text-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.pdf-text-button:disabled { color: #aeb6c8; cursor: not-allowed; }

.pdf-empty {
  min-height: 225px;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 30px;
  text-align: center;
  color: var(--muted);
}

.pdf-empty strong { color: var(--text); }
.pdf-empty span { font-size: 13px; line-height: 1.5; }

.pdf-file-list {
  display: grid;
  gap: 9px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.pdf-file-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fbfcff;
}

.pdf-file-number {
  width: 38px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--pdf-red-soft);
  color: var(--pdf-red);
  font-size: 13px;
  font-weight: 850;
}

.pdf-file-info { min-width: 0; }
.pdf-file-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.pdf-file-info span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }

.pdf-file-controls { display: flex; gap: 5px; }
.pdf-icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
}

.pdf-icon-button:hover:not(:disabled) { color: var(--text); border-color: #bcc9e1; }
.pdf-icon-button.remove:hover:not(:disabled) { color: #c13e3e; border-color: rgba(193, 62, 62, .35); }
.pdf-icon-button:disabled { opacity: .35; cursor: not-allowed; }

.pdf-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 10px;
  margin-top: 16px;
}

.pdf-primary,
.pdf-secondary,
.pdf-download {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  padding: 11px 15px;
  font-weight: 820;
}

.pdf-primary { border: 0; background: var(--primary); color: #fff; }
.pdf-primary:hover:not(:disabled) { background: #13234a; }
.pdf-primary:disabled { opacity: .45; cursor: not-allowed; }
.pdf-secondary { border: 1px solid var(--line); background: #fff; color: var(--text); }

.pdf-status { min-height: 22px; margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.pdf-status.is-error { color: #b43d3d; }

.pdf-result {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(88, 155, 83, .25);
  border-radius: 16px;
  background: #f5fbf3;
}

.pdf-result > div { display: flex; align-items: center; gap: 10px; }
.pdf-result > div > div { min-width: 0; }
.pdf-result strong, .pdf-result span { display: block; }
.pdf-result span { margin-top: 3px; color: #648064; font-size: 12px; line-height: 1.45; }
.pdf-result-check { width: 30px; height: 30px; flex: 0 0 30px; display: grid !important; place-items: center; border-radius: 999px; background: #6ca267; color: #fff !important; font-size: 16px !important; }
.pdf-download { margin-top: 12px; background: #6ca267; color: #fff; text-decoration: none; }

@media (max-width: 900px) {
  .pdf-editor { grid-template-columns: 1fr; }
  .pdf-dropzone { min-height: 190px; }
}

@media (max-width: 620px) {
  .pdf-upload-card, .pdf-queue-card { padding: 15px; border-radius: 19px; }
  .pdf-queue-head { align-items: center; }
  .pdf-file-item { grid-template-columns: 34px minmax(0, 1fr); }
  .pdf-file-number { width: 34px; height: 38px; }
  .pdf-file-controls { grid-column: 1 / -1; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 9px; }
  .pdf-icon-button { width: 40px; height: 38px; }
  .pdf-actions { grid-template-columns: 1fr; }
}
