/* =============================================================================
   Complementos do núcleo sobre o design system (/estatico/ds/ds.css).
   Só o que o DS não tem: telas de entrada, listas de detalhe, linha do tempo,
   miniaturas de amostra. Tudo com tokens do DS (nada de cor fixa), prefixo nx-.
   ============================================================================= */

/* ---------------------------------------------------------------- entrada (login, aprovar, redefinir) */
.nx-entrada { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.nx-hero {
  position: relative; overflow: hidden; background: var(--nav-grad); color: var(--on-primary);
  padding: 54px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
}
.nx-hero::before, .nx-fundo::before {
  content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; right: -160px; top: -160px;
  background: radial-gradient(circle, color-mix(in srgb, var(--primary-soft) 55%, transparent), transparent 68%);
  filter: blur(8px); pointer-events: none;
}
.nx-hero::after, .nx-fundo::after {
  content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; left: -140px; bottom: -150px;
  background: radial-gradient(circle, color-mix(in srgb, var(--mint) 24%, transparent), transparent 70%);
  pointer-events: none;
}
.nx-hero > * { position: relative; z-index: 1; }
.nx-hero__logo { width: 240px; max-width: 70%; height: auto; display: block; }
.nx-hero__texto { max-width: 430px; display: flex; flex-direction: column; gap: 16px; }
.nx-hero__texto h1 { font: 700 40px/1.14 var(--font-display); letter-spacing: -.5px; color: inherit; }
.nx-hero__texto p { color: var(--nav-text); font-size: 15.5px; line-height: 1.55; }
.nx-hero small { color: var(--nav-text); font-size: 12.5px; }

.nx-lado { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg); }
.nx-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; animation: fadeUp .6s var(--ease-page); }
.nx-form h2 { font: 700 27px/1.15 var(--font-display); letter-spacing: -.3px; }
.nx-form > p, .nx-form form > p { color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.nx-form form, .nx-tela { display: flex; flex-direction: column; gap: 14px; }
.nx-form .ds-hint { margin-top: 2px; }
.nx-links { display: flex; flex-direction: column; gap: 10px; align-items: center; margin-top: 4px; }
.nx-link { background: none; border: 0; padding: 4px 6px; color: var(--primary-ink); font-weight: 600; font-size: 13.5px; cursor: pointer; border-radius: 6px; }
.nx-link:hover { text-decoration: underline; }
td > .nx-link { padding: 0; text-align: left; font-size: 14px; }

/* cartão único sobre fundo marinho (aprovar, redefinir) */
.nx-fundo {
  position: relative; overflow: hidden; min-height: 100vh; background: var(--nav-grad);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.nx-cartao { position: relative; z-index: 1; width: 100%; max-width: 440px; animation: fadeUp .6s var(--ease-page); display: flex; flex-direction: column; gap: 16px; }
.nx-cartao__marca { display: flex; align-items: center; gap: 12px; }
.nx-cartao__marca img { width: 44px; height: 44px; border-radius: 12px; }
.nx-cartao h1 { font: 700 24px/1.15 var(--font-display); }
.nx-cartao p { color: var(--text-2); font-size: 13.5px; line-height: 1.5; }

@media (max-width: 900px) {
  .nx-entrada { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .nx-hero { padding: 22px 24px; gap: 8px; flex-direction: row; align-items: center; justify-content: flex-start; }
  .nx-hero__logo { width: 150px; }
  .nx-hero__texto, .nx-hero small { display: none; }
  .nx-lado { align-items: flex-start; padding: 28px 20px 40px; }
  .nx-form h2 { font-size: 24px; }
}

/* campos de código (MFA, reservas) e QR */
.nx-codigo { font: 600 22px/1.2 var(--font-mono); letter-spacing: 6px; text-align: center; }
.nx-qr { display: flex; justify-content: center; }
.nx-qr img {
  width: 220px; height: 220px; padding: 10px; border-radius: 16px; background: var(--on-primary);
  border: 1px solid var(--border); image-rendering: pixelated; transition: opacity .3s, filter .3s;
}
.nx-qr img.nx-expirado { opacity: .25; filter: grayscale(1); }
.nx-passos { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.nx-passos b { color: var(--text); font-weight: 600; }
.nx-chave { font: 500 13px var(--font-mono); word-break: break-all; padding: 10px 12px; border-radius: var(--r-ctrl); background: var(--surface-3); user-select: all; }
.nx-reservas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.nx-reservas span { font: 600 14px var(--font-mono); text-align: center; padding: 9px 6px; border-radius: var(--r-ctrl); background: var(--surface-3); letter-spacing: 1px; }
.nx-espera { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-2); font-size: 13px; }
.nx-grande-codigo { font: 700 30px/1.2 var(--font-mono); letter-spacing: 4px; text-align: center; padding: 16px; border-radius: var(--r-card); background: var(--surface-3); user-select: all; }

/* ---------------------------------------------------------------- detalhes (modais) */
.nx-secoes { display: flex; flex-direction: column; gap: 22px; padding-top: 6px; }
.nx-secao { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.nx-secao > h3 { font: 600 11.5px var(--font-sans); text-transform: uppercase; letter-spacing: .5px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.nx-dl {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; padding: 14px 16px;
  background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 14px;
}
.nx-dl dt { font: 600 11px var(--font-sans); text-transform: uppercase; letter-spacing: .4px; color: var(--text-2); padding-top: 3px; }
.nx-dl dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .nx-dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .nx-dl dd { margin-bottom: 8px; }
}
.nx-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nx-linha {
  display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap;
  padding: 11px 14px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 12px; min-width: 0;
}
.nx-linha__corpo { min-width: 0; flex: 1 1 220px; overflow-wrap: anywhere; }
.nx-linha__sub { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.nx-tempo { list-style: none; margin: 0; padding: 0 0 0 6px; border-left: 2px solid var(--border); }
.nx-tempo li { position: relative; padding: 0 0 12px 18px; font-size: 13.5px; }
.nx-tempo li::before {
  content: ""; position: absolute; left: -7px; top: 5px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--primary);
}
.nx-tempo li.erro::before, .nx-tempo li.alerta::before { border-color: var(--red); }
.nx-tempo li.pagamento::before { border-color: var(--green); }
.nx-tempo time { display: block; font-size: 11.5px; color: var(--text-2); }
.nx-total { display: flex; justify-content: space-between; padding: 12px 14px 0; font-weight: 600; }

/* ---------------------------------------------------------------- amostras */
.nx-amostras { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.nx-amostra { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); }
.nx-amostra img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--surface-3); }
.nx-amostra__corpo { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.nx-amostra__acoes { display: flex; gap: 6px; align-items: center; justify-content: space-between; }
.nx-minis { display: flex; gap: 6px; flex-wrap: wrap; }
.nx-mini { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; border: 1px solid var(--border); background: var(--surface-3); display: block; }
.nx-cobre { color: var(--text-2); font-size: 12.5px; }

/* ---------------------------------------------------------------- utilidades de gestão */
.nx-barra { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.nx-barra .ds-field { min-width: 0; flex: 1 1 140px; }
.nx-barra .ds-field--grande { flex: 1 1 260px; }
@media (max-width: 600px) { .nx-barra .ds-field--grande { flex-basis: 100%; } }
.nx-nota { font-size: 12.5px; color: var(--text-2); }
.nx-obs { margin-top: 8px; font-weight: 400; }
.nx-obs b { font-weight: 600; }
.nx-vincular { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.nx-img-previa { max-height: 90px; max-width: 100%; border-radius: 10px; background: var(--surface-3); padding: 6px; }
.nx-logo-previa { display: flex; align-items: center; justify-content: center; min-height: 110px; border: 1px dashed var(--border); border-radius: var(--r-card); background: var(--surface-2); color: var(--text-2); font-size: 13px; padding: 10px; }
.nx-acoes-fim { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.nx-so-leitor { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (min-width: 701px) { .nx-mapa { min-width: 230px; } }
@media (min-width: 701px) { .ds-table td.nx-quebra { white-space: normal; } .ds-table td.nx-quebra .ds-btn { margin: 2px 0 2px 4px; } }
