:root {
  --valteck-red: #e21b23;
  --valteck-red-dark: #b81118;
  --ink: #111418;
  --muted: #626a73;
  --line: #e5e7eb;
  --panel: #ffffff;
  --soft: #f5f6f7;
  --soft-red: #fff4f4;
  --ok: #176b3a;
  --ok-bg: #edf9f1;
  --error: #a31920;
  --error-bg: #fff1f2;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(17, 20, 24, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: #f1f2f3;
  line-height: 1.55;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }

.site-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--valteck-red);
}

.back-link {
  text-decoration: none;
  font-weight: 700;
  color: #3b4148;
}
.back-link:hover { color: var(--valteck-red); }

.hero {
  overflow: hidden;
  border-radius: 0 0 24px 24px;
  background: #fff;
  box-shadow: var(--shadow);
}
.hero img {
  display: block;
  width: 100%;
  height: auto;
}
.hero-copy {
  padding: 34px clamp(22px, 4vw, 58px) 38px;
  border-top: 4px solid var(--valteck-red);
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 72%, #fff1f1 100%);
}
.hero-copy h1 {
  margin: 6px 0 10px;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.05;
}
.hero-copy p {
  max-width: 920px;
  margin: 0;
  color: #4e555d;
  font-size: 1.03rem;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 24px;
}
.action-card {
  position: relative;
  min-height: 230px;
  padding: 32px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(17, 20, 24, .07);
  overflow: hidden;
}
.action-card::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -55px;
  bottom: -55px;
  border-radius: 50%;
  background: rgba(226, 27, 35, .08);
}
.action-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--soft-red);
  color: var(--valteck-red);
  font-size: 1.5rem;
  font-weight: 900;
}
.action-card h2 { margin: 20px 0 8px; font-size: 1.45rem; }
.action-card p { margin: 0 0 24px; color: var(--muted); max-width: 600px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  border: 0;
  border-radius: 12px;
  min-height: 46px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .65; cursor: wait; transform: none; }
