.tpa-wrap {
  padding: 56px 18px;
  background:
    radial-gradient(circle at top right, rgba(190, 168, 92, .20), transparent 25%),
    radial-gradient(circle at bottom left, rgba(99, 133, 62, .18), transparent 30%),
    linear-gradient(180deg, #f7f3ea 0%, #ffffff 100%);
}

.tpa-shell {
  max-width: 1320px;
  margin: 0 auto;
}

.tpa-hero {
  display: grid;
  grid-template-columns: 1.45fr .75fr;
  gap: 24px;
  margin-bottom: 24px;
}

.tpa-hero-copy,
.tpa-hero-side,
.tpa-panel {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(160, 145, 100, .16);
  box-shadow: 0 16px 50px rgba(38, 45, 23, 0.08);
}

.tpa-hero-copy {
  border-radius: 30px;
  padding: 34px;
}

.tpa-hero-side {
  border-radius: 30px;
  padding: 22px;
  display: flex;
  align-items: stretch;
}

.tpa-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #eef4e4;
  color: #4f662d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.tpa-hero h2 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  color: #18220f;
}

.tpa-sub {
  margin: 0;
  font-size: 18px;
  line-height: 1.65;
  color: #4d5444;
  max-width: 850px;
}

.tpa-hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.tpa-hero-points span,
.tpa-status-pill,
.tpa-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
}

.tpa-hero-points span {
  background: #fff;
  border: 1px solid #ece8da;
  color: #46513b;
}

.tpa-mini-panel {
  width: 100%;
  border-radius: 24px;
  background: linear-gradient(180deg, #1f2c12 0%, #354a1f 100%);
  padding: 22px;
  color: #fff;
  display: grid;
  gap: 14px;
}

.tpa-mini-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.tpa-mini-row:last-child { border-bottom: 0; padding-bottom: 0; }
.tpa-mini-row strong { color: rgba(255,255,255,.78); font-weight: 600; }
.tpa-mini-row span { font-weight: 700; }

.tpa-main-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 24px;
}

.tpa-panel {
  border-radius: 30px;
  padding: 28px;
}

.tpa-panel-head h3 {
  margin: 0 0 8px;
  font-size: 28px;
  color: #1a2410;
}

.tpa-panel-head p {
  margin: 0 0 22px;
  color: #55604a;
  line-height: 1.65;
}

