.import-resume-page {
  background:
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.07), transparent 30rem),
    radial-gradient(circle at top left, rgba(46, 91, 255, 0.05), transparent 28rem),
    var(--bg-secondary, #f8f9fa);
  min-height: calc(100vh - 4rem);
}

.import-eyebrow {
  align-items: center;
  color: #7c3aed;
  display: inline-flex;
  font-size: 0.8125rem;
  font-weight: 700;
  gap: 0.35rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.import-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.import-credits-strip {
  background: #fff;
  border: 1px solid var(--border-color, #e9ecef);
  border-radius: 16px;
  padding: 0.9rem 1.1rem;
  text-align: right;
}

.import-credits-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.import-credits-main .label {
  color: var(--text-muted, #6c757d);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.import-credits-main .value {
  font-size: 1.25rem;
  font-weight: 800;
}

.import-stepper-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.import-stepper-item {
  align-items: center;
  color: var(--text-muted, #6c757d);
  display: inline-flex;
  font-size: 0.8125rem;
  font-weight: 600;
  gap: 0.4rem;
}

.import-stepper-item span {
  align-items: center;
  background: #e2e8f0;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.75rem;
  height: 1.5rem;
  justify-content: center;
  width: 1.5rem;
}

.import-stepper-item.active {
  color: var(--text-primary, #1a1a1a);
}

.import-stepper-item.active span {
  background: #7c3aed;
  color: #fff;
}

.import-stepper-item.done span {
  background: #059669;
  color: #fff;
}

.import-gate-icon {
  align-items: center;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border-radius: 18px;
  color: #fff;
  display: inline-flex;
  font-size: 1.75rem;
  height: 56px;
  justify-content: center;
  margin-bottom: 1rem;
  width: 56px;
}

.import-gate-icon-premium {
  background: linear-gradient(135deg, #6366f1, #7c3aed);
}

.import-gate-icon-warning {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}

.import-gate-lead {
  max-width: 32rem;
}

.import-dropzone {
  align-items: center;
  background: #faf5ff;
  border: 2px dashed #c4b5fd;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  min-height: 280px;
  padding: 2rem;
  text-align: center;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.import-dropzone:hover,
.import-dropzone:focus-visible,
.import-dropzone.is-dragover {
  background: #f3e8ff;
  border-color: #7c3aed;
  outline: none;
}

.import-dropzone.has-file {
  border-color: #7c3aed;
  border-style: solid;
}

.import-dropzone-icon {
  align-items: center;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border-radius: 16px;
  color: #fff;
  display: inline-flex;
  font-size: 1.75rem;
  height: 56px;
  justify-content: center;
  margin-bottom: 1rem;
  width: 56px;
}

.import-flow-list {
  color: var(--text-secondary, #4a4a4a);
  padding-left: 1.1rem;
}

.import-flow-list li {
  margin-bottom: 0.45rem;
}

.import-extract-steps li {
  margin-bottom: 0.35rem;
}

.import-extract-steps li.active {
  color: var(--text-primary, #1a1a1a);
  font-weight: 600;
}

.import-review-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.import-confidence-badge {
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
}

.import-confidence-badge.ok {
  background: #dcfce7;
  color: #166534;
}

.import-confidence-badge.warning {
  background: #fef3c7;
  color: #92400e;
}

.import-confidence-badge.missing {
  background: #fee2e2;
  color: #991b1b;
}

.import-repeatable-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  margin-bottom: 0.75rem;
  padding: 1rem;
}

.import-repeatable-item .form-label {
  margin-bottom: 0.25rem;
}

.import-template-grid .import-template-card.selected {
  box-shadow: 0 0 0 2px #7c3aed;
}

.import-template-grid .gallery-template-card {
  cursor: pointer;
}

@media (max-width: 991.98px) {
  .import-credits-strip {
    text-align: left;
  }
}

/* ---------------------------------------------------------------------------
   Template chooser (import wizard, step 4)

   Sized so the resume itself is the thing you compare — the preview is the card,
   and the chrome (name, price, CTA) stays out of the way until it is needed.
   --------------------------------------------------------------------------- */

.import-template-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.import-template-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tpl-filter {
  background: #fff;
  border: 1px solid #dfe3ec;
  border-radius: 999px;
  color: #475069;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tpl-filter:hover {
  border-color: #2e5bff;
  color: #2e5bff;
}

.tpl-filter[aria-pressed="true"] {
  background: #2e5bff;
  border-color: #2e5bff;
  color: #fff;
}

.import-template-count {
  color: #6b7488;
  font-size: 0.82rem;
  margin-left: auto;
}

.import-template-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.tpl-choice[hidden] {
  display: none;
}

.tpl-choice {
  cursor: pointer;
  margin: 0;
}

.tpl-choice-preview {
  background: #f4f6fb;
  border: 2px solid #e3e7f0;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  /* A4 proportion, so a thumbnail reads as the page it will actually print. */
  aspect-ratio: 210 / 297;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.tpl-choice-preview img {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  width: 100%;
}

.tpl-choice-preview-empty {
  align-items: center;
  color: #9aa2b6;
  display: flex;
  font-size: 0.8rem;
  height: 100%;
  justify-content: center;
}

.tpl-choice:hover .tpl-choice-preview,
.tpl-choice:focus-visible .tpl-choice-preview {
  border-color: #b9c6ff;
  box-shadow: 0 10px 26px rgba(19, 28, 61, 0.14);
  transform: translateY(-3px);
}

.tpl-choice.selected .tpl-choice-preview {
  border-color: #2e5bff;
  box-shadow: 0 0 0 3px rgba(46, 91, 255, 0.18);
}

.tpl-choice-name {
  color: #1d2438;
  font-size: 0.86rem;
  font-weight: 600;
  margin: 10px 2px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tpl-choice-tick {
  align-items: center;
  background: #2e5bff;
  border-radius: 50%;
  color: #fff;
  display: flex;
  height: 26px;
  justify-content: center;
  opacity: 0;
  position: absolute;
  right: 8px;
  top: 8px;
  transform: scale(0.6);
  transition: opacity 0.15s ease, transform 0.15s ease;
  width: 26px;
  z-index: 2;
}

.tpl-choice.selected .tpl-choice-tick {
  opacity: 1;
  transform: scale(1);
}

.tpl-choice-flag {
  backdrop-filter: blur(4px);
  background: rgba(17, 24, 45, 0.78);
  border-radius: 999px;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  left: 8px;
  padding: 3px 9px;
  position: absolute;
  top: 8px;
  z-index: 2;
}

.tpl-choice-flag-owned { background: rgba(22, 130, 74, 0.9); }
.tpl-choice-flag-warn  { background: rgba(176, 106, 12, 0.92); }

.tpl-choice-btn {
  background: #2e5bff;
  border: 0;
  border-radius: 999px;
  bottom: 10px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  left: 50%;
  opacity: 0;
  padding: 7px 16px;
  position: absolute;
  transform: translate(-50%, 6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
  z-index: 2;
}

.tpl-choice:hover .tpl-choice-btn,
.tpl-choice.selected .tpl-choice-btn,
.tpl-choice-btn:focus-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Touch devices get no hover, so the CTA would otherwise be unreachable. */
@media (hover: none) {
  .tpl-choice-btn {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (max-width: 575.98px) {
  .import-template-grid {
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}
