.pdf-file-input {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}

.pdf-import-mask {
  z-index: 80;
}

.pdf-import-panel {
  width: min(100%, 980px);
  max-height: min(88vh, 760px);
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .3);
}

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

.pdf-import-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
}

.pdf-import-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.pdf-close-button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--muted);
  background: #eef2f8;
  font-size: 22px;
}

.pdf-import-status,
.pdf-import-error,
.pdf-import-summary {
  margin: 18px 22px;
  padding: 13px 15px;
  border-radius: 9px;
}

.pdf-import-status,
.pdf-import-summary {
  color: #245d37;
  background: #edf9f1;
}

.pdf-import-error {
  color: #8b1010;
  background: #ffecec;
  line-height: 1.55;
}

.pdf-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid #a8d9b7;
  border-top-color: #217a3a;
  border-radius: 50%;
  animation: pdf-spin .7s linear infinite;
  vertical-align: -2px;
}

@keyframes pdf-spin {
  to { transform: rotate(360deg); }
}

.pdf-preview-scroll {
  max-height: 410px;
  margin: 0 22px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.pdf-preview-table {
  min-width: 830px;
}

.pdf-preview-row {
  display: grid;
  grid-template-columns: 80px 70px 110px 90px 90px 90px minmax(250px, 1fr);
  border-bottom: 1px solid var(--line);
}

.pdf-preview-row:last-child {
  border-bottom: 0;
}

.pdf-preview-row > span {
  padding: 9px 8px;
  border-right: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.45;
}

.pdf-preview-row > span:last-child {
  border-right: 0;
}

.pdf-preview-head {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #fff;
  background: #24324b;
  font-weight: 800;
}

.pdf-preview-empty {
  padding: 38px;
  color: var(--muted);
  text-align: center;
}

.pdf-import-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px 20px;
}

.pdf-import-actions button {
  min-width: 120px;
  min-height: 42px;
  border-radius: 9px;
  font-weight: 800;
}

@media (max-width: 560px) {
  .pdf-import-mask {
    align-items: end;
    padding: 0;
  }

  .pdf-import-panel {
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
  }

  .pdf-import-header,
  .pdf-import-actions {
    padding-inline: 14px;
  }

  .pdf-import-summary,
  .pdf-import-error,
  .pdf-import-status,
  .pdf-preview-scroll {
    margin-inline: 14px;
  }
}
