* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", sans-serif;
  font-size: 13px;
  color: #201f1e;
  background: #ffffff;
  padding: 12px;
}

/* ── Panel carga ── */
#panelCarga { display: block; }
.carga-bloque {
  text-align: center;
  padding: 40px 16px;
}
.carga-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #deecf9;
  border-top-color: #0f4c81;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.carga-texto    { font-size: 13px; color: #605e5c; margin-bottom: 6px; }
.carga-subtexto { font-size: 11px; color: #a19f9d; line-height: 1.5; }

/* ── Checks de test.html ── */
.test-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #f3f2f1;
  font-size: 13px;
}
.test-icono      { font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; }
.test-ok         { color: #107c10; }
.test-fail       { color: #a4262c; }
.test-check a    { color: #0f4c81; }

/* ── Panel test (solo navegador) ── */
.test-bloque {
  padding: 14px;
  font-size: 12px;
  line-height: 1.6;
  color: #201f1e;
}
.test-ok {
  color: #107c10;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
}
.test-bloque p  { margin-bottom: 6px; }
.test-bloque hr { border: none; border-top: 1px solid #edebe9; margin: 12px 0; }
.test-fila {
  font-size: 11px;
  color: #605e5c;
  margin-bottom: 4px;
  word-break: break-all;
}
.test-fila strong { color: #201f1e; }

/* ── Cabecera ── */
.header {
  background: #0f4c81;
  color: #ffffff;
  padding: 10px 12px;
  margin: -12px -12px 14px -12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-titulo { font-size: 15px; font-weight: 600; }
.header-btn {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  font-size: 15px;
  padding: 2px 4px;
  opacity: 0.8;
}
.header-btn:hover { opacity: 1; }

/* ── Datos del correo ── */
.correo-info {
  background: #f3f2f1;
  border-left: 3px solid #0f4c81;
  padding: 6px 10px;
  margin-bottom: 8px;
  border-radius: 2px;
}
.correo-info .label {
  font-size: 10px;
  color: #605e5c;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.correo-info .valor {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Sección ── */
.seccion { margin-bottom: 12px; }
.seccion-titulo {
  font-size: 10px;
  font-weight: 600;
  color: #605e5c;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

/* ── Inputs ── */
input[type="text"] {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #c8c6c4;
  border-radius: 2px;
  font-size: 13px;
  font-family: "Segoe UI", sans-serif;
  margin-bottom: 6px;
}
input[type="text"]:focus { outline: none; border-color: #0f4c81; }

/* ── Botones ── */
.btn {
  width: 100%;
  padding: 7px 12px;
  border: none;
  border-radius: 2px;
  font-size: 13px;
  font-family: "Segoe UI", sans-serif;
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 6px;
}
.btn-primary            { background: #0f4c81; color: #ffffff; }
.btn-primary:hover      { background: #0d3f6b; }
.btn-primary:disabled   { background: #c8c6c4; cursor: default; }
.btn-secondary          { background: #ffffff; color: #0f4c81; border: 1px solid #0f4c81; }
.btn-secondary:hover    { background: #f0f4f9; }
.btn-secondary:disabled { color: #c8c6c4; border-color: #c8c6c4; cursor: default; }

/* ── Resultado expediente ── */
#resultadoExpediente {
  background: #f3f2f1;
  border: 1px solid #c8c6c4;
  border-radius: 2px;
  padding: 8px 10px;
  margin-bottom: 10px;
  display: none;
}
.exp-nombre  { font-weight: 600; margin-bottom: 2px; }
.exp-detalle { font-size: 11px; color: #605e5c; }

/* ── Mensajes de estado ── */
.estado {
  padding: 7px 10px;
  border-radius: 2px;
  font-size: 12px;
  display: none;
  margin-top: 6px;
}
.estado-ok    { background: #dff6dd; color: #107c10; border: 1px solid #107c10; }
.estado-error { background: #fde7e9; color: #a4262c; border: 1px solid #a4262c; }
.estado-info  { background: #deecf9; color: #0f4c81; border: 1px solid #0f4c81; }

/* ── Panel info ── */
.info-fila {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
  padding: 6px 10px;
  background: #f3f2f1;
  border-radius: 2px;
}
.info-label {
  font-size: 10px;
  color: #605e5c;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.info-valor {
  font-size: 12px;
  font-weight: 600;
  word-break: break-all;
}
.info-nota {
  font-size: 11px;
  color: #605e5c;
  line-height: 1.4;
  margin-top: 10px;
}

/* ── Panel error ── */
.error-bloque {
  text-align: center;
  padding: 30px 16px;
}
.error-icono    { font-size: 36px; margin-bottom: 12px; color: #a4262c; }
.error-texto    { font-size: 13px; color: #201f1e; margin-bottom: 12px; line-height: 1.5; }
.error-contacto { font-size: 12px; color: #0f4c81; font-weight: 600; }

/* ── Fila referencia + botón inline ── */
.ref-fila {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}
.ref-fila input {
  flex: 1;
  margin-bottom: 0;
}
.btn-ref {
  flex-shrink: 0;
  width: 32px;
  background: #0f4c81;
  color: #fff;
  border: none;
  border-radius: 2px;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
}
.btn-ref:hover { background: #0d3f6b; }

/* ── Lista de expedientes ── */
.lista-resultados {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid #c8c6c4;
  border-radius: 2px;
}
.lista-item {
  padding: 8px 10px;
  border-bottom: 1px solid #edebe9;
  cursor: pointer;
}
.lista-item:last-child { border-bottom: none; }
.lista-item:hover { background: #f0f4f9; }
.lista-ref  { font-size: 12px; font-weight: 600; color: #0f4c81; }
.lista-desc { font-size: 11px; color: #605e5c; margin-top: 2px;
              white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
