*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fbfbfc;
  color: #1a1a1e;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  line-height: 1.5;
}
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
a { color: #4a3ba8; }
a:hover { color: #372a86; }
img { max-width: 100%; }

/* ─── chrome interno ─── */
.top {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 11px 20px; background: #ffffff; border-bottom: 1px solid #e3e3e7;
}
.top .marca { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.top .sub { font-size: 12.5px; color: #6a6a73; }
.top nav { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.top nav a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px;
  font-size: 13px; color: #3e3e45; text-decoration: none;
  background: #ffffff; border: 1px solid #e3e3e7; border-radius: 8px;
}
.top nav a:hover { background: #f5f5f6; }
.top nav a.on { color: #ffffff; background: #5a4bc4; border-color: #5a4bc4; }
.wrap { max-width: 1400px; margin: 0 auto; padding: 18px 20px 60px; }
.wrap-angosto { max-width: 560px; margin: 0 auto; padding: 22px 18px 60px; }

/* ─── tarjetas y tipografía ─── */
.card {
  display: flex; flex-direction: column; gap: 11px;
  padding: 14px; background: #ffffff;
  border: 1px solid #e3e3e7; border-radius: 11px;
  box-shadow: 0 1px 2px rgba(22,24,44,0.04);
}
.card h2, .card h3 { margin: 0; font-weight: 500; }
.card h2 { font-size: 15px; padding-bottom: 10px; border-bottom: 1px solid #ededf0; }
h1 { margin: 0; font-size: 24px; font-weight: 500; letter-spacing: -0.02em; }
.mut { color: #6a6a73; }
.mini { font-size: 11.5px; color: #6f6f79; }
.fila { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.grid { display: grid; gap: 10px; }

/* ─── formularios ─── */
label { display: block; font-size: 12.5px; color: #585860; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=date],
input[type=password], input[type=url], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px;
  font: inherit; font-size: 15px; color: #1a1a1e;
  background: #ffffff; border: 1px solid #c9c9d0; border-radius: 9px;
}
textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid #5a4bc4; outline-offset: 2px;
}
.campo { margin-bottom: 14px; }
.ayuda { margin-top: 5px; font-size: 12px; line-height: 1.45; color: #6f6f79; }

/* ─── botones ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 0 16px; font: inherit; font-size: 14px; font-weight: 500;
  color: #3e3e45; background: #ffffff; border: 1px solid #c9c9d0; border-radius: 9px;
  cursor: pointer; text-decoration: none;
}
.btn:hover { background: #f5f5f6; }
.btn-primario { color: #ffffff; background: #111111; border-color: #111111; }
.btn-primario:hover { background: #2e2e2e; }
.btn-verde { color: #ffffff; background: #0f7a56; border-color: #0f7a56; }
.btn-verde:hover { background: #0c6247; }
.btn-morado { color: #ffffff; background: #5a4bc4; border-color: #5a4bc4; }
.btn-rojo { color: #ffffff; background: #c02333; border-color: #c02333; }
.btn-rosa { color: #ffffff; background: #a33489; border-color: #a33489; }
.btn:disabled, .btn[aria-disabled=true] { opacity: 0.45; cursor: not-allowed; }
.btn-chico { min-height: 34px; padding: 0 12px; font-size: 12.5px; }
.btn-ancho { width: 100%; }

/* ─── etiquetas ─── */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; font-size: 11.5px; border-radius: 7px; white-space: nowrap;
}

/* ─── avisos ─── */
.aviso { display: flex; gap: 10px; padding: 12px 13px; font-size: 13px; line-height: 1.5; border-radius: 10px; }
.aviso-gris  { background: #f5f5f6; color: #585860; }
.aviso-ambar { background: #fdf1de; color: #7d5210; }
.aviso-verde { background: #e4f6ee; color: #0c6247; }
.aviso-rosa  { background: #fbeaf5; color: #8a2472; }
.aviso-rojo  { background: #fdeaec; color: #8f1522; }

/* ─── cola de casos ─── */
.cola { display: flex; flex-direction: column; gap: 7px; }
.reng {
  display: flex; gap: 10px; align-items: center; padding: 10px 12px;
  text-decoration: none; color: inherit;
  border: 1px solid #e3e3e7; border-left-width: 5px; border-radius: 9px; background: #ffffff;
}
.reng:hover { background: #f8f8fa; color: inherit; }
.reng .folio { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.embudo { display: flex; gap: 7px; flex-wrap: wrap; }
.paso {
  display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 132px;
  padding: 10px 12px; text-decoration: none; color: inherit;
  background: #ffffff; border: 1px solid #e3e3e7; border-left: 4px solid #c9c9d0; border-radius: 10px;
}
.paso:hover { background: #f8f8fa; color: inherit; }
.paso .n { font-size: 28px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; }
.barra { height: 4px; border-radius: 3px; }

/* ─── tablas de datos ─── */
.datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 10px; }
.dato { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dato .k { font-size: 10.5px; letter-spacing: 0.04em; color: #6f6f79; }
.dato .v {
  display: flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 10px;
  font-size: 13px; color: #3e3e45; background: #f5f5f6;
  border: 1px solid #e7e7ea; border-radius: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ─── bitácora ─── */
.bit { display: flex; gap: 10px; }
.bit .linea { display: flex; flex-direction: column; align-items: center; padding-top: 5px; }
.bit .punto { width: 8px; height: 8px; border-radius: 50%; background: #b4b8c7; }
.bit .hilo { flex: 1; width: 1px; margin-top: 3px; background: #e3e3e7; }
.bit .cuerpo { flex: 1; padding-bottom: 14px; }

/* ─── evidencia ─── */
.evidencia { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.evidencia a { display: block; text-decoration: none; }
.evidencia img { width: 100%; height: 118px; object-fit: cover; border-radius: 9px; border: 1px solid #e3e3e7; }
.evidencia .arch {
  display: flex; align-items: center; justify-content: center; height: 118px;
  font-size: 12.5px; color: #3e3e45; background: #f5f5f6; border: 1px solid #e3e3e7; border-radius: 9px;
}

/* ─── cliente (móvil primero) ─── */
.opcion {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 13px; margin-bottom: 8px; font: inherit; font-size: 15px; text-align: left;
  color: #1a1a1e; background: #ffffff; border: 1px solid #c9c9d0; border-radius: 11px; cursor: pointer;
}
.opcion:hover { background: #f7f7f8; }
.opcion.sel { border-color: #111111; background: #f1f1f1; }
.paso-form { display: none; }
.paso-form.activo { display: block; }
.pasos-guia { display: flex; gap: 6px; margin-bottom: 18px; }
.pasos-guia span { flex: 1; height: 4px; border-radius: 2px; background: #e3e3e7; }
.pasos-guia span.on { background: #111111; }
.pasos-guia span.done { background: #0f7a56; }

@media (max-width: 720px) {
  .wrap { padding: 14px 13px 50px; }
  .datos { grid-template-columns: 1fr 1fr; }
  .top { padding: 10px 13px; }
}

/* ─── cara pública: negro, sin morado ─── */
body.cliente a:not(.btn) { color: #111111; }
body.cliente a:not(.btn):hover { color: #2e2e2e; }
body.cliente a.btn-primario, body.cliente .btn-primario { color: #ffffff; }
body.cliente input:focus-visible, body.cliente select:focus-visible, body.cliente textarea:focus-visible,
body.cliente button:focus-visible, body.cliente a:focus-visible { outline-color: #111111; }
body.cliente input, body.cliente select, body.cliente textarea { accent-color: #111111; }
body.cliente .btn:active, body.cliente .btn-primario:active { background: #2e2e2e; border-color: #2e2e2e; color: #ffffff; }
body.cliente .opcion:active { background: #e4e4e4; }
body.cliente .opcion.sel { border-color: #111111; background: #f1f1f1; }
body.cliente input[type=radio], body.cliente input[type=checkbox] { width: 18px; height: 18px; accent-color: #111111; }
body.cliente .aviso-gris { background: #f1f1f1; }

/* ─── interno ─── */
body.interno input, body.interno select, body.interno textarea { accent-color: #5a4bc4; }
body.interno input[type=radio], body.interno input[type=checkbox] { width: 17px; height: 17px; }
.opcion.sel { border-color: #5a4bc4; background: #f1f0f5; }
.btn:active { filter: brightness(0.94); }