.btn-primary {
  color: #fff;
  background: var(--valteck-red);
  box-shadow: 0 10px 22px rgba(226, 27, 35, .22);
}
.btn-primary:hover { background: var(--valteck-red-dark); }
.btn-dark { color: #fff; background: #161a1f; }
.btn-light { color: #252a30; background: #eceff1; }

.info-strip {
  margin-top: 22px;
  padding: 18px 22px;
  border-left: 4px solid var(--valteck-red);
  border-radius: 12px;
  background: #fff;
  color: #4f565e;
}
.info-strip strong { color: var(--ink); }

.page-card {
  margin-top: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.page-card__head {
  padding: 28px clamp(22px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #fff 0%, #fff 72%, #fff3f3 100%);
}
.page-card__head h1 { margin: 4px 0 6px; font-size: clamp(1.8rem, 3vw, 2.5rem); }
.page-card__head p { margin: 0; color: var(--muted); }

.form-wrap { padding: clamp(22px, 4vw, 44px); }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 24px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label, .legend { font-weight: 800; color: #252a30; }
.req { color: var(--valteck-red); }
.help { margin-top: -3px; font-size: .86rem; color: #7a828b; }

.section-title {
  padding-top: 6px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 900;
  font-size: 1.08rem;
}
.section-title span {
  display: inline-block;
  padding: 0 0 8px;
  border-bottom: 3px solid var(--valteck-red);
}

input[type="text"], input[type="email"], input[type="password"], input[type="date"], select, textarea, input[type="file"] {
  width: 100%;
  border: 1px solid #cfd4da;
  border-radius: 10px;
  background: #fff;
  color: #1e2328;
}
input[type="text"], input[type="email"], input[type="password"], input[type="date"], select {
  height: 46px;
  padding: 0 13px;
}
textarea { min-height: 170px; padding: 13px; resize: vertical; }
input[type="file"] { padding: 9px; }
input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(226, 27, 35, .12);
  border-color: var(--valteck-red);
}
input.invalid { border-color: var(--error); background: var(--error-bg); }

.check-line, .radio-line {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #30363c;
}
.radio-group { display: flex; flex-wrap: wrap; gap: 18px; padding-top: 6px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--valteck-red); width: 18px; height: 18px; }

.notice {
  grid-column: 1 / -1;
  padding: 18px 20px;
  border: 1px solid #f2c3c5;
  background: #fff7f7;
  border-radius: 12px;
}
.notice strong { color: var(--valteck-red-dark); }

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.ticket-box { max-width: 760px; margin: 0 auto; }
.ticket-box .form-grid { grid-template-columns: 1fr; }

.status-message {
  display: none;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  font-weight: 700;
}
.status-message.show { display: block; }
.status-message.ok { color: var(--ok); background: var(--ok-bg); border: 1px solid #b9dfc8; }
.status-message.error { color: var(--error); background: var(--error-bg); border: 1px solid #efb5b8; }
.status-message.info { color: #374151; background: #f7f7f7; border: 1px solid #d8dce0; }

.ticket-result {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafafa;
}
.ticket-result h2 { margin: 0 0 14px; font-size: 1.15rem; }
.ticket-result dl { margin: 0; display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; }
.ticket-result dt { font-weight: 800; }
.ticket-result dd { margin: 0; }

.honeypot {
  position: absolute !important;
  left: -99999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 820px) {
  .site-shell { width: min(100% - 20px, 1440px); margin-top: 10px; }
  .action-grid, .form-grid { grid-template-columns: 1fr; }
  .field.full, .notice, .form-actions, .section-title { grid-column: auto; }
  .action-card { min-height: 0; padding: 24px; }
  .hero-copy { padding: 24px 20px 28px; }
  .form-actions { justify-content: stretch; flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
  .ticket-result dl { grid-template-columns: 1fr; gap: 2px 0; }
  .ticket-result dd { margin-bottom: 10px; }
}

/* Actualización: seguimiento general, recuperación y módulo interno */
.recovery-link { margin: -6px 0 4px; font-size: .92rem; }
.recovery-link a { color: var(--valteck-red-dark); font-weight: 800; }
.public-status-text { margin: 0 0 18px; padding: 16px 18px; border-left: 4px solid var(--valteck-red); background: #fff; border-radius: 10px; color: #343a40; }
.privacy-note { margin: 18px 0 0; font-size: .86rem; color: var(--muted); }

.admin-shell { max-width: 1440px; }
.admin-login-card { max-width: 760px; margin-left: auto; margin-right: auto; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 20px; }
.admin-topbar h1 { margin: 3px 0 0; }
.admin-user { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.admin-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 8px 20px rgba(17,20,24,.05); }
.stat-card strong { display: block; font-size: 1.65rem; }
.stat-card span { display: block; margin-top: 4px; color: var(--muted); font-size: .86rem; }
.admin-filters { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; padding: 22px; border-bottom: 1px solid var(--line); }
.admin-filter-actions { display: flex; align-items: end; gap: 8px; }
.table-wrap { width: 100%; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.admin-table th, .admin-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table th { background: #f7f8f9; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.status-pill { display: inline-block; padding: 6px 9px; border-radius: 999px; background: var(--soft-red); color: var(--valteck-red-dark); font-weight: 800; font-size: .82rem; }
.btn-small { min-height: 36px; padding: 0 12px; font-size: .86rem; }
.admin-history-card { margin-top: 20px; }

@media (max-width: 980px) {
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-filters { grid-template-columns: 1fr; }
  .admin-filter-actions { align-items: stretch; }
  .admin-topbar { align-items: flex-start; flex-direction: column; }
}
.status-pill-ok { background: var(--ok-bg); color: var(--ok); }
.status-pill-error { background: var(--error-bg); color: var(--error); }
.ua-cell { max-width: 420px; overflow-wrap: anywhere; font-size: .82rem; color: var(--muted); }

/* =========================================================
   Registro de denuncia: orden visual por bloques relacionados
   ========================================================= */
.report-form {
  padding-top: 30px;
}

.report-form__sections {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.report-section {
  min-width: 0;
  margin: 0;
  padding: 0 0 28px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.report-section__legend {
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: 1.18rem;
  line-height: 1.3;
  font-weight: 900;
  color: var(--ink);
}

.report-section__legend::after {
  content: "";
  display: block;
  width: 52px;
  height: 3px;
  margin-top: 9px;
  border-radius: 999px;
  background: var(--valteck-red);
}

.report-section__intro {
  margin: 10px 0 20px;
  color: var(--muted);
  font-size: .94rem;
}

.report-section__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 30px;
  align-items: start;
}

.report-section__grid .field.full {
  grid-column: 1 / -1;
}

.report-section__grid textarea.textarea-medium {
  min-height: 135px;
}

.report-final {
  padding: 24px;
  border: 1px solid #ead7d8;
  border-radius: 14px;
  background: #fffafa;
}

.report-final h2 {
  margin: 0 0 16px;
  font-size: 1.12rem;
}

.report-final .notice {
  margin: 0;
}

.terms-line {
  margin-top: 18px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  font-weight: 800;
}

.report-final .form-actions {
  margin-top: 20px;
  padding-top: 0;
}

/* El campo antispam nunca debe ocupar espacio visual en el formulario. */
form .honeypot {
  position: fixed !important;
  left: -10000px !important;
  top: 0 !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 820px) {
  .report-form__sections { gap: 22px; }
  .report-section { padding-bottom: 24px; }
  .report-section__grid { grid-template-columns: 1fr; gap: 18px; }
  .report-section__grid .field.full { grid-column: auto; }
  .report-final { padding: 18px; }
}

/* =========================================================
   Ayudas contextuales del formulario (solo campos definidos)
   ========================================================= */

/* Respeta siempre el atributo HTML hidden, incluso en elementos .field
   que normalmente usan display:flex. */
[hidden] {
  display: none !important;
}

.label-with-help {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.label-with-help > label {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
}

.info-help {
  /* El botón queda dentro del ancho del campo; el tooltip se posiciona
     respecto de .label-with-help para que no se salga del formulario. */
  position: static;
  display: inline-flex;
  flex: 0 0 auto;
  z-index: 20;
}

.info-help__button {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #aeb5bd;
  border-radius: 50%;
  background: #fff;
  color: #343a40;
  font: 800 13px/20px Arial, sans-serif;
  text-align: center;
  cursor: pointer;
}

.info-help__button:hover,
.info-help__button:focus-visible,
.info-help.is-open .info-help__button {
  border-color: var(--valteck-red);
  color: var(--valteck-red);
  outline: none;
  box-shadow: 0 0 0 3px rgba(226, 27, 35, .10);
}

.info-tooltip {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  width: min(520px, 100%);
  max-width: 100%;
  padding: 15px 16px;
  border: 1px solid #d9dde2;
  border-radius: 10px;
  background: #fff;
  color: #2b3036;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .16);
  font-size: .84rem;
  font-weight: 400;
  line-height: 1.45;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
  z-index: 100;
}

.info-tooltip::after {
  content: "";
  position: absolute;
  left: 18px;
  bottom: 100%;
  width: 10px;
  height: 10px;
  background: #fff;
  border-left: 1px solid #d9dde2;
  border-top: 1px solid #d9dde2;
  transform: translateY(5px) rotate(45deg);
}

.info-help:hover .info-tooltip,
.info-help:focus-within .info-tooltip,
.info-help.is-open .info-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.info-tooltip strong {
  color: var(--ink);
}

@media (max-width: 720px) {
  .label-with-help {
    align-items: flex-start;
  }

  .info-help__button {
    margin-top: 1px;
  }

  .info-tooltip {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 88px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    transform: translateY(4px);
  }

  .info-help:hover .info-tooltip,
  .info-help:focus-within .info-tooltip,
  .info-help.is-open .info-tooltip {
    transform: translateY(0);
  }

  .info-tooltip::after { display: none; }
}


/* ===== Pie de página Canal de Denuncias ===== */
.canal-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 26px auto 18px;
  padding: 14px 16px 0;
  text-align: center;
  color: #6f7379;
  font-size: 13px;
  line-height: 1.45;
}

.canal-footer p {
  margin: 0;
}

.canal-footer strong {
  color: #3f4247;
  font-weight: 700;
}

.canal-footer__credit {
  margin-top: 3px !important;
  font-size: 10px;
  color: #8a8d92;
}

@media (max-width: 600px) {
  .canal-footer {
    width: calc(100% - 24px);
    margin-top: 20px;
    font-size: 12px;
  }

  .canal-footer__credit {
    font-size: 9px;
  }
}
