/* Trip_Check — visual de cartão de embarque.
   Códigos IATA grandes são o elemento de destaque; o resto fica discreto. */

:root {
  --ceu: #e8eef4;
  --cartao: #fbfcfe;
  --tinta: #14213d;
  --tinta-2: #55657f;
  --linha: #c9d3df;
  --pista: #1d4e89;
  --ok: #23704f;
  --alerta: #9a6212;
  --falha: #a8352a;
  --raio: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ceu: #0d1626;
    --cartao: #152036;
    --tinta: #e7edf6;
    --tinta-2: #9aaac2;
    --linha: #2a3a55;
    --pista: #8db6f0;
    --ok: #5cc395;
    --alerta: #e3b05a;
    --falha: #f08a7e;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ceu);
  color: var(--tinta);
  font-family: "Overpass", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

a { color: var(--pista); text-underline-offset: 0.18em; }

:focus-visible { outline: 3px solid var(--pista); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(100% - 32px, 1040px); margin-inline: auto; }

/* Cabeçalho */
.topo { display: flex; align-items: center; justify-content: space-between; padding-block: 20px; }
.marca { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; color: var(--tinta); text-decoration: none; }
.marca span { color: var(--tinta-2); font-weight: 400; }

.botao {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  padding: 0.6em 1.3em;
  background: var(--pista);
  color: var(--cartao);
  cursor: pointer;
}
.botao--leve { background: transparent; color: var(--tinta-2); border: 1px solid var(--linha); padding: 0.4em 1em; }
.botao--leve:hover { color: var(--tinta); border-color: var(--tinta-2); }

/* Situação */
.situacao { margin-top: 12px; }
.situacao h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.15; margin: 0 0 6px; letter-spacing: -0.015em; }
.situacao p { margin: 0; color: var(--tinta-2); max-width: 62ch; }
.estado { display: inline-flex; align-items: center; gap: 0.5em; font-weight: 700; margin-bottom: 10px; }
.estado::before { content: ""; width: 0.7em; height: 0.7em; border-radius: 50%; background: currentColor; }
.estado--ok { color: var(--ok); }
.estado--alerta { color: var(--alerta); }
.estado--falha { color: var(--falha); }

.tipos { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--tinta-2); }
.tipos strong { color: var(--tinta); }

/* Cartão de embarque */
.bilhete {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  background: var(--cartao);
  border-radius: var(--raio);
  box-shadow: 0 1px 0 var(--linha), 0 18px 40px -28px rgba(20, 33, 61, 0.45);
}
.bilhete__corpo { padding: clamp(18px, 4vw, 32px); min-width: 0; }
.bilhete__canhoto {
  padding: clamp(18px, 4vw, 32px);
  border-left: 2px dashed var(--linha);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 160px;
  position: relative;
}
/* recortes do picote */
.bilhete__canhoto::before, .bilhete__canhoto::after {
  content: "";
  position: absolute;
  left: -13px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ceu);
}
.bilhete__canhoto::before { top: -12px; }
.bilhete__canhoto::after { bottom: -12px; }

.rota { display: flex; align-items: center; gap: clamp(10px, 3vw, 28px); }
.iata { font-size: clamp(2.6rem, 10vw, 5.4rem); font-weight: 800; line-height: 0.9; letter-spacing: -0.03em; }
.voo { flex: 1; display: flex; align-items: center; color: var(--tinta-2); min-width: 40px; }
.voo::before { content: ""; flex: 1; border-top: 2px dashed var(--linha); }
.voo svg { width: clamp(22px, 4vw, 34px); height: auto; margin-left: 6px; fill: currentColor; }

.dados { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px 24px; margin: 22px 0 0; }
.dados dt { color: var(--tinta-2); font-size: 0.85rem; }
.dados dd { margin: 2px 0 0; font-weight: 600; }

.preco { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.canhoto-rotulo { color: var(--tinta-2); font-size: 0.85rem; }

/* Seções */
.secao { margin-top: 48px; }
.secao h2 { font-size: 1.25rem; margin: 0 0 14px; letter-spacing: -0.01em; }

.tabela { width: 100%; border-collapse: collapse; background: var(--cartao); border-radius: var(--raio); overflow: hidden; }
.tabela th, .tabela td { text-align: left; padding: 11px 14px; vertical-align: top; }
.tabela th { font-size: 0.85rem; font-weight: 600; color: var(--tinta-2); border-bottom: 1px solid var(--linha); }
.tabela td { border-bottom: 1px dashed var(--linha); }
.tabela tr:last-child td { border-bottom: 0; }
.tabela .rota-curta { font-weight: 800; white-space: nowrap; }
.tabela td:first-child, .tabela td:nth-child(3), .tabela td:last-child { white-space: nowrap; }
.tabela .num { text-align: right; white-space: nowrap; }
.res--ok { color: var(--ok); font-weight: 600; }
.res--falha { color: var(--falha); font-weight: 600; }

.relatorio {
  background: var(--cartao);
  border-radius: var(--raio);
  padding: clamp(16px, 3vw, 26px);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
  font: inherit;
  line-height: 1.6;
  max-width: 100%;
}

.vazio { background: var(--cartao); border-radius: var(--raio); padding: 22px; color: var(--tinta-2); margin: 0; }

.rodape { color: var(--tinta-2); font-size: 0.85rem; padding-block: 36px 28px; }

/* Login */
.entrada { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.entrada .bilhete { width: min(100%, 460px); margin: 0; grid-template-columns: 1fr; }
.entrada h1 { margin: 0 0 4px; font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.entrada p { margin: 0 0 22px; color: var(--tinta-2); }
.campo { display: block; margin-bottom: 16px; }
.campo span { display: block; font-size: 0.9rem; color: var(--tinta-2); margin-bottom: 4px; }
.campo input {
  width: 100%;
  font: inherit;
  padding: 0.7em 0.85em;
  border: 1px solid var(--linha);
  border-radius: 10px;
  background: var(--ceu);
  color: var(--tinta);
}
.campo input:focus-visible { outline: 3px solid var(--pista); outline-offset: 1px; }
.erro { color: var(--falha); font-weight: 600; margin: 0 0 16px; }

@media (max-width: 720px) {
  .bilhete { grid-template-columns: 1fr; }
  .bilhete__canhoto { border-left: 0; border-top: 2px dashed var(--linha); min-width: 0; }
  .bilhete__canhoto::before { left: -12px; top: -13px; }
  .bilhete__canhoto::after { left: auto; right: -12px; top: -13px; bottom: auto; }

  .tabela thead { display: none; }
  .tabela, .tabela tbody, .tabela tr, .tabela td { display: block; width: 100%; }
  .tabela tr { padding: 10px 14px; border-bottom: 1px dashed var(--linha); }
  .tabela tr:last-child { border-bottom: 0; }
  .tabela td { border: 0; padding: 2px 0; }
  .tabela .num { text-align: left; }
  .tabela td[data-r]::before { content: attr(data-r) ": "; color: var(--tinta-2); }
}

@media (prefers-reduced-motion: no-preference) {
  .bilhete { animation: chegada 420ms ease-out both; }
  @keyframes chegada { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
