.container {
  max-width: 960px;
  margin: 0 auto;
}

/* ── Header ── */
.tool-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 35px 25px;
  border-radius: 20px;
  background: linear-gradient(219deg, #FB0E76 0%, #910694 100%);
}

.tool-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
}

.tool-header p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Buttons ── */
.btn {
    border: none;
    padding: 14px 28px !important;
    border-radius: 30px !important;
    cursor: pointer;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: linear-gradient(219deg, #FB0E76 0%, #910694 100%);
    transition: .3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
  opacity: 0.88;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(145, 6, 148, 0.35);
}

.btn:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  border: 2px solid #910694;
  color: #910694;
}

.btn-outline:hover {
  background: linear-gradient(219deg, #FB0E76 0%, #910694 100%);
  color: #fff;
  border-color: transparent;
}

.btn-danger {
  background: linear-gradient(219deg, #e53935 0%, #b71c1c 100%);
}

/* ── Drop Zone ── */
.drop-zone {
  border: 2.5px dashed #d07ae8;
  border-radius: 18px;
  background: linear-gradient(135deg, #fdf0ff 0%, #fff0f8 100%);
  padding: 56px 40px;
  text-align: center;
  cursor: pointer;
  transition: border-color .3s, background .3s, box-shadow .3s;
  margin-bottom: 30px;
  position: relative;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: #FB0E76;
  background: linear-gradient(135deg, #fce8ff 0%, #ffe6f3 100%);
  box-shadow: 0 0 0 4px rgba(251, 14, 118, 0.08);
}

.drop-icon {
  font-size: 3.2rem;
  margin-bottom: 14px;
  line-height: 1;
}

.drop-zone h2 {
  font-size: 1.55rem;
  font-weight: 700;
  color: #2d2d2d;
  margin-bottom: 8px;
}

.drop-zone p {
  color: #888;
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.drop-zone input[type="file"] {
  display: none;
}

/* ── Results Grid ── */
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
  display: none;
}

.results-grid.visible {
  display: grid;
}

/* ── Cards ── */
.card {
  background: #fff;
  border-radius: 18px;
  padding: 28px 26px;
  box-shadow: 0 4px 24px rgba(145, 6, 148, 0.08);
  border: 1px solid rgba(208, 122, 232, 0.18);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1.5px solid #f0e4f8;
}

.card-icon {
  font-size: 1.4rem;
}

.card-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2d2d2d;
}

/* ── Info List ── */
.info-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f5f0fa;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #2d2d2d;
  text-align: right;
}

.status-ready {
  color: #16a34a;
}

.status-waiting {
  color: #999;
}

.status-error {
  color: #dc2626;
}

/* ── PDF Card Content ── */
.pdf-idle {
  text-align: center;
  padding: 40px 20px;
  color: #bbb;
}

.idle-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: .5;
}

.pdf-idle p {
  font-size: 0.9rem;
}

.pdf-result {
  display: none;
  flex-direction: column;
  gap: 18px;
}

.pdf-result.visible {
  display: flex;
}

.pdf-file-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #fdf0ff 0%, #fff0f8 100%);
  border: 1.5px solid rgba(208, 122, 232, 0.3);
  border-radius: 14px;
  padding: 16px 20px;
}

.chip-icon {
  font-size: 2rem;
}

.chip-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.chip-name {
  font-weight: 700;
  font-size: 1rem;
  color: #2d2d2d;
}

.chip-sub {
  font-size: 0.8rem;
  color: #888;
}

.pdf-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pdf-actions .btn {
  width: 100%;
  justify-content: center;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 0, 40, 0.55);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(145, 6, 148, 0.22);
  overflow: hidden;
  animation: modalIn .25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 26px;
  border-bottom: 1.5px solid #f0e4f8;
  background: linear-gradient(219deg, #FB0E76 0%, #910694 100%);
}

.modal-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}

.modal-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}

.modal-close:hover {
  background: rgba(255,255,255,0.35);
}

.modal-body {
  flex: 1;
  overflow: hidden;
  background: #f8f8f8;
  min-height: 400px;
}

#pdfFrame {
  width: 100%;
  height: 100%;
  min-height: 500px;
  border: none;
}

/* ── Progress Overlay ── */
.progress-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 0, 40, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.progress-overlay.open {
  display: flex;
}

.progress-box {
  background: #fff;
  border-radius: 18px;
  padding: 40px 50px;
  text-align: center;
  box-shadow: 0 16px 60px rgba(145, 6, 148, 0.2);
}

.spinner {
  width: 52px;
  height: 52px;
  border: 5px solid #f0e4f8;
  border-top-color: #FB0E76;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin: 0 auto 18px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress-box p {
  font-weight: 600;
  color: #555;
  font-size: 0.95rem;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .tool-header h1 {
    font-size: 1.8rem;
  }

  .results-grid.visible {
    grid-template-columns: 1fr;
  }

  .drop-zone {
    padding: 36px 20px;
  }
}
