:root {
  color-scheme: light;
  --bg: #f7fbfa;
  --ink: #17202a;
  --muted: #5b6877;
  --line: #dce7e9;
  --panel: #ffffff;
  --accent: #087f8c;
  --accent-dark: #05616b;
  --green: #10a83a;
  --danger: #b42318;
  --success: #067647;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  overflow-y: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 18%, rgba(8, 127, 140, 0.10), transparent 34%),
    radial-gradient(circle at 84% 72%, rgba(16, 168, 58, 0.08), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

.topbar {
  width: min(100% - 48px, 1560px);
  margin: 10px auto 0;
  padding: 6px 22px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 7px;
}

.site-logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.secure-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.secure-badge svg {
  width: 24px;
  height: 24px;
  fill: var(--green);
  flex: 0 0 auto;
}

.secure-badge span {
  display: grid;
  gap: 2px;
}

.secure-badge strong {
  color: var(--ink);
  font-size: 14px;
}

.shell {
  display: grid;
  align-content: center;
  gap: 12px;
  width: min(100% - 64px, 1500px);
  margin: 0 auto;
  padding: 28px 0 18px;
}

.layout-grid {
  display: grid;
  grid-template-columns: 230px minmax(520px, 760px) 230px;
  align-items: start;
  justify-content: center;
  gap: clamp(54px, 6vw, 120px);
}

.panel {
  width: 100%;
  padding: 34px 60px 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(215, 229, 232, 0.98);
  border-radius: 12px;
  box-shadow: 0 22px 70px rgba(23, 32, 42, 0.10);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  color: #344357;
  font-size: 16px;
  font-weight: 800;
}

.mark {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 40px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--accent);
  box-shadow: inset 0 -10px 18px rgba(0, 0, 0, 0.08);
  font-size: 14px;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(38px, 3.2vw, 52px);
  line-height: 1.02;
  letter-spacing: -1.4px;
}

.subtitle {
  max-width: 560px;
  margin: 12px 0 24px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}

.upload {
  display: grid;
  gap: 16px;
}

input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 118px;
  padding: 22px;
  border: 1px dashed #9fb8c7;
  border-radius: 10px;
  background: rgba(251, 253, 255, 0.86);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.dropzone:hover,
.dropzone:focus-within {
  border-color: var(--accent);
  background: #f5fbfc;
  box-shadow: 0 12px 28px rgba(8, 127, 140, 0.08);
  transform: translateY(-1px);
}

.icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  color: var(--accent);
  background: rgba(8, 127, 140, 0.12);
  flex: 0 0 auto;
}

#fileLabel {
  display: grid;
  gap: 5px;
  font-size: 18px;
  font-weight: 900;
}

#fileLabel small {
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
}

button {
  height: 58px;
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, #078d99, #05717b);
  box-shadow: 0 14px 30px rgba(8, 127, 140, 0.20);
  font: inherit;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}

button:hover:not(:disabled) {
  background: linear-gradient(135deg, #087f8c, #055d66);
  box-shadow: 0 16px 34px rgba(8, 127, 140, 0.28);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

button.is-loading {
  position: relative;
  opacity: 0.82;
}

button.is-loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 10px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  vertical-align: -2px;
  animation: spin 820ms linear infinite;
}

.panel-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.panel-note svg {
  width: 22px;
  height: 22px;
  fill: var(--green);
  flex: 0 0 auto;
}

.status {
  min-height: 24px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.progress-panel {
  display: none;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
}

.progress-panel.visible {
  display: block;
}

.progress-header,
.progress-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.progress-header {
  margin-bottom: 8px;
  color: var(--ink);
}

.progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef5;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #25d366);
  transition: width 220ms ease;
}

.progress-details {
  margin-top: 8px;
}

.status.active {
  color: var(--accent-dark);
}

.status.success {
  color: var(--success);
  font-weight: 800;
}

.status.error {
  color: var(--danger);
  font-weight: 800;
}

.promo-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(217, 234, 229, 0.96);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 62px rgba(23, 32, 42, 0.09);
}

.promo-card a,
.promo-card img {
  display: block;
  width: 100%;
}

.promo-card img {
  height: min(70vh, 650px);
  object-fit: contain;
  object-position: top center;
}

.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(34px, 6vw, 96px);
  color: var(--muted);
}

.trust-row div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: center;
}

.trust-row span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--accent);
  font-size: 22px;
}

.trust-row strong {
  color: #314054;
  font-size: 13px;
}

.trust-row small {
  font-size: 12px;
}

.whatsapp-button {
  position: fixed;
  right: 24px;
  bottom: 18px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  color: #ffffff;
  background: #10a66c;
  box-shadow: 0 16px 36px rgba(16, 166, 108, 0.34);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.whatsapp-callout {
  position: absolute;
  right: 0;
  bottom: calc(100% + 14px);
  width: max-content;
  max-width: 260px;
  padding: 10px 14px;
  border: 1px solid rgba(16, 166, 108, 0.22);
  border-radius: 999px;
  color: #087f22;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(16, 166, 108, 0.18);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  animation: whatsappPulse 1.8s ease-in-out infinite;
}

.whatsapp-callout::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-right: 1px solid rgba(16, 166, 108, 0.22);
  border-bottom: 1px solid rgba(16, 166, 108, 0.22);
  background: #ffffff;
  transform: rotate(45deg);
}

.whatsapp-button:hover {
  transform: translateY(-2px);
  background: #0a905b;
  box-shadow: 0 18px 42px rgba(16, 166, 108, 0.42);
}

.whatsapp-button svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(246, 248, 251, 0.78);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.loading-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.loading-box {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(100%, 320px);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(23, 32, 42, 0.16);
  text-align: center;
}

.loading-box strong {
  font-size: 17px;
}

.loading-box span:last-child {
  color: var(--muted);
  font-size: 14px;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(8, 127, 140, 0.16);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 820ms linear infinite;
}

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

@keyframes whatsappPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-5px) scale(1.03);
  }
}

@media (max-width: 1320px) {
  html,
  body {
    overflow-y: auto;
  }

  .layout-grid {
    grid-template-columns: minmax(0, 760px);
  }

  .promo-card {
    display: none;
  }
}

@media (max-width: 820px) {
  .topbar {
    width: min(100% - 28px, 1560px);
    margin-top: 14px;
    padding: 10px 12px;
  }

  .topbar-inner,
  .trust-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-logo {
    font-size: 16px;
    letter-spacing: 4px;
  }

  .site-logo img {
    width: 42px;
    height: 42px;
  }

  .shell {
    width: min(100% - 28px, 1500px);
    padding: 24px 0 34px;
  }

  .panel {
    padding: 34px 24px;
  }

  .dropzone {
    align-items: flex-start;
    flex-direction: column;
    min-height: 140px;
  }

  button {
    height: 58px;
    font-size: 17px;
  }

  .panel-note,
  .trust-row {
    font-size: 14px;
  }

  .whatsapp-button {
    right: 18px;
    bottom: 18px;
    width: 56px;
    height: 56px;
  }

  .whatsapp-callout {
    max-width: 220px;
    font-size: 12px;
    white-space: normal;
  }
}