.tpa-upload-zone {
  position: relative;
  border: 2px dashed #d7d3c3;
  border-radius: 24px;
  background: linear-gradient(180deg, #fcfbf7 0%, #f5f2e7 100%);
  overflow: hidden;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
  margin-bottom: 18px;
}

.tpa-upload-zone.is-dragover {
  border-color: #7c9650;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(87, 108, 53, .12);
}

.tpa-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.tpa-upload-zone-inner {
  min-height: 178px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: left;
  padding: 28px;
}

.tpa-upload-icon {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  background: linear-gradient(180deg, #829b53 0%, #617a35 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(97, 122, 53, .25);
}

#tpa-upload-hint,
.tpa-field small {
  margin: 6px 0 0;
  color: #66715a;
  font-size: 14px;
}

.tpa-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.tpa-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  background: #f0efe9;
  border: 1px solid #ece8da;
}

.tpa-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tpa-thumb-meta {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  background: rgba(20, 24, 13, 0.72);
  color: #fff;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
}

.tpa-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tpa-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tpa-full { grid-column: 1 / -1; }

.tpa-field label {
  font-weight: 700;
  color: #26311b;
}

.tpa-field input,
.tpa-field select,
.tpa-field textarea {
  border: 1px solid #dfdccf;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.tpa-field input:focus,
.tpa-field select:focus,
.tpa-field textarea:focus {
  border-color: #839c55;
  box-shadow: 0 0 0 4px rgba(131, 156, 85, .12);
}

.tpa-actions {
  margin-top: 22px;
}

#tpa-submit {
  width: 100%;
  border: 0;
  border-radius: 22px;
  padding: 17px 22px;
  background: linear-gradient(135deg, #5b7332 0%, #8aa35d 100%);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: 0 16px 30px rgba(94, 118, 53, .26);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

#tpa-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(94, 118, 53, .28);
}

#tpa-submit:disabled {
  opacity: .75;
  cursor: not-allowed;
  transform: none;
}

.tpa-btn-main {
  font-weight: 800;
  font-size: 17px;
}

.tpa-btn-sub {
  font-size: 13px;
  opacity: .9;
}

.tpa-note {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff9eb 0%, #fff5db 100%);
  color: #5f5233;
  border: 1px solid #f0deb0;
  font-size: 14px;
  line-height: 1.55;
}

.tpa-status {
  margin-bottom: 16px;
}

.tpa-status-pill {
  background: #f3efe2;
  color: #5a634b;
  border: 1px solid #e3dcc5;
}

.tpa-status-pill.is-loading {
  background: #eef4e4;
  color: #50682e;
  border-color: #dce7c6;
}

.tpa-status-pill.is-done {
  background: #e7f2e0;
  color: #315123;
  border-color: #cfe2bf;
}

.tpa-status-pill.is-error {
  background: #fceae7;
  color: #8b3024;
  border-color: #f4c8c1;
}

.tpa-result {
  min-height: 420px;
}

.tpa-result-empty {
  display: grid;
  place-items: center;
}

.tpa-empty-state {
  text-align: center;
  padding: 34px 18px;
  color: #57614a;
}

.tpa-empty-icon {
  font-size: 42px;
  margin-bottom: 10px;
}

.tpa-report {
  display: grid;
  gap: 16px;
}

.tpa-report-hero {
  border-radius: 24px;
  background: linear-gradient(135deg, #19230f 0%, #33481d 100%);
  color: #fff;
  padding: 24px;
}

.tpa-report-hero h4 {
  margin: 0 0 10px;
  font-size: 28px;
}

.tpa-report-hero p {
  margin: 0;
  color: rgba(255,255,255,.88);
  line-height: 1.7;
}

.tpa-report-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.tpa-chip {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
}

.tpa-chip.conf-alto { background: #d8efc6; color: #234614; border-color: transparent; }
.tpa-chip.conf-medio { background: #fff0bf; color: #6b5306; border-color: transparent; }
.tpa-chip.conf-bajo { background: #f8d2c9; color: #7a251b; border-color: transparent; }

.tpa-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.tpa-card {
  background: #fff;
  border: 1px solid #ece8da;
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 12px 28px rgba(40, 47, 25, .05);
}

.tpa-card.is-full {
  grid-column: 1 / -1;
}

.tpa-card h5 {
  margin: 0 0 12px;
  font-size: 20px;
  color: #1d2613;
}

.tpa-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.tpa-list li {
  position: relative;
  padding-left: 18px;
  line-height: 1.55;
  color: #4e5743;
}

.tpa-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7d9651;
}

.tpa-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tpa-badge {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  background: #edf4e4;
  color: #405622;
  font-size: 13px;
  font-weight: 700;
}

.tpa-highlight-box {
  padding: 14px 16px;
  border-radius: 16px;
  background: #f7f5ee;
  border: 1px solid #ece8da;
  line-height: 1.6;
  color: #505848;
}

.tpa-skeleton {
  display: grid;
  gap: 14px;
}

.tpa-skeleton-line,
.tpa-skeleton-box {
  border-radius: 14px;
  background: linear-gradient(90deg, #f0efe8 25%, #faf9f4 50%, #f0efe8 75%);
  background-size: 200% 100%;
  animation: tpaShimmer 1.35s infinite linear;
}

.tpa-skeleton-line { height: 18px; }
.tpa-skeleton-box { height: 110px; }

@keyframes tpaShimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

@media (max-width: 1080px) {
  .tpa-hero,
  .tpa-main-grid,
  .tpa-card-grid {
    grid-template-columns: 1fr;
  }

  .tpa-result {
    min-height: 0;
  }
}

@media (max-width: 680px) {
  .tpa-wrap {
    padding: 36px 14px;
  }

  .tpa-hero-copy,
  .tpa-hero-side,
  .tpa-panel {
    border-radius: 24px;
    padding: 20px;
  }

  .tpa-upload-zone-inner {
    min-height: 148px;
    flex-direction: column;
    text-align: center;
  }

  .tpa-preview,
  .tpa-grid {
    grid-template-columns: 1fr;
  }

  #tpa-submit {
    flex-direction: column;
    align-items: flex-start;
  }

  .tpa-report-top {
    flex-direction: column;
  }
}
