/* ==============================
   Base visual da pagina
   ============================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #ffffff;
  font-family:
    Arial,
    Helvetica,
    sans-serif;
  background: #000000;
}

/* ==============================
   Estrutura principal
   ============================== */
.page-shell {
  display: grid;
  min-height: 100vh;
  align-content: center;
  justify-items: center;
  gap: 28px;
  padding: 36px 16px;
}

.brand-header {
  display: flex;
  width: min(100%, 760px);
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 18px 22px;
}

.brand-logo {
  display: block;
  width: auto;
  max-width: 72%;
  object-fit: contain;
}

.brand-logo-marflex {
  height: 118px;
}

.brand-logo-speedbrake {
  height: 116px;
}

.brand-divider {
  width: 1px;
  height: 74px;
  background: linear-gradient(180deg, transparent, #ffffff, transparent);
  opacity: 0.5;
}

.upload-panel {
  width: min(100%, 520px);
  overflow: hidden;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  background: #111111;
  box-shadow:
    0 22px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

.brand-strip {
  height: 8px;
  background: linear-gradient(90deg, #e30613, #ffffff, #ffd200);
}

.panel-content {
  padding: 34px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #ffd200;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  line-height: 1.1;
}

.intro-text {
  margin: 0 0 26px;
  color: #c8c8c8;
  line-height: 1.5;
}

/* ==============================
   Formulario de upload
   ============================== */
.upload-form {
  display: grid;
  gap: 18px;
}

.file-drop {
  display: grid;
  min-height: 210px;
  cursor: pointer;
  place-items: center;
  padding: 28px;
  border: 2px dashed #555555;
  border-radius: 8px;
  background: #181818;
  text-align: center;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.file-drop:hover,
.file-drop.is-dragging {
  border-color: #ffd200;
  background: #202020;
  transform: translateY(-1px);
}

.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.file-icon {
  display: inline-grid;
  width: 72px;
  height: 72px;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border-radius: 8px;
  color: #ffffff;
  background: #ff0000;
  box-shadow: inset 0 -8px 0 rgba(227, 6, 19, 0.85);
}

.upload-icon {
  width: 46px;
  height: 46px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.file-title {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
  font-weight: 700;
}

.file-hint {
  display: block;
  margin-top: 8px;
  color: #a8a8a8;
  font-size: 0.92rem;
}

.primary-button {
  min-height: 48px;
  cursor: pointer;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  background: #e30613;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.primary-button:hover {
  background: #b90510;
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  background: #5a5a5a;
  transform: none;
}

/* ==============================
   Modal central de avisos
   ============================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  z-index: 20;
  place-items: center;
  padding: 18px;
  background: rgba(14, 23, 38, 0.52);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(100%, 420px);
  padding: 28px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.modal-card.is-redirecting {
  border: 1px solid rgba(255, 210, 0, 0.55);
  animation: redirectPulse 1.5s ease-in-out infinite;
}

.modal-card h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.modal-card p {
  margin: 0;
  color: #4b5565;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.modal-button {
  min-width: 112px;
  min-height: 42px;
  cursor: pointer;
  border: 1px solid #cbd3df;
  border-radius: 6px;
  color: #20232a;
  font-weight: 700;
  background: #ffffff;
}

.modal-button.is-primary {
  border-color: #e30613;
  color: #ffffff;
  background: #e30613;
}

.redirect-loader {
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border: 5px solid #0011ff;
  border-top-color: #ffffff;
  border-right-color: #0011ff;
  border-radius: 50%;
  animation: loaderSpin 0.9s linear infinite;
}

.redirect-message {
  animation: messageFloat 1.4s ease-in-out infinite;
}

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

@keyframes messageFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

@keyframes redirectPulse {
  0%,
  100% {
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
  }

  50% {
    box-shadow: 0 24px 80px rgba(227, 6, 19, 0.28);
  }
}

/* ==============================
   Ajustes responsivos
   ============================== */
@media (max-width: 520px) {
  .page-shell {
    gap: 18px;
    padding: 24px 14px;
  }

  .brand-header {
    flex-direction: column;
    gap: 14px;
    padding: 10px;
  }

  .brand-logo {
    max-width: 92%;
  }

  .brand-logo-marflex {
    height: 90px;
  }

  .brand-logo-speedbrake {
    height: 78px;
  }

  .brand-divider {
    width: min(100%, 220px);
    height: 1px;
    background: linear-gradient(90deg, transparent, #ffffff, transparent);
  }

  .panel-content {
    padding: 26px 20px;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-button {
    width: 100%;
  }
}
